w-dwdata-tweqod 1.0.14 → 1.0.16
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.
- package/README.md +2 -2
- package/_taskCpActualSrc/fpHash.json +1 -0
- package/dist/w-dwdata-tweqod.umd.js +2 -2
- package/dist/w-dwdata-tweqod.umd.js.map +1 -1
- package/docs/WDwdataTweqod.mjs.html +14 -3
- package/docs/global.html +43 -3
- package/docs/index.html +1 -1
- package/g.mjs +2 -2
- package/package.json +2 -2
- package/src/WDwdataTweqod.mjs +13 -2
- package/test/WDwdataTweqod.test.mjs +4 -4
package/README.md
CHANGED
|
@@ -66,9 +66,9 @@ ev.on('change', (msg) => {
|
|
|
66
66
|
})
|
|
67
67
|
// change { event: 'start', msg: 'running...' }
|
|
68
68
|
// change { event: 'proc-callfun-download', msg: 'start...' }
|
|
69
|
-
// change { event: 'proc-callfun-download', msg: 'done' }
|
|
69
|
+
// change { event: 'proc-callfun-download', num: 2, msg: 'done' }
|
|
70
70
|
// change { event: 'proc-callfun-getCurrent', msg: 'start...' }
|
|
71
|
-
// change { event: 'proc-callfun-getCurrent', msg: 'done' }
|
|
71
|
+
// change { event: 'proc-callfun-getCurrent', num: 0, msg: 'done' }
|
|
72
72
|
// change { event: 'compare', msg: 'start...' }
|
|
73
73
|
// change { event: 'compare', msg: 'done' }
|
|
74
74
|
// change { event: 'proc-add-callfun-add', id: '114101', msg: 'start...' }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"114115":"eyJpZCI6IjExNDExNSIsImhhc2giOiIxNjQzNWU1OGVmZjVlZTFjIn0=","114116":"eyJpZCI6IjExNDExNiIsImhhc2giOiI0Mjk0YWIxMjg0ODBkMGE4In0="}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-dwdata-tweqod v1.0.
|
|
2
|
+
* w-dwdata-tweqod v1.0.16
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("xxhash-wasm"),require("events"),require("chokidar"),require("url"),require("pino")):"function"==typeof define&&define.amd?define(["fs","path","xxhash-wasm","events","chokidar","url","pino"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweqod"]=t(e.fs,e.path,e["xxhash-wasm"],e.events,e.chokidar,e.url,e.pino)}(this,function(e,t,r,n,o,i,s){"use strict";var a="undefined"!=typeof document?document.currentScript:null,c=Array.isArray,u="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function("return this")(),d=f.Symbol,p=Object.prototype,h=p.hasOwnProperty,y=p.toString,m=d?d.toStringTag:void 0;var g=Object.prototype.toString;var v=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":v&&v in Object(e)?function(e){var t=h.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=y.call(e);return n&&(t?e[m]=r:delete e[m]),o}(e):function(e){return g.call(e)}(e)}function w(e){return null!=e&&"object"==typeof e}function S(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==b(e)}var _=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;function j(e,t){if(c(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!S(e))||(O.test(e)||!_.test(e)||null!=t&&e in Object(t))}function E(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function R(e){if(!E(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var A,x=f["__core-js_shared__"],T=(A=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var k=Function.prototype.toString;function $(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var C=/^\[object .+?Constructor\]$/,D=Function.prototype,N=Object.prototype,P=D.toString,M=N.hasOwnProperty,F=RegExp("^"+P.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function L(e){return!(!E(e)||(t=e,T&&T in t))&&(R(e)?F:C).test($(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return L(r)?r:void 0}var B=U(Object,"create");var I=Object.prototype.hasOwnProperty;var q=Object.prototype.hasOwnProperty;function z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function H(e,t){return e===t||e!=e&&t!=t}function J(e,t){for(var r=e.length;r--;)if(H(e[r][0],t))return r;return-1}z.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return I.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:q.call(t,e)},z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};var W=Array.prototype.splice;function Y(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,r=J(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,r=J(t,e);return r<0?void 0:t[r][1]},Y.prototype.has=function(e){return J(this.__data__,e)>-1},Y.prototype.set=function(e,t){var r=this.__data__,n=J(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var V=U(f,"Map");function K(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function G(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||Y),string:new z}},G.prototype.delete=function(e){var t=K(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return K(this,e).get(e)},G.prototype.has=function(e){return K(this,e).has(e)},G.prototype.set=function(e,t){var r=K(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Z(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Z.Cache||G),r}Z.Cache=G;var X,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/\\(\\)?/g,ne=(X=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,o){t.push(n?o.replace(re,"$1"):r||e)}),t},Q=Z(X,function(e){return 500===ee.size&&ee.clear(),e}),ee=Q.cache,Q),oe=ne;function ie(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var se=d?d.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(c(e))return ie(e,ce)+"";if(S(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ue(e){return null==e?"":ce(e)}function le(e,t){return c(e)?e:j(e,t)?[e]:oe(ue(e))}function fe(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function de(e,t){for(var r=0,n=(t=le(t,e)).length;null!=e&&r<n;)e=e[fe(t[r++])];return r&&r==n?e:void 0}function pe(e,t,r){var n=null==e?void 0:de(e,t);return void 0===n?r:n}function he(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var ye,me=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[ye?s:++n];if(!1===t(o[a],a,o))break}return e};function ge(e){return w(e)&&"[object Arguments]"==b(e)}var ve=Object.prototype,be=ve.hasOwnProperty,we=ve.propertyIsEnumerable,Se=ge(function(){return arguments}())?ge:function(e){return w(e)&&be.call(e,"callee")&&!we.call(e,"callee")},_e=Se;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=je&&je.exports===Oe?f.Buffer:void 0,Re=(Ee?Ee.isBuffer:void 0)||function(){return!1},Ae=/^(?:0|[1-9]\d*)$/;function xe(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ce=$e&&"object"==typeof module&&module&&!module.nodeType&&module,De=Ce&&Ce.exports===$e&&u.process,Ne=function(){try{var e=Ce&&Ce.require&&Ce.require("util").types;return e||De&&De.binding&&De.binding("util")}catch(e){}}(),Pe=Ne&&Ne.isTypedArray,Me=Pe?function(e){return function(t){return e(t)}}(Pe):function(e){return w(e)&&Te(e.length)&&!!ke[b(e)]},Fe=Me,Le=Object.prototype.hasOwnProperty;function Ue(e,t){var r=c(e),n=!r&&_e(e),o=!r&&!n&&Re(e),i=!r&&!n&&!o&&Fe(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var l in e)!t&&!Le.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||xe(l,u))||a.push(l);return a}var Be=Object.prototype;function Ie(e,t){return function(r){return e(t(r))}}var qe=Ie(Object.keys,Object),ze=Object.prototype.hasOwnProperty;function He(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Be))return qe(e);var t,r,n=[];for(var o in Object(e))ze.call(e,o)&&"constructor"!=o&&n.push(o);return n}function Je(e){return null!=e&&Te(e.length)&&!R(e)}function We(e){return Je(e)?Ue(e):He(e)}var Ye=function(e,t){return function(r,n){if(null==r)return r;if(!Je(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(function(e,t){return e&&me(e,t,We)}),Ve=Ye;function Ke(e){return e}function Ge(e,t){var r;return(c(e)?he:Ve)(e,"function"==typeof(r=t)?r:Ke)}var Ze=Array.prototype.reverse;function Xe(e){return null==e?[]:function(e,t){return ie(t,function(t){return e[t]})}(e,We(e))}function Qe(e){return!0===(t=e)||!1===t||w(t)&&"[object Boolean]"==b(t);var t}function et(e){return"[object String]"===Object.prototype.toString.call(e)}function tt(e){return!(!et(e)||""===e)}function rt(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function nt(e){let t,r=Object.prototype.toString.call(e);if(t="[object Promise]"===r,t)return!0;if("[object Function]"!==r)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}function ot(e){return"[object Object]"===Object.prototype.toString.call(e)}function it(e){return e!=e}function st(e){let t=!1;if(tt(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(it(e))return!1;t=!0}return t}function at(e,t){return!!ot(e)&&(!(!tt(t)&&!st(t))&&t in e)}var ct=/\s/;var ut=/^\s+/;function lt(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&ct.test(e.charAt(t)););return t}(e)+1).replace(ut,""):e}var ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,pt=/^0o[0-7]+$/i,ht=parseInt;function yt(e){if("number"==typeof e)return e;if(S(e))return NaN;if(E(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=E(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=lt(e);var r=dt.test(e);return r||pt.test(e)?ht(e.slice(2),r?2:8):ft.test(e)?NaN:+e}var mt=1/0;function gt(e){return e?(e=yt(e))===mt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vt(e){var t=gt(e),r=t%1;return t==t?r?t-r:t:0}function bt(e,t,r){var n=null==e?0:e.length;return n?function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(e,(t=r||void 0===t?1:vt(t))<0?0:t,n):[]}function wt(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function St(e){return"[object Array]"===Object.prototype.toString.call(e)}function _t(e,t){let r=wt();if(!St(e)&&!ot(e))return r.reject("rs is not an array or object"),r;let n=!1;if(ot(e)){n=!0;let t=[];Ge(e,(e,r)=>{t.push({k:r,v:e})}),e=t}rt(t)||(t=function(e){return e});let o=-1,i=[];return e.reduce(function(e,r){return e.then(function(e){i.push(e),o+=1;let s=o,a=r;return n&&(s=r.k,a=r.v),rt(t)?t(a,s):a})},Promise.resolve()).then(function(e){i.push(e),i=bt(i),r.resolve(i)}).catch(function(e){r.reject(e)}),r}function Ot(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function jt(t){return Ot(t,{fs:e})}function Et(e,t={}){let r=pe(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Rt(e,t={}){let r=pe(t,"fs");if(Ot(e,{fs:r}))return{success:"input folder is already exists: "+e};if(r.existsSync(e))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function At(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");Qe(i)||(i=!0);let s="";return s=i?function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Et(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{Rt(n.dirname(t),{fs:o}),o.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Et(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{Rt(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),s=o.createWriteStream(t);i.on("error",n),s.on("error",n),s.on("finish",r),i.pipe(s)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),s}function xt(r,n,o={}){return At(r,n,{path:t,fs:e,...o})}function Tt(r){return function(e,t={}){let r=pe(t,"path"),n=pe(t,"fs");if(!n.existsSync(e)){let t=Rt(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!Ot(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let o of t){let t=r.join(e,o);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}(r,{path:t,fs:e})}function kt(t){return Rt(t,{fs:e})}function $t(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Ot(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),s=n.resolve(t,r),a=o.lstatSync(i);if(a.isDirectory())Rt(s,{fs:o}),$t(i,s,{path:n,fs:o});else if(a.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,s)}else Rt(n.dirname(s),{fs:o}),o.copyFileSync(i,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function Ct(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");Qe(i)||(i=!0);let s="";return s=i?$t(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Ot(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),c=o.lstatSync(r);if(c.isDirectory())Rt(a,{fs:o}),await i(r,a);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,a)}else Rt(n.dirname(a),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(a);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},s=null;return await i(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:o}),s}function Dt(r,n,o={}){return Ct(r,n,{path:t,fs:e,...o})}function Nt(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!Ot(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}(t,{fs:e})}function Pt(r,n=1){return function(e,t=1,r={}){let n=1,o=pe(r,"path"),i=pe(r,"fs");if(!Ot(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return Ot(r,{fs:i})?(Ge(i.readdirSync(r),function(a){let c=o.resolve(r,a),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(s.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(c))),n-=1):s.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),s):s}(e)}(r,n,{path:t,fs:e})}function Mt(e){if(!st(e))return 0;return gt(e)}function Ft(t,n={}){return async function(e,t={}){let n=pe(t,"fs"),o=pe(t,"chunkSize");if(st(o)||(o=67108864),o=Mt(o),!Et(e,{fs:n}))return Promise.reject("fp is not a file");let i=wt();try{let{create64:t}=await r(),s=t(),a=n.createReadStream(e,{highWaterMark:o});a.on("data",e=>{s.update(e)}),a.on("end",()=>{let e=s.digest().toString(16).padStart(16,"0");i.resolve(e)}),a.on("error",i.reject)}catch(e){i.reject(e.toString())}return i}(t,{fs:e,...n})}var Lt=U(f,"DataView"),Ut=U(f,"Promise"),Bt=U(f,"Set"),It=U(f,"WeakMap"),qt="[object Map]",zt="[object Promise]",Ht="[object Set]",Jt="[object WeakMap]",Wt="[object DataView]",Yt=$(Lt),Vt=$(V),Kt=$(Ut),Gt=$(Bt),Zt=$(It),Xt=b;(Lt&&Xt(new Lt(new ArrayBuffer(1)))!=Wt||V&&Xt(new V)!=qt||Ut&&Xt(Ut.resolve())!=zt||Bt&&Xt(new Bt)!=Ht||It&&Xt(new It)!=Jt)&&(Xt=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?$(r):"";if(n)switch(n){case Yt:return Wt;case Vt:return qt;case Kt:return zt;case Gt:return Ht;case Zt:return Jt}return t});var Qt=Xt;function er(e){return function(t){return null==t?void 0:t[e]}}var tr=er("length"),rr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var nr="\\ud800-\\udfff",or="["+nr+"]",ir="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",sr="\\ud83c[\\udffb-\\udfff]",ar="[^"+nr+"]",cr="(?:\\ud83c[\\udde6-\\uddff]){2}",ur="[\\ud800-\\udbff][\\udc00-\\udfff]",lr="(?:"+ir+"|"+sr+")"+"?",fr="[\\ufe0e\\ufe0f]?",dr=fr+lr+("(?:\\u200d(?:"+[ar,cr,ur].join("|")+")"+fr+lr+")*"),pr="(?:"+[ar+ir+"?",ir,cr,ur,or].join("|")+")",hr=RegExp(sr+"(?="+sr+")|"+pr+dr,"g");function yr(e){return function(e){return rr.test(e)}(e)?function(e){for(var t=hr.lastIndex=0;hr.test(e);)++t;return t}(e):tr(e)}function mr(e){if(null==e)return 0;if(Je(e))return"string"==typeof(t=e)||!c(t)&&w(t)&&"[object String]"==b(t)?yr(e):e.length;var t,r=Qt(e);return"[object Map]"==r||"[object Set]"==r?e.size:He(e).length}function gr(e){if(ot(e)){for(let t in e)return!0;return!1}return!1}function vr(e){return!!st(e)&&(e=Mt(e),"number"==typeof(t=e)&&t==vt(t));var t}var br=f.isFinite,wr=Math.min;var Sr=function(e){var t=Math[e];return function(e,r){if(e=yt(e),(r=null==r?0:wr(vt(r),292))&&br(e)){var n=(ue(e)+"e").split("e");return+((n=(ue(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),_r=Sr;function Or(e){if(!st(e))return 0;e=Mt(e);let t=_r(e);return"0"===String(t)?0:t}function jr(e){if(!vr(e))return!1;return Or(e)>=0}var Er="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ar(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var xr={exports:{}};var Tr,kr={exports:{}},$r=Ar(Object.freeze({__proto__:null,default:{}}));function Cr(){return Tr||(Tr=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==Er&&Er.crypto&&(r=Er.crypto),!r)try{r=$r}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},s=i.lib={},a=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}});var h=i.algo={};return i}(Math),t)}(kr)),kr.exports}!function(e){e.exports=Cr().enc.Utf8}(xr);var Dr=Rr(xr.exports),Nr={exports:{}};!function(e){var t;e.exports=(t=Cr(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=a<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var s=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Nr);var Pr=Rr(Nr.exports);function Mr(e){if(!tt(e))return"";let t=Dr.parse(e);return Pr.stringify(t)}function Fr(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Lr(e,t){var r=[];return Ve(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Ur(e){var t=this.__data__=new Y(e);this.size=t.size}Ur.prototype.clear=function(){this.__data__=new Y,this.size=0},Ur.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ur.prototype.get=function(e){return this.__data__.get(e)},Ur.prototype.has=function(e){return this.__data__.has(e)},Ur.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};function Br(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new G;++t<r;)this.add(e[t])}function Ir(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function qr(e,t){return e.has(t)}Br.prototype.add=Br.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Br.prototype.has=function(e){return this.__data__.has(e)};function zr(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,p=2&r?new Br:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var h=e[f],y=t[f];if(n)var m=s?n(y,h,f,t,e,i):n(h,y,f,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!Ir(t,function(e,t){if(!qr(p,t)&&(h===e||o(h,e,r,n,i)))return p.push(t)})){d=!1;break}}else if(h!==y&&!o(h,y,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}var Hr=f.Uint8Array;function Jr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Wr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Yr=d?d.prototype:void 0,Vr=Yr?Yr.valueOf:void 0;var Kr=Object.prototype.propertyIsEnumerable,Gr=Object.getOwnPropertySymbols,Zr=Gr?function(e){return null==e?[]:(e=Object(e),Fr(Gr(e),function(t){return Kr.call(e,t)}))}:function(){return[]};function Xr(e){return function(e,t,r){var n=t(e);return c(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,We,Zr)}var Qr=Object.prototype.hasOwnProperty;var en="[object Arguments]",tn="[object Array]",rn="[object Object]",nn=Object.prototype.hasOwnProperty;function on(e,t,r,n,o,i){var s=c(e),a=c(t),u=s?tn:Qt(e),l=a?tn:Qt(t),f=(u=u==en?rn:u)==rn,d=(l=l==en?rn:l)==rn,p=u==l;if(p&&Re(e)){if(!Re(t))return!1;s=!0,f=!1}if(p&&!f)return i||(i=new Ur),s||Fe(e)?zr(e,t,r,n,o,i):function(e,t,r,n,o,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Hr(e),new Hr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Jr;case"[object Set]":var c=1&n;if(a||(a=Wr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=zr(a(e),a(t),n,o,i,s);return s.delete(e),l;case"[object Symbol]":if(Vr)return Vr.call(e)==Vr.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var h=f&&nn.call(e,"__wrapped__"),y=d&&nn.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,g=y?t.value():t;return i||(i=new Ur),o(m,g,r,n,i)}}return!!p&&(i||(i=new Ur),function(e,t,r,n,o,i){var s=1&r,a=Xr(e),c=a.length;if(c!=Xr(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:Qr.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=s;++u<c;){var y=e[l=a[u]],m=t[l];if(n)var g=s?n(m,y,l,t,e,i):n(y,m,l,e,t,i);if(!(void 0===g?y===m||o(y,m,r,n,i):g)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))}function sn(e,t,r,n,o){return e===t||(null==e||null==t||!w(e)&&!w(t)?e!=e&&t!=t:on(e,t,r,n,sn,o))}function an(e){return e==e&&!E(e)}function cn(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function un(e){var t=function(e){for(var t=We(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,an(o)]}return t}(e);return 1==t.length&&t[0][2]?cn(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],l=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var f=new Ur;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?sn(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}}function ln(e,t){return null!=e&&t in Object(e)}function fn(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=le(t,e)).length,i=!1;++n<o;){var s=fe(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Te(o)&&xe(s,o)&&(c(e)||_e(e))}(e,t,ln)}function dn(e){return j(e)?er(fe(e)):function(e){return function(t){return de(t,e)}}(e)}function pn(e){return"function"==typeof e?e:null==e?Ke:"object"==typeof e?c(e)?function(e,t){return j(e)&&an(t)?cn(fe(e),t):function(r){var n=pe(r,e);return void 0===n&&n===t?fn(r,e):sn(t,n,3)}}(e[0],e[1]):un(e):dn(e)}function hn(e,t){return(c(e)?Fr:Lr)(e,pn(t))}function yn(e,t,r,n={}){let o=pe(n,"withInfor");Qe(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!tt(r))return console.log("invalid key"),o&&(i.infor={}),i;St(e)||(e=[e]),St(t)||(t=[t]),e=hn(e,e=>at(e,r)),t=hn(t,e=>at(e,r));let s=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=s.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),s.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(s.values()),o){let e={};for(let t of i.del)e[t[r]]="del";for(let t of i.add)e[t[r]]="add";for(let t of i.diff)e[t[r]]="diff";for(let t of i.same)e[t[r]]="same";i.infor=e}return i}var mn={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",a="day",c="week",u="month",l="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,s=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:a,D:d,h:s,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,o=a}return!n&&o&&(b=o),o||!n&&b},j=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},E=v;E.l=O,E.i=_,E.w=function(e,t){return j(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var r=j(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return j(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<j(e)},g.$g=function(e,t,r){return E.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,n=!!E.u(t)||t,l=E.p(e),p=function(e,t){var o=E.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(a)},h=function(e,t){return E.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},y=this.$W,m=this.$M,g=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case f:return n?p(1,0):p(31,11);case u:return n?p(1,m):p(0,m+1);case c:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(n?g-w:g+(6-w),m);case a:case d:return h(v+"Hours",0);case s:return h(v+"Minutes",1);case i:return h(v+"Seconds",2);case o:return h(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var r,c=E.p(e),l="set"+(this.$u?"UTC":""),p=(r={},r[a]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[s]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===a?this.$D+(t-this.$W):t;if(c===u||c===f){var y=this.clone().set(d,1);y.$d[p](h),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[E.p(e)]()},g.add=function(n,l){var d,p=this;n=Number(n);var h=E.p(l),y=function(e){var t=j(p);return E.w(t.date(t.date()+Math.round(e*n)),p)};if(h===u)return this.set(u,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===a)return y(1);if(h===c)return y(7);var m=(d={},d[i]=t,d[s]=r,d[o]=e,d)[h]||1,g=this.$d.getTime()+n*m;return E.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),i=this.$H,s=this.$m,a=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return E.s(i%12||12,e,"0")},h=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(y,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return E.s(t.$y,4,"0");case"M":return a+1;case"MM":return E.s(a+1,2,"0");case"MMM":return f(r.monthsShort,a,u,3);case"MMMM":return f(u,a);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return E.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,s,!0);case"A":return h(i,s,!1);case"m":return String(s);case"mm":return E.s(s,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,d,p){var h,y=this,m=E.p(d),g=j(n),v=(g.utcOffset()-this.utcOffset())*t,b=this-g,w=function(){return E.m(y,g)};switch(m){case f:h=w()/12;break;case u:h=w();break;case l:h=w()/3;break;case c:h=(b-v)/6048e5;break;case a:h=(b-v)/864e5;break;case s:h=b/r;break;case i:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:E.a(h)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return E.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),A=R.prototype;return j.prototype=A,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",f],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),j.extend=function(e,t){return e.$i||(e(t,R,j),e.$i=!0),j},j.locale=O,j.isDayjs=_,j.unix=function(e){return j(1e3*e)},j.en=w[b],j.Ls=w,j.p={},j}()}(mn);var gn=Rr(mn.exports);function vn(){if(!rt(gn))throw new Error("invalid dayjs");return gn().format("YYYY-MM-DDTHH:mm:ssZ")}var bn={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,i,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,i),!0;case 6:return l.fn.call(l.context,t,n,o,i,s),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||s(this,i);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(bn);var wn=Rr(bn.exports);function Sn(){return new wn}function _n(e){if(!vr(e))return!1;return Or(e)>0}var On=Ie(Object.getPrototypeOf,Object),jn=Function.prototype,En=Object.prototype,Rn=jn.toString,An=En.hasOwnProperty,xn=Rn.call(Object);function Tn(e){if(!w(e))return!1;var t=b(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!function(e){if(!w(e)||"[object Object]"!=b(e))return!1;var t=On(e);if(null===t)return!0;var r=An.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Rn.call(r)==xn}(e)}function kn(e){if(!tt(e)&&!st(e)&&!S(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function $n(e){let t="";if(Tn(e))t=e.message;else{if(et(e))return e;if(ot(e))return at(e,"message")?e.message:JSON.stringify(e);if(St(e))return JSON.stringify(e);t=kn(e)}return t}function Cn(t){return Et(t,{fs:e})}function Dn(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"file does not exist: "+e};if(!Et(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}(t,{fs:e})}function Nn(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function Pn(e=300){return new function(e){let t=[],r=null,n=null;return _n(e)||(e=300),e=Or(e),function(o,...i){rt(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(Date.now()-n>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(r),r=null)},10))):console.log("func is not a function")}}(e)}function Mn(e,r={}){let i=pe(r,"polling");Qe(i)||(i=!1);let s=pe(r,"timeInterval");_n(s)||(s=100),s=Or(s);let a=pe(r,"timeBinaryInterval");_n(a)||(a=300),a=Or(a);let c=new n.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&Cn(u)&&(l=o.watch(u,{usePolling:i,interval:s,binaryInterval:a,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},s);return c.clear=()=>{(()=>{if(null!==l){try{l.unwatch(u)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(f)},c}function Fn(t,r,n={}){jt(t)||kt(t),jt(r)||kt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,s=t=>{let r={};try{r=function(e){if(!tt(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},a=(t,r)=>{try{let n=function(e,t=!1){if(Nn(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>pe(s(e),t,""),u=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},l=(e,t)=>{let r=s(e);at(r,t)&&delete r[t],a(e,r)},f=()=>s(o),d=e=>a(o,e),p=e=>c(o,e),h=()=>s(i),y=e=>a(i,e),m=e=>c(i,e),g=(e,t)=>u(i,e,t),v=e=>l(i,e),b=e=>{let t=[];return Ge(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=Sn();return e.set=(t,r)=>{((e,t)=>{u(o,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=p,e.remove=t=>{(e=>{l(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=Sn(),t=Pn(300),r=Mn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=wt(),r=f();if(!gr(r))return t.resolve("no src"),t;let n=h(),o=b(r),i=yn(b(n),o,"fp",{withInfor:!1}),s=wt();return s.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:s}),t})().catch(()=>{})})}),e.set=g,e.get=m,e.remove=v,e.readKp=h,e.writeKp=y,e.clear=r.clear,e}}}let Ln=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Ln).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("w-dwdata-tweqod.umd.js",document.baseURI).href),Un=t.dirname(Ln);let Bn=async(r={})=>{let n=pe(r,"keyId");tt(n)||(n="id");let o=pe(r,"fdDwAttime");tt(o)||(o="./_dwAttime"),jt(o)||kt(o);let i=pe(r,"fdDwCurrent");tt(i)||(i="./_dwCurrent"),jt(i)||kt(i);let a=pe(r,"fdTagModify");tt(a)||(a="./_tagModify");let c=pe(r,"fdTagRemove");tt(c)||(c="./_tagRemove");let u=pe(r,"fdResult");tt(u)||(u="./_result"),jt(u)||kt(u);let l=pe(r,"fdTaskCpActualSrc");tt(l)||(l="./_taskCpActualSrc"),jt(l)||kt(l);let f=pe(r,"fdTaskCpSrc");tt(f)||(f="./_taskCpSrc"),jt(f)||kt(f);let d=pe(r,"fdLog");tt(d)||(d="./_logs"),jt(d)||kt(d);let p=pe(r,"funDownload");if(!rt(p))throw new Error("invalid funDownload");let h=pe(r,"funGetCurrent");if(!rt(h))throw new Error("invalid funGetCurrent");let y=pe(r,"funAdd");if(!rt(y))throw new Error("invalid funAdd");let m=pe(r,"funModify");if(!rt(m))throw new Error("invalid funModify");let g=pe(r,"funRemove");if(!rt(g))throw new Error("invalid funRemove");let v=pe(r,"timeToleranceRemove");jr(v)||(v=36e5),v=Mt(v),v>=0&&!jt(c)&&kt(c);let b=Sn(),w=function(e={}){let r=pe(e,"fdLog");tt(r)||(r="./_logs");let n=pe(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=s.transport({targets:[{level:"info",target:t.resolve(Un,"./formatter.mjs"),options:{interval:n,fdLog:r}}]});return s(o)}({fdLog:d,interval:"hr"}),S={info:e=>{w.info(e),b.emit("change",{type:"info",...e})},warn:e=>{w.warn(e),b.emit("change",{type:"warn",...e})},error:e=>{w.error(e),b.emit("change",{type:"error",...e})}},_=async t=>{let r=await(async(t,r,n="")=>{let o="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);o=c;let i=`${o}/${r}`,s={time:vn(),hash:n};e.writeFileSync(i,JSON.stringify(s),"utf8")})("remove",t);return r},O=async(t,r={})=>{let n=await(async(t,r,n={})=>{let o=pe(n,"checkTime");Qe(o)||(o=!0);let i=pe(n,"timeNow"),s="",a=0;if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);s=c,a=v;let u=`${s}/${r}`;if(!Cn(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!o)return{b:!0,msg:`fp[${u}] exists`};if(!gr(i))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=pe(JSON.parse(l),"time"),d=gn(f),p=i.diff(d,"millisecond"),h=p>=a;return h?{b:h,msg:`time difference[${p}] >= time tolerance[${a}]`}:{b:h,msg:"allowable time difference"}})("remove",t,r);return n},j=async t=>{let r=await(async(t,r)=>{let n="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);n=c;let o=`${n}/${r}`;if(!Cn(o))return;let i=e.readFileSync(o,"utf8"),s=JSON.parse(i),a=Dn(o);if(a.error)throw new Error(a.error);return s})("remove",t);return r},E=null,R=(async()=>{await function(e=10){st(e)||(e=10);let t=wt();return setTimeout(function(){t.resolve()},e),t}(1);let e=gn(),t=()=>{let t=gn(),r=t.diff(e,"second");return{timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:t.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${r}s`}};S.info({event:"start",msg:"running..."});let r="",s=Fn(l,l).buildSrc(),a=Fn(f,f);E=a.buildSrc();let c=[];try{S.info({event:"proc-callfun-download",msg:"start..."});let e=p();nt(e)&&(e=await e),S.info({event:"proc-callfun-download",num:mr(e),msg:"done"}),c=e}catch(e){console.log(e),S.error({event:"proc-callfun-download",msg:$n(e)}),r="error at proc-callfun-download"}if(tt(r))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...t(),msg:r});let u=[];try{S.info({event:"proc-callfun-getCurrent",msg:"start..."});let e=h();nt(e)&&(e=await e),S.info({event:"proc-callfun-getCurrent",num:mr(e),msg:"done"}),u=e}catch(e){console.log(e),S.error({event:"proc-callfun-getCurrent",msg:$n(e)}),r="error at proc-callfun-getCurrent"}if(tt(r))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...t(),msg:r});if(0===mr(c))return console.log("invalid data, task canceled"),void S.info({event:"cancel",...t(),msg:"no data"});let d=null;try{S.info({event:"compare",msg:"start..."}),d=yn(u,c,n,{withInfor:!1}),S.info({event:"compare",msg:"done"})}catch(e){console.log(e),S.error({event:"compare",msg:$n(e)})}if(!gr(d))return console.log("can not calculate the difference, task canceled"),void S.info({event:"cancel",...t(),msg:"can not calculate the difference between the data before and after"});if(0!==mr(d.del)||0!==mr(d.add)||0!==mr(d.diff)){if(await _t(d.del,async e=>{if(!tt(r)){try{S.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"start..."});let t=g(e);nt(t)&&(t=await t)}catch(t){console.log(t),S.error({event:"proc-remove-callfun-remove",[n]:e[n],msg:$n(t)}),r="error at proc-remove-callfun-remove"}if(!tt(r))try{if(s.remove(e[n]),v<=0)E.remove(e[n]),S.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"done"});else{(await O(e[n],{checkTime:!1})).b||(await _(e[n]),S.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"tag"}))}}catch(t){console.log(t),S.error({event:"proc-remove-otkActual-remove",[n]:e[n],msg:$n(t)}),r="error at proc-remove-otkActual-remove"}}}),tt(r))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...t(),msg:r});if(await _t(d.add,async e=>{if(!tt(r)){try{S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"start..."});let t=y(e);nt(t)&&(t=await t)}catch(t){console.log(t),S.error({event:"proc-add-callfun-add",[n]:e[n],msg:$n(t)}),r="error at proc-add-callfun-add"}if(!tt(r))try{let t=Mr(JSON.stringify(e));if(s.set(e[n],t),v<=0)E.set(e[n],t),S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"});else{(await O(e[n],{checkTime:!1})).b?(await j(e[n]),S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"release-tag"})):(E.set(e[n],t),S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"}))}}catch(t){console.log(t),S.error({event:"proc-add-otkActual-set",[n]:e[n],msg:$n(t)}),r="error at proc-add-otkActual-set"}}}),tt(r))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...t(),msg:r});if(await _t(d.diff,async e=>{if(!tt(r)){try{S.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"start..."});let t=m(e);nt(t)&&(t=await t)}catch(t){console.log(t),S.error({event:"proc-diff-callfun-modify",[n]:e[n],msg:$n(t)}),r="error at proc-diff-callfun-modify"}if(!tt(r))try{let t=Mr(JSON.stringify(e));s.set(e[n],t),E.set(e[n],t),S.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"done"})}catch(t){console.log(t),S.error({event:"proc-diff-otkActual-set",[n]:e[n],msg:$n(t)}),r="error at proc-diff-otkActual-set"}}}),tt(r))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...t(),msg:r});{Tt(i);let e=Dt(o,i);if(e.error)return console.log(e.error),S.error({event:"task-update-rawData",msg:e.error}),void(r="error at task-update-rawData")}if(tt(r))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...t(),msg:r});S.info({event:"end",...t(),msg:"done"})}else S.info({event:"cancel",...t(),msg:"no difference"})})().catch(e=>{console.log(e),S.error({event:"proc-coreSrc",msg:$n(e)})}),A=(async()=>{await async function(e,t={}){let r=null,n=wt();if(!rt(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return nt(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=pe(t,"attemptNum",null);_n(i)||(i=200);let s=pe(t,"timeInterval",null);_n(s)||(s=1e3);let a=0,c=setInterval(async()=>{a+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),a>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},s);return n}(()=>null!==E);let e=gn(),t=Pt(c,1),r=Pt(a,1);0===mr(t)&&0===mr(r)||await _t(t,async t=>{(await O(t.name,{timeNow:e,checkTime:!0})).b&&(await j(t.name),S.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"release-tag"}),E.remove(t.name),S.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),S.error({event:"proc-coreDetect",msg:$n(e)})});return b.srlog=S,Promise.all([R,A]).finally(()=>{b.emit("end")}),b};function In(e){return!!Nn(e)||(!!function(e){return"[object Null]"===Object.prototype.toString.call(e)}(e)||(!!function(e){if(ot(e)){for(let t in e)return!1;return!0}return!1}(e)||(!!function(e){return!(!et(e)||""!==e)}(e)||(!!function(e){return!!St(e)&&0===e.length}(e)||!!it(e)))))}function qn(e,t){return tt(e)&&jr(t)?0===(t=Or(t))?e:function(e,t){if(!tt(e))return"";if(!jr(t))return"";if(0===(t=Or(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function zn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hn}=Object.prototype,{getPrototypeOf:Jn}=Object,{iterator:Wn,toStringTag:Yn}=Symbol,Vn=(e=>t=>{const r=Hn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>Vn(t)===e),Gn=e=>t=>typeof t===e,{isArray:Zn}=Array,Xn=Gn("undefined");function Qn(e){return null!==e&&!Xn(e)&&null!==e.constructor&&!Xn(e.constructor)&&ro(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const eo=Kn("ArrayBuffer");const to=Gn("string"),ro=Gn("function"),no=Gn("number"),oo=e=>null!==e&&"object"==typeof e,io=e=>{if("object"!==Vn(e))return!1;const t=Jn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Yn in e||Wn in e)},so=Kn("Date"),ao=Kn("File"),co=Kn("Blob"),uo=Kn("FileList"),lo=Kn("URLSearchParams"),[fo,po,ho,yo]=["ReadableStream","Request","Response","Headers"].map(Kn);function mo(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Zn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Qn(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function go(e,t){if(Qn(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const vo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,bo=e=>!Xn(e)&&e!==vo;const wo=(So="undefined"!=typeof Uint8Array&&Jn(Uint8Array),e=>So&&e instanceof So);var So;const _o=Kn("HTMLFormElement"),Oo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),jo=Kn("RegExp"),Eo=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};mo(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const Ro=Kn("AsyncFunction"),Ao=(xo="function"==typeof setImmediate,To=ro(vo.postMessage),xo?setImmediate:To?(ko=`axios@${Math.random()}`,$o=[],vo.addEventListener("message",({source:e,data:t})=>{e===vo&&t===ko&&$o.length&&$o.shift()()},!1),e=>{$o.push(e),vo.postMessage(ko,"*")}):e=>setTimeout(e));var xo,To,ko,$o;const Co="undefined"!=typeof queueMicrotask?queueMicrotask.bind(vo):"undefined"!=typeof process&&process.nextTick||Ao;var Do={isArray:Zn,isArrayBuffer:eo,isBuffer:Qn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ro(e.append)&&("formdata"===(t=Vn(e))||"object"===t&&ro(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&eo(e.buffer),t},isString:to,isNumber:no,isBoolean:e=>!0===e||!1===e,isObject:oo,isPlainObject:io,isEmptyObject:e=>{if(!oo(e)||Qn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:fo,isRequest:po,isResponse:ho,isHeaders:yo,isUndefined:Xn,isDate:so,isFile:ao,isBlob:co,isRegExp:jo,isFunction:ro,isStream:e=>oo(e)&&ro(e.pipe),isURLSearchParams:lo,isTypedArray:wo,isFileList:uo,forEach:mo,merge:function e(){const{caseless:t}=bo(this)&&this||{},r={},n=(n,o)=>{const i=t&&go(r,o)||o;io(r[i])&&io(n)?r[i]=e(r[i],n):io(n)?r[i]=e({},n):Zn(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&mo(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(mo(t,(t,n)=>{r&&ro(t)?e[n]=zn(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Jn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Vn,kindOfTest:Kn,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(Zn(e))return e;let t=e.length;if(!no(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Wn]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:_o,hasOwnProperty:Oo,hasOwnProp:Oo,reduceDescriptors:Eo,freezeMethods:e=>{Eo(e,(t,r)=>{if(ro(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];ro(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return Zn(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:go,global:vo,isContextDefined:bo,isSpecCompliantForm:function(e){return!!(e&&ro(e.append)&&"FormData"===e[Yn]&&e[Wn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(oo(e)){if(t.indexOf(e)>=0)return;if(Qn(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Zn(e)?[]:{};return mo(e,(e,t)=>{const i=r(e,n+1);!Xn(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Ro,isThenable:e=>e&&(oo(e)||ro(e))&&ro(e.then)&&ro(e.catch),setImmediate:Ao,asap:Co,isIterable:e=>null!=e&&ro(e[Wn])};function No(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Do.inherits(No,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Do.toJSONObject(this.config),code:this.code,status:this.status}}});const Po=No.prototype,Mo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Mo[e]={value:e}}),Object.defineProperties(No,Mo),Object.defineProperty(Po,"isAxiosError",{value:!0}),No.from=(e,t,r,n,o,i)=>{const s=Object.create(Po);return Do.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),No.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function Fo(e){return Do.isPlainObject(e)||Do.isArray(e)}function Lo(e){return Do.endsWith(e,"[]")?e.slice(0,-2):e}function Uo(e,t,r){return e?e.concat(t).map(function(e,t){return e=Lo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Bo=Do.toFlatObject(Do,{},null,function(e){return/^is[A-Z]/.test(e)});function Io(e,t,r){if(!Do.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Do.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Do.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Do.isSpecCompliantForm(t);if(!Do.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Do.isDate(e))return e.toISOString();if(Do.isBoolean(e))return e.toString();if(!a&&Do.isBlob(e))throw new No("Blob is not supported. Use a Buffer instead.");return Do.isArrayBuffer(e)||Do.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(Do.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Do.isArray(e)&&function(e){return Do.isArray(e)&&!e.some(Fo)}(e)||(Do.isFileList(e)||Do.endsWith(r,"[]"))&&(a=Do.toArray(e)))return r=Lo(r),a.forEach(function(e,n){!Do.isUndefined(e)&&null!==e&&t.append(!0===s?Uo([r],n,i):null===s?r:r+"[]",c(e))}),!1;return!!Fo(e)||(t.append(Uo(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Bo,{defaultVisitor:u,convertValue:c,isVisitable:Fo});if(!Do.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Do.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Do.forEach(r,function(r,i){!0===(!(Do.isUndefined(r)||null===r)&&o.call(t,r,Do.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function qo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function zo(e,t){this._pairs=[],e&&Io(e,this,t)}const Ho=zo.prototype;function Jo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wo(e,t,r){if(!t)return e;const n=r&&r.encode||Jo;Do.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Do.isURLSearchParams(t)?t.toString():new zo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ho.append=function(e,t){this._pairs.push([e,t])},Ho.toString=function(e){const t=e?function(t){return e.call(this,t,qo)}:qo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Yo=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Do.forEach(this.handlers,function(t){null!==t&&e(t)})}},Vo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ko={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Go="undefined"!=typeof window&&"undefined"!=typeof document,Zo="object"==typeof navigator&&navigator||void 0,Xo=Go&&(!Zo||["ReactNative","NativeScript","NS"].indexOf(Zo.product)<0),Qo="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ei=Go&&window.location.href||"http://localhost";var ti={...Object.freeze({__proto__:null,hasBrowserEnv:Go,hasStandardBrowserEnv:Xo,hasStandardBrowserWebWorkerEnv:Qo,navigator:Zo,origin:ei}),...Ko};function ri(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&Do.isArray(n)?n.length:i,a)return Do.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&Do.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Do.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s}if(Do.isFormData(e)&&Do.isFunction(e.entries)){const r={};return Do.forEachEntry(e,(e,n)=>{t(function(e){return Do.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ni={transitional:Vo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Do.isObject(e);o&&Do.isHTMLForm(e)&&(e=new FormData(e));if(Do.isFormData(e))return n?JSON.stringify(ri(e)):e;if(Do.isArrayBuffer(e)||Do.isBuffer(e)||Do.isStream(e)||Do.isFile(e)||Do.isBlob(e)||Do.isReadableStream(e))return e;if(Do.isArrayBufferView(e))return e.buffer;if(Do.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Io(e,new ti.classes.URLSearchParams,{visitor:function(e,t,r,n){return ti.isNode&&Do.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Do.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Io(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Do.isString(e))try{return(t||JSON.parse)(e),Do.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ni.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Do.isResponse(e)||Do.isReadableStream(e))return e;if(e&&Do.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw No.from(e,No.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ti.classes.FormData,Blob:ti.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Do.forEach(["delete","get","head","post","put","patch"],e=>{ni.headers[e]={}});var oi=ni;const ii=Do.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const si=Symbol("internals");function ai(e){return e&&String(e).trim().toLowerCase()}function ci(e){return!1===e||null==e?e:Do.isArray(e)?e.map(ci):String(e)}function ui(e,t,r,n,o){return Do.isFunction(n)?n.call(this,t,r):(o&&(t=r),Do.isString(t)?Do.isString(n)?-1!==t.indexOf(n):Do.isRegExp(n)?n.test(t):void 0:void 0)}class li{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ai(t);if(!o)throw new Error("header name must be a non-empty string");const i=Do.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ci(e))}const i=(e,t)=>Do.forEach(e,(e,r)=>o(e,r,t));if(Do.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Do.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&ii[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Do.isObject(e)&&Do.isIterable(e)){let r,n,o={};for(const t of e){if(!Do.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Do.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=ai(e)){const r=Do.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Do.isFunction(t))return t.call(this,e,r);if(Do.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ai(e)){const r=Do.findKey(this,e);return!(!r||void 0===this[r]||t&&!ui(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ai(e)){const o=Do.findKey(r,e);!o||t&&!ui(0,r[o],o,t)||(delete r[o],n=!0)}}return Do.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!ui(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Do.forEach(this,(n,o)=>{const i=Do.findKey(r,o);if(i)return t[i]=ci(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=ci(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Do.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Do.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[si]=this[si]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ai(e);t[n]||(!function(e,t){const r=Do.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Do.isArray(e)?e.forEach(n):n(e),this}}li.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Do.reduceDescriptors(li.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Do.freezeMethods(li);var fi=li;function di(e,t){const r=this||oi,n=t||r,o=fi.from(n.headers);let i=n.data;return Do.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function pi(e){return!(!e||!e.__CANCEL__)}function hi(e,t,r){No.call(this,null==e?"canceled":e,No.ERR_CANCELED,t,r),this.name="CanceledError"}function yi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new No("Request failed with status code "+r.status,[No.ERR_BAD_REQUEST,No.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Do.inherits(hi,No,{__CANCEL__:!0});const mi=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let l=s,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},gi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},vi=e=>(...t)=>Do.asap(()=>e(...t));var bi=ti.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ti.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ti.origin),ti.navigator&&/(msie|trident)/i.test(ti.navigator.userAgent)):()=>!0,wi=ti.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];Do.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Do.isString(n)&&s.push("path="+n),Do.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Si(e,t,r){let n=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const _i=e=>e instanceof fi?{...e}:e;function Oi(e,t){t=t||{};const r={};function n(e,t,r,n){return Do.isPlainObject(e)&&Do.isPlainObject(t)?Do.merge.call({caseless:n},e,t):Do.isPlainObject(t)?Do.merge({},t):Do.isArray(t)?t.slice():t}function o(e,t,r,o){return Do.isUndefined(t)?Do.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Do.isUndefined(t))return n(void 0,t)}function s(e,t){return Do.isUndefined(t)?Do.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(_i(e),_i(t),0,!0)};return Do.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,s=i(e[n],t[n],n);Do.isUndefined(s)&&i!==a||(r[n]=s)}),r}var ji=e=>{const t=Oi({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=fi.from(a),t.url=Wo(Si(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Do.isFormData(n))if(ti.hasStandardBrowserEnv||ti.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ti.hasStandardBrowserEnv&&(o&&Do.isFunction(o)&&(o=o(t)),o||!1!==o&&bi(t.url))){const e=i&&s&&wi.read(s);e&&a.set(i,e)}return t};var Ei="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=ji(e);let o=n.data;const i=fi.from(n.headers).normalize();let s,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=fi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());yi(function(e){t(e),h()},function(e){r(e),h()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new No("Request aborted",No.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new No("Network Error",No.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Vo;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new No(t,o.clarifyTimeoutError?No.ETIMEDOUT:No.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&Do.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),Do.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),p&&([c,l]=mi(p,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=mi(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=t=>{y&&(r(!t||t.type?new hi(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ti.protocols.indexOf(g)?r(new No("Unsupported protocol "+g+":",No.ERR_BAD_REQUEST,e)):y.send(o||null)})};var Ri=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof No?t:new hi(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new No(`timeout ${t} of ms exceeded`,No.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>Do.asap(s),a}};const Ai=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},xi=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Ti=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of xi(e))yield*Ai(r,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},ki="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$i=ki&&"function"==typeof ReadableStream,Ci=ki&&("function"==typeof TextEncoder?(Di=new TextEncoder,e=>Di.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Di;const Ni=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Pi=$i&&Ni(()=>{let e=!1;const t=new Request(ti.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Mi=$i&&Ni(()=>Do.isReadableStream(new Response("").body)),Fi={stream:Mi&&(e=>e.body)};var Li;ki&&(Li=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Fi[e]&&(Fi[e]=Do.isFunction(Li[e])?t=>t[e]():(t,r)=>{throw new No(`Response type '${e}' is not supported`,No.ERR_NOT_SUPPORT,r)})}));const Ui=async(e,t)=>{const r=Do.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Do.isBlob(e))return e.size;if(Do.isSpecCompliantForm(e)){const t=new Request(ti.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Do.isArrayBufferView(e)||Do.isArrayBuffer(e)?e.byteLength:(Do.isURLSearchParams(e)&&(e+=""),Do.isString(e)?(await Ci(e)).byteLength:void 0)})(t):r};var Bi=ki&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=ji(e);u=u?(u+"").toLowerCase():"text";let p,h=Ri([o,i&&i.toAbortSignal()],s);const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&Pi&&"get"!==r&&"head"!==r&&0!==(m=await Ui(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Do.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=gi(m,mi(vi(c)));n=Ti(r.body,65536,e,t)}}Do.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let i=await fetch(p,d);const s=Mi&&("stream"===u||"response"===u);if(Mi&&(a||s&&y)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=Do.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&gi(t,mi(vi(a),!0))||[];i=new Response(Ti(i.body,65536,r,()=>{n&&n(),y&&y()}),e)}u=u||"text";let g=await Fi[Do.findKey(Fi,u)||"text"](i,e);return!s&&y&&y(),await new Promise((t,r)=>{yi(t,r,{data:g,headers:fi.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})})}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new No("Network Error",No.ERR_NETWORK,e,p),{cause:t.cause||t});throw No.from(t,t&&t.code,e,p)}});const Ii={http:null,xhr:Ei,fetch:Bi};Do.forEach(Ii,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const qi=e=>`- ${e}`,zi=e=>Do.isFunction(e)||null===e||!1===e;var Hi=e=>{e=Do.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!zi(r)&&(n=Ii[(t=String(r)).toLowerCase()],void 0===n))throw new No(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new No("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(qi).join("\n"):" "+qi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hi(null,e)}function Wi(e){Ji(e),e.headers=fi.from(e.headers),e.data=di.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Hi(e.adapter||oi.adapter)(e).then(function(t){return Ji(e),t.data=di.call(e,e.transformResponse,t),t.headers=fi.from(t.headers),t},function(t){return pi(t)||(Ji(e),t&&t.response&&(t.response.data=di.call(e,e.transformResponse,t.response),t.response.headers=fi.from(t.response.headers))),Promise.reject(t)})}const Yi="1.11.0",Vi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ki={};Vi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Yi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new No(n(o," has been removed"+(t?" in "+t:"")),No.ERR_DEPRECATED);return t&&!Ki[o]&&(Ki[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Vi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Gi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new No("options must be an object",No.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new No("option "+i+" must be "+r,No.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new No("Unknown option "+i,No.ERR_BAD_OPTION)}},validators:Vi};const Zi=Gi.validators;class Xi{constructor(e){this.defaults=e||{},this.interceptors={request:new Yo,response:new Yo}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Oi(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Gi.assertOptions(r,{silentJSONParsing:Zi.transitional(Zi.boolean),forcedJSONParsing:Zi.transitional(Zi.boolean),clarifyTimeoutError:Zi.transitional(Zi.boolean)},!1),null!=n&&(Do.isFunction(n)?t.paramsSerializer={serialize:n}:Gi.assertOptions(n,{encode:Zi.function,serialize:Zi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Gi.assertOptions(t,{baseUrl:Zi.spelling("baseURL"),withXsrfToken:Zi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Do.merge(o.common,o[t.method]);o&&Do.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=fi.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!a){const e=[Wi.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Wi.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Wo(Si((e=Oi(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Do.forEach(["delete","get","head","options"],function(e){Xi.prototype[e]=function(t,r){return this.request(Oi(r||{},{method:e,url:t,data:(r||{}).data}))}}),Do.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Oi(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Xi.prototype[e]=t(),Xi.prototype[e+"Form"]=t(!0)});var Qi=Xi;class es{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new hi(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new es(function(t){e=t}),cancel:e}}}var ts=es;const rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rs).forEach(([e,t])=>{rs[t]=e});var ns=rs;const os=function e(t){const r=new Qi(t),n=zn(Qi.prototype.request,r);return Do.extend(n,Qi.prototype,r,{allOwnKeys:!0}),Do.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Oi(t,r))},n}(oi);os.Axios=Qi,os.CanceledError=hi,os.CancelToken=ts,os.isCancel=pi,os.VERSION=Yi,os.toFormData=Io,os.AxiosError=No,os.Cancel=os.CanceledError,os.all=function(e){return Promise.all(e)},os.spread=function(e){return function(t){return e.apply(null,t)}},os.isAxiosError=function(e){return Do.isObject(e)&&!0===e.isAxiosError},os.mergeConfig=Oi,os.AxiosHeaders=fi,os.formToJSON=e=>ri(Do.isHTMLForm(e)?new FormData(e):e),os.getAdapter=Hi,os.HttpStatusCode=ns,os.default=os;var is=os;let ss=async(e,t={})=>{let r=null,n=pe(t,"keepAllData");Qe(n)||(n=!0);let o=await is.get(`https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001?Authorization=${e}`).catch(e=>{r=e});if(null!==r)return;let i=[...pe(o,"data.records.earthquake",[]),...pe(o,"data.records.Earthquake",[])];if(!St(s=i)||0===s.length||1===s.length&&In(s[0]))throw console.log("rEqsL",o),new Error("無法取得顯著有感地震之earthquake數據");var s;let a=[];return Ge(i,e=>{let t=pe(e,"earthquakeInfo.originTime",""),r=pe(e,"EarthquakeInfo.OriginTime",""),o=t||r;if(!tt(o))throw console.log("v",e),new Error(`無法取得originTime[${o}]`);let i=pe(e,"earthquakeInfo.magnitude.magnitudeType",""),s=pe(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeType",""),c=i||s;if(!tt(c))throw console.log("v",e),new Error(`無法取得magnitudeType[${c}]`);let u=pe(e,"earthquakeInfo.magnitude.magnitudeValue",""),l=pe(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeValue",""),f=u||l;if(!st(f))throw console.log("v",e),new Error(`無法取得magnitudeValue[${f}]`);let d=pe(e,"ReportContent",""),p=f;p=kn(p);let h=gn(o),y=pe(e,"EarthquakeNo","");y=kn(y);let m=qn(y,3),g=o,v=h.format("YYYY-MM-DDTHH:mm:ssZ"),b=h.format("YYYYMMDDHHmmss"),w=pe(e,"EarthquakeInfo.FocalDepth","");w=kn(w);let S=pe(e,"EarthquakeInfo.Epicenter.Location",""),_=pe(e,"EarthquakeInfo.Epicenter.EpicenterLongitude","");_=kn(_);let O=pe(e,"EarthquakeInfo.Epicenter.EpicenterLatitude","");O=kn(O);let j={id:y,tag:"",number:m,time:v,timeRec:g,timeTag:b,ml:p,depth:w,description:d,location:S,intensity:"",longitude:_,latitude:O};n&&(j.data=e),a.push(j)}),a};return async(t,r={})=>{let n=pe(r,"keepAllData");Qe(n)||(n=!0);let o=pe(r,"fdDwStorage");tt(o)||(o="./_dwStorage"),jt(o)||kt(o);let i=pe(r,"fdDwAttime");tt(i)||(i="./_dwAttime"),jt(i)||kt(i);let s=pe(r,"fdDwCurrent");tt(s)||(s="./_dwCurrent"),jt(s)||kt(s);let a=pe(r,"fdResult");tt(a)||(a="./_result"),jt(a)||kt(a);let c=pe(r,"fdTaskCpSrc");tt(c)||(c="./_taskCpSrc"),jt(c)||kt(c);let u=pe(r,"fdLog");tt(u)||(u="./_logs"),jt(u)||kt(u);let l=pe(r,"funDownloadEqs"),f=pe(r,"funDownload"),d=pe(r,"funGetCurrent"),p=pe(r,"funAdd"),h=pe(r,"funModify"),y=pe(r,"funRemove"),m=async()=>{let r=[];var a;rt(l)?(r=l(),nt(r)&&(r=await r)):r=await ss(t,{keepAllData:n}),r=null==(a=r)?a:Ze.call(a),Tt(i),Dt(s,i);let c=(t=>{let r=Pt(t,1),n=[];return Ge(r,t=>{let r=e.readFileSync(t.path,"utf8"),o=JSON.parse(r);n.push(o)}),n})(i),u={};return Ge(c,e=>{u[e.id]=e}),await _t(r,async t=>{let r=`${o}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8");let n=await Ft(r);if(at(u,t.id)){if(n!==u[t.id].hash){u[t.id].hash=n;let r=`${i}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(u[t.id]),"utf8")}}else{u[t.id]={id:t.id,hash:n};let r=`${i}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(u[t.id]),"utf8")}}),Xe(u)};rt(f)||(f=m);let g=async()=>{let t=Pt(s,1),r=[];return Ge(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};rt(d)||(d=g);let v=async e=>{let t=`${a}/${e.id}`;jt(t)&&Nt(t)};rt(y)||(y=v);let b=async e=>{let t=`${a}/${e.id}`;jt(t)||kt(t),Tt(t),xt(`${o}/${e.id}.json`,`${t}/${e.id}.json`)};rt(p)||(p=b);let w=async e=>{let t=`${a}/${e.id}`;jt(t)||kt(t),Tt(t),xt(`${o}/${e.id}.json`,`${t}/${e.id}.json`)};rt(h)||(h=w);let S={fdDwAttime:i,fdDwCurrent:s,fdResult:a,fdTaskCpSrc:c,fdLog:u,funDownload:f,funGetCurrent:d,funRemove:y,funAdd:p,funModify:h};return await Bn(S)}});
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("xxhash-wasm"),require("events"),require("chokidar"),require("url"),require("pino")):"function"==typeof define&&define.amd?define(["fs","path","xxhash-wasm","events","chokidar","url","pino"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweqod"]=t(e.fs,e.path,e["xxhash-wasm"],e.events,e.chokidar,e.url,e.pino)}(this,function(e,t,r,n,o,i,s){"use strict";var a="undefined"!=typeof document?document.currentScript:null,c=Array.isArray,u="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function("return this")(),d=f.Symbol,p=Object.prototype,h=p.hasOwnProperty,y=p.toString,m=d?d.toStringTag:void 0;var g=Object.prototype.toString;var v=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":v&&v in Object(e)?function(e){var t=h.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=y.call(e);return n&&(t?e[m]=r:delete e[m]),o}(e):function(e){return g.call(e)}(e)}function w(e){return null!=e&&"object"==typeof e}function S(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==b(e)}var _=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;function j(e,t){if(c(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!S(e))||(O.test(e)||!_.test(e)||null!=t&&e in Object(t))}function E(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function R(e){if(!E(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var A,x=f["__core-js_shared__"],T=(A=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var k=Function.prototype.toString;function $(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var C=/^\[object .+?Constructor\]$/,D=Function.prototype,N=Object.prototype,P=D.toString,M=N.hasOwnProperty,F=RegExp("^"+P.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function L(e){return!(!E(e)||(t=e,T&&T in t))&&(R(e)?F:C).test($(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return L(r)?r:void 0}var B=U(Object,"create");var I=Object.prototype.hasOwnProperty;var q=Object.prototype.hasOwnProperty;function z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function H(e,t){return e===t||e!=e&&t!=t}function J(e,t){for(var r=e.length;r--;)if(H(e[r][0],t))return r;return-1}z.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return I.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:q.call(t,e)},z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};var W=Array.prototype.splice;function Y(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,r=J(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,r=J(t,e);return r<0?void 0:t[r][1]},Y.prototype.has=function(e){return J(this.__data__,e)>-1},Y.prototype.set=function(e,t){var r=this.__data__,n=J(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var V=U(f,"Map");function K(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function G(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||Y),string:new z}},G.prototype.delete=function(e){var t=K(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return K(this,e).get(e)},G.prototype.has=function(e){return K(this,e).has(e)},G.prototype.set=function(e,t){var r=K(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Z(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Z.Cache||G),r}Z.Cache=G;var X,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/\\(\\)?/g,ne=(X=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,o){t.push(n?o.replace(re,"$1"):r||e)}),t},Q=Z(X,function(e){return 500===ee.size&&ee.clear(),e}),ee=Q.cache,Q),oe=ne;function ie(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var se=d?d.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(c(e))return ie(e,ce)+"";if(S(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ue(e){return null==e?"":ce(e)}function le(e,t){return c(e)?e:j(e,t)?[e]:oe(ue(e))}function fe(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function de(e,t){for(var r=0,n=(t=le(t,e)).length;null!=e&&r<n;)e=e[fe(t[r++])];return r&&r==n?e:void 0}function pe(e,t,r){var n=null==e?void 0:de(e,t);return void 0===n?r:n}function he(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var ye,me=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[ye?s:++n];if(!1===t(o[a],a,o))break}return e};function ge(e){return w(e)&&"[object Arguments]"==b(e)}var ve=Object.prototype,be=ve.hasOwnProperty,we=ve.propertyIsEnumerable,Se=ge(function(){return arguments}())?ge:function(e){return w(e)&&be.call(e,"callee")&&!we.call(e,"callee")},_e=Se;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=je&&je.exports===Oe?f.Buffer:void 0,Re=(Ee?Ee.isBuffer:void 0)||function(){return!1},Ae=/^(?:0|[1-9]\d*)$/;function xe(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ce=$e&&"object"==typeof module&&module&&!module.nodeType&&module,De=Ce&&Ce.exports===$e&&u.process,Ne=function(){try{var e=Ce&&Ce.require&&Ce.require("util").types;return e||De&&De.binding&&De.binding("util")}catch(e){}}(),Pe=Ne&&Ne.isTypedArray,Me=Pe?function(e){return function(t){return e(t)}}(Pe):function(e){return w(e)&&Te(e.length)&&!!ke[b(e)]},Fe=Me,Le=Object.prototype.hasOwnProperty;function Ue(e,t){var r=c(e),n=!r&&_e(e),o=!r&&!n&&Re(e),i=!r&&!n&&!o&&Fe(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var l in e)!t&&!Le.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||xe(l,u))||a.push(l);return a}var Be=Object.prototype;function Ie(e,t){return function(r){return e(t(r))}}var qe=Ie(Object.keys,Object),ze=Object.prototype.hasOwnProperty;function He(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Be))return qe(e);var t,r,n=[];for(var o in Object(e))ze.call(e,o)&&"constructor"!=o&&n.push(o);return n}function Je(e){return null!=e&&Te(e.length)&&!R(e)}function We(e){return Je(e)?Ue(e):He(e)}var Ye=function(e,t){return function(r,n){if(null==r)return r;if(!Je(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(function(e,t){return e&&me(e,t,We)}),Ve=Ye;function Ke(e){return e}function Ge(e,t){var r;return(c(e)?he:Ve)(e,"function"==typeof(r=t)?r:Ke)}var Ze=Array.prototype.reverse;function Xe(e){return null==e?[]:function(e,t){return ie(t,function(t){return e[t]})}(e,We(e))}function Qe(e){return!0===(t=e)||!1===t||w(t)&&"[object Boolean]"==b(t);var t}function et(e){return"[object String]"===Object.prototype.toString.call(e)}function tt(e){return!(!et(e)||""===e)}var rt=/\s/;var nt=/^\s+/;function ot(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&rt.test(e.charAt(t)););return t}(e)+1).replace(nt,""):e}var it=/^[-+]0x[0-9a-f]+$/i,st=/^0b[01]+$/i,at=/^0o[0-7]+$/i,ct=parseInt;function ut(e){if("number"==typeof e)return e;if(S(e))return NaN;if(E(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=E(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ot(e);var r=st.test(e);return r||at.test(e)?ct(e.slice(2),r?2:8):it.test(e)?NaN:+e}var lt=1/0;function ft(e){return e?(e=ut(e))===lt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function dt(e){var t=ft(e),r=t%1;return t==t?r?t-r:t:0}function pt(e){return e!=e}function ht(e){let t=!1;if(tt(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(pt(e))return!1;t=!0}return t}function yt(e){if(!ht(e))return 0;return ft(e)}function mt(e){return!!ht(e)&&(e=yt(e),"number"==typeof(t=e)&&t==dt(t));var t}var gt=f.isFinite,vt=Math.min;var bt=function(e){var t=Math[e];return function(e,r){if(e=ut(e),(r=null==r?0:vt(dt(r),292))&>(e)){var n=(ue(e)+"e").split("e");return+((n=(ue(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),wt=bt;function St(e){if(!ht(e))return 0;e=yt(e);let t=wt(e);return"0"===String(t)?0:t}function _t(e){if(!mt(e))return!1;return St(e)>=0}function Ot(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function jt(e){let t,r=Object.prototype.toString.call(e);if(t="[object Promise]"===r,t)return!0;if("[object Function]"!==r)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}function Et(e){return"[object Object]"===Object.prototype.toString.call(e)}function Rt(e,t){return!!Et(e)&&(!(!tt(t)&&!ht(t))&&t in e)}function At(e,t,r){var n=null==e?0:e.length;return n?function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(e,(t=r||void 0===t?1:dt(t))<0?0:t,n):[]}function xt(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function Tt(e){return"[object Array]"===Object.prototype.toString.call(e)}function kt(e,t){let r=xt();if(!Tt(e)&&!Et(e))return r.reject("rs is not an array or object"),r;let n=!1;if(Et(e)){n=!0;let t=[];Ge(e,(e,r)=>{t.push({k:r,v:e})}),e=t}Ot(t)||(t=function(e){return e});let o=-1,i=[];return e.reduce(function(e,r){return e.then(function(e){i.push(e),o+=1;let s=o,a=r;return n&&(s=r.k,a=r.v),Ot(t)?t(a,s):a})},Promise.resolve()).then(function(e){i.push(e),i=At(i),r.resolve(i)}).catch(function(e){r.reject(e)}),r}function $t(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function Ct(t){return $t(t,{fs:e})}function Dt(e,t={}){let r=pe(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Nt(e,t={}){let r=pe(t,"fs");if($t(e,{fs:r}))return{success:"input folder is already exists: "+e};if(r.existsSync(e))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function Pt(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");Qe(i)||(i=!0);let s="";return s=i?function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Dt(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{Nt(n.dirname(t),{fs:o}),o.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Dt(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{Nt(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),s=o.createWriteStream(t);i.on("error",n),s.on("error",n),s.on("finish",r),i.pipe(s)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),s}function Mt(r,n,o={}){return Pt(r,n,{path:t,fs:e,...o})}function Ft(r){return function(e,t={}){let r=pe(t,"path"),n=pe(t,"fs");if(!n.existsSync(e)){let t=Nt(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!$t(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let o of t){let t=r.join(e,o);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}(r,{path:t,fs:e})}function Lt(t){return Nt(t,{fs:e})}function Ut(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!$t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),s=n.resolve(t,r),a=o.lstatSync(i);if(a.isDirectory())Nt(s,{fs:o}),Ut(i,s,{path:n,fs:o});else if(a.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,s)}else Nt(n.dirname(s),{fs:o}),o.copyFileSync(i,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function Bt(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");Qe(i)||(i=!0);let s="";return s=i?Ut(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!$t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),c=o.lstatSync(r);if(c.isDirectory())Nt(a,{fs:o}),await i(r,a);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,a)}else Nt(n.dirname(a),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(a);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},s=null;return await i(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:o}),s}function It(r,n,o={}){return Bt(r,n,{path:t,fs:e,...o})}function qt(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!$t(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}(t,{fs:e})}function zt(r,n=1){return function(e,t=1,r={}){let n=1,o=pe(r,"path"),i=pe(r,"fs");if(!$t(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return $t(r,{fs:i})?(Ge(i.readdirSync(r),function(a){let c=o.resolve(r,a),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(s.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(c))),n-=1):s.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),s):s}(e)}(r,n,{path:t,fs:e})}function Ht(t,n={}){return async function(e,t={}){let n=pe(t,"fs"),o=pe(t,"chunkSize");if(ht(o)||(o=67108864),o=yt(o),!Dt(e,{fs:n}))return Promise.reject("fp is not a file");let i=xt();try{let{create64:t}=await r(),s=t(),a=n.createReadStream(e,{highWaterMark:o});a.on("data",e=>{s.update(e)}),a.on("end",()=>{let e=s.digest().toString(16).padStart(16,"0");i.resolve(e)}),a.on("error",i.reject)}catch(e){i.reject(e.toString())}return i}(t,{fs:e,...n})}var Jt=U(f,"DataView"),Wt=U(f,"Promise"),Yt=U(f,"Set"),Vt=U(f,"WeakMap"),Kt="[object Map]",Gt="[object Promise]",Zt="[object Set]",Xt="[object WeakMap]",Qt="[object DataView]",er=$(Jt),tr=$(V),rr=$(Wt),nr=$(Yt),or=$(Vt),ir=b;(Jt&&ir(new Jt(new ArrayBuffer(1)))!=Qt||V&&ir(new V)!=Kt||Wt&&ir(Wt.resolve())!=Gt||Yt&&ir(new Yt)!=Zt||Vt&&ir(new Vt)!=Xt)&&(ir=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?$(r):"";if(n)switch(n){case er:return Qt;case tr:return Kt;case rr:return Gt;case nr:return Zt;case or:return Xt}return t});var sr=ir;function ar(e){return function(t){return null==t?void 0:t[e]}}var cr=ar("length"),ur=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var lr="\\ud800-\\udfff",fr="["+lr+"]",dr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",pr="\\ud83c[\\udffb-\\udfff]",hr="[^"+lr+"]",yr="(?:\\ud83c[\\udde6-\\uddff]){2}",mr="[\\ud800-\\udbff][\\udc00-\\udfff]",gr="(?:"+dr+"|"+pr+")"+"?",vr="[\\ufe0e\\ufe0f]?",br=vr+gr+("(?:\\u200d(?:"+[hr,yr,mr].join("|")+")"+vr+gr+")*"),wr="(?:"+[hr+dr+"?",dr,yr,mr,fr].join("|")+")",Sr=RegExp(pr+"(?="+pr+")|"+wr+br,"g");function _r(e){return function(e){return ur.test(e)}(e)?function(e){for(var t=Sr.lastIndex=0;Sr.test(e);)++t;return t}(e):cr(e)}function Or(e){if(null==e)return 0;if(Je(e))return"string"==typeof(t=e)||!c(t)&&w(t)&&"[object String]"==b(t)?_r(e):e.length;var t,r=sr(e);return"[object Map]"==r||"[object Set]"==r?e.size:He(e).length}function jr(e){if(Et(e)){for(let t in e)return!0;return!1}return!1}var Er="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ar(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var xr={exports:{}};var Tr,kr={exports:{}},$r=Ar(Object.freeze({__proto__:null,default:{}}));function Cr(){return Tr||(Tr=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==Er&&Er.crypto&&(r=Er.crypto),!r)try{r=$r}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},s=i.lib={},a=s.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}});var h=i.algo={};return i}(Math),t)}(kr)),kr.exports}!function(e){e.exports=Cr().enc.Utf8}(xr);var Dr=Rr(xr.exports),Nr={exports:{}};!function(e){var t;e.exports=(t=Cr(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=a<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var s=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Nr);var Pr=Rr(Nr.exports);function Mr(e){if(!tt(e))return"";let t=Dr.parse(e);return Pr.stringify(t)}function Fr(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Lr(e,t){var r=[];return Ve(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Ur(e){var t=this.__data__=new Y(e);this.size=t.size}Ur.prototype.clear=function(){this.__data__=new Y,this.size=0},Ur.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ur.prototype.get=function(e){return this.__data__.get(e)},Ur.prototype.has=function(e){return this.__data__.has(e)},Ur.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};function Br(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new G;++t<r;)this.add(e[t])}function Ir(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function qr(e,t){return e.has(t)}Br.prototype.add=Br.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Br.prototype.has=function(e){return this.__data__.has(e)};function zr(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,p=2&r?new Br:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var h=e[f],y=t[f];if(n)var m=s?n(y,h,f,t,e,i):n(h,y,f,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!Ir(t,function(e,t){if(!qr(p,t)&&(h===e||o(h,e,r,n,i)))return p.push(t)})){d=!1;break}}else if(h!==y&&!o(h,y,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}var Hr=f.Uint8Array;function Jr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Wr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Yr=d?d.prototype:void 0,Vr=Yr?Yr.valueOf:void 0;var Kr=Object.prototype.propertyIsEnumerable,Gr=Object.getOwnPropertySymbols,Zr=Gr?function(e){return null==e?[]:(e=Object(e),Fr(Gr(e),function(t){return Kr.call(e,t)}))}:function(){return[]};function Xr(e){return function(e,t,r){var n=t(e);return c(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,We,Zr)}var Qr=Object.prototype.hasOwnProperty;var en="[object Arguments]",tn="[object Array]",rn="[object Object]",nn=Object.prototype.hasOwnProperty;function on(e,t,r,n,o,i){var s=c(e),a=c(t),u=s?tn:sr(e),l=a?tn:sr(t),f=(u=u==en?rn:u)==rn,d=(l=l==en?rn:l)==rn,p=u==l;if(p&&Re(e)){if(!Re(t))return!1;s=!0,f=!1}if(p&&!f)return i||(i=new Ur),s||Fe(e)?zr(e,t,r,n,o,i):function(e,t,r,n,o,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Hr(e),new Hr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Jr;case"[object Set]":var c=1&n;if(a||(a=Wr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=zr(a(e),a(t),n,o,i,s);return s.delete(e),l;case"[object Symbol]":if(Vr)return Vr.call(e)==Vr.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var h=f&&nn.call(e,"__wrapped__"),y=d&&nn.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,g=y?t.value():t;return i||(i=new Ur),o(m,g,r,n,i)}}return!!p&&(i||(i=new Ur),function(e,t,r,n,o,i){var s=1&r,a=Xr(e),c=a.length;if(c!=Xr(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:Qr.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=s;++u<c;){var y=e[l=a[u]],m=t[l];if(n)var g=s?n(m,y,l,t,e,i):n(y,m,l,e,t,i);if(!(void 0===g?y===m||o(y,m,r,n,i):g)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))}function sn(e,t,r,n,o){return e===t||(null==e||null==t||!w(e)&&!w(t)?e!=e&&t!=t:on(e,t,r,n,sn,o))}function an(e){return e==e&&!E(e)}function cn(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function un(e){var t=function(e){for(var t=We(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,an(o)]}return t}(e);return 1==t.length&&t[0][2]?cn(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],l=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var f=new Ur;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?sn(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}}function ln(e,t){return null!=e&&t in Object(e)}function fn(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=le(t,e)).length,i=!1;++n<o;){var s=fe(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Te(o)&&xe(s,o)&&(c(e)||_e(e))}(e,t,ln)}function dn(e){return j(e)?ar(fe(e)):function(e){return function(t){return de(t,e)}}(e)}function pn(e){return"function"==typeof e?e:null==e?Ke:"object"==typeof e?c(e)?function(e,t){return j(e)&&an(t)?cn(fe(e),t):function(r){var n=pe(r,e);return void 0===n&&n===t?fn(r,e):sn(t,n,3)}}(e[0],e[1]):un(e):dn(e)}function hn(e,t){return(c(e)?Fr:Lr)(e,pn(t))}function yn(e,t,r,n={}){let o=pe(n,"withInfor");Qe(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!tt(r))return console.log("invalid key"),o&&(i.infor={}),i;Tt(e)||(e=[e]),Tt(t)||(t=[t]),e=hn(e,e=>Rt(e,r)),t=hn(t,e=>Rt(e,r));let s=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=s.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),s.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(s.values()),o){let e={};for(let t of i.del)e[t[r]]="del";for(let t of i.add)e[t[r]]="add";for(let t of i.diff)e[t[r]]="diff";for(let t of i.same)e[t[r]]="same";i.infor=e}return i}var mn={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",a="day",c="week",u="month",l="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,s=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:a,D:d,h:s,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,o=a}return!n&&o&&(b=o),o||!n&&b},j=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},E=v;E.l=O,E.i=_,E.w=function(e,t){return j(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var r=j(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return j(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<j(e)},g.$g=function(e,t,r){return E.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,n=!!E.u(t)||t,l=E.p(e),p=function(e,t){var o=E.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(a)},h=function(e,t){return E.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},y=this.$W,m=this.$M,g=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case f:return n?p(1,0):p(31,11);case u:return n?p(1,m):p(0,m+1);case c:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(n?g-w:g+(6-w),m);case a:case d:return h(v+"Hours",0);case s:return h(v+"Minutes",1);case i:return h(v+"Seconds",2);case o:return h(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var r,c=E.p(e),l="set"+(this.$u?"UTC":""),p=(r={},r[a]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[s]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===a?this.$D+(t-this.$W):t;if(c===u||c===f){var y=this.clone().set(d,1);y.$d[p](h),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[E.p(e)]()},g.add=function(n,l){var d,p=this;n=Number(n);var h=E.p(l),y=function(e){var t=j(p);return E.w(t.date(t.date()+Math.round(e*n)),p)};if(h===u)return this.set(u,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===a)return y(1);if(h===c)return y(7);var m=(d={},d[i]=t,d[s]=r,d[o]=e,d)[h]||1,g=this.$d.getTime()+n*m;return E.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),i=this.$H,s=this.$m,a=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return E.s(i%12||12,e,"0")},h=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(y,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return E.s(t.$y,4,"0");case"M":return a+1;case"MM":return E.s(a+1,2,"0");case"MMM":return f(r.monthsShort,a,u,3);case"MMMM":return f(u,a);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return E.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,s,!0);case"A":return h(i,s,!1);case"m":return String(s);case"mm":return E.s(s,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,d,p){var h,y=this,m=E.p(d),g=j(n),v=(g.utcOffset()-this.utcOffset())*t,b=this-g,w=function(){return E.m(y,g)};switch(m){case f:h=w()/12;break;case u:h=w();break;case l:h=w()/3;break;case c:h=(b-v)/6048e5;break;case a:h=(b-v)/864e5;break;case s:h=b/r;break;case i:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:E.a(h)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return E.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),A=R.prototype;return j.prototype=A,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",f],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),j.extend=function(e,t){return e.$i||(e(t,R,j),e.$i=!0),j},j.locale=O,j.isDayjs=_,j.unix=function(e){return j(1e3*e)},j.en=w[b],j.Ls=w,j.p={},j}()}(mn);var gn=Rr(mn.exports);function vn(){if(!Ot(gn))throw new Error("invalid dayjs");return gn().format("YYYY-MM-DDTHH:mm:ssZ")}var bn={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,i,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,i),!0;case 6:return l.fn.call(l.context,t,n,o,i,s),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||s(this,i);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(bn);var wn=Rr(bn.exports);function Sn(){return new wn}function _n(e){if(!mt(e))return!1;return St(e)>0}var On=Ie(Object.getPrototypeOf,Object),jn=Function.prototype,En=Object.prototype,Rn=jn.toString,An=En.hasOwnProperty,xn=Rn.call(Object);function Tn(e){if(!w(e))return!1;var t=b(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!function(e){if(!w(e)||"[object Object]"!=b(e))return!1;var t=On(e);if(null===t)return!0;var r=An.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Rn.call(r)==xn}(e)}function kn(e){if(!tt(e)&&!ht(e)&&!S(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function $n(e){let t="";if(Tn(e))t=e.message;else{if(et(e))return e;if(Et(e))return Rt(e,"message")?e.message:JSON.stringify(e);if(Tt(e))return JSON.stringify(e);t=kn(e)}return t}function Cn(t){return Dt(t,{fs:e})}function Dn(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"file does not exist: "+e};if(!Dt(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}(t,{fs:e})}function Nn(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function Pn(e=300){return new function(e){let t=[],r=null,n=null;return _n(e)||(e=300),e=St(e),function(o,...i){Ot(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(Date.now()-n>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(r),r=null)},10))):console.log("func is not a function")}}(e)}function Mn(e,r={}){let i=pe(r,"polling");Qe(i)||(i=!1);let s=pe(r,"timeInterval");_n(s)||(s=100),s=St(s);let a=pe(r,"timeBinaryInterval");_n(a)||(a=300),a=St(a);let c=new n.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&Cn(u)&&(l=o.watch(u,{usePolling:i,interval:s,binaryInterval:a,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},s);return c.clear=()=>{(()=>{if(null!==l){try{l.unwatch(u)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(f)},c}function Fn(t,r,n={}){Ct(t)||Lt(t),Ct(r)||Lt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,s=t=>{let r={};try{r=function(e){if(!tt(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},a=(t,r)=>{try{let n=function(e,t=!1){if(Nn(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>pe(s(e),t,""),u=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},l=(e,t)=>{let r=s(e);Rt(r,t)&&delete r[t],a(e,r)},f=()=>s(o),d=e=>a(o,e),p=e=>c(o,e),h=()=>s(i),y=e=>a(i,e),m=e=>c(i,e),g=(e,t)=>u(i,e,t),v=e=>l(i,e),b=e=>{let t=[];return Ge(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=Sn();return e.set=(t,r)=>{((e,t)=>{u(o,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=p,e.remove=t=>{(e=>{l(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=Sn(),t=Pn(300),r=Mn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=xt(),r=f();if(!jr(r))return t.resolve("no src"),t;let n=h(),o=b(r),i=yn(b(n),o,"fp",{withInfor:!1}),s=xt();return s.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:s}),t})().catch(()=>{})})}),e.set=g,e.get=m,e.remove=v,e.readKp=h,e.writeKp=y,e.clear=r.clear,e}}}let Ln=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Ln).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("w-dwdata-tweqod.umd.js",document.baseURI).href),Un=t.dirname(Ln);let Bn=async(r={})=>{let n=pe(r,"keyId");tt(n)||(n="id");let o=pe(r,"fdDwAttime");tt(o)||(o="./_dwAttime"),Ct(o)||Lt(o);let i=pe(r,"fdDwCurrent");tt(i)||(i="./_dwCurrent"),Ct(i)||Lt(i);let a=pe(r,"fdTagRemove");tt(a)||(a="./_tagRemove");let c=pe(r,"fdResult");tt(c)||(c="./_result"),Ct(c)||Lt(c);let u=pe(r,"fdTaskCpActualSrc");tt(u)||(u="./_taskCpActualSrc"),Ct(u)||Lt(u);let l=pe(r,"fdTaskCpSrc");tt(l)||(l="./_taskCpSrc"),Ct(l)||Lt(l);let f=pe(r,"fdLog");tt(f)||(f="./_logs"),Ct(f)||Lt(f);let d=pe(r,"funDownload");if(!Ot(d))throw new Error("invalid funDownload");let p=pe(r,"funGetCurrent");if(!Ot(p))throw new Error("invalid funGetCurrent");let h=pe(r,"funAdd");if(!Ot(h))throw new Error("invalid funAdd");let y=pe(r,"funModify");if(!Ot(y))throw new Error("invalid funModify");let m=pe(r,"funRemove");if(!Ot(m))throw new Error("invalid funRemove");let g=pe(r,"timeToleranceRemove");_t(g)||(g=0),g=yt(g),g>0&&!Ct(a)&&Lt(a);let v=Sn(),b=function(e={}){let r=pe(e,"fdLog");tt(r)||(r="./_logs");let n=pe(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=s.transport({targets:[{level:"info",target:t.resolve(Un,"./formatter.mjs"),options:{interval:n,fdLog:r}}]});return s(o)}({fdLog:f,interval:"hr"}),w={info:e=>{b.info(e),v.emit("change",{type:"info",...e})},warn:e=>{b.warn(e),v.emit("change",{type:"warn",...e})},error:e=>{b.error(e),v.emit("change",{type:"error",...e})}},S=async t=>{let r=await(async(t,r,n="")=>{let o="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);o=a;let i=`${o}/${r}`,s={time:vn(),hash:n};e.writeFileSync(i,JSON.stringify(s),"utf8")})("remove",t);return r},_=async(t,r={})=>{let n=await(async(t,r,n={})=>{let o=pe(n,"checkTime");Qe(o)||(o=!0);let i=pe(n,"timeNow"),s="",c=0;if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);s=a,c=g;let u=`${s}/${r}`;if(!Cn(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!o)return{b:!0,msg:`fp[${u}] exists`};if(!jr(i))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=pe(JSON.parse(l),"time"),d=gn(f),p=i.diff(d,"millisecond"),h=p>=c;return h?{b:h,msg:`time difference[${p}] >= time tolerance[${c}]`}:{b:h,msg:"allowable time difference"}})("remove",t,r);return n},O=async t=>{let r=await(async(t,r)=>{let n="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);n=a;let o=`${n}/${r}`;if(!Cn(o))return;let i=e.readFileSync(o,"utf8"),s=JSON.parse(i),c=Dn(o);if(c.error)throw new Error(c.error);return s})("remove",t);return r},j=null,E=(async()=>{await function(e=10){ht(e)||(e=10);let t=xt();return setTimeout(function(){t.resolve()},e),t}(1);let e=gn(),t=()=>{let t=gn(),r=t.diff(e,"second");return{timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:t.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${r}s`}};w.info({event:"start",msg:"running..."});let r="",s=Fn(u,u).buildSrc(),a=Fn(l,l);j=a.buildSrc();let c=[];try{w.info({event:"proc-callfun-download",msg:"start..."});let e=d();jt(e)&&(e=await e),w.info({event:"proc-callfun-download",num:Or(e),msg:"done"}),c=e}catch(e){console.log(e),w.error({event:"proc-callfun-download",msg:$n(e)}),r="error at proc-callfun-download"}if(tt(r))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...t(),msg:r});let f=[];try{w.info({event:"proc-callfun-getCurrent",msg:"start..."});let e=p();jt(e)&&(e=await e),w.info({event:"proc-callfun-getCurrent",num:Or(e),msg:"done"}),f=e}catch(e){console.log(e),w.error({event:"proc-callfun-getCurrent",msg:$n(e)}),r="error at proc-callfun-getCurrent"}if(tt(r))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...t(),msg:r});if(0===Or(c))return console.log("invalid data, task canceled"),void w.info({event:"cancel",...t(),msg:"no data"});let v=null;try{w.info({event:"compare",msg:"start..."}),v=yn(f,c,n,{withInfor:!1}),w.info({event:"compare",msg:"done"})}catch(e){console.log(e),w.error({event:"compare",msg:$n(e)})}if(!jr(v))return console.log("can not calculate the difference, task canceled"),void w.info({event:"cancel",...t(),msg:"can not calculate the difference between the data before and after"});if(0!==Or(v.del)||0!==Or(v.add)||0!==Or(v.diff)){if(await kt(v.del,async e=>{if(!tt(r)){try{w.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"start..."});let t=m(e);jt(t)&&(t=await t)}catch(t){console.log(t),w.error({event:"proc-remove-callfun-remove",[n]:e[n],msg:$n(t)}),r="error at proc-remove-callfun-remove"}if(!tt(r))try{if(s.remove(e[n]),g<=0)j.remove(e[n]),w.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"done"});else{(await _(e[n],{checkTime:!1})).b||(await S(e[n]),w.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"tag"}))}}catch(t){console.log(t),w.error({event:"proc-remove-otkActual-remove",[n]:e[n],msg:$n(t)}),r="error at proc-remove-otkActual-remove"}}}),tt(r))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...t(),msg:r});if(await kt(v.add,async e=>{if(!tt(r)){try{w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"start..."});let t=h(e);jt(t)&&(t=await t)}catch(t){console.log(t),w.error({event:"proc-add-callfun-add",[n]:e[n],msg:$n(t)}),r="error at proc-add-callfun-add"}if(!tt(r))try{let t=Mr(JSON.stringify(e));if(s.set(e[n],t),g<=0)j.set(e[n],t),w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"});else{(await _(e[n],{checkTime:!1})).b?(await O(e[n]),w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"release-tag"})):(j.set(e[n],t),w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"}))}}catch(t){console.log(t),w.error({event:"proc-add-otkActual-set",[n]:e[n],msg:$n(t)}),r="error at proc-add-otkActual-set"}}}),tt(r))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...t(),msg:r});if(await kt(v.diff,async e=>{if(!tt(r)){try{w.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"start..."});let t=y(e);jt(t)&&(t=await t)}catch(t){console.log(t),w.error({event:"proc-diff-callfun-modify",[n]:e[n],msg:$n(t)}),r="error at proc-diff-callfun-modify"}if(!tt(r))try{let t=Mr(JSON.stringify(e));s.set(e[n],t),j.set(e[n],t),w.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"done"})}catch(t){console.log(t),w.error({event:"proc-diff-otkActual-set",[n]:e[n],msg:$n(t)}),r="error at proc-diff-otkActual-set"}}}),tt(r))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...t(),msg:r});{Ft(i);let e=It(o,i);if(e.error)return console.log(e.error),w.error({event:"task-update-rawData",msg:e.error}),void(r="error at task-update-rawData")}if(tt(r))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...t(),msg:r});w.info({event:"end",...t(),msg:"done"})}else w.info({event:"cancel",...t(),msg:"no difference"})})().catch(e=>{console.log(e),w.error({event:"proc-coreSrc",msg:$n(e)})}),R=(async()=>{await async function(e,t={}){let r=null,n=xt();if(!Ot(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return jt(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=pe(t,"attemptNum",null);_n(i)||(i=200);let s=pe(t,"timeInterval",null);_n(s)||(s=1e3);let a=0,c=setInterval(async()=>{a+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),a>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},s);return n}(()=>null!==j);let e=gn(),t=zt(a,1);0!==Or(t)&&await kt(t,async t=>{(await _(t.name,{timeNow:e,checkTime:!0})).b&&(await O(t.name),w.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"release-tag"}),j.remove(t.name),w.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),w.error({event:"proc-coreDetect",msg:$n(e)})});return v.srlog=w,Promise.all([E,R]).finally(()=>{v.emit("end")}),v};function In(e){return!!Nn(e)||(!!function(e){return"[object Null]"===Object.prototype.toString.call(e)}(e)||(!!function(e){if(Et(e)){for(let t in e)return!1;return!0}return!1}(e)||(!!function(e){return!(!et(e)||""!==e)}(e)||(!!function(e){return!!Tt(e)&&0===e.length}(e)||!!pt(e)))))}function qn(e,t){return tt(e)&&_t(t)?0===(t=St(t))?e:function(e,t){if(!tt(e))return"";if(!_t(t))return"";if(0===(t=St(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function zn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hn}=Object.prototype,{getPrototypeOf:Jn}=Object,{iterator:Wn,toStringTag:Yn}=Symbol,Vn=(e=>t=>{const r=Hn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>Vn(t)===e),Gn=e=>t=>typeof t===e,{isArray:Zn}=Array,Xn=Gn("undefined");function Qn(e){return null!==e&&!Xn(e)&&null!==e.constructor&&!Xn(e.constructor)&&ro(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const eo=Kn("ArrayBuffer");const to=Gn("string"),ro=Gn("function"),no=Gn("number"),oo=e=>null!==e&&"object"==typeof e,io=e=>{if("object"!==Vn(e))return!1;const t=Jn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Yn in e||Wn in e)},so=Kn("Date"),ao=Kn("File"),co=Kn("Blob"),uo=Kn("FileList"),lo=Kn("URLSearchParams"),[fo,po,ho,yo]=["ReadableStream","Request","Response","Headers"].map(Kn);function mo(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Zn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Qn(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function go(e,t){if(Qn(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const vo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,bo=e=>!Xn(e)&&e!==vo;const wo=(So="undefined"!=typeof Uint8Array&&Jn(Uint8Array),e=>So&&e instanceof So);var So;const _o=Kn("HTMLFormElement"),Oo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),jo=Kn("RegExp"),Eo=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};mo(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const Ro=Kn("AsyncFunction"),Ao=(xo="function"==typeof setImmediate,To=ro(vo.postMessage),xo?setImmediate:To?(ko=`axios@${Math.random()}`,$o=[],vo.addEventListener("message",({source:e,data:t})=>{e===vo&&t===ko&&$o.length&&$o.shift()()},!1),e=>{$o.push(e),vo.postMessage(ko,"*")}):e=>setTimeout(e));var xo,To,ko,$o;const Co="undefined"!=typeof queueMicrotask?queueMicrotask.bind(vo):"undefined"!=typeof process&&process.nextTick||Ao;var Do={isArray:Zn,isArrayBuffer:eo,isBuffer:Qn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ro(e.append)&&("formdata"===(t=Vn(e))||"object"===t&&ro(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&eo(e.buffer),t},isString:to,isNumber:no,isBoolean:e=>!0===e||!1===e,isObject:oo,isPlainObject:io,isEmptyObject:e=>{if(!oo(e)||Qn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:fo,isRequest:po,isResponse:ho,isHeaders:yo,isUndefined:Xn,isDate:so,isFile:ao,isBlob:co,isRegExp:jo,isFunction:ro,isStream:e=>oo(e)&&ro(e.pipe),isURLSearchParams:lo,isTypedArray:wo,isFileList:uo,forEach:mo,merge:function e(){const{caseless:t}=bo(this)&&this||{},r={},n=(n,o)=>{const i=t&&go(r,o)||o;io(r[i])&&io(n)?r[i]=e(r[i],n):io(n)?r[i]=e({},n):Zn(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&mo(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(mo(t,(t,n)=>{r&&ro(t)?e[n]=zn(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&Jn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Vn,kindOfTest:Kn,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(Zn(e))return e;let t=e.length;if(!no(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Wn]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:_o,hasOwnProperty:Oo,hasOwnProp:Oo,reduceDescriptors:Eo,freezeMethods:e=>{Eo(e,(t,r)=>{if(ro(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];ro(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return Zn(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:go,global:vo,isContextDefined:bo,isSpecCompliantForm:function(e){return!!(e&&ro(e.append)&&"FormData"===e[Yn]&&e[Wn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(oo(e)){if(t.indexOf(e)>=0)return;if(Qn(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Zn(e)?[]:{};return mo(e,(e,t)=>{const i=r(e,n+1);!Xn(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Ro,isThenable:e=>e&&(oo(e)||ro(e))&&ro(e.then)&&ro(e.catch),setImmediate:Ao,asap:Co,isIterable:e=>null!=e&&ro(e[Wn])};function No(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Do.inherits(No,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Do.toJSONObject(this.config),code:this.code,status:this.status}}});const Po=No.prototype,Mo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Mo[e]={value:e}}),Object.defineProperties(No,Mo),Object.defineProperty(Po,"isAxiosError",{value:!0}),No.from=(e,t,r,n,o,i)=>{const s=Object.create(Po);return Do.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),No.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function Fo(e){return Do.isPlainObject(e)||Do.isArray(e)}function Lo(e){return Do.endsWith(e,"[]")?e.slice(0,-2):e}function Uo(e,t,r){return e?e.concat(t).map(function(e,t){return e=Lo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Bo=Do.toFlatObject(Do,{},null,function(e){return/^is[A-Z]/.test(e)});function Io(e,t,r){if(!Do.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Do.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Do.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Do.isSpecCompliantForm(t);if(!Do.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Do.isDate(e))return e.toISOString();if(Do.isBoolean(e))return e.toString();if(!a&&Do.isBlob(e))throw new No("Blob is not supported. Use a Buffer instead.");return Do.isArrayBuffer(e)||Do.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(Do.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Do.isArray(e)&&function(e){return Do.isArray(e)&&!e.some(Fo)}(e)||(Do.isFileList(e)||Do.endsWith(r,"[]"))&&(a=Do.toArray(e)))return r=Lo(r),a.forEach(function(e,n){!Do.isUndefined(e)&&null!==e&&t.append(!0===s?Uo([r],n,i):null===s?r:r+"[]",c(e))}),!1;return!!Fo(e)||(t.append(Uo(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Bo,{defaultVisitor:u,convertValue:c,isVisitable:Fo});if(!Do.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Do.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Do.forEach(r,function(r,i){!0===(!(Do.isUndefined(r)||null===r)&&o.call(t,r,Do.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function qo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function zo(e,t){this._pairs=[],e&&Io(e,this,t)}const Ho=zo.prototype;function Jo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wo(e,t,r){if(!t)return e;const n=r&&r.encode||Jo;Do.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Do.isURLSearchParams(t)?t.toString():new zo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ho.append=function(e,t){this._pairs.push([e,t])},Ho.toString=function(e){const t=e?function(t){return e.call(this,t,qo)}:qo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Yo=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Do.forEach(this.handlers,function(t){null!==t&&e(t)})}},Vo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ko={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Go="undefined"!=typeof window&&"undefined"!=typeof document,Zo="object"==typeof navigator&&navigator||void 0,Xo=Go&&(!Zo||["ReactNative","NativeScript","NS"].indexOf(Zo.product)<0),Qo="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ei=Go&&window.location.href||"http://localhost";var ti={...Object.freeze({__proto__:null,hasBrowserEnv:Go,hasStandardBrowserEnv:Xo,hasStandardBrowserWebWorkerEnv:Qo,navigator:Zo,origin:ei}),...Ko};function ri(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&Do.isArray(n)?n.length:i,a)return Do.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&Do.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Do.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s}if(Do.isFormData(e)&&Do.isFunction(e.entries)){const r={};return Do.forEachEntry(e,(e,n)=>{t(function(e){return Do.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ni={transitional:Vo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Do.isObject(e);o&&Do.isHTMLForm(e)&&(e=new FormData(e));if(Do.isFormData(e))return n?JSON.stringify(ri(e)):e;if(Do.isArrayBuffer(e)||Do.isBuffer(e)||Do.isStream(e)||Do.isFile(e)||Do.isBlob(e)||Do.isReadableStream(e))return e;if(Do.isArrayBufferView(e))return e.buffer;if(Do.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Io(e,new ti.classes.URLSearchParams,{visitor:function(e,t,r,n){return ti.isNode&&Do.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Do.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Io(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Do.isString(e))try{return(t||JSON.parse)(e),Do.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ni.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Do.isResponse(e)||Do.isReadableStream(e))return e;if(e&&Do.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw No.from(e,No.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ti.classes.FormData,Blob:ti.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Do.forEach(["delete","get","head","post","put","patch"],e=>{ni.headers[e]={}});var oi=ni;const ii=Do.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const si=Symbol("internals");function ai(e){return e&&String(e).trim().toLowerCase()}function ci(e){return!1===e||null==e?e:Do.isArray(e)?e.map(ci):String(e)}function ui(e,t,r,n,o){return Do.isFunction(n)?n.call(this,t,r):(o&&(t=r),Do.isString(t)?Do.isString(n)?-1!==t.indexOf(n):Do.isRegExp(n)?n.test(t):void 0:void 0)}class li{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ai(t);if(!o)throw new Error("header name must be a non-empty string");const i=Do.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ci(e))}const i=(e,t)=>Do.forEach(e,(e,r)=>o(e,r,t));if(Do.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Do.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&ii[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Do.isObject(e)&&Do.isIterable(e)){let r,n,o={};for(const t of e){if(!Do.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Do.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=ai(e)){const r=Do.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Do.isFunction(t))return t.call(this,e,r);if(Do.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ai(e)){const r=Do.findKey(this,e);return!(!r||void 0===this[r]||t&&!ui(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ai(e)){const o=Do.findKey(r,e);!o||t&&!ui(0,r[o],o,t)||(delete r[o],n=!0)}}return Do.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!ui(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Do.forEach(this,(n,o)=>{const i=Do.findKey(r,o);if(i)return t[i]=ci(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=ci(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Do.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Do.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[si]=this[si]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ai(e);t[n]||(!function(e,t){const r=Do.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Do.isArray(e)?e.forEach(n):n(e),this}}li.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Do.reduceDescriptors(li.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Do.freezeMethods(li);var fi=li;function di(e,t){const r=this||oi,n=t||r,o=fi.from(n.headers);let i=n.data;return Do.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function pi(e){return!(!e||!e.__CANCEL__)}function hi(e,t,r){No.call(this,null==e?"canceled":e,No.ERR_CANCELED,t,r),this.name="CanceledError"}function yi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new No("Request failed with status code "+r.status,[No.ERR_BAD_REQUEST,No.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Do.inherits(hi,No,{__CANCEL__:!0});const mi=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let l=s,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},gi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},vi=e=>(...t)=>Do.asap(()=>e(...t));var bi=ti.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ti.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ti.origin),ti.navigator&&/(msie|trident)/i.test(ti.navigator.userAgent)):()=>!0,wi=ti.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];Do.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Do.isString(n)&&s.push("path="+n),Do.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Si(e,t,r){let n=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const _i=e=>e instanceof fi?{...e}:e;function Oi(e,t){t=t||{};const r={};function n(e,t,r,n){return Do.isPlainObject(e)&&Do.isPlainObject(t)?Do.merge.call({caseless:n},e,t):Do.isPlainObject(t)?Do.merge({},t):Do.isArray(t)?t.slice():t}function o(e,t,r,o){return Do.isUndefined(t)?Do.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Do.isUndefined(t))return n(void 0,t)}function s(e,t){return Do.isUndefined(t)?Do.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(_i(e),_i(t),0,!0)};return Do.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,s=i(e[n],t[n],n);Do.isUndefined(s)&&i!==a||(r[n]=s)}),r}var ji=e=>{const t=Oi({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=fi.from(a),t.url=Wo(Si(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Do.isFormData(n))if(ti.hasStandardBrowserEnv||ti.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ti.hasStandardBrowserEnv&&(o&&Do.isFunction(o)&&(o=o(t)),o||!1!==o&&bi(t.url))){const e=i&&s&&wi.read(s);e&&a.set(i,e)}return t};var Ei="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=ji(e);let o=n.data;const i=fi.from(n.headers).normalize();let s,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=fi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());yi(function(e){t(e),h()},function(e){r(e),h()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new No("Request aborted",No.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new No("Network Error",No.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Vo;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new No(t,o.clarifyTimeoutError?No.ETIMEDOUT:No.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&Do.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),Do.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),p&&([c,l]=mi(p,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=mi(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=t=>{y&&(r(!t||t.type?new hi(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ti.protocols.indexOf(g)?r(new No("Unsupported protocol "+g+":",No.ERR_BAD_REQUEST,e)):y.send(o||null)})};var Ri=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof No?t:new hi(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new No(`timeout ${t} of ms exceeded`,No.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>Do.asap(s),a}};const Ai=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},xi=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Ti=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of xi(e))yield*Ai(r,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},ki="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$i=ki&&"function"==typeof ReadableStream,Ci=ki&&("function"==typeof TextEncoder?(Di=new TextEncoder,e=>Di.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Di;const Ni=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Pi=$i&&Ni(()=>{let e=!1;const t=new Request(ti.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Mi=$i&&Ni(()=>Do.isReadableStream(new Response("").body)),Fi={stream:Mi&&(e=>e.body)};var Li;ki&&(Li=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Fi[e]&&(Fi[e]=Do.isFunction(Li[e])?t=>t[e]():(t,r)=>{throw new No(`Response type '${e}' is not supported`,No.ERR_NOT_SUPPORT,r)})}));const Ui=async(e,t)=>{const r=Do.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Do.isBlob(e))return e.size;if(Do.isSpecCompliantForm(e)){const t=new Request(ti.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Do.isArrayBufferView(e)||Do.isArrayBuffer(e)?e.byteLength:(Do.isURLSearchParams(e)&&(e+=""),Do.isString(e)?(await Ci(e)).byteLength:void 0)})(t):r};var Bi=ki&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=ji(e);u=u?(u+"").toLowerCase():"text";let p,h=Ri([o,i&&i.toAbortSignal()],s);const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&Pi&&"get"!==r&&"head"!==r&&0!==(m=await Ui(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Do.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=gi(m,mi(vi(c)));n=Ti(r.body,65536,e,t)}}Do.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let i=await fetch(p,d);const s=Mi&&("stream"===u||"response"===u);if(Mi&&(a||s&&y)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=Do.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&gi(t,mi(vi(a),!0))||[];i=new Response(Ti(i.body,65536,r,()=>{n&&n(),y&&y()}),e)}u=u||"text";let g=await Fi[Do.findKey(Fi,u)||"text"](i,e);return!s&&y&&y(),await new Promise((t,r)=>{yi(t,r,{data:g,headers:fi.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})})}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new No("Network Error",No.ERR_NETWORK,e,p),{cause:t.cause||t});throw No.from(t,t&&t.code,e,p)}});const Ii={http:null,xhr:Ei,fetch:Bi};Do.forEach(Ii,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const qi=e=>`- ${e}`,zi=e=>Do.isFunction(e)||null===e||!1===e;var Hi=e=>{e=Do.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!zi(r)&&(n=Ii[(t=String(r)).toLowerCase()],void 0===n))throw new No(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new No("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(qi).join("\n"):" "+qi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hi(null,e)}function Wi(e){Ji(e),e.headers=fi.from(e.headers),e.data=di.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Hi(e.adapter||oi.adapter)(e).then(function(t){return Ji(e),t.data=di.call(e,e.transformResponse,t),t.headers=fi.from(t.headers),t},function(t){return pi(t)||(Ji(e),t&&t.response&&(t.response.data=di.call(e,e.transformResponse,t.response),t.response.headers=fi.from(t.response.headers))),Promise.reject(t)})}const Yi="1.11.0",Vi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ki={};Vi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Yi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new No(n(o," has been removed"+(t?" in "+t:"")),No.ERR_DEPRECATED);return t&&!Ki[o]&&(Ki[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Vi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Gi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new No("options must be an object",No.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new No("option "+i+" must be "+r,No.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new No("Unknown option "+i,No.ERR_BAD_OPTION)}},validators:Vi};const Zi=Gi.validators;class Xi{constructor(e){this.defaults=e||{},this.interceptors={request:new Yo,response:new Yo}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Oi(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Gi.assertOptions(r,{silentJSONParsing:Zi.transitional(Zi.boolean),forcedJSONParsing:Zi.transitional(Zi.boolean),clarifyTimeoutError:Zi.transitional(Zi.boolean)},!1),null!=n&&(Do.isFunction(n)?t.paramsSerializer={serialize:n}:Gi.assertOptions(n,{encode:Zi.function,serialize:Zi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Gi.assertOptions(t,{baseUrl:Zi.spelling("baseURL"),withXsrfToken:Zi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Do.merge(o.common,o[t.method]);o&&Do.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=fi.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!a){const e=[Wi.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Wi.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Wo(Si((e=Oi(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Do.forEach(["delete","get","head","options"],function(e){Xi.prototype[e]=function(t,r){return this.request(Oi(r||{},{method:e,url:t,data:(r||{}).data}))}}),Do.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Oi(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Xi.prototype[e]=t(),Xi.prototype[e+"Form"]=t(!0)});var Qi=Xi;class es{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new hi(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new es(function(t){e=t}),cancel:e}}}var ts=es;const rs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(rs).forEach(([e,t])=>{rs[t]=e});var ns=rs;const os=function e(t){const r=new Qi(t),n=zn(Qi.prototype.request,r);return Do.extend(n,Qi.prototype,r,{allOwnKeys:!0}),Do.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Oi(t,r))},n}(oi);os.Axios=Qi,os.CanceledError=hi,os.CancelToken=ts,os.isCancel=pi,os.VERSION=Yi,os.toFormData=Io,os.AxiosError=No,os.Cancel=os.CanceledError,os.all=function(e){return Promise.all(e)},os.spread=function(e){return function(t){return e.apply(null,t)}},os.isAxiosError=function(e){return Do.isObject(e)&&!0===e.isAxiosError},os.mergeConfig=Oi,os.AxiosHeaders=fi,os.formToJSON=e=>ri(Do.isHTMLForm(e)?new FormData(e):e),os.getAdapter=Hi,os.HttpStatusCode=ns,os.default=os;var is=os;let ss=async(e,t={})=>{let r=null,n=pe(t,"keepAllData");Qe(n)||(n=!0);let o=await is.get(`https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001?Authorization=${e}`).catch(e=>{r=e});if(null!==r)return;let i=[...pe(o,"data.records.earthquake",[]),...pe(o,"data.records.Earthquake",[])];if(!Tt(s=i)||0===s.length||1===s.length&&In(s[0]))throw console.log("rEqsL",o),new Error("無法取得顯著有感地震之earthquake數據");var s;let a=[];return Ge(i,e=>{let t=pe(e,"earthquakeInfo.originTime",""),r=pe(e,"EarthquakeInfo.OriginTime",""),o=t||r;if(!tt(o))throw console.log("v",e),new Error(`無法取得originTime[${o}]`);let i=pe(e,"earthquakeInfo.magnitude.magnitudeType",""),s=pe(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeType",""),c=i||s;if(!tt(c))throw console.log("v",e),new Error(`無法取得magnitudeType[${c}]`);let u=pe(e,"earthquakeInfo.magnitude.magnitudeValue",""),l=pe(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeValue",""),f=u||l;if(!ht(f))throw console.log("v",e),new Error(`無法取得magnitudeValue[${f}]`);let d=pe(e,"ReportContent",""),p=f;p=kn(p);let h=gn(o),y=pe(e,"EarthquakeNo","");y=kn(y);let m=qn(y,3),g=o,v=h.format("YYYY-MM-DDTHH:mm:ssZ"),b=h.format("YYYYMMDDHHmmss"),w=pe(e,"EarthquakeInfo.FocalDepth","");w=kn(w);let S=pe(e,"EarthquakeInfo.Epicenter.Location",""),_=pe(e,"EarthquakeInfo.Epicenter.EpicenterLongitude","");_=kn(_);let O=pe(e,"EarthquakeInfo.Epicenter.EpicenterLatitude","");O=kn(O);let j={id:y,tag:"",number:m,time:v,timeRec:g,timeTag:b,ml:p,depth:w,description:d,location:S,intensity:"",longitude:_,latitude:O};n&&(j.data=e),a.push(j)}),a};return async(t,r={})=>{let n=pe(r,"keepAllData");Qe(n)||(n=!0);let o=pe(r,"fdDwStorage");tt(o)||(o="./_dwStorage"),Ct(o)||Lt(o);let i=pe(r,"fdDwAttime");tt(i)||(i="./_dwAttime"),Ct(i)||Lt(i);let s=pe(r,"fdDwCurrent");tt(s)||(s="./_dwCurrent"),Ct(s)||Lt(s);let a=pe(r,"fdResult");tt(a)||(a="./_result"),Ct(a)||Lt(a);let c=pe(r,"fdTaskCpSrc");tt(c)||(c="./_taskCpSrc"),Ct(c)||Lt(c);let u=pe(r,"fdLog");tt(u)||(u="./_logs"),Ct(u)||Lt(u);let l=pe(r,"funDownloadEqs"),f=pe(r,"funDownload"),d=pe(r,"funGetCurrent"),p=pe(r,"funAdd"),h=pe(r,"funModify"),y=pe(r,"funRemove"),m=pe(r,"timeToleranceRemove");_t(m)||(m=0),m=yt(m);let g=async()=>{let r=[];var a;Ot(l)?(r=l(),jt(r)&&(r=await r)):r=await ss(t,{keepAllData:n}),r=null==(a=r)?a:Ze.call(a),Ft(i),It(s,i);let c=(t=>{let r=zt(t,1),n=[];return Ge(r,t=>{let r=e.readFileSync(t.path,"utf8"),o=JSON.parse(r);n.push(o)}),n})(i),u={};return Ge(c,e=>{u[e.id]=e}),await kt(r,async t=>{let r=`${o}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8");let n=await Ht(r);if(Rt(u,t.id)){if(n!==u[t.id].hash){u[t.id].hash=n;let r=`${i}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(u[t.id]),"utf8")}}else{u[t.id]={id:t.id,hash:n};let r=`${i}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(u[t.id]),"utf8")}}),Xe(u)};Ot(f)||(f=g);let v=async()=>{let t=zt(s,1),r=[];return Ge(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};Ot(d)||(d=v);let b=async e=>{let t=`${a}/${e.id}`;Ct(t)&&qt(t)};Ot(y)||(y=b);let w=async e=>{let t=`${a}/${e.id}`;Ct(t)||Lt(t),Ft(t),Mt(`${o}/${e.id}.json`,`${t}/${e.id}.json`)};Ot(p)||(p=w);let S=async e=>{let t=`${a}/${e.id}`;Ct(t)||Lt(t),Ft(t),Mt(`${o}/${e.id}.json`,`${t}/${e.id}.json`)};Ot(h)||(h=S);let _={fdDwAttime:i,fdDwCurrent:s,fdResult:a,fdTaskCpSrc:c,fdLog:u,funDownload:f,funGetCurrent:d,funRemove:y,funAdd:p,funModify:h,timeToleranceRemove:m};return await Bn(_)}});
|
|
7
7
|
//# sourceMappingURL=w-dwdata-tweqod.umd.js.map
|