filecat 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 445.bundle.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[445],{7481:(t,e,r)=>{r.d(e,{S:()=>i,X:()=>a});var n=r(6540);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}function a(t){var e,r,a,i=(r=n.useState([]),a=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(r,a)||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}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=i[0],u=i[1];return(0,n.useEffect)((function(){t.children?u(Array.isArray(t.children)?t.children:[t.children]):u(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,c.map((function(e,r){return n.createElement("tr",{key:r},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===c.length-1?"small":""},e)})))}))))}function i(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},7445:(t,e,r)=>{r.r(e),r.d(e,{default:()=>W});var n=r(6540),o=r(5725),a=r(447),i=r(5997),c=r(7481),u=r(3033),l=r(9653),f=r(3459),s=r(2726),h=r(3413),p=r.n(h),y=r(2389),d=r(7952),m=r(5421),v=r(7444),g=r(6417),b=r(2042);function w(t){return w="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},w(t)}function E(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(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 x(){x=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:_(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(T([])));L&&L!==r&&n.call(L,i)&&(E=L);var k=b.prototype=v.prototype=Object.create(E);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==w(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=j(c,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===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(w(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},A(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.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),P(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;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=O(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function k(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){L(a,n,o,i,c,"next",t)}function c(t){L(a,n,o,i,c,"throw",t)}i(void 0)}))}}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}function _(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}function j(t){var e=(0,y.Bd)().t,r=A((0,n.useState)([]),2),h=r[0],w=r[1],L=A((0,n.useState)([]),2),O=L[0],_=L[1],j=A((0,n.useState)(""),2),I=j[0],P=j[1],C=A((0,n.useState)(""),2),T=C[0],N=C[1],F=A((0,n.useState)(!1),2),G=F[0],H=F[1],Z=A((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=A((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){k(x().mark((function t(){var e,r,n,o,a,i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/dnspod");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=S(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),_(o),r.account&&(P(r.account.id),N(r.account.token)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var B=function(){var t=k(x().mark((function t(){var e,r,n,o,a,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!G||I&&T){t.next=3;break}return new(p())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(E(h),E(O));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={id:I,token:T},e.isOpen=G,e.ddnsType=s.E2.dnspod,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=k(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=k(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},O.length>0&&O.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:B})},n.createElement(u.Sm,{placeholder:"ID",value:I,handleInputChange:function(t){P(t)}}),n.createElement(u.Sm,{placeholder:"TOKEN",value:T,handleInputChange:function(t){N(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:G,onchange:function(){H(!G)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!G,onchange:function(){H(!G)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function I(t){return I="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},I(t)}function P(t){return function(t){if(Array.isArray(t))return Z(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||H(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 C(){C=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:A(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var w={};l(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==r&&n.call(x,i)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==I(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function A(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,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===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(I(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(S),l(S,u,"Generator"),l(S,i,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=H(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function N(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function F(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){N(a,n,o,i,c,"next",t)}function c(t){N(a,n,o,i,c,"throw",t)}i(void 0)}))}}function G(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||H(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t,e){if(t){if("string"==typeof t)return Z(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)?Z(t,e):void 0}}function Z(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}function U(t){var e=(0,y.Bd)().t,r=G((0,n.useState)([]),2),h=r[0],w=r[1],E=G((0,n.useState)([]),2),x=E[0],S=E[1],L=G((0,n.useState)(""),2),k=L[0],A=L[1],O=G((0,n.useState)(""),2),_=O[0],j=O[1],I=G((0,n.useState)(!1),2),N=I[0],H=I[1],Z=G((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=G((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){F(C().mark((function t(){var e,r,n,o,a,i,c;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/tx");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=T(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),S(o),r.account&&(A(r.account.secretid),j(r.account.secretkey)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var B=function(){var t=F(C().mark((function t(){var e,r,n,o,a,i;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!N||k&&_){t.next=3;break}return new(p())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(P(h),P(x));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={secretid:k,secretkey:_},e.isOpen=N,e.ddnsType=s.E2.tengxun,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=F(C().mark((function t(e){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=F(C().mark((function t(){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},x.length>0&&x.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){D(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:B})},n.createElement(u.Sm,{placeholder:"SecretId",value:k,handleInputChange:function(t){A(t)}}),n.createElement(u.Sm,{placeholder:"SecretKey",value:_,handleInputChange:function(t){j(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:N,onchange:function(){H(!N)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!N,onchange:function(){H(!N)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function W(){var t=(0,y.Bd)().t,e=[{index:1,name:"dnspod(".concat(t("腾讯"),")"),rto:"dnspod/"},{index:2,name:"".concat(t("腾讯")).concat(t("云")),rto:"tengxun/"}];return n.createElement(o.W1,{optionList:e},n.createElement(j,null),n.createElement(U,null))}}}]);