w-dwdata-tweq 1.0.0

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.
Files changed (58) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +55 -0
  4. package/.jsdoc +25 -0
  5. package/LICENSE +21 -0
  6. package/README.md +48 -0
  7. package/SECURITY.md +5 -0
  8. package/babel.config.js +16 -0
  9. package/dist/w-dwdata-tweq.umd.js +8 -0
  10. package/dist/w-dwdata-tweq.umd.js.map +1 -0
  11. package/docs/WDwdataTweq.mjs.html +318 -0
  12. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  18. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  19. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  28. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  29. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  30. package/docs/global.html +781 -0
  31. package/docs/index.html +84 -0
  32. package/docs/scripts/collapse.js +39 -0
  33. package/docs/scripts/commonNav.js +28 -0
  34. package/docs/scripts/linenumber.js +25 -0
  35. package/docs/scripts/nav.js +12 -0
  36. package/docs/scripts/polyfill.js +4 -0
  37. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  38. package/docs/scripts/prettify/lang-css.js +2 -0
  39. package/docs/scripts/prettify/prettify.js +28 -0
  40. package/docs/scripts/search.js +99 -0
  41. package/docs/styles/jsdoc.css +776 -0
  42. package/docs/styles/prettify.css +80 -0
  43. package/g.downloadEqs.mjs +16 -0
  44. package/g.mjs +53 -0
  45. package/g.parseData.mjs +26 -0
  46. package/package.json +34 -0
  47. package/script.txt +17 -0
  48. package/src/WDwdataTweq.mjs +246 -0
  49. package/src/cropPic.mjs +15 -0
  50. package/src/downloadEqs.mjs +124 -0
  51. package/src/downloadFile.mjs +77 -0
  52. package/src/downloadPics.mjs +57 -0
  53. package/src/parseData.mjs +152 -0
  54. package/test/WDwdataTweq.test.mjs +150 -0
  55. package/toolg/addVersion.mjs +4 -0
  56. package/toolg/cleanFolder.mjs +4 -0
  57. package/toolg/gDistRollup.mjs +26 -0
  58. package/toolg/modifyReadme.mjs +4 -0
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * w-dwdata-tweq v1.0.0
3
+ * (c) 2018-2021 yuda-lyu(semisphere)
4
+ * Released under the MIT License.
5
+ */
6
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("events"),require("fs/promises"),require("node:fs/promises"),require("node:stream"),require("node:path"),require("os"),require("url"),require("node:util"),require("child_process"),require("node:child_process"),require("node:crypto"),require("node:events"),require("node:os")):"function"==typeof define&&define.amd?define(["fs","path","events","fs/promises","node:fs/promises","node:stream","node:path","os","url","node:util","child_process","node:child_process","node:crypto","node:events","node:os"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.events$1,e.promises$1,e.promises,e.require$$1,e.require$$0$1,e.os,e.url,e.require$$0$4,e.require$$0$2,e.require$$0$3,e.require$$1$1,e.require$$0$5,e.require$$7)}(this,function(e,t,r,n,i,o,s,a,l,c,u,h,f,d,p){"use strict";var m="undefined"!=typeof document?document.currentScript:null;function g(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var b=g(t),v=Array.isArray,w="object"==typeof global&&global&&global.Object===Object&&global,y="object"==typeof self&&self&&self.Object===Object&&self,E=w||y||Function("return this")(),_=E.Symbol,O=Object.prototype,x=O.hasOwnProperty,j=O.toString,P=_?_.toStringTag:void 0;var S=Object.prototype.toString;var R=_?_.toStringTag:void 0;function A(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":R&&R in Object(e)?function(e){var t=x.call(e,P),r=e[P];try{e[P]=void 0;var n=!0}catch(e){}var i=j.call(e);return n&&(t?e[P]=r:delete e[P]),i}(e):function(e){return S.call(e)}(e)}function k(e){return null!=e&&"object"==typeof e}function $(e){return"symbol"==typeof e||k(e)&&"[object Symbol]"==A(e)}var I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function T(e,t){if(v(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!$(e))||(L.test(e)||!I.test(e)||null!=t&&e in Object(t))}function D(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function N(e){if(!D(e))return!1;var t=A(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var C,M=E["__core-js_shared__"],F=(C=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";var B=Function.prototype.toString;function z(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/^\[object .+?Constructor\]$/,q=Function.prototype,W=Object.prototype,H=q.toString,G=W.hasOwnProperty,V=RegExp("^"+H.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y(e){return!(!D(e)||(t=e,F&&F in t))&&(N(e)?V:U).test(z(e));var t}function X(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Y(r)?r:void 0}var J=X(Object,"create");var K=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 ee(e,t){return e===t||e!=e&&t!=t}function te(e,t){for(var r=e.length;r--;)if(ee(e[r][0],t))return r;return-1}Z.prototype.clear=function(){this.__data__=J?J(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(J){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return K.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return J?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]=J&&void 0===t?"__lodash_hash_undefined__":t,this};var re=Array.prototype.splice;function ne(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])}}ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,r=te(t,e);return!(r<0)&&(r==t.length-1?t.pop():re.call(t,r,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,r=te(t,e);return r<0?void 0:t[r][1]},ne.prototype.has=function(e){return te(this.__data__,e)>-1},ne.prototype.set=function(e,t){var r=this.__data__,n=te(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var ie=X(E,"Map");function oe(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function se(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])}}se.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(ie||ne),string:new Z}},se.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},se.prototype.get=function(e){return oe(this,e).get(e)},se.prototype.has=function(e){return oe(this,e).has(e)},se.prototype.set=function(e,t){var r=oe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ae(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(ae.Cache||se),r}ae.Cache=se;var le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=function(e){var t=ae(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(le,function(e,r,n,i){t.push(n?i.replace(ce,"$1"):r||e)}),t}),he=ue;function fe(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var de=_?_.prototype:void 0,pe=de?de.toString:void 0;function me(e){if("string"==typeof e)return e;if(v(e))return fe(e,me)+"";if($(e))return pe?pe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ge(e){return null==e?"":me(e)}function be(e,t){return v(e)?e:T(e,t)?[e]:he(ge(e))}function ve(e){if("string"==typeof e||$(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function we(e,t){for(var r=0,n=(t=be(t,e)).length;null!=e&&r<n;)e=e[ve(t[r++])];return r&&r==n?e:void 0}function ye(e,t,r){var n=null==e?void 0:we(e,t);return void 0===n?r:n}function Ee(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var _e,Oe=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[_e?s:++n];if(!1===t(i[a],a,i))break}return e},xe=Oe;function je(e){return k(e)&&"[object Arguments]"==A(e)}var Pe=Object.prototype,Se=Pe.hasOwnProperty,Re=Pe.propertyIsEnumerable,Ae=je(function(){return arguments}())?je:function(e){return k(e)&&Se.call(e,"callee")&&!Re.call(e,"callee")},ke=Ae;var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ie=$e&&"object"==typeof module&&module&&!module.nodeType&&module,Le=Ie&&Ie.exports===$e?E.Buffer:void 0,Te=(Le?Le.isBuffer:void 0)||function(){return!1},De=/^(?:0|[1-9]\d*)$/;function Ne(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&De.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var Me={};Me["[object Float32Array]"]=Me["[object Float64Array]"]=Me["[object Int8Array]"]=Me["[object Int16Array]"]=Me["[object Int32Array]"]=Me["[object Uint8Array]"]=Me["[object Uint8ClampedArray]"]=Me["[object Uint16Array]"]=Me["[object Uint32Array]"]=!0,Me["[object Arguments]"]=Me["[object Array]"]=Me["[object ArrayBuffer]"]=Me["[object Boolean]"]=Me["[object DataView]"]=Me["[object Date]"]=Me["[object Error]"]=Me["[object Function]"]=Me["[object Map]"]=Me["[object Number]"]=Me["[object Object]"]=Me["[object RegExp]"]=Me["[object Set]"]=Me["[object String]"]=Me["[object WeakMap]"]=!1;var Fe,Be="object"==typeof exports&&exports&&!exports.nodeType&&exports,ze=Be&&"object"==typeof module&&module&&!module.nodeType&&module,Ue=ze&&ze.exports===Be&&w.process,qe=function(){try{var e=ze&&ze.require&&ze.require("util").types;return e||Ue&&Ue.binding&&Ue.binding("util")}catch(e){}}(),We=qe&&qe.isTypedArray,He=We?(Fe=We,function(e){return Fe(e)}):function(e){return k(e)&&Ce(e.length)&&!!Me[A(e)]},Ge=Object.prototype.hasOwnProperty;function Ve(e,t){var r=v(e),n=!r&&ke(e),i=!r&&!n&&Te(e),o=!r&&!n&&!i&&He(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],l=a.length;for(var c in e)!t&&!Ge.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ne(c,l))||a.push(c);return a}var Ye=Object.prototype;var Xe=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),Je=Xe,Ke=Object.prototype.hasOwnProperty;function Qe(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Ye))return Je(e);var t,r,n=[];for(var i in Object(e))Ke.call(e,i)&&"constructor"!=i&&n.push(i);return n}function Ze(e){return null!=e&&Ce(e.length)&&!N(e)}function et(e){return Ze(e)?Ve(e):Qe(e)}var tt=function(e,t){return function(r,n){if(null==r)return r;if(!Ze(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Object(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}(function(e,t){return e&&xe(e,t,et)}),rt=tt;function nt(e){return e}function it(e,t){var r;return(v(e)?Ee:rt)(e,"function"==typeof(r=t)?r:nt)}var ot=Array.prototype.reverse;function st(e){return!(!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)||""===e)}function at(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function lt(e,t={}){let r=ye(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function ct(t){return lt(t,{fs:e})}function ut(e,t={}){let r=ye(t,"fs");if(lt(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 ht(r){return function(e,t={}){let r=ye(t,"path"),n=ye(t,"fs");if(!n.existsSync(e)){let t=ut(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!lt(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let i of t){let t=r.join(e,i);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 ft(t){return ut(t,{fs:e})}function dt(t){return function(e,t={}){let r=ye(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!lt(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,i=ye(r,"path"),o=ye(r,"fs");if(!lt(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return lt(r,{fs:o})?(it(o.readdirSync(r),function(a){let l=i.resolve(r,a),c=null;try{c=o.statSync(l)}catch(e){}c&&c.isDirectory()?(s.push({isFolder:!0,level:n,path:l,name:i.basename(l)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(l))),n-=1):s.push({isFolder:!1,level:n,path:l,name:i.basename(l)})}),s):s}(e)}(r,n,{path:t,fs:e})}var mt=X(E,"DataView"),gt=X(E,"Promise"),bt=X(E,"Set"),vt=X(E,"WeakMap"),wt="[object Map]",yt="[object Promise]",Et="[object Set]",_t="[object WeakMap]",Ot="[object DataView]",xt=z(mt),jt=z(ie),Pt=z(gt),St=z(bt),Rt=z(vt),At=A;(mt&&At(new mt(new ArrayBuffer(1)))!=Ot||ie&&At(new ie)!=wt||gt&&At(gt.resolve())!=yt||bt&&At(new bt)!=Et||vt&&At(new vt)!=_t)&&(At=function(e){var t=A(e),r="[object Object]"==t?e.constructor:void 0,n=r?z(r):"";if(n)switch(n){case xt:return Ot;case jt:return wt;case Pt:return yt;case St:return Et;case Rt:return _t}return t});var kt=At;function $t(e){return function(t){return null==t?void 0:t[e]}}var It=$t("length"),Lt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Tt(e){return Lt.test(e)}var Dt="\\ud800-\\udfff",Nt="["+Dt+"]",Ct="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Mt="\\ud83c[\\udffb-\\udfff]",Ft="[^"+Dt+"]",Bt="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="(?:"+Ct+"|"+Mt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Wt=qt+Ut+("(?:\\u200d(?:"+[Ft,Bt,zt].join("|")+")"+qt+Ut+")*"),Ht="(?:"+[Ft+Ct+"?",Ct,Bt,zt,Nt].join("|")+")",Gt=RegExp(Mt+"(?="+Mt+")|"+Ht+Wt,"g");function Vt(e){return Tt(e)?function(e){for(var t=Gt.lastIndex=0;Gt.test(e);)++t;return t}(e):It(e)}function Yt(e){if(null==e)return 0;if(Ze(e))return"string"==typeof(t=e)||!v(t)&&k(t)&&"[object String]"==A(t)?Vt(e):e.length;var t,r=kt(e);return"[object Map]"==r||"[object Set]"==r?e.size:Qe(e).length}function Xt(e){return"[object Object]"===Object.prototype.toString.call(e)}function Jt(e){if(Xt(e)){for(let t in e)return!0;return!1}return!1}function Kt(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}var Qt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Zt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function er(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 tr={exports:{}};function rr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var nr,ir={exports:{}},or=er(Object.freeze({__proto__:null,default:{}}));function sr(){return nr||(nr=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!==Qt&&Qt.crypto&&(r=Qt.crypto),!r)try{r=or}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.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(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)}},l=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||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a<i;a+=4)t[n+a>>>2]=r[a>>>2];return this.sigBytes+=i,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 l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).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 l.init(r,t/2)}},h=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}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 l.init(r,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},d=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);r=i.splice(0,c),n.sigBytes-=u}return new l.init(r,u)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.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 p.HMAC.init(e,r).finalize(t)}}});var p=o.algo={};return o}(Math),t)}(ir)),ir.exports}!function(e){e.exports=sr().enc.Utf8}(tr);var ar=Zt(tr.exports),lr={exports:{}};!function(e){var t;e.exports=(t=sr(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var i=[],o=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;i[o>>>2]|=a<<24-o%4*8,o++}return r.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)i.push(n.charAt(s>>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(lr);var cr=Zt(lr.exports);function ur(e){if(!st(e))return"";let t=ar.parse(e);return cr.stringify(t)}function hr(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function fr(e,t){var r=[];return rt(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function dr(e){var t=this.__data__=new ne(e);this.size=t.size}dr.prototype.clear=function(){this.__data__=new ne,this.size=0},dr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},dr.prototype.get=function(e){return this.__data__.get(e)},dr.prototype.has=function(e){return this.__data__.has(e)},dr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ne){var n=r.__data__;if(!ie||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(e,t),this.size=r.size,this};function pr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new se;++t<r;)this.add(e[t])}function mr(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 gr(e,t){return e.has(t)}pr.prototype.add=pr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},pr.prototype.has=function(e){return this.__data__.has(e)};function br(e,t,r,n,i,o){var s=1&r,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,f=!0,d=2&r?new pr:void 0;for(o.set(e,t),o.set(t,e);++h<a;){var p=e[h],m=t[h];if(n)var g=s?n(m,p,h,t,e,o):n(p,m,h,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!mr(t,function(e,t){if(!gr(d,t)&&(p===e||i(p,e,r,n,o)))return d.push(t)})){f=!1;break}}else if(p!==m&&!i(p,m,r,n,o)){f=!1;break}}return o.delete(e),o.delete(t),f}var vr=E.Uint8Array;function wr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function yr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Er=_?_.prototype:void 0,_r=Er?Er.valueOf:void 0;var Or=Object.prototype.propertyIsEnumerable,xr=Object.getOwnPropertySymbols,jr=xr?function(e){return null==e?[]:(e=Object(e),hr(xr(e),function(t){return Or.call(e,t)}))}:function(){return[]},Pr=jr;function Sr(e){return function(e,t,r){var n=t(e);return v(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,et,Pr)}var Rr=Object.prototype.hasOwnProperty;var Ar="[object Arguments]",kr="[object Array]",$r="[object Object]",Ir=Object.prototype.hasOwnProperty;function Lr(e,t,r,n,i,o){var s=v(e),a=v(t),l=s?kr:kt(e),c=a?kr:kt(t),u=(l=l==Ar?$r:l)==$r,h=(c=c==Ar?$r:c)==$r,f=l==c;if(f&&Te(e)){if(!Te(t))return!1;s=!0,u=!1}if(f&&!u)return o||(o=new dr),s||He(e)?br(e,t,r,n,i,o):function(e,t,r,n,i,o,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||!o(new vr(e),new vr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ee(+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=wr;case"[object Set]":var l=1&n;if(a||(a=yr),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=br(a(e),a(t),n,i,o,s);return s.delete(e),u;case"[object Symbol]":if(_r)return _r.call(e)==_r.call(t)}return!1}(e,t,l,r,n,i,o);if(!(1&r)){var d=u&&Ir.call(e,"__wrapped__"),p=h&&Ir.call(t,"__wrapped__");if(d||p){var m=d?e.value():e,g=p?t.value():t;return o||(o=new dr),i(m,g,r,n,o)}}return!!f&&(o||(o=new dr),function(e,t,r,n,i,o){var s=1&r,a=Sr(e),l=a.length;if(l!=Sr(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:Rr.call(t,u)))return!1}var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var d=!0;o.set(e,t),o.set(t,e);for(var p=s;++c<l;){var m=e[u=a[c]],g=t[u];if(n)var b=s?n(g,m,u,t,e,o):n(m,g,u,e,t,o);if(!(void 0===b?m===g||i(m,g,r,n,o):b)){d=!1;break}p||(p="constructor"==u)}if(d&&!p){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(d=!1)}return o.delete(e),o.delete(t),d}(e,t,r,n,i,o))}function Tr(e,t,r,n,i){return e===t||(null==e||null==t||!k(e)&&!k(t)?e!=e&&t!=t:Lr(e,t,r,n,Tr,i))}function Dr(e){return e==e&&!D(e)}function Nr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function Cr(e){var t=function(e){for(var t=et(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Dr(i)]}return t}(e);return 1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var i=r.length,o=i,s=!n;if(null==e)return!o;for(e=Object(e);i--;){var a=r[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var l=(a=r[i])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var h=new dr;if(n)var f=n(c,u,l,e,t,h);if(!(void 0===f?Tr(u,c,3,n,h):f))return!1}}return!0}(r,e,t)}}function Mr(e,t){return null!=e&&t in Object(e)}function Fr(e,t){return null!=e&&function(e,t,r){for(var n=-1,i=(t=be(t,e)).length,o=!1;++n<i;){var s=ve(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Ce(i)&&Ne(s,i)&&(v(e)||ke(e))}(e,t,Mr)}function Br(e){return T(e)?$t(ve(e)):function(e){return function(t){return we(t,e)}}(e)}function zr(e){return"function"==typeof e?e:null==e?nt:"object"==typeof e?v(e)?function(e,t){return T(e)&&Dr(t)?Nr(ve(e),t):function(r){var n=ye(r,e);return void 0===n&&n===t?Fr(r,e):Tr(t,n,3)}}(e[0],e[1]):Cr(e):Br(e)}function Ur(e,t){return(v(e)?hr:fr)(e,zr(t))}function qr(e){return"[object Array]"===Object.prototype.toString.call(e)}function Wr(e){return!0===(t=e)||!1===t||k(t)&&"[object Boolean]"==A(t);var t}function Hr(e){let t=!1;if(st(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(function(e){return e!=e}(e))return!1;t=!0}return t}function Gr(e,t){return!!Xt(e)&&(!(!st(t)&&!Hr(t))&&t in e)}function Vr(e,t,r,n={}){let i=ye(n,"withInfor");Wr(i)||(i=!0);let o={del:[],add:[],same:[],diff:[]};if(!st(r))return console.log("invalid key"),i&&(o.infor={}),o;qr(e)||(e=[e]),qr(t)||(t=[t]),e=Ur(e,e=>Gr(e,r)),t=Ur(t,e=>Gr(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)?o.same.push(e):o.diff.push(e),s.delete(t[r])}else o.del.push(t)}if(o.add=Array.from(s.values()),i){let e={};for(let t of o.del)e[t[r]]="del";for(let t of o.add)e[t[r]]="add";for(let t of o.diff)e[t[r]]="diff";for(let t of o.same)e[t[r]]="same";o.infor=e}return o}var Yr={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=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,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},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 i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].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,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var l,c,u=this._events[a],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,o),!0;case 6:return u.fn.call(u.context,t,n,i,o,s),!0}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,d=u.length;for(c=0;c<d;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,i);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var l=0,c=[],u=a.length;l<u;l++)(a[l].fn!==t||i&&!a[l].once||n&&a[l].context!==n)&&c.push(a[l]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}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}(Yr);var Xr=Zt(Yr.exports);function Jr(){return new Xr}function Kr(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}var Qr=/\s/;var Zr=/^\s+/;function en(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Qr.test(e.charAt(t)););return t}(e)+1).replace(Zr,""):e}var tn=/^[-+]0x[0-9a-f]+$/i,rn=/^0b[01]+$/i,nn=/^0o[0-7]+$/i,on=parseInt;function sn(e){if("number"==typeof e)return e;if($(e))return NaN;if(D(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=D(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=en(e);var r=rn.test(e);return r||nn.test(e)?on(e.slice(2),r?2:8):tn.test(e)?NaN:+e}var an=1/0;function ln(e){return e?(e=sn(e))===an||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function cn(e){var t=ln(e),r=t%1;return t==t?r?t-r:t:0}function un(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function hn(e,t){let r=un();if(!qr(e)&&!Xt(e))return r.reject("rs is not an array or object"),r;let n=!1;if(Xt(e)){n=!0;let t=[];it(e,(e,r)=>{t.push({k:r,v:e})}),e=t}at(t)||(t=function(e){return e});let i=-1,o=[];return e.reduce(function(e,r){return e.then(function(e){o.push(e),i+=1;let s=i,a=r;return n&&(s=r.k,a=r.v),at(t)?t(a,s):a})},Promise.resolve()).then(function(e){var t,n,i,s;o.push(e),s=null==(t=o)?0:t.length,o=s?Kr(t,(n=i||void 0===n?1:cn(n))<0?0:n,s):[],r.resolve(o)}).catch(function(e){r.reject(e)}),r}function fn(e=10){Hr(e)||(e=10);let t=un();return setTimeout(function(){t.resolve()},e),t}function dn(e,t,r={}){let n=ye(r,"path"),i=ye(r,"fs");if(!lt(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};try{i.readdirSync(e).forEach(function(r){let o=n.resolve(e,r),s=n.resolve(t,r),a=i.lstatSync(o);if(a.isDirectory())ut(s,{fs:i}),dn(o,s,{path:n,fs:i});else if(a.isSymbolicLink()){let e=i.readlinkSync(o);i.symlinkSync(e,s)}else ut(n.dirname(s),{fs:i}),i.copyFileSync(o,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function pn(e,t,r={}){let n=ye(r,"path"),i=ye(r,"fs"),o=ye(r,"useSync","");Wr(o)||(o=!0);let s="";return s=o?dn(e,t,{path:n,fs:i}):async function(e,t,r={}){let n=ye(r,"path"),i=ye(r,"fs");if(!lt(e,{fs:i}))return{error:`fpSrc[${e}] is not a folder`};let o=async(e,t)=>{let r=i.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),l=i.lstatSync(r);if(l.isDirectory())ut(a,{fs:i}),await o(r,a);else if(l.isSymbolicLink()){let e=i.readlinkSync(r);i.symlinkSync(e,a)}else ut(n.dirname(a),{fs:i}),await new Promise((e,t)=>{let n=i.createReadStream(r),o=i.createWriteStream(a);n.on("error",t),o.on("error",t),o.on("finish",e),n.pipe(o)})}},s=null;return await o(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:i}),s}function mn(e,t=!1){if(function(e){return"[object Undefined]"===Object.prototype.toString.call(e)}(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}function gn(e){if(!Hr(e))return 0;return ln(e)}function bn(e){return!!Hr(e)&&(e=gn(e),"number"==typeof(t=e)&&t==cn(t));var t}var vn=E.isFinite,wn=Math.min;var yn=function(e){var t=Math[e];return function(e,r){if(e=sn(e),(r=null==r?0:wn(cn(r),292))&&vn(e)){var n=(ge(e)+"e").split("e");return+((n=(ge(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),En=yn;function _n(e){if(!Hr(e))return 0;e=gn(e);let t=En(e);return"0"===String(t)?0:t}function On(e){if(!bn(e))return!1;return _n(e)>0}function xn(e=300){return new function(e){let t=[],r=null,n=null;return On(e)||(e=300),e=_n(e),function(i,...o){at(i)?(n=Date.now(),t.push({func:i,input:o}),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)}const jn="files",Pn="directories",Sn="files_directories",Rn="all",An={root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:jn,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(An);const kn="READDIRP_RECURSIVE_ERROR",$n=new Set(["ENOENT","EPERM","EACCES","ELOOP",kn]),In=[Pn,Rn,Sn,jn],Ln=new Set([Pn,Rn,Sn]),Tn=new Set([Rn,Sn,jn]),Dn="win32"===process.platform,Nn=e=>!0,Cn=e=>{if(void 0===e)return Nn;if("function"==typeof e)return e;if("string"==typeof e){const t=e.trim();return e=>e.basename===t}if(Array.isArray(e)){const t=e.map(e=>e.trim());return e=>t.some(t=>e.basename===t)}return Nn};class Mn extends o.Readable{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});const t={...An,...e},{root:r,type:n}=t;this._fileFilter=Cn(t.fileFilter),this._directoryFilter=Cn(t.directoryFilter);const o=t.lstat?i.lstat:i.stat;this._stat=Dn?e=>o(e,{bigint:!0}):o,this._maxDepth=t.depth??An.depth,this._wantsDir=!!n&&Ln.has(n),this._wantsFile=!!n&&Tn.has(n),this._wantsEverything=n===Rn,this._root=s.resolve(r),this._isDirent=!t.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(r,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const t=this.parent,r=t&&t.files;if(r&&r.length>0){const{path:n,depth:i}=t,o=r.splice(0,e).map(e=>this._formatEntry(e,n)),s=await Promise.all(o);for(const t of s){if(!t)continue;if(this.destroyed)return;const r=await this._getEntryType(t);"directory"===r&&this._directoryFilter(t)?(i<=this._maxDepth&&this.parents.push(this._exploreDir(t.fullPath,i+1)),this._wantsDir&&(this.push(t),e--)):("file"===r||this._includeAsFile(t))&&this._fileFilter(t)&&this._wantsFile&&(this.push(t),e--)}}else{const e=this.parents.pop();if(!e){this.push(null);break}if(this.parent=await e,this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=!1}}}async _exploreDir(e,t){let r;try{r=await i.readdir(e,this._rdOptions)}catch(e){this._onError(e)}return{files:r,depth:t,path:e}}async _formatEntry(e,t){let r;const n=this._isDirent?e.name:e;try{const i=s.resolve(s.join(t,n));r={path:s.relative(this._root,i),fullPath:i,basename:n},r[this._statsProp]=this._isDirent?e:await this._stat(i)}catch(e){return void this._onError(e)}return r}_onError(e){var t;t=e,$n.has(t.code)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return"";const t=e[this._statsProp];if(t.isFile())return"file";if(t.isDirectory())return"directory";if(t&&t.isSymbolicLink()){const t=e.fullPath;try{const e=await i.realpath(t),r=await i.lstat(e);if(r.isFile())return"file";if(r.isDirectory()){const r=e.length;if(t.startsWith(e)&&t.substr(r,1)===s.sep){const r=new Error(`Circular symlink detected: "${t}" points to "${e}"`);return r.code=kn,this._onError(r)}return"directory"}}catch(e){return this._onError(e),""}}}_includeAsFile(e){const t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}}const Fn=()=>{},Bn=process.platform,zn="win32"===Bn,Un="darwin"===Bn,qn="linux"===Bn,Wn="freebsd"===Bn,Hn="OS400"===a.type(),Gn={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Vn=Gn,Yn={lstat:n.lstat,stat:n.stat},Xn="listeners",Jn="errHandlers",Kn="rawEmitters",Qn=[Xn,Jn,Kn],Zn=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),ei=(e,t)=>{e instanceof Set?e.forEach(t):t(e)},ti=(e,t,r)=>{let n=e[t];n instanceof Set||(e[t]=n=new Set([n])),n.add(r)},ri=(e,t,r)=>{const n=e[t];n instanceof Set?n.delete(r):n===r&&delete e[t]},ni=e=>e instanceof Set?0===e.size:!e,ii=new Map;function oi(t,r,n,i,o){const s=(e,r)=>{n(t),o(e,r,{watchedPath:t}),r&&t!==r&&si(b.resolve(t,r),Xn,b.join(t,r))};try{return e.watch(t,{persistent:r.persistent},s)}catch(e){return void i(e)}}const si=(e,t,r,n,i)=>{const o=ii.get(e);o&&ei(o[t],e=>{e(r,n,i)})},ai=(e,t,r,i)=>{const{listener:o,errHandler:s,rawEmitter:a}=i;let l,c=ii.get(t);if(!r.persistent){if(l=oi(e,r,o,s,a),!l)return;return l.close.bind(l)}if(c)ti(c,Xn,o),ti(c,Jn,s),ti(c,Kn,a);else{if(l=oi(e,r,si.bind(null,t,Xn),s,si.bind(null,t,Kn)),!l)return;l.on(Vn.ERROR,async r=>{const i=si.bind(null,t,Jn);if(c&&(c.watcherUnusable=!0),zn&&"EPERM"===r.code)try{const t=await n.open(e,"r");await t.close(),i(r)}catch(e){}else i(r)}),c={listeners:o,errHandlers:s,rawEmitters:a,watcher:l},ii.set(t,c)}return()=>{ri(c,Xn,o),ri(c,Jn,s),ri(c,Kn,a),ni(c.listeners)&&(c.watcher.close(),ii.delete(t),Qn.forEach((e=>t=>{const r=e[t];r instanceof Set?r.clear():delete e[t]})(c)),c.watcher=void 0,Object.freeze(c))}},li=new Map;class ci{constructor(e){this.fsw=e,this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(t,r){const n=this.fsw.options,i=b.dirname(t),o=b.basename(t);this.fsw._getWatchedDir(i).add(o);const s=b.resolve(t),a={persistent:n.persistent};let l;if(r||(r=Fn),n.usePolling){const i=n.interval!==n.binaryInterval;a.interval=i&&(c=o,Zn.has(b.extname(c).slice(1).toLowerCase()))?n.binaryInterval:n.interval,l=((t,r,n,i)=>{const{listener:o,rawEmitter:s}=i;let a=li.get(r);const l=a&&a.options;return l&&(l.persistent<n.persistent||l.interval>n.interval)&&(e.unwatchFile(r),a=void 0),a?(ti(a,Xn,o),ti(a,Kn,s)):(a={listeners:o,rawEmitters:s,options:n,watcher:e.watchFile(r,n,(e,n)=>{ei(a.rawEmitters,t=>{t(Vn.CHANGE,r,{curr:e,prev:n})});const i=e.mtimeMs;(e.size!==n.size||i>n.mtimeMs||0===i)&&ei(a.listeners,r=>r(t,e))})},li.set(r,a)),()=>{ri(a,Xn,o),ri(a,Kn,s),ni(a.listeners)&&(li.delete(r),e.unwatchFile(r),a.options=a.watcher=void 0,Object.freeze(a))}})(t,s,a,{listener:r,rawEmitter:this.fsw._emitRaw})}else l=ai(t,s,a,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});var c;return l}_handleFile(e,t,r){if(this.fsw.closed)return;const i=b.dirname(e),o=b.basename(e),s=this.fsw._getWatchedDir(i);let a=t;if(s.has(o))return;const l=async(t,r)=>{if(this.fsw._throttle("watch",e,5))if(r&&0!==r.mtimeMs){if(s.has(o)){const t=r.atimeMs,n=r.mtimeMs;(!t||t<=n||n!==a.mtimeMs)&&this.fsw._emit(Vn.CHANGE,e,r),a=r}}else try{const r=await n.stat(e);if(this.fsw.closed)return;const i=r.atimeMs,o=r.mtimeMs;if((!i||i<=o||o!==a.mtimeMs)&&this.fsw._emit(Vn.CHANGE,e,r),(Un||qn||Wn)&&a.ino!==r.ino){this.fsw._closeFile(t),a=r;const n=this._watchWithNodeFs(e,l);n&&this.fsw._addPathCloser(t,n)}else a=r}catch(e){this.fsw._remove(i,o)}},c=this._watchWithNodeFs(e,l);if((!r||!this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Vn.ADD,e,0))return;this.fsw._emit(Vn.ADD,e,t)}return c}async _handleSymlink(e,t,r,i){if(this.fsw.closed)return;const o=e.fullPath,s=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){let t;this.fsw._incrReadyCount();try{t=await n.realpath(r)}catch(e){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;return s.has(i)?this.fsw._symlinkPaths.get(o)!==t&&(this.fsw._symlinkPaths.set(o,t),this.fsw._emit(Vn.CHANGE,r,e.stats)):(s.add(i),this.fsw._symlinkPaths.set(o,t),this.fsw._emit(Vn.ADD,r,e.stats)),this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(o))return!0;this.fsw._symlinkPaths.set(o,!0)}_handleRead(e,t,r,n,i,o,s){if(e=b.join(e,""),!(s=this.fsw._throttle("readdir",e,1e3)))return;const a=this.fsw._getWatchedDir(r.path),l=new Set;let c=this.fsw._readdirp(e,{fileFilter:e=>r.filterPath(e),directoryFilter:e=>r.filterDir(e)});return c?(c.on("data",async s=>{if(this.fsw.closed)return void(c=void 0);const u=s.path;let h=b.join(e,u);l.add(u),s.stats.isSymbolicLink()&&await this._handleSymlink(s,e,h,u)||(this.fsw.closed?c=void 0:u!==n&&(n||a.has(u))||(this.fsw._incrReadyCount(),h=b.join(i,b.relative(i,h)),this._addToNodeFs(h,t,r,o+1)))}).on(Vn.ERROR,this._boundHandleError),new Promise((t,u)=>{if(!c)return u();c.once("end",()=>{if(this.fsw.closed)return void(c=void 0);const u=!!s&&s.clear();t(void 0),a.getChildren().filter(t=>t!==e&&!l.has(t)).forEach(t=>{this.fsw._remove(e,t)}),c=void 0,u&&this._handleRead(e,!1,r,n,i,o,s)})})):void 0}async _handleDir(e,t,r,n,i,o,s){const a=this.fsw._getWatchedDir(b.dirname(e)),l=a.has(b.basename(e));let c,u;r&&this.fsw.options.ignoreInitial||i||l||this.fsw._emit(Vn.ADD_DIR,e,t),a.add(b.basename(e)),this.fsw._getWatchedDir(e);const h=this.fsw.options.depth;if((null==h||n<=h)&&!this.fsw._symlinkPaths.has(s)){if(!i&&(await this._handleRead(e,r,o,i,e,n,c),this.fsw.closed))return;u=this._watchWithNodeFs(e,(t,r)=>{r&&0===r.mtimeMs||this._handleRead(t,!1,o,i,e,n,c)})}return u}async _addToNodeFs(e,t,r,i,o){const s=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return s(),!1;const a=this.fsw._getWatchHelpers(e);r&&(a.filterPath=e=>r.filterPath(e),a.filterDir=e=>r.filterDir(e));try{const r=await Yn[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,r))return s(),!1;const l=this.fsw.options.followSymlinks;let c;if(r.isDirectory()){const s=b.resolve(e),u=l?await n.realpath(e):e;if(this.fsw.closed)return;if(c=await this._handleDir(a.watchPath,r,t,i,o,a,u),this.fsw.closed)return;s!==u&&void 0!==u&&this.fsw._symlinkPaths.set(s,u)}else if(r.isSymbolicLink()){const o=l?await n.realpath(e):e;if(this.fsw.closed)return;const s=b.dirname(a.watchPath);if(this.fsw._getWatchedDir(s).add(a.watchPath),this.fsw._emit(Vn.ADD,a.watchPath,r),c=await this._handleDir(s,r,t,i,e,a,o),this.fsw.closed)return;void 0!==o&&this.fsw._symlinkPaths.set(b.resolve(e),o)}else c=this._handleFile(a.watchPath,r,t);return s(),c&&this.fsw._addPathCloser(e,c),!1}catch(t){if(this.fsw._handleError(t))return s(),e}}}
7
+ /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */const ui=/\\/g,hi=/\/\//,fi=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,di=/^\.[/\\]/;function pi(e){return Array.isArray(e)?e:[e]}const mi=e=>"object"==typeof e&&null!==e&&!(e instanceof RegExp);function gi(e,t,r){const n=function(e){if("string"!=typeof e)throw new Error("string expected");let t=!1;(e=(e=b.normalize(e)).replace(/\\/g,"/")).startsWith("//")&&(t=!0);const r=/\/\//;for(;e.match(r);)e=e.replace(r,"/");return t&&(e="/"+e),e}(t);for(let t=0;t<e.length;t++){if((0,e[t])(n,r))return!0}return!1}function bi(e,t){if(null==e)throw new TypeError("anymatch: specify first argument");const r=pi(e).map(e=>function(e){return"function"==typeof e?e:"string"==typeof e?t=>e===t:e instanceof RegExp?t=>e.test(t):"object"==typeof e&&null!==e?t=>{if(e.path===t)return!0;if(e.recursive){const r=b.relative(e.path,t);return!!r&&!r.startsWith("..")&&!b.isAbsolute(r)}return!1}:()=>!1}(e));return null==t?(e,t)=>gi(r,e,t):gi(r,t)}const vi=e=>{const t=pi(e).flat();if(!t.every(e=>"string"==typeof e))throw new TypeError(`Non-string provided as watch path: ${t}`);return t.map(yi)},wi=e=>{let t=e.replace(ui,"/"),r=!1;for(t.startsWith("//")&&(r=!0);t.match(hi);)t=t.replace(hi,"/");return r&&(t="/"+t),t},yi=e=>wi(b.normalize(wi(e))),Ei=(e="")=>t=>"string"==typeof t?yi(b.isAbsolute(t)?t:b.join(e,t)):t,_i=Object.freeze(new Set);class Oi{constructor(e,t){this.path=e,this._removeWatcher=t,this.items=new Set}add(e){const{items:t}=this;t&&"."!==e&&".."!==e&&t.add(e)}async remove(e){const{items:t}=this;if(!t)return;if(t.delete(e),t.size>0)return;const r=this.path;try{await n.readdir(r)}catch(e){this._removeWatcher&&this._removeWatcher(b.dirname(r),b.basename(r))}}has(e){const{items:t}=this;if(t)return t.has(e)}getChildren(){const{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=Fn,this.items=_i,Object.freeze(this)}}class xi{constructor(e,t,r){this.fsw=r;const n=e;this.path=e=e.replace(di,""),this.watchPath=n,this.fullWatchPath=b.resolve(n),this.dirParts=[],this.dirParts.forEach(e=>{e.length>1&&e.pop()}),this.followSymlinks=t,this.statMethod=t?"stat":"lstat"}entryPath(e){return b.join(this.watchPath,b.relative(this.watchPath,e.fullPath))}filterPath(e){const{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);const r=this.entryPath(e);return this.fsw._isntIgnored(r,t)&&this.fsw._hasReadPermissions(t)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class ji extends r.EventEmitter{constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;const t=e.awaitWriteFinish,r={stabilityThreshold:2e3,pollInterval:100},n={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?pi(e.ignored):pi([]),awaitWriteFinish:!0===t?r:"object"==typeof t&&{...r,...t}};Hn&&(n.usePolling=!0),void 0===n.atomic&&(n.atomic=!n.usePolling);const i=process.env.CHOKIDAR_USEPOLLING;if(void 0!==i){const e=i.toLowerCase();n.usePolling="false"!==e&&"0"!==e&&("true"===e||"1"===e||!!e)}const o=process.env.CHOKIDAR_INTERVAL;o&&(n.interval=Number.parseInt(o,10));let s=0;this._emitReady=()=>{s++,s>=this._readyCount&&(this._emitReady=Fn,this._readyEmitted=!0,process.nextTick(()=>this.emit(Gn.READY)))},this._emitRaw=(...e)=>this.emit(Gn.RAW,...e),this._boundRemove=this._remove.bind(this),this.options=n,this._nodeFsHandler=new ci(this),Object.freeze(n)}_addIgnoredPath(e){if(mi(e))for(const t of this._ignoredPaths)if(mi(t)&&t.path===e.path&&t.recursive===e.recursive)return;this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),"string"==typeof e)for(const t of this._ignoredPaths)mi(t)&&t.path===e&&this._ignoredPaths.delete(t)}add(e,t,r){const{cwd:n}=this.options;this.closed=!1,this._closePromise=void 0;let i=vi(e);return n&&(i=i.map(e=>{const t=((e,t)=>b.isAbsolute(e)?e:b.join(t,e))(e,n);return t})),i.forEach(e=>{this._removeIgnoredPath(e)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async e=>{const n=await this._nodeFsHandler._addToNodeFs(e,!r,void 0,0,t);return n&&this._emitReady(),n})).then(e=>{this.closed||e.forEach(e=>{e&&this.add(b.dirname(e),b.basename(t||e))})}),this}unwatch(e){if(this.closed)return this;const t=vi(e),{cwd:r}=this.options;return t.forEach(e=>{b.isAbsolute(e)||this._closers.has(e)||(r&&(e=b.join(r,e)),e=b.resolve(e)),this._closePath(e),this._addIgnoredPath(e),this._watched.has(e)&&this._addIgnoredPath({path:e,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(t=>t.forEach(t=>{const r=t();r instanceof Promise&&e.push(r)})),this._streams.forEach(e=>e.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(e=>e.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((t,r)=>{const n=this.options.cwd?b.relative(this.options.cwd,r):r;e[n||"."]=t.getChildren().sort()}),e}emitWithAll(e,t){this.emit(e,...t),e!==Gn.ERROR&&this.emit(Gn.ALL,e,...t)}async _emit(e,t,r){if(this.closed)return;const i=this.options;zn&&(t=b.normalize(t)),i.cwd&&(t=b.relative(i.cwd,t));const o=[t];null!=r&&o.push(r);const s=i.awaitWriteFinish;let a;if(s&&(a=this._pendingWrites.get(t)))return a.lastChange=new Date,this;if(i.atomic){if(e===Gn.UNLINK)return this._pendingUnlinks.set(t,[e,...o]),setTimeout(()=>{this._pendingUnlinks.forEach((e,t)=>{this.emit(...e),this.emit(Gn.ALL,...e),this._pendingUnlinks.delete(t)})},"number"==typeof i.atomic?i.atomic:100),this;e===Gn.ADD&&this._pendingUnlinks.has(t)&&(e=Gn.CHANGE,this._pendingUnlinks.delete(t))}if(s&&(e===Gn.ADD||e===Gn.CHANGE)&&this._readyEmitted){const r=(t,r)=>{t?(e=Gn.ERROR,o[0]=t,this.emitWithAll(e,o)):r&&(o.length>1?o[1]=r:o.push(r),this.emitWithAll(e,o))};return this._awaitWriteFinish(t,s.stabilityThreshold,e,r),this}if(e===Gn.CHANGE){if(!this._throttle(Gn.CHANGE,t,50))return this}if(i.alwaysStat&&void 0===r&&(e===Gn.ADD||e===Gn.ADD_DIR||e===Gn.CHANGE)){const e=i.cwd?b.join(i.cwd,t):t;let r;try{r=await n.stat(e)}catch(e){}if(!r||this.closed)return;o.push(r)}return this.emitWithAll(e,o),this}_handleError(e){const t=e&&e.code;return e&&"ENOENT"!==t&&"ENOTDIR"!==t&&(!this.options.ignorePermissionErrors||"EPERM"!==t&&"EACCES"!==t)&&this.emit(Gn.ERROR,e),e||this.closed}_throttle(e,t,r){this._throttled.has(e)||this._throttled.set(e,new Map);const n=this._throttled.get(e);if(!n)throw new Error("invalid throttle");const i=n.get(t);if(i)return i.count++,!1;let o;const s=()=>{const e=n.get(t),r=e?e.count:0;return n.delete(t),clearTimeout(o),e&&clearTimeout(e.timeoutObject),r};o=setTimeout(s,r);const a={timeoutObject:o,clear:s,count:0};return n.set(t,a),a}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(t,r,n,i){const o=this.options.awaitWriteFinish;if("object"!=typeof o)return;const s=o.pollInterval;let a,l=t;this.options.cwd&&!b.isAbsolute(t)&&(l=b.join(this.options.cwd,t));const c=new Date,u=this._pendingWrites;u.has(t)||(u.set(t,{lastChange:c,cancelWait:()=>(u.delete(t),clearTimeout(a),n)}),a=setTimeout(function n(o){e.stat(l,(e,l)=>{if(e||!u.has(t))return void(e&&"ENOENT"!==e.code&&i(e));const c=Number(new Date);o&&l.size!==o.size&&(u.get(t).lastChange=c),c-u.get(t).lastChange>=r?(u.delete(t),i(void 0,l)):a=setTimeout(n,s,l)})},s))}_isIgnored(e,t){if(this.options.atomic&&fi.test(e))return!0;if(!this._userIgnored){const{cwd:e}=this.options,t=(this.options.ignored||[]).map(Ei(e)),r=[...[...this._ignoredPaths].map(Ei(e)),...t];this._userIgnored=bi(r,void 0)}return this._userIgnored(e,t)}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e){return new xi(e,this.options.followSymlinks,this)}_getWatchedDir(e){const t=b.resolve(e);return this._watched.has(t)||this._watched.set(t,new Oi(t,this._boundRemove)),this._watched.get(t)}_hasReadPermissions(e){return!!this.options.ignorePermissionErrors||Boolean(256&Number(e.mode))}_remove(e,t,r){const n=b.join(e,t),i=b.resolve(n);if(r=null!=r?r:this._watched.has(n)||this._watched.has(i),!this._throttle("remove",n,100))return;r||1!==this._watched.size||this.add(e,t,!0);this._getWatchedDir(n).getChildren().forEach(e=>this._remove(n,e));const o=this._getWatchedDir(e),s=o.has(t);o.remove(t),this._symlinkPaths.has(i)&&this._symlinkPaths.delete(i);let a=n;if(this.options.cwd&&(a=b.relative(this.options.cwd,n)),this.options.awaitWriteFinish&&this._pendingWrites.has(a)){if(this._pendingWrites.get(a).cancelWait()===Gn.ADD)return}this._watched.delete(n),this._watched.delete(i);const l=r?Gn.UNLINK_DIR:Gn.UNLINK;s&&!this._isIgnored(n)&&this._emit(l,n),this._closePath(n)}_closePath(e){this._closeFile(e);const t=b.dirname(e);this._getWatchedDir(t).remove(b.basename(e))}_closeFile(e){const t=this._closers.get(e);t&&(t.forEach(e=>e()),this._closers.delete(e))}_addPathCloser(e,t){if(!t)return;let r=this._closers.get(e);r||(r=[],this._closers.set(e,r)),r.push(t)}_readdirp(e,t){if(this.closed)return;let r=function(e,t={}){let r=t.entryType||t.type;if("both"===r&&(r=Sn),r&&(t.type=r),!e)throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");if("string"!=typeof e)throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!In.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${In.join(", ")}`);return t.root=e,new Mn(t)}(e,{type:Gn.ALL,alwaysStat:!0,lstat:!0,...t,depth:0});return this._streams.add(r),r.once("close",()=>{r=void 0}),r.once("end",()=>{r&&(this._streams.delete(r),r=void 0)}),r}}var Pi={watch:function(e,t={}){const r=new ji(t);return r.add(e),r},FSWatcher:ji};function Si(t){return function(e,t={}){let r=ye(t,"fs");return!!r.existsSync(e)&&!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink()}(t,{fs:e})}function Ri(e,n={}){let i=ye(n,"polling");Wr(i)||(i=!1);let o=ye(n,"timeInterval");On(o)||(o=100),o=_n(o);let s=ye(n,"timeBinaryInterval");On(s)||(s=300),s=_n(s);let a=new r.EventEmitter,l=e,c=null,u=setInterval(()=>{null===c&&Si(l)&&(c=Pi.watch(l,{usePolling:i,interval:o,binaryInterval:s,awaitWriteFinish:!0}),c.on("all",(e,r,n)=>{r=t.resolve(r),a.emit("change",{type:e,fp:r,stats:n})}))},o);return a.clear=()=>{(()=>{if(null!==c){try{c.unwatch(l)}catch(e){console.log(e)}c.close().catch(e=>{console.log(e)}).finally(()=>{c=null})}})(),clearInterval(u)},a}function Ai(t,r,n={}){ct(t)||ft(t),ct(r)||ft(r);let i=`${t}/fpHash.json`,o=`${r}/fpHash.json`,s=t=>{let r={};try{r=function(e){if(!st(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=mn(r);e.writeFileSync(t,n,"utf8")}catch(e){}},l=(e,t)=>ye(s(e),t,""),c=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},u=(e,t)=>{let r=s(e);Gr(r,t)&&delete r[t],a(e,r)},h=()=>s(i),f=e=>a(i,e),d=e=>l(i,e),p=()=>s(o),m=e=>a(o,e),g=e=>l(o,e),b=(e,t)=>c(o,e,t),v=e=>u(o,e),w=e=>{let t=[];return it(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=Jr();return e.set=(t,r)=>{((e,t)=>{c(i,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=d,e.remove=t=>{(e=>{u(i,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=h,e.writeKp=f,e},buildTar:()=>{let e=Jr(),t=xn(300),r=Ri(i);return r.on("change",r=>{t(()=>{(async()=>{let t=un(),r=h();if(!Jt(r))return t.resolve("no src"),t;let n=p(),i=w(r),o=Vr(w(n),i,"fp",{withInfor:!1}),s=un();return s.then(e=>{m(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:o,pm:s}),t})().catch(()=>{})})}),e.set=b,e.get=g,e.remove=v,e.readKp=p,e.writeKp=m,e.clear=r.clear,e}}}var ki={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",o="minute",s="hour",a="day",l="week",c="month",u="quarter",h="year",f="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,g={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])+"]"}},b=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:b,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+b(n,2,"0")+":"+b(i,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()),i=t.clone().add(n,c),o=r-i<0,s=t.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-s:s-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:l,d:a,D:f,h:s,m:o,s:i,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",y={};y[w]=g;var E="$isDayjsObject",_=function(e){return e instanceof P||!(!e||!e[E])},O=function e(t,r,n){var i;if(!t)return w;if("string"==typeof t){var o=t.toLowerCase();y[o]&&(i=o),r&&(y[o]=r,i=o);var s=t.split("-");if(!i&&s.length>1)return e(s[0])}else{var a=t.name;y[a]=t,i=a}return!n&&i&&(w=i),i||!n&&w},x=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new P(r)},j=v;j.l=O,j.i=_,j.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var P=function(){function g(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[E]=!0}var b=g.prototype;return b.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.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(p);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},b.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()},b.$utils=function(){return j},b.isValid=function(){return!(this.$d.toString()===d)},b.isSame=function(e,t){var r=x(e);return this.startOf(t)<=r&&r<=this.endOf(t)},b.isAfter=function(e,t){return x(e)<this.startOf(t)},b.isBefore=function(e,t){return this.endOf(t)<x(e)},b.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(e,t){var r=this,n=!!j.u(t)||t,u=j.p(e),d=function(e,t){var i=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(a)},p=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case h:return n?d(1,0):d(31,11);case c:return n?d(1,g):d(0,g+1);case l:var w=this.$locale().weekStart||0,y=(m<w?m+7:m)-w;return d(n?b-y:b+(6-y),g);case a:case f:return p(v+"Hours",0);case s:return p(v+"Minutes",1);case o:return p(v+"Seconds",2);case i:return p(v+"Milliseconds",3);default:return this.clone()}},b.endOf=function(e){return this.startOf(e,!1)},b.$set=function(e,t){var r,l=j.p(e),u="set"+(this.$u?"UTC":""),d=(r={},r[a]=u+"Date",r[f]=u+"Date",r[c]=u+"Month",r[h]=u+"FullYear",r[s]=u+"Hours",r[o]=u+"Minutes",r[i]=u+"Seconds",r[n]=u+"Milliseconds",r)[l],p=l===a?this.$D+(t-this.$W):t;if(l===c||l===h){var m=this.clone().set(f,1);m.$d[d](p),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},b.set=function(e,t){return this.clone().$set(e,t)},b.get=function(e){return this[j.p(e)]()},b.add=function(n,u){var f,d=this;n=Number(n);var p=j.p(u),m=function(e){var t=x(d);return j.w(t.date(t.date()+Math.round(e*n)),d)};if(p===c)return this.set(c,this.$M+n);if(p===h)return this.set(h,this.$y+n);if(p===a)return m(1);if(p===l)return m(7);var g=(f={},f[o]=t,f[s]=r,f[i]=e,f)[p]||1,b=this.$d.getTime()+n*g;return j.w(b,this)},b.subtract=function(e,t){return this.add(-1*e,t)},b.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=j.z(this),o=this.$H,s=this.$m,a=this.$M,l=r.weekdays,c=r.months,u=r.meridiem,h=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].slice(0,o)},f=function(e){return j.s(o%12||12,e,"0")},p=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return a+1;case"MM":return j.s(a+1,2,"0");case"MMM":return h(r.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,l,2);case"ddd":return h(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return j.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return p(o,s,!0);case"A":return p(o,s,!1);case"m":return String(s);case"mm":return j.s(s,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(n,f,d){var p,m=this,g=j.p(f),b=x(n),v=(b.utcOffset()-this.utcOffset())*t,w=this-b,y=function(){return j.m(m,b)};switch(g){case h:p=y()/12;break;case c:p=y();break;case u:p=y()/3;break;case l:p=(w-v)/6048e5;break;case a:p=(w-v)/864e5;break;case s:p=w/r;break;case o:p=w/t;break;case i:p=w/e;break;default:p=w}return d?p:j.a(p)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return y[this.$L]},b.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},b.clone=function(){return j.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},g}(),S=P.prototype;return x.prototype=S,[["$ms",n],["$s",i],["$m",o],["$H",s],["$W",a],["$M",c],["$y",h],["$D",f]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,P,x),e.$i=!0),x},x.locale=O,x.isDayjs=_,x.unix=function(e){return x(1e3*e)},x.en=y[w],x.Ls=y,x.p={},x}()}(ki);var $i=Zt(ki.exports),Ii={exports:{}};function Li(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}var Ti=function(e,t,r){var n=r&&r.stringify||Li;if("object"==typeof e&&null!==e){var i=t.length+1;if(1===i)return e;var o=new Array(i);o[0]=n(e);for(var s=1;s<i;s++)o[s]=n(t[s]);return o.join(" ")}if("string"!=typeof e)return e;var a=t.length;if(0===a)return e;for(var l="",c=0,u=-1,h=e&&e.length||0,f=0;f<h;){if(37===e.charCodeAt(f)&&f+1<h){switch(u=u>-1?u:0,e.charCodeAt(f+1)){case 100:case 102:if(c>=a)break;if(null==t[c])break;u<f&&(l+=e.slice(u,f)),l+=Number(t[c]),u=f+2,f++;break;case 105:if(c>=a)break;if(null==t[c])break;u<f&&(l+=e.slice(u,f)),l+=Math.floor(Number(t[c])),u=f+2,f++;break;case 79:case 111:case 106:if(c>=a)break;if(void 0===t[c])break;u<f&&(l+=e.slice(u,f));var d=typeof t[c];if("string"===d){l+="'"+t[c]+"'",u=f+2,f++;break}if("function"===d){l+=t[c].name||"<anonymous>",u=f+2,f++;break}l+=n(t[c]),u=f+2,f++;break;case 115:if(c>=a)break;u<f&&(l+=e.slice(u,f)),l+=String(t[c]),u=f+2,f++;break;case 37:u<f&&(l+=e.slice(u,f)),l+="%",u=f+2,f++,c--}++c}++f}if(-1===u)return e;u<h&&(l+=e.slice(u));return l};const Di=Ti;Ii.exports=qi;const Ni=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},Ci={mapHttpRequest:Xi,mapHttpResponse:Xi,wrapRequestSerializer:Ji,wrapResponseSerializer:Ji,wrapErrorSerializer:Ji,req:Xi,res:Xi,err:Vi,errWithCause:Vi};function Mi(e,t){return"silent"===e?1/0:t.levels.values[e]}const Fi=Symbol("pino.logFuncs"),Bi=Symbol("pino.hierarchy"),zi={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Ui(e,t){const r={logger:t,parent:e[Bi]};t[Bi]=r}function qi(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||Ni;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=function(e,t){if(Array.isArray(e))return e.filter(function(e){return"!stdSerializers.err"!==e});return!0===e&&Object.keys(t)}(e.browser.serialize,n);let o=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);const s=Object.keys(e.customLevels||{}),a=["error","fatal","warn","info","debug","trace"].concat(s);"function"==typeof r&&a.forEach(function(e){r[e]=r}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const l=e.level||"info",c=Object.create(r);c.log||(c.log=Ki),function(e,t,r){const n={};t.forEach(e=>{n[e]=r[e]?r[e]:Ni[e]||Ni[zi[e]||"log"]||Ki}),e[Fi]=n}(c,a,r),Ui({},c),Object.defineProperty(c,"levelVal",{get:function(){return Mi(this.level,this)}}),Object.defineProperty(c,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,Wi(this,u,c,"error"),Wi(this,u,c,"fatal"),Wi(this,u,c,"warn"),Wi(this,u,c,"info"),Wi(this,u,c,"debug"),Wi(this,u,c,"trace"),s.forEach(e=>{Wi(this,u,c,e)})}});const u={transmit:t,serialize:i,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:a,timestamp:Yi(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Ki};function h(r,o,s){if(!o)throw new Error("missing bindings for child Pino");s=s||{},i&&o.serializers&&(s.serializers=o.serializers);const a=s.serializers;if(i&&a){var l=Object.assign({},n,a),c=!0===e.browser.serialize?Object.keys(l):i;delete o.serializers,Hi([o],c,l,this._stdErrSerialize)}function u(e){this._childLevel=1+(0|e._childLevel),this.bindings=o,l&&(this.serializers=l,this._serialize=c),t&&(this._logEvent=Gi([].concat(e._logEvent.bindings,o)))}u.prototype=this;const f=new u(this);return Ui(this,f),f.child=function(...e){return h.call(this,r,...e)},f.level=s.level||this.level,r.onChild(f),f}return c.levels=function(e){const t=e.customLevels||{},r=Object.assign({},qi.levels.values,t),n=Object.assign({},qi.levels.labels,function(e){const t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}(t));return{values:r,labels:n}}(e),c.level=l,c.isLevelEnabled=function(e){return!!this.levels.values[e]&&this.levels.values[e]>=this.levels.values[this.level]},c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Ki,c.serializers=n,c._serialize=i,c._stdErrSerialize=o,c.child=function(...e){return h.call(this,u,...e)},t&&(c._logEvent=Gi()),c}function Wi(e,t,r,n){if(Object.defineProperty(e,n,{value:Mi(e.level,r)>Mi(n,r)?Ki:r[Fi][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Ki){if(!t.transmit)return;const i=Mi(t.transmit.level||e.level,r);if(Mi(n,r)<i)return}e[n]=function(e,t,r,n){return i=e[Fi][n],function(){const o=t.timestamp(),s=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Ni?Ni:this;for(var l=0;l<s.length;l++)s[l]=arguments[l];var c=!1;if(t.serialize&&(Hi(s,this._serialize,this.serializers,this._stdErrSerialize),c=!0),t.asObject||t.formatters?i.call(a,...function(e,t,r,n,i){const{level:o,log:s=e=>e}=i.formatters||{},a=r.slice();let l=a[0];const c={};let u=1+(0|e._childLevel);if(u<1&&(u=1),n&&(c.time=n),o){const r=o(t,e.levels.values[t]);Object.assign(c,r)}else c.level=e.levels.values[t];if(i.asObjectBindingsOnly){if(null!==l&&"object"==typeof l)for(;u--&&"object"==typeof a[0];)Object.assign(c,a.shift());return[s(c),...a]}if(null!==l&&"object"==typeof l){for(;u--&&"object"==typeof a[0];)Object.assign(c,a.shift());l=a.length?Di(a.shift(),a):void 0}else"string"==typeof l&&(l=Di(a.shift(),a));return void 0!==l&&(c[i.messageKey]=l),[s(c)]}(this,n,s,o,t)):i.apply(a,s),t.transmit){const i=t.transmit.level||e._level,a=Mi(i,r),l=Mi(n,r);if(l<a)return;!function(e,t,r,n=!1){const i=t.send,o=t.ts,s=t.methodLevel,a=t.methodValue,l=t.val,c=e._logEvent.bindings;n||Hi(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter(function(e){return-1===c.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=a,i(s,e._logEvent,l),e._logEvent=Gi(c)}(this,{ts:o,methodLevel:n,methodValue:l,transmitLevel:i,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Mi(e._level,r)},s,c)}};var i}(e,t,r,n);const i=function(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[Bi];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==i.length&&(e[n]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(i,e[n]))}function Hi(e,t,r,n){for(const i in e)if(n&&e[i]instanceof Error)e[i]=qi.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i])&&t)for(const n in e[i])t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function Gi(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Vi(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}function Yi(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?Qi:Zi}function Xi(){return{}}function Ji(e){return e}function Ki(){}function Qi(){return!1}function Zi(){return Date.now()}qi.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},qi.stdSerializers=Ci,qi.stdTimeFunctions=Object.assign({},{nullTime:Qi,epochTime:Zi,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),Ii.exports.default=qi,Ii.exports.pino=qi;var eo=Zt(Ii.exports);let to=l.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(to).href:"undefined"==typeof document?location.href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("w-dwdata-tweq.umd.js",document.baseURI).href),ro=t.dirname(to);let no=function(e={}){let r=ye(e,"fdLog");st(r)||(r="./_logs");let n=ye(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let i=eo.transport({targets:[{level:"info",target:t.resolve(ro,"./formatter.mjs"),options:{interval:n,logDir:r}}]});return eo(i)}({fdLog:"./_logs",interval:"hr"}),io=async(r={})=>{let n=ye(r,"keyId");st(n)||(n="id");let i=ye(r,"fdDwAttime");st(i)||(i="./_dwAttime"),ct(i)||ft(i);let o=ye(r,"fdDwCurrent");st(o)||(o="./_dwCurrent"),ct(o)||ft(o);let s=ye(r,"fdResult");st(s)||(s="./_result"),ct(s)||ft(s);let a=ye(r,"fdTaskCpSrc");st(a)||(a="./_taskCpSrc"),ct(a)||ft(a);let l=ye(r,"funDownload");if(!at(l))throw new Error("invalid funDownload");let c=ye(r,"funGetCurrent");if(!at(c))throw new Error("invalid funGetCurrent");let u=ye(r,"funAdd");if(!at(u))throw new Error("invalid funAdd");let h=ye(r,"funModify");if(!at(h))throw new Error("invalid funModify");let f=ye(r,"funRemove");if(!at(f))throw new Error("invalid funRemove");let d=Jr(),p=e=>{no.info(e),d.emit("change",{type:"info",...e})},m=e=>{no.error(e),d.emit("change",{type:"error",...e})};return(async()=>{await fn(1);let r=$i(),s=()=>{let e=$i(),t=e.diff(r,"second");return{timeRunStart:r.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${t}s`}};p({event:"start",msg:"running..."});let d="",g=Ai(a,a).buildSrc(),b=[];try{p({event:"proc-callfun-download",msg:"start..."});let e=l();Kt(e)&&(e=await e),p({event:"proc-callfun-download",msg:"done"}),b=e}catch(e){console.log(e),m({event:"proc-callfun-download",msg:e.message}),d="error at proc-callfun-download"}if(st(d))return console.log("error occurred, task canceled"),void p({event:"cancel",...s(),msg:d});let v=[];try{p({event:"proc-callfun-getCurrent",msg:"start..."});let e=c();Kt(e)&&(e=await e),p({event:"proc-callfun-getCurrent",msg:"done"}),v=e}catch(e){console.log(e),m({event:"proc-callfun-getCurrent",msg:e.message}),d="error at proc-callfun-getCurrent"}if(st(d))return console.log("error occurred, task canceled"),void p({event:"cancel",...s(),msg:d});if(0===Yt(b))return console.log("invalid data, task canceled"),void p({event:"cancel",...s(),msg:"can not download data"});if(Yt(v)-Yt(b)>10)return console.log(`difference between the data before and after is too large, size(itemsCur)[${Yt(v)}]-size(itemsAtt)[${Yt(b)}]>10`),void p({event:"cancel",...s(),msg:"difference between the data before and after is too large"});let w=null;try{p({event:"compare",msg:"start..."}),w=Vr(v,b,n,{withInfor:!1}),p({event:"compare",msg:"done"})}catch(e){console.log(e),m({event:"compare",msg:e.message})}if(!Jt(w))return console.log("can not calculate the difference, task canceled"),void p({event:"cancel",...s(),msg:"can not calculate the difference between the data before and after"});if(0===Yt(w.del)&&0===Yt(w.add)&&0===Yt(w.diff))return console.log("no difference, task canceled"),void p({event:"cancel",...s(),msg:"no difference"});if(await hn(w.del,async e=>{if(!st(d)){try{p({event:"proc-remove-callfun-remove",[n]:e[n],msg:"start..."});let t=f(e);Kt(t)&&(t=await t)}catch(t){console.log(t),m({event:"proc-remove-callfun-remove",[n]:e[n],msg:t.message}),d="error at proc-remove-callfun-remove"}if(!st(d))try{g.remove(e[n]),p({event:"proc-remove-callfun-remove",[n]:e[n],msg:"done"})}catch(t){console.log(t),m({event:"proc-remove-otk-remove",[n]:e[n],msg:t.message}),d="error at proc-remove-otk-remove"}}}),st(d))return console.log("error occurred, task canceled"),void p({event:"cancel",...s(),msg:d});if(await hn(w.add,async e=>{if(!st(d)){try{p({event:"proc-add-callfun-add",[n]:e[n],msg:"start..."});let t=u(e);Kt(t)&&(t=await t)}catch(t){console.log(t),m({event:"proc-add-callfun-add",[n]:e[n],msg:t.message}),d="error at proc-add-callfun-add"}if(!st(d))try{let t=ur(JSON.stringify(e));g.set(e[n],t),p({event:"proc-add-callfun-add",[n]:e[n],msg:"done"})}catch(t){console.log(t),m({event:"proc-add-otk-set",[n]:e[n],msg:t.message}),d="error at proc-add-otk-set"}}}),st(d))return console.log("error occurred, task canceled"),void p({event:"cancel",...s(),msg:d});if(await hn(w.diff,async e=>{if(!st(d)){try{p({event:"proc-diff-callfun-modify",[n]:e[n],msg:"start..."});let t=h(e);Kt(t)&&(t=await t)}catch(t){console.log(t),m({event:"proc-diff-callfun-modify",[n]:e[n],msg:t.message}),d="error at proc-diff-callfun-modify"}if(!st(d))try{let t=ur(JSON.stringify(e));g.set(e[n],t),p({event:"proc-diff-callfun-modify",[n]:e[n],msg:"done"})}catch(t){console.log(t),m({event:"proc-diff-otk-set",[n]:e[n],msg:t.message}),d="error at proc-diff-otk-set"}}}),st(d))return console.log("error occurred, task canceled"),void p({event:"cancel",...s(),msg:d});{ht(o);let r=function(r,n,i={}){return pn(r,n,{path:t,fs:e,...i})}(i,o);if(r.error)return console.log(r.error),m({event:"task-update-rawData",msg:r.error}),void(d="error at task-update-rawData")}if(st(d))return console.log("error occurred, task canceled"),void p({event:"cancel",...s(),msg:d});p({event:"end",...s(),msg:"done"})})().catch(e=>{console.log(e),m({event:"proc-core",msg:e.message})}),d};function oo(e,t){var r=-1,n=Ze(e)?Array(e.length):[];return rt(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function so(e,t){return(v(e)?fe:oo)(e,zr(t))}var ao=Array.prototype.join;function lo(e,t){return function(){return e.apply(t,arguments)}}const{toString:co}=Object.prototype,{getPrototypeOf:uo}=Object,{iterator:ho,toStringTag:fo}=Symbol,po=(e=>t=>{const r=co.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),mo=e=>(e=e.toLowerCase(),t=>po(t)===e),go=e=>t=>typeof t===e,{isArray:bo}=Array,vo=go("undefined");function wo(e){return null!==e&&!vo(e)&&null!==e.constructor&&!vo(e.constructor)&&_o(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yo=mo("ArrayBuffer");const Eo=go("string"),_o=go("function"),Oo=go("number"),xo=e=>null!==e&&"object"==typeof e,jo=e=>{if("object"!==po(e))return!1;const t=uo(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||fo in e||ho in e)},Po=mo("Date"),So=mo("File"),Ro=mo("Blob"),Ao=mo("FileList"),ko=mo("URLSearchParams"),[$o,Io,Lo,To]=["ReadableStream","Request","Response","Headers"].map(mo);function Do(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),bo(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(wo(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function No(e,t){if(wo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const Co="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Mo=e=>!vo(e)&&e!==Co;const Fo=(Bo="undefined"!=typeof Uint8Array&&uo(Uint8Array),e=>Bo&&e instanceof Bo);var Bo;const zo=mo("HTMLFormElement"),Uo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),qo=mo("RegExp"),Wo=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Do(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};const Ho=mo("AsyncFunction"),Go=(Vo="function"==typeof setImmediate,Yo=_o(Co.postMessage),Vo?setImmediate:Yo?(Xo=`axios@${Math.random()}`,Jo=[],Co.addEventListener("message",({source:e,data:t})=>{e===Co&&t===Xo&&Jo.length&&Jo.shift()()},!1),e=>{Jo.push(e),Co.postMessage(Xo,"*")}):e=>setTimeout(e));var Vo,Yo,Xo,Jo;const Ko="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Co):"undefined"!=typeof process&&process.nextTick||Go;var Qo={isArray:bo,isArrayBuffer:yo,isBuffer:wo,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||_o(e.append)&&("formdata"===(t=po(e))||"object"===t&&_o(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&yo(e.buffer),t},isString:Eo,isNumber:Oo,isBoolean:e=>!0===e||!1===e,isObject:xo,isPlainObject:jo,isEmptyObject:e=>{if(!xo(e)||wo(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:$o,isRequest:Io,isResponse:Lo,isHeaders:To,isUndefined:vo,isDate:Po,isFile:So,isBlob:Ro,isRegExp:qo,isFunction:_o,isStream:e=>xo(e)&&_o(e.pipe),isURLSearchParams:ko,isTypedArray:Fo,isFileList:Ao,forEach:Do,merge:function e(){const{caseless:t}=Mo(this)&&this||{},r={},n=(n,i)=>{const o=t&&No(r,i)||i;jo(r[o])&&jo(n)?r[o]=e(r[o],n):jo(n)?r[o]=e({},n):bo(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Do(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(Do(t,(t,n)=>{r&&_o(t)?e[n]=lo(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 i,o,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&uo(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:po,kindOfTest:mo,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(bo(e))return e;let t=e.length;if(!Oo(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[ho]).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:zo,hasOwnProperty:Uo,hasOwnProp:Uo,reduceDescriptors:Wo,freezeMethods:e=>{Wo(e,(t,r)=>{if(_o(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];_o(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 bo(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:No,global:Co,isContextDefined:Mo,isSpecCompliantForm:function(e){return!!(e&&_o(e.append)&&"FormData"===e[fo]&&e[ho])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(xo(e)){if(t.indexOf(e)>=0)return;if(wo(e))return e;if(!("toJSON"in e)){t[n]=e;const i=bo(e)?[]:{};return Do(e,(e,t)=>{const o=r(e,n+1);!vo(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:Ho,isThenable:e=>e&&(xo(e)||_o(e))&&_o(e.then)&&_o(e.catch),setImmediate:Go,asap:Ko,isIterable:e=>null!=e&&_o(e[ho])};function Zo(e,t,r,n,i){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),i&&(this.response=i,this.status=i.status?i.status:null)}Qo.inherits(Zo,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:Qo.toJSONObject(this.config),code:this.code,status:this.status}}});const es=Zo.prototype,ts={};["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=>{ts[e]={value:e}}),Object.defineProperties(Zo,ts),Object.defineProperty(es,"isAxiosError",{value:!0}),Zo.from=(e,t,r,n,i,o)=>{const s=Object.create(es);return Qo.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Zo.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};function rs(e){return Qo.isPlainObject(e)||Qo.isArray(e)}function ns(e){return Qo.endsWith(e,"[]")?e.slice(0,-2):e}function is(e,t,r){return e?e.concat(t).map(function(e,t){return e=ns(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const os=Qo.toFlatObject(Qo,{},null,function(e){return/^is[A-Z]/.test(e)});function ss(e,t,r){if(!Qo.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Qo.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Qo.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Qo.isSpecCompliantForm(t);if(!Qo.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Qo.isDate(e))return e.toISOString();if(Qo.isBoolean(e))return e.toString();if(!a&&Qo.isBlob(e))throw new Zo("Blob is not supported. Use a Buffer instead.");return Qo.isArrayBuffer(e)||Qo.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(Qo.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Qo.isArray(e)&&function(e){return Qo.isArray(e)&&!e.some(rs)}(e)||(Qo.isFileList(e)||Qo.endsWith(r,"[]"))&&(a=Qo.toArray(e)))return r=ns(r),a.forEach(function(e,n){!Qo.isUndefined(e)&&null!==e&&t.append(!0===s?is([r],n,o):null===s?r:r+"[]",l(e))}),!1;return!!rs(e)||(t.append(is(i,r,o),l(e)),!1)}const u=[],h=Object.assign(os,{defaultVisitor:c,convertValue:l,isVisitable:rs});if(!Qo.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Qo.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),Qo.forEach(r,function(r,o){!0===(!(Qo.isUndefined(r)||null===r)&&i.call(t,r,Qo.isString(o)?o.trim():o,n,h))&&e(r,n?n.concat(o):[o])}),u.pop()}}(e),t}function as(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ls(e,t){this._pairs=[],e&&ss(e,this,t)}const cs=ls.prototype;function us(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hs(e,t,r){if(!t)return e;const n=r&&r.encode||us;Qo.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(o=i?i(t,r):Qo.isURLSearchParams(t)?t.toString():new ls(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}cs.append=function(e,t){this._pairs.push([e,t])},cs.toString=function(e){const t=e?function(t){return e.call(this,t,as)}:as;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var fs=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){Qo.forEach(this.handlers,function(t){null!==t&&e(t)})}},ds={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ps={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ls,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ms="undefined"!=typeof window&&"undefined"!=typeof document,gs="object"==typeof navigator&&navigator||void 0,bs=ms&&(!gs||["ReactNative","NativeScript","NS"].indexOf(gs.product)<0),vs="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ws=ms&&window.location.href||"http://localhost";var ys={...Object.freeze({__proto__:null,hasBrowserEnv:ms,hasStandardBrowserEnv:bs,hasStandardBrowserWebWorkerEnv:vs,navigator:gs,origin:ws}),...ps};function Es(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=e.length;if(o=!o&&Qo.isArray(n)?n.length:o,a)return Qo.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&Qo.isObject(n[o])||(n[o]=[]);return t(e,r,n[o],i)&&Qo.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s}if(Qo.isFormData(e)&&Qo.isFunction(e.entries)){const r={};return Qo.forEachEntry(e,(e,n)=>{t(function(e){return Qo.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const _s={transitional:ds,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=Qo.isObject(e);i&&Qo.isHTMLForm(e)&&(e=new FormData(e));if(Qo.isFormData(e))return n?JSON.stringify(Es(e)):e;if(Qo.isArrayBuffer(e)||Qo.isBuffer(e)||Qo.isStream(e)||Qo.isFile(e)||Qo.isBlob(e)||Qo.isReadableStream(e))return e;if(Qo.isArrayBufferView(e))return e.buffer;if(Qo.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ss(e,new ys.classes.URLSearchParams,{visitor:function(e,t,r,n){return ys.isNode&&Qo.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=Qo.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ss(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(Qo.isString(e))try{return(t||JSON.parse)(e),Qo.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||_s.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Qo.isResponse(e)||Qo.isReadableStream(e))return e;if(e&&Qo.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 Zo.from(e,Zo.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:ys.classes.FormData,Blob:ys.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Qo.forEach(["delete","get","head","post","put","patch"],e=>{_s.headers[e]={}});var Os=_s;const xs=Qo.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 js=Symbol("internals");function Ps(e){return e&&String(e).trim().toLowerCase()}function Ss(e){return!1===e||null==e?e:Qo.isArray(e)?e.map(Ss):String(e)}function Rs(e,t,r,n,i){return Qo.isFunction(n)?n.call(this,t,r):(i&&(t=r),Qo.isString(t)?Qo.isString(n)?-1!==t.indexOf(n):Qo.isRegExp(n)?n.test(t):void 0:void 0)}class As{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=Ps(t);if(!i)throw new Error("header name must be a non-empty string");const o=Qo.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Ss(e))}const o=(e,t)=>Qo.forEach(e,(e,r)=>i(e,r,t));if(Qo.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Qo.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&xs[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(Qo.isObject(e)&&Qo.isIterable(e)){let r,n,i={};for(const t of e){if(!Qo.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[n=t[0]]=(r=i[n])?Qo.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=Ps(e)){const r=Qo.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(Qo.isFunction(t))return t.call(this,e,r);if(Qo.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ps(e)){const r=Qo.findKey(this,e);return!(!r||void 0===this[r]||t&&!Rs(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=Ps(e)){const i=Qo.findKey(r,e);!i||t&&!Rs(0,r[i],i,t)||(delete r[i],n=!0)}}return Qo.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!Rs(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return Qo.forEach(this,(n,i)=>{const o=Qo.findKey(r,i);if(o)return t[o]=Ss(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete t[i],t[s]=Ss(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Qo.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Qo.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[js]=this[js]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ps(e);t[n]||(!function(e,t){const r=Qo.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return Qo.isArray(e)?e.forEach(n):n(e),this}}As.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Qo.reduceDescriptors(As.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Qo.freezeMethods(As);var ks=As;function $s(e,t){const r=this||Os,n=t||r,i=ks.from(n.headers);let o=n.data;return Qo.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Is(e){return!(!e||!e.__CANCEL__)}function Ls(e,t,r){Zo.call(this,null==e?"canceled":e,Zo.ERR_CANCELED,t,r),this.name="CanceledError"}function Ts(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Zo("Request failed with status code "+r.status,[Zo.ERR_BAD_REQUEST,Zo.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Qo.inherits(Ls,Zo,{__CANCEL__:!0});const Ds=(e,t,r=3)=>{let n=0;const i=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[s];i||(i=l),r[o]=a,n[o]=l;let u=s,h=0;for(;u!==o;)h+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const f=c&&l-c;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(e,t){let r,n,i=0,o=1e3/t;const s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},()=>r&&s(r)]}(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a);n=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},Ns=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Cs=e=>(...t)=>Qo.asap(()=>e(...t));var Ms=ys.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ys.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ys.origin),ys.navigator&&/(msie|trident)/i.test(ys.navigator.userAgent)):()=>!0,Fs=ys.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const s=[e+"="+encodeURIComponent(t)];Qo.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Qo.isString(n)&&s.push("path="+n),Qo.isString(i)&&s.push("domain="+i),!0===o&&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 Bs(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 zs=e=>e instanceof ks?{...e}:e;function Us(e,t){t=t||{};const r={};function n(e,t,r,n){return Qo.isPlainObject(e)&&Qo.isPlainObject(t)?Qo.merge.call({caseless:n},e,t):Qo.isPlainObject(t)?Qo.merge({},t):Qo.isArray(t)?t.slice():t}function i(e,t,r,i){return Qo.isUndefined(t)?Qo.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!Qo.isUndefined(t))return n(void 0,t)}function s(e,t){return Qo.isUndefined(t)?Qo.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const l={url:o,method:o,data:o,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)=>i(zs(e),zs(t),0,!0)};return Qo.forEach(Object.keys({...e,...t}),function(n){const o=l[n]||i,s=o(e[n],t[n],n);Qo.isUndefined(s)&&o!==a||(r[n]=s)}),r}var qs=e=>{const t=Us({},e);let r,{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=t;if(t.headers=a=ks.from(a),t.url=hs(Bs(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Qo.isFormData(n))if(ys.hasStandardBrowserEnv||ys.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(ys.hasStandardBrowserEnv&&(i&&Qo.isFunction(i)&&(i=i(t)),i||!1!==i&&Ms(t.url))){const e=o&&s&&Fs.read(s);e&&a.set(o,e)}return t};var Ws="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=qs(e);let i=n.data;const o=ks.from(n.headers).normalize();let s,a,l,c,u,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=n;function p(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const n=ks.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ts(function(e){t(e),p()},function(e){r(e),p()},{data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(r(new Zo("Request aborted",Zo.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new Zo("Network Error",Zo.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||ds;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Zo(t,i.clarifyTimeoutError?Zo.ETIMEDOUT:Zo.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&Qo.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Qo.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),h&&"json"!==h&&(m.responseType=n.responseType),d&&([l,u]=Ds(d,!0),m.addEventListener("progress",l)),f&&m.upload&&([a,c]=Ds(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{m&&(r(!t||t.type?new Ls(null,e,m):t),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);b&&-1===ys.protocols.indexOf(b)?r(new Zo("Unsupported protocol "+b+":",Zo.ERR_BAD_REQUEST,e)):m.send(i||null)})};var Hs=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const i=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Zo?t:new Ls(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new Zo(`timeout ${t} of ms exceeded`,Zo.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>Qo.asap(s),a}};const Gs=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,i=0;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},Vs=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()}},Ys=(e,t,r,n)=>{const i=async function*(e,t){for await(const r of Vs(e))yield*Gs(r,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await i.next();if(t)return a(),void e.close();let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},Xs="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Js=Xs&&"function"==typeof ReadableStream,Ks=Xs&&("function"==typeof TextEncoder?(Qs=new TextEncoder,e=>Qs.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Qs;const Zs=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ea=Js&&Zs(()=>{let e=!1;const t=new Request(ys.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ta=Js&&Zs(()=>Qo.isReadableStream(new Response("").body)),ra={stream:ta&&(e=>e.body)};var na;Xs&&(na=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ra[e]&&(ra[e]=Qo.isFunction(na[e])?t=>t[e]():(t,r)=>{throw new Zo(`Response type '${e}' is not supported`,Zo.ERR_NOT_SUPPORT,r)})}));const ia=async(e,t)=>{const r=Qo.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Qo.isBlob(e))return e.size;if(Qo.isSpecCompliantForm(e)){const t=new Request(ys.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Qo.isArrayBufferView(e)||Qo.isArrayBuffer(e)?e.byteLength:(Qo.isURLSearchParams(e)&&(e+=""),Qo.isString(e)?(await Ks(e)).byteLength:void 0)})(t):r};var oa=Xs&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:f}=qs(e);c=c?(c+"").toLowerCase():"text";let d,p=Hs([i,o&&o.toAbortSignal()],s);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&ea&&"get"!==r&&"head"!==r&&0!==(g=await ia(u,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Qo.isFormData(n)&&(e=r.headers.get("content-type"))&&u.setContentType(e),r.body){const[e,t]=Ns(g,Ds(Cs(l)));n=Ys(r.body,65536,e,t)}}Qo.isString(h)||(h=h?"include":"omit");const i="credentials"in Request.prototype;d=new Request(t,{...f,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:i?h:void 0});let o=await fetch(d,f);const s=ta&&("stream"===c||"response"===c);if(ta&&(a||s&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=Qo.toFiniteNumber(o.headers.get("content-length")),[r,n]=a&&Ns(t,Ds(Cs(a),!0))||[];o=new Response(Ys(o.body,65536,r,()=>{n&&n(),m&&m()}),e)}c=c||"text";let b=await ra[Qo.findKey(ra,c)||"text"](o,e);return!s&&m&&m(),await new Promise((t,r)=>{Ts(t,r,{data:b,headers:ks.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:d})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Zo("Network Error",Zo.ERR_NETWORK,e,d),{cause:t.cause||t});throw Zo.from(t,t&&t.code,e,d)}});const sa={http:null,xhr:Ws,fetch:oa};Qo.forEach(sa,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const aa=e=>`- ${e}`,la=e=>Qo.isFunction(e)||null===e||!1===e;var ca=e=>{e=Qo.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!la(r)&&(n=sa[(t=String(r)).toLowerCase()],void 0===n))throw new Zo(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Zo("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(aa).join("\n"):" "+aa(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function ua(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ls(null,e)}function ha(e){ua(e),e.headers=ks.from(e.headers),e.data=$s.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ca(e.adapter||Os.adapter)(e).then(function(t){return ua(e),t.data=$s.call(e,e.transformResponse,t),t.headers=ks.from(t.headers),t},function(t){return Is(t)||(ua(e),t&&t.response&&(t.response.data=$s.call(e,e.transformResponse,t.response),t.response.headers=ks.from(t.response.headers))),Promise.reject(t)})}const fa="1.11.0",da={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{da[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pa={};da.transitional=function(e,t,r){function n(e,t){return"[Axios v"+fa+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new Zo(n(i," has been removed"+(t?" in "+t:"")),Zo.ERR_DEPRECATED);return t&&!pa[i]&&(pa[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},da.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var ma={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Zo("options must be an object",Zo.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new Zo("option "+o+" must be "+r,Zo.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Zo("Unknown option "+o,Zo.ERR_BAD_OPTION)}},validators:da};const ga=ma.validators;class ba{constructor(e){this.defaults=e||{},this.interceptors={request:new fs,response:new fs}}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=Us(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&ma.assertOptions(r,{silentJSONParsing:ga.transitional(ga.boolean),forcedJSONParsing:ga.transitional(ga.boolean),clarifyTimeoutError:ga.transitional(ga.boolean)},!1),null!=n&&(Qo.isFunction(n)?t.paramsSerializer={serialize:n}:ma.assertOptions(n,{encode:ga.function,serialize:ga.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ma.assertOptions(t,{baseUrl:ga.spelling("baseURL"),withXsrfToken:ga.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Qo.merge(i.common,i[t.method]);i&&Qo.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=ks.concat(o,i);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 l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,h=0;if(!a){const e=[ha.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);h<u;)c=c.then(e[h++],e[h++]);return c}u=s.length;let f=t;for(h=0;h<u;){const e=s[h++],t=s[h++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=ha.call(this,f)}catch(e){return Promise.reject(e)}for(h=0,u=l.length;h<u;)c=c.then(l[h++],l[h++]);return c}getUri(e){return hs(Bs((e=Us(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Qo.forEach(["delete","get","head","options"],function(e){ba.prototype[e]=function(t,r){return this.request(Us(r||{},{method:e,url:t,data:(r||{}).data}))}}),Qo.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(Us(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ba.prototype[e]=t(),ba.prototype[e+"Form"]=t(!0)});var va=ba;class wa{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,i){r.reason||(r.reason=new Ls(e,n,i),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 wa(function(t){e=t}),cancel:e}}}var ya=wa;const Ea={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(Ea).forEach(([e,t])=>{Ea[t]=e});var _a=Ea;const Oa=function e(t){const r=new va(t),n=lo(va.prototype.request,r);return Qo.extend(n,va.prototype,r,{allOwnKeys:!0}),Qo.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Us(t,r))},n}(Os);Oa.Axios=va,Oa.CanceledError=Ls,Oa.CancelToken=ya,Oa.isCancel=Is,Oa.VERSION=fa,Oa.toFormData=ss,Oa.AxiosError=Zo,Oa.Cancel=Oa.CanceledError,Oa.all=function(e){return Promise.all(e)},Oa.spread=function(e){return function(t){return e.apply(null,t)}},Oa.isAxiosError=function(e){return Qo.isObject(e)&&!0===e.isAxiosError},Oa.mergeConfig=Us,Oa.AxiosHeaders=ks,Oa.formToJSON=e=>Es(Qo.isHTMLForm(e)?new FormData(e):e),Oa.getAdapter=ca,Oa.HttpStatusCode=_a,Oa.default=Oa;var xa=Oa;let ja=e=>{let t=so(e,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`});var r,n;return n="&",null==(r=t)?"":ao.call(r,n)};function Pa(e){return e!=e}function Sa(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,Pa,r)}var Ra="\\ud800-\\udfff",Aa="["+Ra+"]",ka="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$a="\\ud83c[\\udffb-\\udfff]",Ia="[^"+Ra+"]",La="(?:\\ud83c[\\udde6-\\uddff]){2}",Ta="[\\ud800-\\udbff][\\udc00-\\udfff]",Da="(?:"+ka+"|"+$a+")"+"?",Na="[\\ufe0e\\ufe0f]?",Ca=Na+Da+("(?:\\u200d(?:"+[Ia,La,Ta].join("|")+")"+Na+Da+")*"),Ma="(?:"+[Ia+ka+"?",ka,La,Ta,Aa].join("|")+")",Fa=RegExp($a+"(?="+$a+")|"+Ma+Ca,"g");function Ba(e){return Tt(e)?function(e){return e.match(Fa)||[]}(e):function(e){return e.split("")}(e)}function za(e,t,r){if((e=ge(e))&&(r||void 0===t))return en(e);if(!e||!(t=me(t)))return e;var n=Ba(e),i=Ba(t),o=function(e,t){for(var r=-1,n=e.length;++r<n&&Sa(t,e[r],0)>-1;);return r}(n,i),s=function(e,t){for(var r=e.length;r--&&Sa(t,e[r],0)>-1;);return r}(n,i)+1;return function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:Kr(e,t,r)}(n,o,s).join("")}function Ua(e){if(!bn(e))return!1;return _n(e)>=0}let qa=async(e,t)=>{let r=await fetch(e);if(!r.ok)throw new Error(`can not download file, status[${r.status}]: ${r.statusText}`);let i=await r.arrayBuffer(),o=Buffer.from(i);await n.writeFile(t,o)},Wa=async(e,t)=>{ct(e)||ft(e);let r=[{url:t.urlPicEqReport,fn:"picEqReport.gif"},{url:t.urlPicEqIntensity,fn:"picEqIntensity.png"},{url:t.urlPicEqPga,fn:"picEqPga.png"},{url:t.urlPicEqPgv,fn:"picEqPgv.png"}];await hn(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=ye(r,"retries");Ua(n)||(n=3),n=_n(n);let i=ye(r,"retrietimeDelays");Ua(i)||(i=1e3),i=gn(i);let o="error",s=null,a=null;for(let r=1;r<=n&&(await qa(e,t).then(e=>{a=e,o="success"}).catch(e=>{s=e}),await fn(i),null===a);r++);if("error"===o)throw new Error(s);return a})(t.url,r)})};const Ha=function(e){return null!=e};var Ga={defined:Ha,object:function(e){return"object"==typeof e},plainObject:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fn:function(e){return"function"==typeof e},bool:function(e){return"boolean"==typeof e},buffer:function(e){return e instanceof Buffer},typedArray:function(e){if(Ha(e))switch(e.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},arrayBuffer:function(e){return e instanceof ArrayBuffer},string:function(e){return"string"==typeof e&&e.length>0},number:function(e){return"number"==typeof e&&!Number.isNaN(e)},integer:function(e){return Number.isInteger(e)},inRange:function(e,t,r){return e>=t&&e<=r},inArray:function(e,t){return t.includes(e)},invalidParameterError:function(e,t,r){return new Error(`Expected ${t} for ${e} but received ${r} of type ${typeof r}`)},nativeError:function(e,t){return t.message=e.message,t}},Va={exports:{}};const Ya=()=>"linux"===process.platform;let Xa=null;var Ja={isLinux:Ya,getReport:()=>{if(!Xa)if(Ya()&&process.report){const e=process.report.excludeNetwork;process.report.excludeNetwork=!0,Xa=process.report.getReport(),process.report.excludeNetwork=e}else Xa={};return Xa}};const Ka=e;var Qa={LDD_PATH:"/usr/bin/ldd",readFileSync:e=>Ka.readFileSync(e,"utf-8"),readFile:e=>new Promise((t,r)=>{Ka.readFile(e,"utf-8",(e,n)=>{e?r(e):t(n)})})};const Za=u,{isLinux:el,getReport:tl}=Ja,{LDD_PATH:rl,readFile:nl,readFileSync:il}=Qa;let ol,sl;const al="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";let ll="";const cl=()=>ll||new Promise(e=>{Za.exec(al,(t,r)=>{ll=t?" ":r,e(ll)})}),ul=()=>{if(!ll)try{ll=Za.execSync(al,{encoding:"utf8"})}catch(e){ll=" "}return ll},hl="glibc",fl=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,dl="musl",pl=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),ml=()=>{const e=tl();return e.header&&e.header.glibcVersionRuntime?hl:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(pl)?dl:null},gl=e=>{const[t,r]=e.split(/[\r\n]+/);return t&&t.includes(hl)?hl:r&&r.includes(dl)?dl:null},bl=e=>e.includes("musl")?dl:e.includes("GNU C Library")?hl:null,vl=async()=>{let e=null;if(el()&&(e=await(async()=>{if(void 0!==ol)return ol;ol=null;try{const e=await nl(rl);ol=bl(e)}catch(e){}return ol})(),e||(e=ml()),!e)){const t=await cl();e=gl(t)}return e},wl=()=>{let e=null;if(el()&&(e=(()=>{if(void 0!==ol)return ol;ol=null;try{const e=il(rl);ol=bl(e)}catch(e){}return ol})(),e||(e=ml()),!e)){const t=ul();e=gl(t)}return e},yl=()=>{const e=tl();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},El=e=>e.trim().split(/\s+/)[1],_l=e=>{const[t,r,n]=e.split(/[\r\n]+/);return t&&t.includes(hl)?El(t):r&&n&&r.includes(dl)?El(n):null};var Ol={GLIBC:hl,MUSL:dl,family:vl,familySync:wl,isNonGlibcLinux:async()=>el()&&await vl()!==hl,isNonGlibcLinuxSync:()=>el()&&wl()!==hl,version:async()=>{let e=null;if(el()&&(e=await(async()=>{if(void 0!==sl)return sl;sl=null;try{const e=(await nl(rl)).match(fl);e&&(sl=e[1])}catch(e){}return sl})(),e||(e=yl()),!e)){const t=await cl();e=_l(t)}return e},versionSync:()=>{let e=null;if(el()&&(e=(()=>{if(void 0!==sl)return sl;sl=null;try{const e=il(rl).match(fl);e&&(sl=e[1])}catch(e){}return sl})(),e||(e=yl()),!e)){const t=ul();e=_l(t)}return e}};var xl="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var jl={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Pl={exports:{}};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=jl,o=xl,s=(t=e.exports={}).re=[],a=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let h=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[f,n]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=h++;o(e,i,t),u[e]=i,l[i]=t,c[i]=n,s[i]=new RegExp(t,r?"g":void 0),a[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${f}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Pl,Pl.exports);var Sl=Pl.exports;const Rl=Object.freeze({loose:!0}),Al=Object.freeze({});var kl=e=>e?"object"!=typeof e?Rl:e:Al;const $l=/^[0-9]+$/,Il=(e,t)=>{const r=$l.test(e),n=$l.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var Ll={compareIdentifiers:Il,rcompareIdentifiers:(e,t)=>Il(t,e)};const Tl=xl,{MAX_LENGTH:Dl,MAX_SAFE_INTEGER:Nl}=jl,{safeRe:Cl,t:Ml}=Sl,Fl=kl,{compareIdentifiers:Bl}=Ll;var zl=class e{constructor(t,r){if(r=Fl(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Dl)throw new TypeError(`version is longer than ${Dl} characters`);Tl("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Cl[Ml.LOOSE]:Cl[Ml.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Nl||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nl||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nl||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<Nl)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Tl("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Bl(this.major,t.major)||Bl(this.minor,t.minor)||Bl(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const e=this.prerelease[r],n=t.prerelease[r];if(Tl("prerelease compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return Bl(e,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{const e=this.build[r],n=t.build[r];if(Tl("build compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return Bl(e,n)}while(++r)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?Cl[Ml.PRERELEASELOOSE]:Cl[Ml.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===Bl(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const Ul=zl;var ql=(e,t,r=!1)=>{if(e instanceof Ul)return e;try{return new Ul(e,t)}catch(e){if(!r)return null;throw e}};const Wl=zl,Hl=ql,{safeRe:Gl,t:Vl}=Sl;var Yl=(e,t)=>{if(e instanceof Wl)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?Gl[Vl.COERCERTLFULL]:Gl[Vl.COERCERTL];let i;for(;(i=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?Gl[Vl.COERCEFULL]:Gl[Vl.COERCE]);if(null===r)return null;const n=r[2],i=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Hl(`${n}.${i}.${o}${s}${a}`,t)};const Xl=zl;var Jl=(e,t,r)=>new Xl(e,r).compare(new Xl(t,r));const Kl=Jl;var Ql=(e,t,r)=>Kl(e,t,r)>=0;var Zl=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};const ec=Jl;const tc=Jl;const rc=Jl;const nc=Jl;const ic=Jl;const oc=(e,t,r)=>0===ec(e,t,r),sc=(e,t,r)=>0!==tc(e,t,r),ac=(e,t,r)=>rc(e,t,r)>0,lc=Ql,cc=(e,t,r)=>nc(e,t,r)<0,uc=(e,t,r)=>ic(e,t,r)<=0;var hc,fc,dc,pc,mc=(e,t,r,n)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return oc(e,r,n);case"!=":return sc(e,r,n);case">":return ac(e,r,n);case">=":return lc(e,r,n);case"<":return cc(e,r,n);case"<=":return uc(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};function gc(){if(pc)return dc;pc=1;const e=/\s+/g;class t{constructor(r,o){if(o=n(o),r instanceof t)return r.loose===!!o.loose&&r.includePrerelease===!!o.includePrerelease?r:new t(r.raw,o);if(r instanceof i)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=r.trim().replace(e," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!p(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&d))+":"+e,n=r.get(t);if(n)return n;const s=this.options.loose,m=s?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];e=e.replace(m,S(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[l.COMPARATORTRIM],c),o("comparator trim",e),e=e.replace(a[l.TILDETRIM],u),o("tilde trim",e),e=e.replace(a[l.CARETTRIM],h),o("caret trim",e);let g=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>P(e,this.options));s&&(g=g.filter(e=>(o("loose invalid filter",e,this.options),!!e.match(a[l.COMPARATORLOOSE])))),o("range list",g);const v=new Map,w=g.map(e=>new i(e,this.options));for(const e of w){if(p(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const y=[...v.values()];return r.set(t,y),y}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>g(t,r)&&e.set.some(e=>g(e,r)&&t.every(t=>e.every(e=>t.intersects(e,r)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}dc=t;const r=new Zl,n=kl,i=function(){if(fc)return hc;fc=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(n,i){if(i=r(i),n instanceof t){if(n.loose===!!i.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,i),this.options=i,this.loose=!!i.loose,this.parse(n),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(t){const r=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],o=t.match(r);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new a(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new a(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,n).test(this.value):""===e.operator?""===e.value||new l(this.value,n).test(e.semver):!((n=r(n)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(o(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(o(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}hc=t;const r=kl,{safeRe:n,t:i}=Sl,o=mc,s=xl,a=zl,l=gc();return hc}(),o=xl,s=zl,{safeRe:a,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:h}=Sl,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=jl,p=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},b=(e,t)=>(o("comp",e,t),e=E(e,t),o("caret",e),e=w(e,t),o("tildes",e),e=O(e,t),o("xrange",e),e=j(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map(e=>y(e,t)).join(" "),y=(e,t)=>{const r=t.loose?a[l.TILDELOOSE]:a[l.TILDE];return e.replace(r,(t,r,n,i,s)=>{let a;return o("tilde",e,t,r,n,i,s),v(r)?a="":v(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:v(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(o("replaceTilde pr",s),a=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,o("tilde return",a),a})},E=(e,t)=>e.trim().split(/\s+/).map(e=>_(e,t)).join(" "),_=(e,t)=>{o("caret",e,t);const r=t.loose?a[l.CARETLOOSE]:a[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,s,a)=>{let l;return o("caret",e,t,r,i,s,a),v(r)?l="":v(i)?l=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(s)?l="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:a?(o("replaceCaret pr",a),l="0"===r?"0"===i?`>=${r}.${i}.${s}-${a} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s}-${a} <${+r+1}.0.0-0`):(o("no pr"),l="0"===r?"0"===i?`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s} <${+r+1}.0.0-0`),o("caret return",l),l})},O=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map(e=>x(e,t)).join(" ")),x=(e,t)=>{e=e.trim();const r=t.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return e.replace(r,(r,n,i,s,a,l)=>{o("xRange",e,r,n,i,s,a,l);const c=v(i),u=c||v(s),h=u||v(a),f=h;return"="===n&&f&&(n=""),l=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(u&&(s=0),a=0,">"===n?(n=">=",u?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?i=+i+1:s=+s+1),"<"===n&&(l="-0"),r=`${n+i}.${s}.${a}${l}`):u?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),o("xRange return",r),r})},j=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[l.STAR],"")),P=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),S=e=>(t,r,n,i,o,s,a,l,c,u,h,f)=>`${r=v(n)?"":v(i)?`>=${n}.0.0${e?"-0":""}`:v(o)?`>=${n}.${i}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(h)?`<${c}.${+u+1}.0-0`:f?`<=${c}.${u}.${h}-${f}`:e?`<${c}.${u}.${+h+1}-0`:`<=${l}`}`.trim(),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(o(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0};return dc}const bc=gc();var vc=(e,t,r)=>{try{t=new bc(t,r)}catch(e){return!1}return t.test(e)},wc={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.34.3",author:"Lovell Fuller <npm@lovell.info>",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert <pierre.inglebert@gmail.com>","Jonathan Ong <jonathanrichardong@gmail.com>","Chanon Sajjamanochai <chanon.s@gmail.com>","Juliano Julio <julianojulio@gmail.com>","Daniel Gasienica <daniel@gasienica.ch>","Julian Walker <julian@fiftythree.com>","Amit Pitaru <pitaru.amit@gmail.com>","Brandon Aaron <hello.brandon@aaron.sh>","Andreas Lind <andreas@one.com>","Maurus Cuelenaere <mcuelenaere@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>","Victor Mateevitsi <mvictoras@gmail.com>","Alaric Holloway <alaric.holloway@gmail.com>","Bernhard K. Weisshuhn <bkw@codingforce.com>","Chris Riley <criley@primedia.com>","David Carley <dacarley@gmail.com>","John Tobin <john@limelightmobileinc.com>","Kenton Gray <kentongray@gmail.com>","Felix Bünemann <Felix.Buenemann@gmail.com>","Samy Al Zahrani <samyalzahrany@gmail.com>","Chintan Thakkar <lemnisk8@gmail.com>","F. Orlando Galashan <frulo@gmx.de>","Kleis Auke Wolthuizen <info@kleisauke.nl>","Matt Hirsch <mhirsch@media.mit.edu>","Matthias Thoemmes <thoemmes@gmail.com>","Patrick Paskaris <patrick@paskaris.gr>","Jérémy Lal <kapouer@melix.org>","Rahul Nanwani <r.nanwani@gmail.com>","Alice Monday <alice0meta@gmail.com>","Kristo Jorgenson <kristo.jorgenson@gmail.com>","YvesBos <yves_bos@outlook.com>","Guy Maliar <guy@tailorbrands.com>","Nicolas Coden <nicolas@ncoden.fr>","Matt Parrish <matt.r.parrish@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Matthew McEachen <matthew+github@mceachen.org>","Jarda Kotěšovec <jarda.kotesovec@gmail.com>","Kenric D'Souza <kenric.dsouza@gmail.com>","Oleh Aleinyk <oleg.aleynik@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Andrea Bianco <andrea.bianco@unibas.ch>","Rik Heywood <rik@rik.org>","Thomas Parisot <hi@oncletom.io>","Nathan Graves <nathanrgraves+github@gmail.com>","Tom Lokhorst <tom@lokhorst.eu>","Espen Hovlandsdal <espen@hovlandsdal.com>","Sylvain Dumont <sylvain.dumont35@gmail.com>","Alun Davies <alun.owain.davies@googlemail.com>","Aidan Hoolachan <ajhoolachan21@gmail.com>","Axel Eirola <axel.eirola@iki.fi>","Freezy <freezy@xbmc.org>","Daiz <taneli.vatanen@gmail.com>","Julian Aubourg <j@ubourg.net>","Keith Belovay <keith@picthrive.com>","Michael B. Klein <mbklein@gmail.com>","Jordan Prudhomme <jordan@raboland.fr>","Ilya Ovdin <iovdin@gmail.com>","Andargor <andargor@yahoo.com>","Paul Neave <paul.neave@gmail.com>","Brendan Kennedy <brenwken@gmail.com>","Brychan Bennett-Odlum <git@brychan.io>","Edward Silverton <e.silverton@gmail.com>","Roman Malieiev <aromaleev@gmail.com>","Tomas Szabo <tomas.szabo@deftomat.com>","Robert O'Rourke <robert@o-rourke.org>","Guillermo Alfonso Varela Chouciño <guillevch@gmail.com>","Christian Flintrup <chr@gigahost.dk>","Manan Jadhav <manan@motionden.com>","Leon Radley <leon@radley.se>","alza54 <alza54@thiocod.in>","Jacob Smith <jacob@frende.me>","Michael Nutt <michael@nutt.im>","Brad Parham <baparham@gmail.com>","Taneli Vatanen <taneli.vatanen@gmail.com>","Joris Dugué <zaruike10@gmail.com>","Chris Banks <christopher.bradley.banks@gmail.com>","Ompal Singh <ompal.hitm09@gmail.com>","Brodan <christopher.hranj@gmail.com>","Ankur Parihar <ankur.github@gmail.com>","Brahim Ait elhaj <brahima@gmail.com>","Mart Jansink <m.jansink@gmail.com>","Lachlan Newman <lachnewman007@gmail.com>","Dennis Beatty <dennis@dcbeatty.com>","Ingvar Stepanyan <me@rreverser.com>","Don Denton <don@happycollision.com>"],scripts:{install:"node install/check.js",clean:"rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",test:"npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types","test-lint":"semistandard && cpplint","test-unit":"nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha","test-licensing":'license-checker --production --summary --onlyAllow="Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT"',"test-leak":"./test/leak/leak.sh","test-types":"tsd","package-from-local-build":"node npm/from-local-build.js","docs-build":"node docs/build.mjs","docs-serve":"cd docs && npm start","docs-publish":"cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",main:"lib/index.js",types:"lib/index.d.ts",files:["install","lib","src/*.{cc,h,gyp}"],repository:{type:"git",url:"git://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{color:"^4.2.3","detect-libc":"^2.0.4",semver:"^7.7.2"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.34.3","@img/sharp-darwin-x64":"0.34.3","@img/sharp-libvips-darwin-arm64":"1.2.0","@img/sharp-libvips-darwin-x64":"1.2.0","@img/sharp-libvips-linux-arm":"1.2.0","@img/sharp-libvips-linux-arm64":"1.2.0","@img/sharp-libvips-linux-ppc64":"1.2.0","@img/sharp-libvips-linux-s390x":"1.2.0","@img/sharp-libvips-linux-x64":"1.2.0","@img/sharp-libvips-linuxmusl-arm64":"1.2.0","@img/sharp-libvips-linuxmusl-x64":"1.2.0","@img/sharp-linux-arm":"0.34.3","@img/sharp-linux-arm64":"0.34.3","@img/sharp-linux-ppc64":"0.34.3","@img/sharp-linux-s390x":"0.34.3","@img/sharp-linux-x64":"0.34.3","@img/sharp-linuxmusl-arm64":"0.34.3","@img/sharp-linuxmusl-x64":"0.34.3","@img/sharp-wasm32":"0.34.3","@img/sharp-win32-arm64":"0.34.3","@img/sharp-win32-ia32":"0.34.3","@img/sharp-win32-x64":"0.34.3"},devDependencies:{"@emnapi/runtime":"^1.4.4","@img/sharp-libvips-dev":"1.2.0","@img/sharp-libvips-dev-wasm32":"1.2.0","@img/sharp-libvips-win32-arm64":"1.2.0","@img/sharp-libvips-win32-ia32":"1.2.0","@img/sharp-libvips-win32-x64":"1.2.0","@types/node":"*",cc:"^3.0.1",emnapi:"^1.4.4","exif-reader":"^2.0.2","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^9.1.1","license-checker":"^25.0.1",mocha:"^11.7.1","node-addon-api":"^8.4.0","node-gyp":"^11.2.0",nyc:"^17.1.0",semistandard:"^17.0.0","tar-fs":"^3.1.0",tsd:"^0.32.0"},license:"Apache-2.0",engines:{node:"^18.17.0 || ^20.3.0 || >=21.0.0"},config:{libvips:">=8.17.1"},funding:{url:"https://opencollective.com/libvips"},semistandard:{env:["mocha"]},cc:{linelength:"120",filter:["build/include"]},nyc:{include:["lib"]},tsd:{directory:"test/types/"}};const{spawnSync:yc}=h,{createHash:Ec}=f,_c=Yl,Oc=Ql,xc=vc,jc=Ol,{config:Pc,engines:Sc,optionalDependencies:Rc}=wc,Ac=process.env.npm_package_config_libvips||Pc.libvips,kc=_c(Ac).version,$c={encoding:"utf8",shell:!0},Ic=()=>jc.isNonGlibcLinuxSync()?jc.familySync():"",Lc=()=>{if(Tc())return"wasm32";const{npm_config_arch:e,npm_config_platform:t,npm_config_libc:r}=process.env,n="string"==typeof r?r:Ic();return`${t||process.platform}${n}-${e||process.arch}`},Tc=()=>{const{CC:e}=process.env;return Boolean(e&&e.endsWith("/emcc"))},Dc=e=>Ec("sha512").update(e).digest("hex"),Nc=()=>{if("win32"!==process.platform){return(yc("pkg-config --modversion vips-cpp",{...$c,env:{...process.env,PKG_CONFIG_PATH:Cc()}}).stdout||"").trim()}return""},Cc=()=>{if("win32"!==process.platform){return[(yc('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',$c).stdout||"").trim(),process.env.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":")}return""},Mc=(e,t,r)=>(r&&r(`Detected ${t}, skipping search for globally-installed libvips`),e);var Fc={minimumLibvipsVersion:kc,prebuiltPlatforms:["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-ppc64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-arm64","win32-ia32","win32-x64"],buildPlatformArch:Lc,buildSharpLibvipsIncludeDir:()=>{try{return rr(`@img/sharp-libvips-dev-${Lc()}/include`)}catch{try{return require("@img/sharp-libvips-dev/include")}catch{}}return""},buildSharpLibvipsCPlusPlusDir:()=>{try{return require("@img/sharp-libvips-dev/cplusplus")}catch{}return""},buildSharpLibvipsLibDir:()=>{try{return rr(`@img/sharp-libvips-dev-${Lc()}/lib`)}catch{try{return rr(`@img/sharp-libvips-${Lc()}/lib`)}catch{}}return""},isUnsupportedNodeRuntime:()=>{if("node"===process.release?.name&&process.versions&&!xc(process.versions.node,Sc.node))return{found:process.versions.node,expected:Sc.node}},runtimePlatformArch:()=>`${process.platform}${Ic()}-${process.arch}`,log:e=>{e instanceof Error?console.error(`sharp: Installation error: ${e.message}`):console.log(`sharp: ${e}`)},yarnLocator:()=>{try{const e=Dc(`imgsharp-libvips-${Lc()}`),t=_c(Rc[`@img/sharp-libvips-${Lc()}`],{includePrerelease:!0}).version;return Dc(`${e}npm:${t}`).slice(0,10)}catch{}return""},spawnRebuild:()=>yc("node-gyp rebuild --directory=src "+(Tc()?"--nodedir=emscripten":""),{...$c,stdio:"inherit"}).status,globalLibvipsVersion:Nc,pkgConfigPath:Cc,useGlobalLibvips:e=>{if(!0===Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS))return Mc(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",e);if(!0===Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS))return Mc(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",e);if((()=>{if("darwin"===process.platform&&"x64"===process.arch)return"sysctl.proc_translated: 1"===(yc("sysctl sysctl.proc_translated",$c).stdout||"").trim();return!1})())return Mc(!1,"Rosetta",e);const t=Nc();return!!t&&Oc(t,kc)}};const{familySync:Bc,versionSync:zc}=Ol,{runtimePlatformArch:Uc,isUnsupportedNodeRuntime:qc,prebuiltPlatforms:Wc,minimumLibvipsVersion:Hc}=Fc,Gc=Uc(),Vc=[`../src/build/Release/sharp-${Gc}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${Gc}/sharp.node`,"@img/sharp-wasm32/sharp.node"];let Yc,Xc;const Jc=[];for(Yc of Vc)try{Xc=rr(Yc);break}catch(e){Jc.push(e)}if(Xc&&Yc.startsWith("@img/sharp-linux-x64")&&!Xc._isUsingX64V2()){const e=new Error("Prebuilt binaries for linux-x64 require v2 microarchitecture");e.code="Unsupported CPU",Jc.push(e),Xc=null}if(!Xc){const[e,t,r]=["linux","darwin","win32"].map(e=>Gc.startsWith(e)),n=[`Could not load the "sharp" module using the ${Gc} runtime`];Jc.forEach(e=>{"MODULE_NOT_FOUND"!==e.code&&n.push(`${e.code}: ${e.message}`)});const i=Jc.map(e=>e.message).join(" ");if(n.push("Possible solutions:"),qc()){const{found:e,expected:t}=qc();n.push("- Please upgrade Node.js:",` Found ${e}`,` Requires ${t}`)}else if(Wc.includes(Gc)){const[e,t]=Gc.split("-"),r=e.endsWith("musl")?" --libc=musl":"";n.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${e.replace("musl","")}${r} --cpu=${t} sharp`)}else n.push(`- Manually install libvips >= ${Hc}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(e&&/(symbol not found|CXXABI_)/i.test(i))try{const{config:e}=rr(`@img/sharp-libvips-${Gc}/package`),t=`${Bc()} ${zc()}`,r=`${e.musl?"musl":"glibc"} ${e.musl||e.glibc}`;n.push("- Update your OS:",` Found ${t}`,` Requires ${r}`)}catch(e){}throw e&&/\/snap\/core[0-9]{2}/.test(i)&&n.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node"),t&&/Incompatible library version/.test(i)&&n.push("- Update Homebrew:"," brew update && brew upgrade vips"),Jc.some(e=>"ERR_DLOPEN_DISABLED"===e.code)&&n.push("- Run Node.js without using the --no-addons flag"),r&&/The specified procedure could not be found/.test(i)&&n.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp"),n.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(n.join("\n"))}Va.exports=Xc;var Kc=Va.exports;const Qc=o,Zc=Ga,eu=c.debuglog("sharp"),tu=function(e,t){if(1===arguments.length&&!Zc.defined(e))throw new Error("Invalid input");return this instanceof tu?(Qc.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBeforePreExtract:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,precision:"integer",minAmpl:.2,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,dilateWidth:0,erodeWidth:0,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,withXmp:"",resolveWithObject:!1,loop:-1,delay:[],jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpSmartDeblock:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifKeepDuplicateFrames:!1,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],pdfBackground:[255,255,255,255],debuglog:e=>{this.emit("warning",e),eu(e)},queueListener:function(e){tu.queue.emit("change",e)}},this.options.input=this._createInputDescriptor(e,t,{allowStream:!0}),this):new tu(e,t)};Object.setPrototypeOf(tu.prototype,Qc.Duplex.prototype),Object.setPrototypeOf(tu,Qc.Duplex),Object.assign(tu.prototype,{clone:function(){const e=this.constructor.call(),{debuglog:t,queueListener:r,...n}=this.options;return e.options=structuredClone(n),e.options.debuglog=t,e.options.queueListener=r,this._isStreamInput()&&this.on("finish",()=>{this._flattenBufferIn(),e.options.input.buffer=this.options.input.buffer,e.emit("finish")}),e}});var ru=tu;const nu=Ga,iu=Kc,ou={left:"low",top:"low",low:"low",center:"centre",centre:"centre",right:"high",bottom:"high",high:"high"},su=["failOn","limitInputPixels","unlimited","animated","autoOrient","density","ignoreIcc","page","pages","sequentialRead","jp2","openSlide","pdf","raw","svg","tiff","failOnError","openSlideLevel","pdfBackground","tiffSubifd"];function au(e){const t=su.filter(t=>nu.defined(e[t])).map(t=>[t,e[t]]);return t.length?Object.fromEntries(t):void 0}function lu(e,t,r){const n={autoOrient:!1,failOn:"warning",limitInputPixels:Math.pow(16383,2),ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(nu.string(e))n.file=e;else if(nu.buffer(e)){if(0===e.length)throw Error("Input Buffer is empty");n.buffer=e}else if(nu.arrayBuffer(e)){if(0===e.byteLength)throw Error("Input bit Array is empty");n.buffer=Buffer.from(e,0,e.byteLength)}else if(nu.typedArray(e)){if(0===e.length)throw Error("Input Bit Array is empty");n.buffer=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(nu.plainObject(e)&&!nu.defined(t))au(t=e)&&(n.buffer=[]);else if(!nu.defined(e)&&!nu.defined(t)&&nu.object(r)&&r.allowStream)n.buffer=[];else{if(!Array.isArray(e))throw new Error(`Unsupported input '${e}' of type ${typeof e}${nu.defined(t)?" when also providing options of type "+typeof t:""}`);if(!(e.length>1))throw new Error("Expected at least two images to join");if(this.options.joining)throw new Error("Recursive join is unsupported");this.options.joining=!0,this.options.join=e.map(e=>this._createInputDescriptor(e))}if(nu.object(t)){if(nu.defined(t.failOnError)){if(!nu.bool(t.failOnError))throw nu.invalidParameterError("failOnError","boolean",t.failOnError);n.failOn=t.failOnError?"warning":"none"}if(nu.defined(t.failOn)){if(!nu.string(t.failOn)||!nu.inArray(t.failOn,["none","truncated","error","warning"]))throw nu.invalidParameterError("failOn","one of: none, truncated, error, warning",t.failOn);n.failOn=t.failOn}if(nu.defined(t.autoOrient)){if(!nu.bool(t.autoOrient))throw nu.invalidParameterError("autoOrient","boolean",t.autoOrient);n.autoOrient=t.autoOrient}if(nu.defined(t.density)){if(!nu.inRange(t.density,1,1e5))throw nu.invalidParameterError("density","number between 1 and 100000",t.density);n.density=t.density}if(nu.defined(t.ignoreIcc)){if(!nu.bool(t.ignoreIcc))throw nu.invalidParameterError("ignoreIcc","boolean",t.ignoreIcc);n.ignoreIcc=t.ignoreIcc}if(nu.defined(t.limitInputPixels))if(nu.bool(t.limitInputPixels))n.limitInputPixels=t.limitInputPixels?Math.pow(16383,2):0;else{if(!nu.integer(t.limitInputPixels)||!nu.inRange(t.limitInputPixels,0,Number.MAX_SAFE_INTEGER))throw nu.invalidParameterError("limitInputPixels","positive integer",t.limitInputPixels);n.limitInputPixels=t.limitInputPixels}if(nu.defined(t.unlimited)){if(!nu.bool(t.unlimited))throw nu.invalidParameterError("unlimited","boolean",t.unlimited);n.unlimited=t.unlimited}if(nu.defined(t.sequentialRead)){if(!nu.bool(t.sequentialRead))throw nu.invalidParameterError("sequentialRead","boolean",t.sequentialRead);n.sequentialRead=t.sequentialRead}if(nu.defined(t.raw)){if(!(nu.object(t.raw)&&nu.integer(t.raw.width)&&t.raw.width>0&&nu.integer(t.raw.height)&&t.raw.height>0&&nu.integer(t.raw.channels)&&nu.inRange(t.raw.channels,1,4)))throw new Error("Expected width, height and channels for raw pixel input");switch(n.rawWidth=t.raw.width,n.rawHeight=t.raw.height,n.rawChannels=t.raw.channels,e.constructor){case Uint8Array:case Uint8ClampedArray:n.rawDepth="uchar";break;case Int8Array:n.rawDepth="char";break;case Uint16Array:n.rawDepth="ushort";break;case Int16Array:n.rawDepth="short";break;case Uint32Array:n.rawDepth="uint";break;case Int32Array:n.rawDepth="int";break;case Float32Array:n.rawDepth="float";break;case Float64Array:n.rawDepth="double";break;default:n.rawDepth="uchar"}if(n.rawPremultiplied=!1,nu.defined(t.raw.premultiplied)){if(!nu.bool(t.raw.premultiplied))throw nu.invalidParameterError("raw.premultiplied","boolean",t.raw.premultiplied);n.rawPremultiplied=t.raw.premultiplied}if(n.rawPageHeight=0,nu.defined(t.raw.pageHeight)){if(!(nu.integer(t.raw.pageHeight)&&t.raw.pageHeight>0&&t.raw.pageHeight<=t.raw.height))throw nu.invalidParameterError("raw.pageHeight","positive integer",t.raw.pageHeight);if(t.raw.height%t.raw.pageHeight!==0)throw new Error(`Expected raw.height ${t.raw.height} to be a multiple of raw.pageHeight ${t.raw.pageHeight}`);n.rawPageHeight=t.raw.pageHeight}}if(nu.defined(t.animated)){if(!nu.bool(t.animated))throw nu.invalidParameterError("animated","boolean",t.animated);n.pages=t.animated?-1:1}if(nu.defined(t.pages)){if(!nu.integer(t.pages)||!nu.inRange(t.pages,-1,1e5))throw nu.invalidParameterError("pages","integer between -1 and 100000",t.pages);n.pages=t.pages}if(nu.defined(t.page)){if(!nu.integer(t.page)||!nu.inRange(t.page,0,1e5))throw nu.invalidParameterError("page","integer between 0 and 100000",t.page);n.page=t.page}if(nu.object(t.openSlide)&&nu.defined(t.openSlide.level)){if(!nu.integer(t.openSlide.level)||!nu.inRange(t.openSlide.level,0,256))throw nu.invalidParameterError("openSlide.level","integer between 0 and 256",t.openSlide.level);n.openSlideLevel=t.openSlide.level}else if(nu.defined(t.level)){if(!nu.integer(t.level)||!nu.inRange(t.level,0,256))throw nu.invalidParameterError("level","integer between 0 and 256",t.level);n.openSlideLevel=t.level}if(nu.object(t.tiff)&&nu.defined(t.tiff.subifd)){if(!nu.integer(t.tiff.subifd)||!nu.inRange(t.tiff.subifd,-1,1e5))throw nu.invalidParameterError("tiff.subifd","integer between -1 and 100000",t.tiff.subifd);n.tiffSubifd=t.tiff.subifd}else if(nu.defined(t.subifd)){if(!nu.integer(t.subifd)||!nu.inRange(t.subifd,-1,1e5))throw nu.invalidParameterError("subifd","integer between -1 and 100000",t.subifd);n.tiffSubifd=t.subifd}if(nu.object(t.svg)){if(nu.defined(t.svg.stylesheet)){if(!nu.string(t.svg.stylesheet))throw nu.invalidParameterError("svg.stylesheet","string",t.svg.stylesheet);n.svgStylesheet=t.svg.stylesheet}if(nu.defined(t.svg.highBitdepth)){if(!nu.bool(t.svg.highBitdepth))throw nu.invalidParameterError("svg.highBitdepth","boolean",t.svg.highBitdepth);n.svgHighBitdepth=t.svg.highBitdepth}}if(nu.object(t.pdf)&&nu.defined(t.pdf.background)?n.pdfBackground=this._getBackgroundColourOption(t.pdf.background):nu.defined(t.pdfBackground)&&(n.pdfBackground=this._getBackgroundColourOption(t.pdfBackground)),nu.object(t.jp2)&&nu.defined(t.jp2.oneshot)){if(!nu.bool(t.jp2.oneshot))throw nu.invalidParameterError("jp2.oneshot","boolean",t.jp2.oneshot);n.jp2Oneshot=t.jp2.oneshot}if(nu.defined(t.create)){if(!(nu.object(t.create)&&nu.integer(t.create.width)&&t.create.width>0&&nu.integer(t.create.height)&&t.create.height>0&&nu.integer(t.create.channels)))throw new Error("Expected valid width, height and channels to create a new input image");if(n.createWidth=t.create.width,n.createHeight=t.create.height,n.createChannels=t.create.channels,n.createPageHeight=0,nu.defined(t.create.pageHeight)){if(!(nu.integer(t.create.pageHeight)&&t.create.pageHeight>0&&t.create.pageHeight<=t.create.height))throw nu.invalidParameterError("create.pageHeight","positive integer",t.create.pageHeight);if(t.create.height%t.create.pageHeight!==0)throw new Error(`Expected create.height ${t.create.height} to be a multiple of create.pageHeight ${t.create.pageHeight}`);n.createPageHeight=t.create.pageHeight}if(nu.defined(t.create.noise)){if(!nu.object(t.create.noise))throw new Error("Expected noise to be an object");if("gaussian"!==t.create.noise.type)throw new Error("Only gaussian noise is supported at the moment");if(n.createNoiseType=t.create.noise.type,!nu.inRange(t.create.channels,1,4))throw nu.invalidParameterError("create.channels","number between 1 and 4",t.create.channels);if(n.createNoiseMean=128,nu.defined(t.create.noise.mean)){if(!nu.number(t.create.noise.mean)||!nu.inRange(t.create.noise.mean,0,1e4))throw nu.invalidParameterError("create.noise.mean","number between 0 and 10000",t.create.noise.mean);n.createNoiseMean=t.create.noise.mean}if(n.createNoiseSigma=30,nu.defined(t.create.noise.sigma)){if(!nu.number(t.create.noise.sigma)||!nu.inRange(t.create.noise.sigma,0,1e4))throw nu.invalidParameterError("create.noise.sigma","number between 0 and 10000",t.create.noise.sigma);n.createNoiseSigma=t.create.noise.sigma}}else{if(!nu.defined(t.create.background))throw new Error("Expected valid noise or background to create a new input image");if(!nu.inRange(t.create.channels,3,4))throw nu.invalidParameterError("create.channels","number between 3 and 4",t.create.channels);n.createBackground=this._getBackgroundColourOption(t.create.background)}delete n.buffer}if(nu.defined(t.text)){if(!nu.object(t.text)||!nu.string(t.text.text))throw new Error("Expected a valid string to create an image with text.");if(n.textValue=t.text.text,nu.defined(t.text.height)&&nu.defined(t.text.dpi))throw new Error("Expected only one of dpi or height");if(nu.defined(t.text.font)){if(!nu.string(t.text.font))throw nu.invalidParameterError("text.font","string",t.text.font);n.textFont=t.text.font}if(nu.defined(t.text.fontfile)){if(!nu.string(t.text.fontfile))throw nu.invalidParameterError("text.fontfile","string",t.text.fontfile);n.textFontfile=t.text.fontfile}if(nu.defined(t.text.width)){if(!(nu.integer(t.text.width)&&t.text.width>0))throw nu.invalidParameterError("text.width","positive integer",t.text.width);n.textWidth=t.text.width}if(nu.defined(t.text.height)){if(!(nu.integer(t.text.height)&&t.text.height>0))throw nu.invalidParameterError("text.height","positive integer",t.text.height);n.textHeight=t.text.height}if(nu.defined(t.text.align)){if(!nu.string(t.text.align)||!nu.string(this.constructor.align[t.text.align]))throw nu.invalidParameterError("text.align","valid alignment",t.text.align);n.textAlign=this.constructor.align[t.text.align]}if(nu.defined(t.text.justify)){if(!nu.bool(t.text.justify))throw nu.invalidParameterError("text.justify","boolean",t.text.justify);n.textJustify=t.text.justify}if(nu.defined(t.text.dpi)){if(!nu.integer(t.text.dpi)||!nu.inRange(t.text.dpi,1,1e6))throw nu.invalidParameterError("text.dpi","integer between 1 and 1000000",t.text.dpi);n.textDpi=t.text.dpi}if(nu.defined(t.text.rgba)){if(!nu.bool(t.text.rgba))throw nu.invalidParameterError("text.rgba","bool",t.text.rgba);n.textRgba=t.text.rgba}if(nu.defined(t.text.spacing)){if(!nu.integer(t.text.spacing)||!nu.inRange(t.text.spacing,-1e6,1e6))throw nu.invalidParameterError("text.spacing","integer between -1000000 and 1000000",t.text.spacing);n.textSpacing=t.text.spacing}if(nu.defined(t.text.wrap)){if(!nu.string(t.text.wrap)||!nu.inArray(t.text.wrap,["word","char","word-char","none"]))throw nu.invalidParameterError("text.wrap","one of: word, char, word-char, none",t.text.wrap);n.textWrap=t.text.wrap}delete n.buffer}if(nu.defined(t.join)){if(!nu.defined(this.options.join))throw new Error("Expected input to be an array of images to join");if(nu.defined(t.join.animated)){if(!nu.bool(t.join.animated))throw nu.invalidParameterError("join.animated","boolean",t.join.animated);n.joinAnimated=t.join.animated}if(nu.defined(t.join.across)){if(!nu.integer(t.join.across)||!nu.inRange(t.join.across,1,1e6))throw nu.invalidParameterError("join.across","integer between 1 and 100000",t.join.across);n.joinAcross=t.join.across}if(nu.defined(t.join.shim)){if(!nu.integer(t.join.shim)||!nu.inRange(t.join.shim,0,1e6))throw nu.invalidParameterError("join.shim","integer between 0 and 100000",t.join.shim);n.joinShim=t.join.shim}if(nu.defined(t.join.background)&&(n.joinBackground=this._getBackgroundColourOption(t.join.background)),nu.defined(t.join.halign)){if(!nu.string(t.join.halign)||!nu.string(this.constructor.align[t.join.halign]))throw nu.invalidParameterError("join.halign","valid alignment",t.join.halign);n.joinHalign=this.constructor.align[t.join.halign]}if(nu.defined(t.join.valign)){if(!nu.string(t.join.valign)||!nu.string(this.constructor.align[t.join.valign]))throw nu.invalidParameterError("join.valign","valid alignment",t.join.valign);n.joinValign=this.constructor.align[t.join.valign]}}}else if(nu.defined(t))throw new Error("Invalid input options "+t);return n}function cu(e,t,r){Array.isArray(this.options.input.buffer)?nu.buffer(e)?(0===this.options.input.buffer.length&&this.on("finish",()=>{this.streamInFinished=!0}),this.options.input.buffer.push(e),r()):r(new Error("Non-Buffer data on Writable Stream")):r(new Error("Unexpected data on Writable Stream"))}function uu(){this._isStreamInput()&&(this.options.input.buffer=Buffer.concat(this.options.input.buffer))}function hu(){return Array.isArray(this.options.input.buffer)}function fu(e){const t=Error();return nu.fn(e)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),iu.metadata(this.options,(r,n)=>{r?e(nu.nativeError(r,t)):e(null,n)})}):iu.metadata(this.options,(r,n)=>{r?e(nu.nativeError(r,t)):e(null,n)}),this):this._isStreamInput()?new Promise((e,r)=>{const n=()=>{this._flattenBufferIn(),iu.metadata(this.options,(n,i)=>{n?r(nu.nativeError(n,t)):e(i)})};this.writableFinished?n():this.once("finish",n)}):new Promise((e,r)=>{iu.metadata(this.options,(n,i)=>{n?r(nu.nativeError(n,t)):e(i)})})}function du(e){const t=Error();return nu.fn(e)?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),iu.stats(this.options,(r,n)=>{r?e(nu.nativeError(r,t)):e(null,n)})}):iu.stats(this.options,(r,n)=>{r?e(nu.nativeError(r,t)):e(null,n)}),this):this._isStreamInput()?new Promise((e,r)=>{this.on("finish",function(){this._flattenBufferIn(),iu.stats(this.options,(n,i)=>{n?r(nu.nativeError(n,t)):e(i)})})}):new Promise((e,r)=>{iu.stats(this.options,(n,i)=>{n?r(nu.nativeError(n,t)):e(i)})})}const pu=Ga,mu={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},gu={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},bu={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},vu={entropy:16,attention:17},wu={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3",mks2013:"mks2013",mks2021:"mks2021"},yu={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},Eu={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};function _u(e){return e.angle%360!=0||!0===e.input.autoOrient||0!==e.rotationAngle}function Ou(e){return-1!==e.width||-1!==e.height}function xu(e,t,r){if(Ou(this.options)&&this.options.debuglog("ignoring previous resize options"),-1!==this.options.widthPost&&this.options.debuglog("operation order will be: extract, resize, extract"),pu.defined(e))if(pu.object(e)&&!pu.defined(r))r=e;else{if(!(pu.integer(e)&&e>0))throw pu.invalidParameterError("width","positive integer",e);this.options.width=e}else this.options.width=-1;if(pu.defined(t)){if(!(pu.integer(t)&&t>0))throw pu.invalidParameterError("height","positive integer",t);this.options.height=t}else this.options.height=-1;if(pu.object(r)){if(pu.defined(r.width)){if(!(pu.integer(r.width)&&r.width>0))throw pu.invalidParameterError("width","positive integer",r.width);this.options.width=r.width}if(pu.defined(r.height)){if(!(pu.integer(r.height)&&r.height>0))throw pu.invalidParameterError("height","positive integer",r.height);this.options.height=r.height}if(pu.defined(r.fit)){const e=Eu[r.fit];if(!pu.string(e))throw pu.invalidParameterError("fit","valid fit",r.fit);this.options.canvas=e}if(pu.defined(r.position)){const e=pu.integer(r.position)?r.position:vu[r.position]||gu[r.position]||mu[r.position];if(!pu.integer(e)||!pu.inRange(e,0,8)&&!pu.inRange(e,16,17))throw pu.invalidParameterError("position","valid position/gravity/strategy",r.position);this.options.position=e}if(this._setBackgroundColourOption("resizeBackground",r.background),pu.defined(r.kernel)){if(!pu.string(wu[r.kernel]))throw pu.invalidParameterError("kernel","valid kernel name",r.kernel);this.options.kernel=wu[r.kernel]}pu.defined(r.withoutEnlargement)&&this._setBooleanOption("withoutEnlargement",r.withoutEnlargement),pu.defined(r.withoutReduction)&&this._setBooleanOption("withoutReduction",r.withoutReduction),pu.defined(r.fastShrinkOnLoad)&&this._setBooleanOption("fastShrinkOnLoad",r.fastShrinkOnLoad)}return _u(this.options)&&Ou(this.options)&&(this.options.rotateBeforePreExtract=!0),this}function ju(e){if(pu.integer(e)&&e>0)this.options.extendTop=e,this.options.extendBottom=e,this.options.extendLeft=e,this.options.extendRight=e;else{if(!pu.object(e))throw pu.invalidParameterError("extend","integer or object",e);if(pu.defined(e.top)){if(!(pu.integer(e.top)&&e.top>=0))throw pu.invalidParameterError("top","positive integer",e.top);this.options.extendTop=e.top}if(pu.defined(e.bottom)){if(!(pu.integer(e.bottom)&&e.bottom>=0))throw pu.invalidParameterError("bottom","positive integer",e.bottom);this.options.extendBottom=e.bottom}if(pu.defined(e.left)){if(!(pu.integer(e.left)&&e.left>=0))throw pu.invalidParameterError("left","positive integer",e.left);this.options.extendLeft=e.left}if(pu.defined(e.right)){if(!(pu.integer(e.right)&&e.right>=0))throw pu.invalidParameterError("right","positive integer",e.right);this.options.extendRight=e.right}if(this._setBackgroundColourOption("extendBackground",e.background),pu.defined(e.extendWith)){if(!pu.string(bu[e.extendWith]))throw pu.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",e.extendWith);this.options.extendWith=bu[e.extendWith]}}return this}function Pu(e){const t=Ou(this.options)||-1!==this.options.widthPre?"Post":"Pre";return-1!==this.options[`width${t}`]&&this.options.debuglog("ignoring previous extract options"),["left","top","width","height"].forEach(function(r){const n=e[r];if(!(pu.integer(n)&&n>=0))throw pu.invalidParameterError(r,"integer",n);this.options[r+("left"===r||"top"===r?"Offset":"")+t]=n},this),_u(this.options)&&!Ou(this.options)&&(-1!==this.options.widthPre&&-1!==this.options.widthPost||(this.options.rotateBeforePreExtract=!0)),this}function Su(e){if(this.options.trimThreshold=10,pu.defined(e)){if(!pu.object(e))throw pu.invalidParameterError("trim","object",e);if(pu.defined(e.background)&&this._setBackgroundColourOption("trimBackground",e.background),pu.defined(e.threshold)){if(!(pu.number(e.threshold)&&e.threshold>=0))throw pu.invalidParameterError("threshold","positive number",e.threshold);this.options.trimThreshold=e.threshold}pu.defined(e.lineArt)&&this._setBooleanOption("trimLineArt",e.lineArt)}return _u(this.options)&&(this.options.rotateBeforePreExtract=!0),this}const Ru=Ga,Au={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};function ku(e){if(!Array.isArray(e))throw Ru.invalidParameterError("images to composite","array",e);return this.options.composite=e.map(e=>{if(!Ru.object(e))throw Ru.invalidParameterError("image to composite","object",e);const t=this._inputOptionsFromObject(e),r={input:this._createInputDescriptor(e.input,t,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(Ru.defined(e.blend)){if(!Ru.string(Au[e.blend]))throw Ru.invalidParameterError("blend","valid blend name",e.blend);r.blend=Au[e.blend]}if(Ru.defined(e.tile)){if(!Ru.bool(e.tile))throw Ru.invalidParameterError("tile","boolean",e.tile);r.tile=e.tile}if(Ru.defined(e.left)){if(!Ru.integer(e.left))throw Ru.invalidParameterError("left","integer",e.left);r.left=e.left}if(Ru.defined(e.top)){if(!Ru.integer(e.top))throw Ru.invalidParameterError("top","integer",e.top);r.top=e.top}if(Ru.defined(e.top)!==Ru.defined(e.left))throw new Error("Expected both left and top to be set");if(r.hasOffset=Ru.integer(e.top)&&Ru.integer(e.left),Ru.defined(e.gravity))if(Ru.integer(e.gravity)&&Ru.inRange(e.gravity,0,8))r.gravity=e.gravity;else{if(!Ru.string(e.gravity)||!Ru.integer(this.constructor.gravity[e.gravity]))throw Ru.invalidParameterError("gravity","valid gravity",e.gravity);r.gravity=this.constructor.gravity[e.gravity]}if(Ru.defined(e.premultiplied)){if(!Ru.bool(e.premultiplied))throw Ru.invalidParameterError("premultiplied","boolean",e.premultiplied);r.premultiplied=e.premultiplied}return r}),this}const $u=Ga,Iu={integer:"integer",float:"float",approximate:"approximate"};function Lu(e,t){if(!$u.defined(e))return this.autoOrient();if((this.options.angle||this.options.rotationAngle)&&(this.options.debuglog("ignoring previous rotate options"),this.options.angle=0,this.options.rotationAngle=0),!$u.integer(e)||e%90){if(!$u.number(e))throw $u.invalidParameterError("angle","numeric",e);this.options.rotationAngle=e,$u.object(t)&&t.background&&this._setBackgroundColourOption("rotationBackground",t.background)}else this.options.angle=e;return this}function Tu(){return this.options.input.autoOrient=!0,this}function Du(e){return this.options.flip=!$u.bool(e)||e,this}function Nu(e){return this.options.flop=!$u.bool(e)||e,this}function Cu(e,t){const r=[].concat(...e);if(4!==r.length||!r.every($u.number))throw $u.invalidParameterError("matrix","1x4 or 2x2 array",e);if(this.options.affineMatrix=r,$u.defined(t)){if(!$u.object(t))throw $u.invalidParameterError("options","object",t);if(this._setBackgroundColourOption("affineBackground",t.background),$u.defined(t.idx)){if(!$u.number(t.idx))throw $u.invalidParameterError("options.idx","number",t.idx);this.options.affineIdx=t.idx}if($u.defined(t.idy)){if(!$u.number(t.idy))throw $u.invalidParameterError("options.idy","number",t.idy);this.options.affineIdy=t.idy}if($u.defined(t.odx)){if(!$u.number(t.odx))throw $u.invalidParameterError("options.odx","number",t.odx);this.options.affineOdx=t.odx}if($u.defined(t.ody)){if(!$u.number(t.ody))throw $u.invalidParameterError("options.ody","number",t.ody);this.options.affineOdy=t.ody}if($u.defined(t.interpolator)){if(!$u.inArray(t.interpolator,Object.values(this.constructor.interpolators)))throw $u.invalidParameterError("options.interpolator","valid interpolator name",t.interpolator);this.options.affineInterpolator=t.interpolator}}return this}function Mu(e,t,r){if($u.defined(e))if($u.bool(e))this.options.sharpenSigma=e?-1:0;else if($u.number(e)&&$u.inRange(e,.01,1e4)){if(this.options.sharpenSigma=e,$u.defined(t)){if(!$u.number(t)||!$u.inRange(t,0,1e4))throw $u.invalidParameterError("flat","number between 0 and 10000",t);this.options.sharpenM1=t}if($u.defined(r)){if(!$u.number(r)||!$u.inRange(r,0,1e4))throw $u.invalidParameterError("jagged","number between 0 and 10000",r);this.options.sharpenM2=r}}else{if(!$u.plainObject(e))throw $u.invalidParameterError("sigma","number between 0.01 and 10000",e);if(!$u.number(e.sigma)||!$u.inRange(e.sigma,1e-6,10))throw $u.invalidParameterError("options.sigma","number between 0.000001 and 10",e.sigma);if(this.options.sharpenSigma=e.sigma,$u.defined(e.m1)){if(!$u.number(e.m1)||!$u.inRange(e.m1,0,1e6))throw $u.invalidParameterError("options.m1","number between 0 and 1000000",e.m1);this.options.sharpenM1=e.m1}if($u.defined(e.m2)){if(!$u.number(e.m2)||!$u.inRange(e.m2,0,1e6))throw $u.invalidParameterError("options.m2","number between 0 and 1000000",e.m2);this.options.sharpenM2=e.m2}if($u.defined(e.x1)){if(!$u.number(e.x1)||!$u.inRange(e.x1,0,1e6))throw $u.invalidParameterError("options.x1","number between 0 and 1000000",e.x1);this.options.sharpenX1=e.x1}if($u.defined(e.y2)){if(!$u.number(e.y2)||!$u.inRange(e.y2,0,1e6))throw $u.invalidParameterError("options.y2","number between 0 and 1000000",e.y2);this.options.sharpenY2=e.y2}if($u.defined(e.y3)){if(!$u.number(e.y3)||!$u.inRange(e.y3,0,1e6))throw $u.invalidParameterError("options.y3","number between 0 and 1000000",e.y3);this.options.sharpenY3=e.y3}}else this.options.sharpenSigma=-1;return this}function Fu(e){if($u.defined(e)){if(!$u.integer(e)||!$u.inRange(e,1,1e3))throw $u.invalidParameterError("size","integer between 1 and 1000",e);this.options.medianSize=e}else this.options.medianSize=3;return this}function Bu(e){let t;if($u.number(e))t=e;else if($u.plainObject(e)){if(!$u.number(e.sigma))throw $u.invalidParameterError("options.sigma","number between 0.3 and 1000",t);if(t=e.sigma,"precision"in e){if(!$u.string(Iu[e.precision]))throw $u.invalidParameterError("precision","one of: integer, float, approximate",e.precision);this.options.precision=Iu[e.precision]}if("minAmplitude"in e){if(!$u.number(e.minAmplitude)||!$u.inRange(e.minAmplitude,.001,1))throw $u.invalidParameterError("minAmplitude","number between 0.001 and 1",e.minAmplitude);this.options.minAmpl=e.minAmplitude}}if($u.defined(e))if($u.bool(e))this.options.blurSigma=e?-1:0;else{if(!$u.number(t)||!$u.inRange(t,.3,1e3))throw $u.invalidParameterError("sigma","number between 0.3 and 1000",t);this.options.blurSigma=t}else this.options.blurSigma=-1;return this}function zu(e){if($u.defined(e)){if(!($u.integer(e)&&e>0))throw $u.invalidParameterError("dilate","positive integer",zu);this.options.dilateWidth=e}else this.options.dilateWidth=1;return this}function Uu(e){if($u.defined(e)){if(!($u.integer(e)&&e>0))throw $u.invalidParameterError("erode","positive integer",Uu);this.options.erodeWidth=e}else this.options.erodeWidth=1;return this}function qu(e){return this.options.flatten=!$u.bool(e)||e,$u.object(e)&&this._setBackgroundColourOption("flattenBackground",e.background),this}function Wu(){return this.options.unflatten=!0,this}function Hu(e,t){if($u.defined(e)){if(!$u.number(e)||!$u.inRange(e,1,3))throw $u.invalidParameterError("gamma","number between 1.0 and 3.0",e);this.options.gamma=e}else this.options.gamma=2.2;if($u.defined(t)){if(!$u.number(t)||!$u.inRange(t,1,3))throw $u.invalidParameterError("gammaOut","number between 1.0 and 3.0",t);this.options.gammaOut=t}else this.options.gammaOut=this.options.gamma;return this}function Gu(e){if(this.options.negate=!$u.bool(e)||e,$u.plainObject(e)&&"alpha"in e){if(!$u.bool(e.alpha))throw $u.invalidParameterError("alpha","should be boolean value",e.alpha);this.options.negateAlpha=e.alpha}return this}function Vu(e){if($u.plainObject(e)){if($u.defined(e.lower)){if(!$u.number(e.lower)||!$u.inRange(e.lower,0,99))throw $u.invalidParameterError("lower","number between 0 and 99",e.lower);this.options.normaliseLower=e.lower}if($u.defined(e.upper)){if(!$u.number(e.upper)||!$u.inRange(e.upper,1,100))throw $u.invalidParameterError("upper","number between 1 and 100",e.upper);this.options.normaliseUpper=e.upper}}if(this.options.normaliseLower>=this.options.normaliseUpper)throw $u.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this}function Yu(e){return this.normalise(e)}function Xu(e){if(!$u.plainObject(e))throw $u.invalidParameterError("options","plain object",e);if(!($u.integer(e.width)&&e.width>0))throw $u.invalidParameterError("width","integer greater than zero",e.width);if(this.options.claheWidth=e.width,!($u.integer(e.height)&&e.height>0))throw $u.invalidParameterError("height","integer greater than zero",e.height);if(this.options.claheHeight=e.height,$u.defined(e.maxSlope)){if(!$u.integer(e.maxSlope)||!$u.inRange(e.maxSlope,0,100))throw $u.invalidParameterError("maxSlope","integer between 0 and 100",e.maxSlope);this.options.claheMaxSlope=e.maxSlope}return this}function Ju(e){if(!($u.object(e)&&Array.isArray(e.kernel)&&$u.integer(e.width)&&$u.integer(e.height)&&$u.inRange(e.width,3,1001)&&$u.inRange(e.height,3,1001)&&e.height*e.width===e.kernel.length))throw new Error("Invalid convolution kernel");return $u.integer(e.scale)||(e.scale=e.kernel.reduce(function(e,t){return e+t},0)),e.scale<1&&(e.scale=1),$u.integer(e.offset)||(e.offset=0),this.options.convKernel=e,this}function Ku(e,t){if($u.defined(e))if($u.bool(e))this.options.threshold=e?128:0;else{if(!$u.integer(e)||!$u.inRange(e,0,255))throw $u.invalidParameterError("threshold","integer between 0 and 255",e);this.options.threshold=e}else this.options.threshold=128;return $u.object(t)&&!0!==t.greyscale&&!0!==t.grayscale?this.options.thresholdGrayscale=!1:this.options.thresholdGrayscale=!0,this}function Qu(e,t,r){if(this.options.boolean=this._createInputDescriptor(e,r),!$u.string(t)||!$u.inArray(t,["and","or","eor"]))throw $u.invalidParameterError("operator","one of: and, or, eor",t);return this.options.booleanOp=t,this}function Zu(e,t){if(!$u.defined(e)&&$u.number(t)?e=1:$u.number(e)&&!$u.defined(t)&&(t=0),$u.defined(e))if($u.number(e))this.options.linearA=[e];else{if(!(Array.isArray(e)&&e.length&&e.every($u.number)))throw $u.invalidParameterError("a","number or array of numbers",e);this.options.linearA=e}else this.options.linearA=[];if($u.defined(t))if($u.number(t))this.options.linearB=[t];else{if(!(Array.isArray(t)&&t.length&&t.every($u.number)))throw $u.invalidParameterError("b","number or array of numbers",t);this.options.linearB=t}else this.options.linearB=[];if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this}function eh(e){if(!Array.isArray(e))throw $u.invalidParameterError("inputMatrix","array",e);if(3!==e.length&&4!==e.length)throw $u.invalidParameterError("inputMatrix","3x3 or 4x4 array",e.length);const t=e.flat().map(Number);if(9!==t.length&&16!==t.length)throw $u.invalidParameterError("inputMatrix","cardinality of 9 or 16",t.length);return this.options.recombMatrix=t,this}function th(e){if(!$u.plainObject(e))throw $u.invalidParameterError("options","plain object",e);if("brightness"in e){if(!($u.number(e.brightness)&&e.brightness>=0))throw $u.invalidParameterError("brightness","number above zero",e.brightness);this.options.brightness=e.brightness}if("saturation"in e){if(!($u.number(e.saturation)&&e.saturation>=0))throw $u.invalidParameterError("saturation","number above zero",e.saturation);this.options.saturation=e.saturation}if("hue"in e){if(!$u.integer(e.hue))throw $u.invalidParameterError("hue","number",e.hue);this.options.hue=e.hue%360}if("lightness"in e){if(!$u.number(e.lightness))throw $u.invalidParameterError("lightness","number",e.lightness);this.options.lightness=e.lightness}return this}var rh={exports:{}},nh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ih={exports:{}},oh=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},sh=Array.prototype.concat,ah=Array.prototype.slice,lh=ih.exports=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];oh(i)?t=sh.call(t,ah.call(i)):t.push(i)}return t};lh.wrap=function(e){return function(){return e(lh(arguments))}};var ch=ih.exports,uh=nh,hh=ch,fh=Object.hasOwnProperty,dh=Object.create(null);for(var ph in uh)fh.call(uh,ph)&&(dh[uh[ph]]=ph);var mh=rh.exports={to:{},get:{}};function gh(e,t,r){return Math.min(Math.max(t,e),r)}function bh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}mh.get=function(e){var t,r;switch(e.substring(0,3).toLowerCase()){case"hsl":t=mh.get.hsl(e),r="hsl";break;case"hwb":t=mh.get.hwb(e),r="hwb";break;default:t=mh.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},mh.get.rgb=function(e){if(!e)return null;var t,r,n,i=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=t[2],t=t[1],r=0;r<3;r++){var o=2*r;i[r]=parseInt(t.slice(o,o+2),16)}n&&(i[3]=parseInt(n,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(n=(t=t[1])[3],r=0;r<3;r++)i[r]=parseInt(t[r]+t[r],16);n&&(i[3]=parseInt(n+n,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)i[r]=parseInt(t[r+1],0);t[4]&&(t[5]?i[3]=.01*parseFloat(t[4]):i[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:fh.call(uh,t[1])?((i=uh[t[1]])[3]=1,i):null:null;for(r=0;r<3;r++)i[r]=Math.round(2.55*parseFloat(t[r+1]));t[4]&&(t[5]?i[3]=.01*parseFloat(t[4]):i[3]=parseFloat(t[4]))}for(r=0;r<3;r++)i[r]=gh(i[r],0,255);return i[3]=gh(i[3],0,1),i},mh.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,gh(parseFloat(t[2]),0,100),gh(parseFloat(t[3]),0,100),gh(isNaN(r)?1:r,0,1)]}return null},mh.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,gh(parseFloat(t[2]),0,100),gh(parseFloat(t[3]),0,100),gh(isNaN(r)?1:r,0,1)]}return null},mh.to.hex=function(){var e=hh(arguments);return"#"+bh(e[0])+bh(e[1])+bh(e[2])+(e[3]<1?bh(Math.round(255*e[3])):"")},mh.to.rgb=function(){var e=hh(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},mh.to.rgb.percent=function(){var e=hh(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},mh.to.hsl=function(){var e=hh(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},mh.to.hwb=function(){var e=hh(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},mh.to.keyword=function(e){return dh[e.slice(0,3)]};var vh=rh.exports;const wh=nh,yh={};for(const e of Object.keys(wh))yh[wh[e]]=e;const Eh={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _h=Eh;for(const e of Object.keys(Eh)){if(!("channels"in Eh[e]))throw new Error("missing channels property: "+e);if(!("labels"in Eh[e]))throw new Error("missing channel labels property: "+e);if(Eh[e].labels.length!==Eh[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=Eh[e];delete Eh[e].channels,delete Eh[e].labels,Object.defineProperty(Eh[e],"channels",{value:t}),Object.defineProperty(Eh[e],"labels",{value:r})}function Oh(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}Eh.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=o-i;let a,l;o===i?a=0:t===o?a=(r-n)/s:r===o?a=2+(n-t)/s:n===o&&(a=4+(t-r)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(i+o)/2;return l=o===i?0:c<=.5?s/(o+i):s/(2-o-i),[a,100*l,100*c]},Eh.rgb.hsv=function(e){let t,r,n,i,o;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),u=c-Math.min(s,a,l),h=function(e){return(c-e)/6/u+.5};return 0===u?(i=0,o=0):(o=u/c,t=h(s),r=h(a),n=h(l),s===c?i=n-r:a===c?i=1/3+t-n:l===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},Eh.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=Eh.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*o,100*n]},Eh.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},Eh.rgb.keyword=function(e){const t=yh[e];if(t)return t;let r,n=1/0;for(const t of Object.keys(wh)){const i=Oh(e,wh[t]);i<n&&(n=i,r=t)}return r},Eh.keyword.rgb=function(e){return wh[e]},Eh.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},Eh.rgb.lab=function(e){const t=Eh.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(r-n),200*(n-i)]},Eh.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,o,s;if(0===r)return s=255*n,[s,s,s];i=n<.5?n*(1+r):n+r-n*r;const a=2*n-i,l=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,s=6*o<1?a+6*(i-a)*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,l[e]=255*s;return l},Eh.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;return[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},Eh.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*o),l=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},Eh.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let o,s;s=(2-r)*n;const a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,100*o,100*s]},Eh.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let o;i>1&&(r/=i,n/=i);const s=Math.floor(6*t),a=1-n;o=6*t-s,1&s&&(o=1-o);const l=r+o*(a-r);let c,u,h;switch(s){default:case 6:case 0:c=a,u=l,h=r;break;case 1:c=l,u=a,h=r;break;case 2:c=r,u=a,h=l;break;case 3:c=r,u=l,h=a;break;case 4:c=l,u=r,h=a;break;case 5:c=a,u=r,h=l}return[255*c,255*u,255*h]},Eh.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},Eh.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,o,s;return i=3.2406*t+-1.5372*r+-.4986*n,o=-.9689*t+1.8758*r+.0415*n,s=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[255*i,255*o,255*s]},Eh.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},Eh.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,o=t**3,s=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},Eh.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(r*r+n*n),i]},Eh.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},Eh.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=null===t?Eh.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(s+=60),s},Eh.hsv.ansi16=function(e){return Eh.rgb.ansi16(Eh.hsv.rgb(e),e[2])},Eh.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},Eh.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},Eh.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},Eh.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},Eh.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},Eh.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),s=i-o;let a,l;return a=s<1?o/(1-s):0,l=s<=0?0:i===t?(r-n)/s%6:i===r?2+(n-t)/s:4+(t-r)/s,l/=6,l%=1,[360*l,100*s,100*a]},Eh.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},Eh.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},Eh.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-r)*n,[255*(r*i[0]+l),255*(r*i[1]+l),255*(r*i[2]+l)]},Eh.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},Eh.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},Eh.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},Eh.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},Eh.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Eh.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Eh.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Eh.gray.hsl=function(e){return[0,0,e[0]]},Eh.gray.hsv=Eh.gray.hsl,Eh.gray.hwb=function(e){return[0,100,e[0]]},Eh.gray.cmyk=function(e){return[0,0,0,e[0]]},Eh.gray.lab=function(e){return[e[0],0,0]},Eh.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},Eh.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const xh=_h;function jh(e){const t=function(){const e={},t=Object.keys(xh);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),n=Object.keys(xh[e]);for(let i=n.length,o=0;o<i;o++){const i=n[o],s=t[i];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,r.unshift(i))}}return t}function Ph(e,t){return function(r){return t(e(r))}}function Sh(e,t){const r=[t[e].parent,e];let n=xh[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)r.unshift(t[i].parent),n=Ph(xh[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}const Rh=_h,Ah=function(e){const t=jh(e),r={},n=Object.keys(t);for(let e=n.length,i=0;i<e;i++){const e=n[i];null!==t[e].parent&&(r[e]=Sh(e,t))}return r},kh={};Object.keys(Rh).forEach(e=>{kh[e]={},Object.defineProperty(kh[e],"channels",{value:Rh[e].channels}),Object.defineProperty(kh[e],"labels",{value:Rh[e].labels});const t=Ah(e);Object.keys(t).forEach(r=>{const n=t[r];kh[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),kh[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})});const $h=vh,Ih=kh,Lh=["keyword","gray","hex"],Th={};for(const e of Object.keys(Ih))Th[[...Ih[e].labels].sort().join("")]=e;const Dh={};function Nh(e,t){if(!(this instanceof Nh))return new Nh(e,t);if(t&&t in Lh&&(t=null),t&&!(t in Ih))throw new Error("Unknown model: "+t);let r,n;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Nh)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=$h.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,n=Ih[this.model].channels,this.color=t.value.slice(0,n),this.valpha="number"==typeof t.value[n]?t.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=Ih[this.model].channels;const r=Array.prototype.slice.call(e,0,n);this.color=Bh(r,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const n=t.sort().join("");if(!(n in Th))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Th[n];const{labels:i}=Ih[this.model],o=[];for(r=0;r<i.length;r++)o.push(e[i[r]]);this.color=Bh(o)}if(Dh[this.model])for(n=Ih[this.model].channels,r=0;r<n;r++){const e=Dh[this.model][r];e&&(this.color[r]=e(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Nh.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in $h.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const r=1===t.valpha?t.color:[...t.color,this.valpha];return $h.to[t.model](r)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),r=1===t.valpha?t.color:[...t.color,this.valpha];return $h.to.rgb.percent(r)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Ih[this.model],{labels:r}=Ih[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new Nh([...this.color.map(Ch(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new Nh([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Mh("rgb",0,Fh(255)),green:Mh("rgb",1,Fh(255)),blue:Mh("rgb",2,Fh(255)),hue:Mh(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Mh("hsl",1,Fh(100)),lightness:Mh("hsl",2,Fh(100)),saturationv:Mh("hsv",1,Fh(100)),value:Mh("hsv",2,Fh(100)),chroma:Mh("hcg",1,Fh(100)),gray:Mh("hcg",2,Fh(100)),white:Mh("hwb",1,Fh(100)),wblack:Mh("hwb",2,Fh(100)),cyan:Mh("cmyk",0,Fh(100)),magenta:Mh("cmyk",1,Fh(100)),yellow:Mh("cmyk",2,Fh(100)),black:Mh("cmyk",3,Fh(100)),x:Mh("xyz",0,Fh(95.047)),y:Mh("xyz",1,Fh(100)),z:Mh("xyz",2,Fh(108.833)),l:Mh("lab",0,Fh(100)),a:Mh("lab",1),b:Mh("lab",2),keyword(e){return void 0!==e?new Nh(e):Ih[this.model].keyword(this.color)},hex(e){return void 0!==e?new Nh(e):$h.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new Nh(e);const t=this.rgb().round().color;let r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),$h.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const e=n/255;t[r]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return Nh.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,o=2*i-1,s=r.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return Nh.rgb(a*r.red()+l*n.red(),a*r.green()+l*n.green(),a*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const e of Object.keys(Ih)){if(Lh.includes(e))continue;const{channels:t}=Ih[e];Nh.prototype[e]=function(...t){return this.model===e?new Nh(this):t.length>0?new Nh(t,e):new Nh([...(r=Ih[this.model][e].raw(this.color),Array.isArray(r)?r:[r]),this.valpha],e);var r},Nh[e]=function(...r){let n=r[0];return"number"==typeof n&&(n=Bh(r,t)),new Nh(n,e)}}function Ch(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function Mh(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(Dh[n]||(Dh[n]=[]))[t]=r;return e=e[0],function(n){let i;return void 0!==n?(r&&(n=r(n)),i=this[e](),i.color[t]=n,i):(i=this[e]().color[t],r&&(i=r(i)),i)}}function Fh(e){return function(t){return Math.max(0,Math.min(e,t))}}function Bh(e,t){for(let r=0;r<t;r++)"number"!=typeof e[r]&&(e[r]=0);return e}const zh=Nh,Uh=Ga,qh={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};function Wh(e){return this._setBackgroundColourOption("tint",e),this}function Hh(e){return this.options.greyscale=!Uh.bool(e)||e,this}function Gh(e){return this.greyscale(e)}function Vh(e){if(!Uh.string(e))throw Uh.invalidParameterError("colourspace","string",e);return this.options.colourspacePipeline=e,this}function Yh(e){return this.pipelineColourspace(e)}function Xh(e){if(!Uh.string(e))throw Uh.invalidParameterError("colourspace","string",e);return this.options.colourspace=e,this}function Jh(e){return this.toColourspace(e)}function Kh(e){if(Uh.object(e)||Uh.string(e)){const t=zh(e);return[t.red(),t.green(),t.blue(),Math.round(255*t.alpha())]}throw Uh.invalidParameterError("background","object or string",e)}function Qh(e,t){Uh.defined(t)&&(this.options[e]=Kh(t))}const Zh=Ga,ef={and:"and",or:"or",eor:"eor"};function tf(){return this.options.removeAlpha=!0,this}function rf(e){if(Zh.defined(e)){if(!Zh.number(e)||!Zh.inRange(e,0,1))throw Zh.invalidParameterError("alpha","number between 0 and 1",e);this.options.ensureAlpha=e}else this.options.ensureAlpha=1;return this}function nf(e){const t={red:0,green:1,blue:2,alpha:3};if(Object.keys(t).includes(e)&&(e=t[e]),!Zh.integer(e)||!Zh.inRange(e,0,4))throw Zh.invalidParameterError("channel","integer or one of: red, green, blue, alpha",e);return this.options.extractChannel=e,this}function of(e,t){return Array.isArray(e)?e.forEach(function(e){this.options.joinChannelIn.push(this._createInputDescriptor(e,t))},this):this.options.joinChannelIn.push(this._createInputDescriptor(e,t)),this}function sf(e){if(!Zh.string(e)||!Zh.inArray(e,["and","or","eor"]))throw Zh.invalidParameterError("boolOp","one of: and, or, eor",e);return this.options.bandBoolOp=e,this}const af=s,lf=Ga,cf=Kc,uf=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),hf=/\.(jp[2x]|j2[kc])$/i,ff=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),df=e=>1<<31-Math.clz32(Math.ceil(Math.log2(e)));function pf(e,t){let r;if(lf.string(e)?lf.string(this.options.input.file)&&af.resolve(this.options.input.file)===af.resolve(e)?r=new Error("Cannot use same file for input and output"):hf.test(af.extname(e))&&!this.constructor.format.jp2k.output.file&&(r=ff()):r=new Error("Missing output file path"),!r){this.options.fileOut=e;const r=Error();return this._pipeline(t,r)}return lf.fn(t)?(t(r),this):Promise.reject(r)}function mf(e,t){lf.object(e)?this._setBooleanOption("resolveWithObject",e.resolveWithObject):this.options.resolveWithObject&&(this.options.resolveWithObject=!1),this.options.fileOut="";const r=Error();return this._pipeline(lf.fn(e)?e:t,r)}function gf(){return this.options.keepMetadata|=1,this}function bf(e){if(!lf.object(e))throw lf.invalidParameterError("exif","object",e);for(const[t,r]of Object.entries(e)){if(!lf.object(r))throw lf.invalidParameterError(t,"object",r);for(const[e,n]of Object.entries(r)){if(!lf.string(n))throw lf.invalidParameterError(`${t}.${e}`,"string",n);this.options.withExif[`exif-${t.toLowerCase()}-${e}`]=n}}return this.options.withExifMerge=!1,this.keepExif()}function vf(e){return this.withExif(e),this.options.withExifMerge=!0,this}function wf(){return this.options.keepMetadata|=8,this}function yf(e,t){if(!lf.string(e))throw lf.invalidParameterError("icc","string",e);if(this.options.withIccProfile=e,this.keepIccProfile(),lf.object(t)&&lf.defined(t.attach)){if(!lf.bool(t.attach))throw lf.invalidParameterError("attach","boolean",t.attach);t.attach||(this.options.keepMetadata&=-9)}return this}function Ef(){return this.options.keepMetadata|=2,this}function _f(e){if(!(lf.string(e)&&e.length>0))throw lf.invalidParameterError("xmp","non-empty string",e);return this.options.withXmp=e,this.options.keepMetadata|=2,this}function Of(){return this.options.keepMetadata=31,this}function xf(e){if(this.keepMetadata(),this.withIccProfile("srgb"),lf.object(e)){if(lf.defined(e.orientation)){if(!lf.integer(e.orientation)||!lf.inRange(e.orientation,1,8))throw lf.invalidParameterError("orientation","integer between 1 and 8",e.orientation);this.options.withMetadataOrientation=e.orientation}if(lf.defined(e.density)){if(!(lf.number(e.density)&&e.density>0))throw lf.invalidParameterError("density","positive number",e.density);this.options.withMetadataDensity=e.density}lf.defined(e.icc)&&this.withIccProfile(e.icc),lf.defined(e.exif)&&this.withExifMerge(e.exif)}return this}function jf(e,t){const r=uf.get((lf.object(e)&&lf.string(e.id)?e.id:e).toLowerCase());if(!r)throw lf.invalidParameterError("format",`one of: ${[...uf.keys()].join(", ")}`,e);return this[r](t)}function Pf(e){if(lf.object(e)){if(lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,1,100))throw lf.invalidParameterError("quality","integer between 1 and 100",e.quality);this.options.jpegQuality=e.quality}if(lf.defined(e.progressive)&&this._setBooleanOption("jpegProgressive",e.progressive),lf.defined(e.chromaSubsampling)){if(!lf.string(e.chromaSubsampling)||!lf.inArray(e.chromaSubsampling,["4:2:0","4:4:4"]))throw lf.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",e.chromaSubsampling);this.options.jpegChromaSubsampling=e.chromaSubsampling}const t=lf.bool(e.optimizeCoding)?e.optimizeCoding:e.optimiseCoding;if(lf.defined(t)&&this._setBooleanOption("jpegOptimiseCoding",t),lf.defined(e.mozjpeg)){if(!lf.bool(e.mozjpeg))throw lf.invalidParameterError("mozjpeg","boolean",e.mozjpeg);e.mozjpeg&&(this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3)}const r=lf.bool(e.trellisQuantization)?e.trellisQuantization:e.trellisQuantisation;lf.defined(r)&&this._setBooleanOption("jpegTrellisQuantisation",r),lf.defined(e.overshootDeringing)&&this._setBooleanOption("jpegOvershootDeringing",e.overshootDeringing);const n=lf.bool(e.optimizeScans)?e.optimizeScans:e.optimiseScans;lf.defined(n)&&(this._setBooleanOption("jpegOptimiseScans",n),n&&(this.options.jpegProgressive=!0));const i=lf.number(e.quantizationTable)?e.quantizationTable:e.quantisationTable;if(lf.defined(i)){if(!lf.integer(i)||!lf.inRange(i,0,8))throw lf.invalidParameterError("quantisationTable","integer between 0 and 8",i);this.options.jpegQuantisationTable=i}}return this._updateFormatOut("jpeg",e)}function Sf(e){if(lf.object(e)){if(lf.defined(e.progressive)&&this._setBooleanOption("pngProgressive",e.progressive),lf.defined(e.compressionLevel)){if(!lf.integer(e.compressionLevel)||!lf.inRange(e.compressionLevel,0,9))throw lf.invalidParameterError("compressionLevel","integer between 0 and 9",e.compressionLevel);this.options.pngCompressionLevel=e.compressionLevel}lf.defined(e.adaptiveFiltering)&&this._setBooleanOption("pngAdaptiveFiltering",e.adaptiveFiltering);const t=e.colours||e.colors;if(lf.defined(t)){if(!lf.integer(t)||!lf.inRange(t,2,256))throw lf.invalidParameterError("colours","integer between 2 and 256",t);this.options.pngBitdepth=df(t)}if(lf.defined(e.palette)?this._setBooleanOption("pngPalette",e.palette):[e.quality,e.effort,e.colours,e.colors,e.dither].some(lf.defined)&&this._setBooleanOption("pngPalette",!0),this.options.pngPalette){if(lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,0,100))throw lf.invalidParameterError("quality","integer between 0 and 100",e.quality);this.options.pngQuality=e.quality}if(lf.defined(e.effort)){if(!lf.integer(e.effort)||!lf.inRange(e.effort,1,10))throw lf.invalidParameterError("effort","integer between 1 and 10",e.effort);this.options.pngEffort=e.effort}if(lf.defined(e.dither)){if(!lf.number(e.dither)||!lf.inRange(e.dither,0,1))throw lf.invalidParameterError("dither","number between 0.0 and 1.0",e.dither);this.options.pngDither=e.dither}}}return this._updateFormatOut("png",e)}function Rf(e){if(lf.object(e)){if(lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,1,100))throw lf.invalidParameterError("quality","integer between 1 and 100",e.quality);this.options.webpQuality=e.quality}if(lf.defined(e.alphaQuality)){if(!lf.integer(e.alphaQuality)||!lf.inRange(e.alphaQuality,0,100))throw lf.invalidParameterError("alphaQuality","integer between 0 and 100",e.alphaQuality);this.options.webpAlphaQuality=e.alphaQuality}if(lf.defined(e.lossless)&&this._setBooleanOption("webpLossless",e.lossless),lf.defined(e.nearLossless)&&this._setBooleanOption("webpNearLossless",e.nearLossless),lf.defined(e.smartSubsample)&&this._setBooleanOption("webpSmartSubsample",e.smartSubsample),lf.defined(e.smartDeblock)&&this._setBooleanOption("webpSmartDeblock",e.smartDeblock),lf.defined(e.preset)){if(!lf.string(e.preset)||!lf.inArray(e.preset,["default","photo","picture","drawing","icon","text"]))throw lf.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",e.preset);this.options.webpPreset=e.preset}if(lf.defined(e.effort)){if(!lf.integer(e.effort)||!lf.inRange(e.effort,0,6))throw lf.invalidParameterError("effort","integer between 0 and 6",e.effort);this.options.webpEffort=e.effort}lf.defined(e.minSize)&&this._setBooleanOption("webpMinSize",e.minSize),lf.defined(e.mixed)&&this._setBooleanOption("webpMixed",e.mixed)}return $f(e,this.options),this._updateFormatOut("webp",e)}function Af(e){if(lf.object(e)){lf.defined(e.reuse)&&this._setBooleanOption("gifReuse",e.reuse),lf.defined(e.progressive)&&this._setBooleanOption("gifProgressive",e.progressive);const t=e.colours||e.colors;if(lf.defined(t)){if(!lf.integer(t)||!lf.inRange(t,2,256))throw lf.invalidParameterError("colours","integer between 2 and 256",t);this.options.gifBitdepth=df(t)}if(lf.defined(e.effort)){if(!lf.number(e.effort)||!lf.inRange(e.effort,1,10))throw lf.invalidParameterError("effort","integer between 1 and 10",e.effort);this.options.gifEffort=e.effort}if(lf.defined(e.dither)){if(!lf.number(e.dither)||!lf.inRange(e.dither,0,1))throw lf.invalidParameterError("dither","number between 0.0 and 1.0",e.dither);this.options.gifDither=e.dither}if(lf.defined(e.interFrameMaxError)){if(!lf.number(e.interFrameMaxError)||!lf.inRange(e.interFrameMaxError,0,32))throw lf.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",e.interFrameMaxError);this.options.gifInterFrameMaxError=e.interFrameMaxError}if(lf.defined(e.interPaletteMaxError)){if(!lf.number(e.interPaletteMaxError)||!lf.inRange(e.interPaletteMaxError,0,256))throw lf.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",e.interPaletteMaxError);this.options.gifInterPaletteMaxError=e.interPaletteMaxError}if(lf.defined(e.keepDuplicateFrames)){if(!lf.bool(e.keepDuplicateFrames))throw lf.invalidParameterError("keepDuplicateFrames","boolean",e.keepDuplicateFrames);this._setBooleanOption("gifKeepDuplicateFrames",e.keepDuplicateFrames)}}return $f(e,this.options),this._updateFormatOut("gif",e)}function kf(e){if(!this.constructor.format.jp2k.output.buffer)throw ff();if(lf.object(e)){if(lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,1,100))throw lf.invalidParameterError("quality","integer between 1 and 100",e.quality);this.options.jp2Quality=e.quality}if(lf.defined(e.lossless)){if(!lf.bool(e.lossless))throw lf.invalidParameterError("lossless","boolean",e.lossless);this.options.jp2Lossless=e.lossless}if(lf.defined(e.tileWidth)){if(!lf.integer(e.tileWidth)||!lf.inRange(e.tileWidth,1,32768))throw lf.invalidParameterError("tileWidth","integer between 1 and 32768",e.tileWidth);this.options.jp2TileWidth=e.tileWidth}if(lf.defined(e.tileHeight)){if(!lf.integer(e.tileHeight)||!lf.inRange(e.tileHeight,1,32768))throw lf.invalidParameterError("tileHeight","integer between 1 and 32768",e.tileHeight);this.options.jp2TileHeight=e.tileHeight}if(lf.defined(e.chromaSubsampling)){if(!lf.string(e.chromaSubsampling)||!lf.inArray(e.chromaSubsampling,["4:2:0","4:4:4"]))throw lf.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",e.chromaSubsampling);this.options.jp2ChromaSubsampling=e.chromaSubsampling}}return this._updateFormatOut("jp2",e)}function $f(e,t){if(lf.object(e)&&lf.defined(e.loop)){if(!lf.integer(e.loop)||!lf.inRange(e.loop,0,65535))throw lf.invalidParameterError("loop","integer between 0 and 65535",e.loop);t.loop=e.loop}if(lf.object(e)&&lf.defined(e.delay))if(lf.integer(e.delay)&&lf.inRange(e.delay,0,65535))t.delay=[e.delay];else{if(!(Array.isArray(e.delay)&&e.delay.every(lf.integer)&&e.delay.every(e=>lf.inRange(e,0,65535))))throw lf.invalidParameterError("delay","integer or an array of integers between 0 and 65535",e.delay);t.delay=e.delay}}function If(e){if(lf.object(e)){if(lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,1,100))throw lf.invalidParameterError("quality","integer between 1 and 100",e.quality);this.options.tiffQuality=e.quality}if(lf.defined(e.bitdepth)){if(!lf.integer(e.bitdepth)||!lf.inArray(e.bitdepth,[1,2,4,8]))throw lf.invalidParameterError("bitdepth","1, 2, 4 or 8",e.bitdepth);this.options.tiffBitdepth=e.bitdepth}if(lf.defined(e.tile)&&this._setBooleanOption("tiffTile",e.tile),lf.defined(e.tileWidth)){if(!(lf.integer(e.tileWidth)&&e.tileWidth>0))throw lf.invalidParameterError("tileWidth","integer greater than zero",e.tileWidth);this.options.tiffTileWidth=e.tileWidth}if(lf.defined(e.tileHeight)){if(!(lf.integer(e.tileHeight)&&e.tileHeight>0))throw lf.invalidParameterError("tileHeight","integer greater than zero",e.tileHeight);this.options.tiffTileHeight=e.tileHeight}if(lf.defined(e.miniswhite)&&this._setBooleanOption("tiffMiniswhite",e.miniswhite),lf.defined(e.pyramid)&&this._setBooleanOption("tiffPyramid",e.pyramid),lf.defined(e.xres)){if(!(lf.number(e.xres)&&e.xres>0))throw lf.invalidParameterError("xres","number greater than zero",e.xres);this.options.tiffXres=e.xres}if(lf.defined(e.yres)){if(!(lf.number(e.yres)&&e.yres>0))throw lf.invalidParameterError("yres","number greater than zero",e.yres);this.options.tiffYres=e.yres}if(lf.defined(e.compression)){if(!lf.string(e.compression)||!lf.inArray(e.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))throw lf.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",e.compression);this.options.tiffCompression=e.compression}if(lf.defined(e.predictor)){if(!lf.string(e.predictor)||!lf.inArray(e.predictor,["none","horizontal","float"]))throw lf.invalidParameterError("predictor","one of: none, horizontal, float",e.predictor);this.options.tiffPredictor=e.predictor}if(lf.defined(e.resolutionUnit)){if(!lf.string(e.resolutionUnit)||!lf.inArray(e.resolutionUnit,["inch","cm"]))throw lf.invalidParameterError("resolutionUnit","one of: inch, cm",e.resolutionUnit);this.options.tiffResolutionUnit=e.resolutionUnit}}return this._updateFormatOut("tiff",e)}function Lf(e){return this.heif({...e,compression:"av1"})}function Tf(e){if(!lf.object(e))throw lf.invalidParameterError("options","Object",e);if(!lf.string(e.compression)||!lf.inArray(e.compression,["av1","hevc"]))throw lf.invalidParameterError("compression","one of: av1, hevc",e.compression);if(this.options.heifCompression=e.compression,lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,1,100))throw lf.invalidParameterError("quality","integer between 1 and 100",e.quality);this.options.heifQuality=e.quality}if(lf.defined(e.lossless)){if(!lf.bool(e.lossless))throw lf.invalidParameterError("lossless","boolean",e.lossless);this.options.heifLossless=e.lossless}if(lf.defined(e.effort)){if(!lf.integer(e.effort)||!lf.inRange(e.effort,0,9))throw lf.invalidParameterError("effort","integer between 0 and 9",e.effort);this.options.heifEffort=e.effort}if(lf.defined(e.chromaSubsampling)){if(!lf.string(e.chromaSubsampling)||!lf.inArray(e.chromaSubsampling,["4:2:0","4:4:4"]))throw lf.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",e.chromaSubsampling);this.options.heifChromaSubsampling=e.chromaSubsampling}if(lf.defined(e.bitdepth)){if(!lf.integer(e.bitdepth)||!lf.inArray(e.bitdepth,[8,10,12]))throw lf.invalidParameterError("bitdepth","8, 10 or 12",e.bitdepth);if(8!==e.bitdepth&&this.constructor.versions.heif)throw lf.invalidParameterError("bitdepth when using prebuilt binaries",8,e.bitdepth);this.options.heifBitdepth=e.bitdepth}return this._updateFormatOut("heif",e)}function Df(e){if(lf.object(e)){if(lf.defined(e.quality)){if(!lf.integer(e.quality)||!lf.inRange(e.quality,1,100))throw lf.invalidParameterError("quality","integer between 1 and 100",e.quality);this.options.jxlDistance=e.quality>=30?.1+.09*(100-e.quality):53/3e3*e.quality*e.quality-1.15*e.quality+25}else if(lf.defined(e.distance)){if(!lf.number(e.distance)||!lf.inRange(e.distance,0,15))throw lf.invalidParameterError("distance","number between 0.0 and 15.0",e.distance);this.options.jxlDistance=e.distance}if(lf.defined(e.decodingTier)){if(!lf.integer(e.decodingTier)||!lf.inRange(e.decodingTier,0,4))throw lf.invalidParameterError("decodingTier","integer between 0 and 4",e.decodingTier);this.options.jxlDecodingTier=e.decodingTier}if(lf.defined(e.lossless)){if(!lf.bool(e.lossless))throw lf.invalidParameterError("lossless","boolean",e.lossless);this.options.jxlLossless=e.lossless}if(lf.defined(e.effort)){if(!lf.integer(e.effort)||!lf.inRange(e.effort,1,9))throw lf.invalidParameterError("effort","integer between 1 and 9",e.effort);this.options.jxlEffort=e.effort}}return $f(e,this.options),this._updateFormatOut("jxl",e)}function Nf(e){if(lf.object(e)&&lf.defined(e.depth)){if(!lf.string(e.depth)||!lf.inArray(e.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))throw lf.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",e.depth);this.options.rawDepth=e.depth}return this._updateFormatOut("raw")}function Cf(e){if(lf.object(e)){if(lf.defined(e.size)){if(!lf.integer(e.size)||!lf.inRange(e.size,1,8192))throw lf.invalidParameterError("size","integer between 1 and 8192",e.size);this.options.tileSize=e.size}if(lf.defined(e.overlap)){if(!lf.integer(e.overlap)||!lf.inRange(e.overlap,0,8192))throw lf.invalidParameterError("overlap","integer between 0 and 8192",e.overlap);if(e.overlap>this.options.tileSize)throw lf.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,e.overlap);this.options.tileOverlap=e.overlap}if(lf.defined(e.container)){if(!lf.string(e.container)||!lf.inArray(e.container,["fs","zip"]))throw lf.invalidParameterError("container","one of: fs, zip",e.container);this.options.tileContainer=e.container}if(lf.defined(e.layout)){if(!lf.string(e.layout)||!lf.inArray(e.layout,["dz","google","iiif","iiif3","zoomify"]))throw lf.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",e.layout);this.options.tileLayout=e.layout}if(lf.defined(e.angle)){if(!lf.integer(e.angle)||e.angle%90)throw lf.invalidParameterError("angle","positive/negative multiple of 90",e.angle);this.options.tileAngle=e.angle}if(this._setBackgroundColourOption("tileBackground",e.background),lf.defined(e.depth)){if(!lf.string(e.depth)||!lf.inArray(e.depth,["onepixel","onetile","one"]))throw lf.invalidParameterError("depth","one of: onepixel, onetile, one",e.depth);this.options.tileDepth=e.depth}if(lf.defined(e.skipBlanks)){if(!lf.integer(e.skipBlanks)||!lf.inRange(e.skipBlanks,-1,65535))throw lf.invalidParameterError("skipBlanks","integer between -1 and 255/65535",e.skipBlanks);this.options.tileSkipBlanks=e.skipBlanks}else lf.defined(e.layout)&&"google"===e.layout&&(this.options.tileSkipBlanks=5);const t=lf.bool(e.center)?e.center:e.centre;if(lf.defined(t)&&this._setBooleanOption("tileCentre",t),lf.defined(e.id)){if(!lf.string(e.id))throw lf.invalidParameterError("id","string",e.id);this.options.tileId=e.id}if(lf.defined(e.basename)){if(!lf.string(e.basename))throw lf.invalidParameterError("basename","string",e.basename);this.options.tileBasename=e.basename}}if(lf.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if("input"!==this.options.formatOut)throw lf.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")}function Mf(e){if(!lf.plainObject(e))throw lf.invalidParameterError("options","object",e);if(!lf.integer(e.seconds)||!lf.inRange(e.seconds,0,3600))throw lf.invalidParameterError("seconds","integer between 0 and 3600",e.seconds);return this.options.timeoutSeconds=e.seconds,this}function Ff(e,t){return lf.object(t)&&!1===t.force||(this.options.formatOut=e),this}function Bf(e,t){if(!lf.bool(t))throw lf.invalidParameterError(e,"boolean",t);this.options[e]=t}function zf(){if(!this.options.streamOut){this.options.streamOut=!0;const e=Error();this._pipeline(void 0,e)}}function Uf(e,t){return"function"==typeof e?(this._isStreamInput()?this.on("finish",()=>{this._flattenBufferIn(),cf.pipeline(this.options,(r,n,i)=>{r?e(lf.nativeError(r,t)):e(null,n,i)})}):cf.pipeline(this.options,(r,n,i)=>{r?e(lf.nativeError(r,t)):e(null,n,i)}),this):this.options.streamOut?(this._isStreamInput()?(this.once("finish",()=>{this._flattenBufferIn(),cf.pipeline(this.options,(e,r,n)=>{e?this.emit("error",lf.nativeError(e,t)):(this.emit("info",n),this.push(r)),this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished&&this.emit("finish")):cf.pipeline(this.options,(e,r,n)=>{e?this.emit("error",lf.nativeError(e,t)):(this.emit("info",n),this.push(r)),this.push(null),this.on("end",()=>this.emit("close"))}),this):this._isStreamInput()?new Promise((e,r)=>{this.once("finish",()=>{this._flattenBufferIn(),cf.pipeline(this.options,(n,i,o)=>{n?r(lf.nativeError(n,t)):this.options.resolveWithObject?e({data:i,info:o}):e(i)})})}):new Promise((e,r)=>{cf.pipeline(this.options,(n,i,o)=>{n?r(lf.nativeError(n,t)):this.options.resolveWithObject?e({data:i,info:o}):e(i)})})}const qf=d,Wf=Ol,Hf=Ga,{runtimePlatformArch:Gf}=Fc,Vf=Kc,Yf=Gf(),Xf=Vf.libvipsVersion(),Jf=Vf.format();Jf.heif.output.alias=["avif","heic"],Jf.jpeg.output.alias=["jpe","jpg"],Jf.tiff.output.alias=["tif"],Jf.jp2k.output.alias=["j2c","j2k","jp2","jpx"];const Kf={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"};let Qf={vips:Xf.semver};if(!Xf.isGlobal)if(Xf.isWasm)try{Qf=require("@img/sharp-wasm32/versions")}catch(e){}else try{Qf=rr(`@img/sharp-${Yf}/versions`)}catch(e){try{Qf=rr(`@img/sharp-libvips-${Yf}/versions`)}catch(e){}}function Zf(e){return Hf.bool(e)?e?Vf.cache(50,20,100):Vf.cache(0,0,0):Hf.object(e)?Vf.cache(e.memory,e.files,e.items):Vf.cache()}function ed(e){return Vf.concurrency(Hf.integer(e)?e:null)}Qf.sharp=wc.version,Qf.heif&&Jf.heif&&(Jf.heif.input.fileSuffix=[".avif"],Jf.heif.output.alias=["avif"]),Zf(!0),Wf.familySync()!==Wf.GLIBC||Vf._isUsingJemalloc()?Wf.familySync()===Wf.MUSL&&1024===Vf.concurrency()&&Vf.concurrency(p.availableParallelism()):Vf.concurrency(1);const td=new qf.EventEmitter;function rd(){return Vf.counters()}function nd(e){return Vf.simd(Hf.bool(e)?e:null)}function id(e){if(!Hf.object(e))throw Hf.invalidParameterError("options","object",e);if(!Array.isArray(e.operation)||!e.operation.every(Hf.string))throw Hf.invalidParameterError("operation","Array<string>",e.operation);Vf.block(e.operation,!0)}function od(e){if(!Hf.object(e))throw Hf.invalidParameterError("options","object",e);if(!Array.isArray(e.operation)||!e.operation.every(Hf.string))throw Hf.invalidParameterError("operation","Array<string>",e.operation);Vf.block(e.operation,!1)}const sd=ru;!function(e){Object.assign(e.prototype,{_inputOptionsFromObject:au,_createInputDescriptor:lu,_write:cu,_flattenBufferIn:uu,_isStreamInput:hu,metadata:fu,stats:du}),e.align=ou}(sd),function(e){Object.assign(e.prototype,{resize:xu,extend:ju,extract:Pu,trim:Su}),e.gravity=mu,e.strategy=vu,e.kernel=wu,e.fit=yu,e.position=gu}(sd),function(e){e.prototype.composite=ku,e.blend=Au}(sd),function(e){Object.assign(e.prototype,{autoOrient:Tu,rotate:Lu,flip:Du,flop:Nu,affine:Cu,sharpen:Mu,erode:Uu,dilate:zu,median:Fu,blur:Bu,flatten:qu,unflatten:Wu,gamma:Hu,negate:Gu,normalise:Vu,normalize:Yu,clahe:Xu,convolve:Ju,threshold:Ku,boolean:Qu,linear:Zu,recomb:eh,modulate:th})}(sd),function(e){Object.assign(e.prototype,{tint:Wh,greyscale:Hh,grayscale:Gh,pipelineColourspace:Vh,pipelineColorspace:Yh,toColourspace:Xh,toColorspace:Jh,_getBackgroundColourOption:Kh,_setBackgroundColourOption:Qh}),e.colourspace=qh,e.colorspace=qh}(sd),function(e){Object.assign(e.prototype,{removeAlpha:tf,ensureAlpha:rf,extractChannel:nf,joinChannel:of,bandbool:sf}),e.bool=ef}(sd),function(e){Object.assign(e.prototype,{toFile:pf,toBuffer:mf,keepExif:gf,withExif:bf,withExifMerge:vf,keepIccProfile:wf,withIccProfile:yf,keepXmp:Ef,withXmp:_f,keepMetadata:Of,withMetadata:xf,toFormat:jf,jpeg:Pf,jp2:kf,png:Sf,webp:Rf,tiff:If,avif:Lf,heif:Tf,jxl:Df,gif:Af,raw:Nf,tile:Cf,timeout:Mf,_updateFormatOut:Ff,_setBooleanOption:Bf,_read:zf,_pipeline:Uf})}(sd),function(e){e.cache=Zf,e.concurrency=ed,e.counters=rd,e.simd=nd,e.format=Jf,e.interpolators=Kf,e.versions=Qf,e.queue=td,e.block=id,e.unblock=od}(sd);var ad=Zt(sd);return async(t,r,n={})=>{let i=ye(n,"keyId");st(i)||(i="id");let o=ye(n,"fdDwAttime");st(o)||(o="./_dwAttime"),ct(o)||ft(o);let s=ye(n,"fdDwCurrent");st(s)||(s="./_dwCurrent"),ct(s)||ft(s);let a=ye(n,"fdResult");st(a)||(a="./_result"),ct(a)||ft(a);let l=ye(n,"fdTaskCpSrc");st(l)||(l="./_taskCpSrc"),ct(l)||ft(l);let c=ye(n,"funDownload"),u=ye(n,"funGetCurrent"),h=ye(n,"funAdd"),f=ye(n,"funModify"),d=ye(n,"funRemove"),p=async()=>{let n=await(async(e,t)=>{let r={draw:6,"columns[0][data]":0,"columns[0][name]":"EventNo","columns[0][searchable]":!1,"columns[0][orderable]":!0,"columns[0][search][value]":"","columns[0][search][regex]":!1,"columns[1][data]":1,"columns[1][name]":"MaxIntensity","columns[1][searchable]":!0,"columns[1][orderable]":!0,"columns[1][search][value]":"","columns[1][search][regex]":!1,"columns[2][data]":2,"columns[2][name]":"OriginTime","columns[2][searchable]":!0,"columns[2][orderable]":!0,"columns[2][search][value]":"","columns[2][search][regex]":!1,"columns[3][data]":3,"columns[3][name]":"MagnitudeValue","columns[3][searchable]":!0,"columns[3][orderable]":!0,"columns[3][search][value]":"","columns[3][search][regex]":!1,"columns[4][data]":4,"columns[4][name]":"Depth","columns[4][searchable]":!0,"columns[4][orderable]":!0,"columns[4][search][value]":"","columns[4][search][regex]":!1,"columns[5][data]":5,"columns[5][name]":"Description","columns[5][searchable]":!0,"columns[5][orderable]":!0,"columns[5][search][value]":"","columns[5][search][regex]":!1,"columns[6][data]":6,"columns[6][name]":"Description","columns[6][searchable]":!0,"columns[6][orderable]":!0,"columns[6][search][value]":"","columns[6][search][regex]":!1,"order[0][column]":2,"order[0][dir]":"desc",start:0,length:-1,"search[value]":"","search[regex]":!1,Search:"",txtSDate:`${e}-1-1`,txtEDate:`${t+1}-1-1`,txtSscale:"",txtEscale:"",txtSdepth:"",txtEdepth:"",txtLonS:"",txtLonE:"",txtLatS:"",txtLatE:"",ddlCity:"",ddlTown:"",ddlCitySta:"",ddlStation:"",txtIntensityB:"",txtIntensityE:"",txtLon:"",txtLat:"",txtKM:"",ddlStationName:"------",cblEventNo:"Y",txtSDatePWS:"",txtEDatePWS:"",txtSscalePWS:"",txtEscalePWS:"",ddlMark:""},n=null;try{n=(await xa.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",ja(r),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}return n})(t,r),s=(e=>{let t=so(ye(e,"data",[]),e=>{let t=ye(e,0,""),r=ye(e,1,""),n=ye(e,2,""),i=ye(e,3,""),o=ye(e,4,""),s=ye(e,5,""),a=ye(e,6,""),l=ye(e,7,""),c=ye(e,8,"");r=za(r);let u=$i(n,"YYYY-MM-DD HH-mm:ss"),h=u.format("YYYY-MM-DDTHH:mm:ssZ"),f=u.format("YYYYMMDDHHmmss"),d=u.format("YYYY"),p=u.format("YYYYMM"),m="";return Hr(r)&&Hr(d)&&(m=`${_n(d)-1911}${r}`),{id:m,tag:t,number:r,time:h,timeRec:n,timeTag:f,ml:i,depth:o,location:s,intensity:a,longitude:l,latitude:c,urlWebEqInfor:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Details/${t}`,urlWebEqReport:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Imgs/${t}`,urlWebEqIntensity:`https://scweb.cwa.gov.tw/zh-TW/earthquake/ShakeMap/${t}`,urlWebEqWave:`https://scweb.cwa.gov.tw/zh-TW/earthquake/WaveformAcc/${t}`,urlPicEqReport:`https://scweb.cwa.gov.tw/webdata/OLDEQ/${p}/${t}.gif`,urlPicEqIntensity:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${d}/${d}${r}i.png`,urlPicEqPga:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${d}/${d}${r}a.png`,urlPicEqPgv:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${d}/${d}${r}v.png`}});return t})(n);var a;return s=null==(a=s)?a:ot.call(a),it(s,t=>{let r=`${o}/${t[i]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),s};at(c)||(c=p);let m=async()=>{let t=pt(s,1),r=[];return it(t,t=>{let n=e.readFileSync(t.path,"utf8"),i=JSON.parse(n);r.push(i)}),r};at(u)||(u=m);let g=async e=>{let t=`${a}/${e[i]}`;ct(t)&&dt(t)};at(d)||(d=g);let b=async e=>{let t=`${a}/${e[i]}`;ct(t)&&ht(t),await Wa(t,e);let r=`${t}/picEqReport.gif`,n=`${t}/picEqIntensityList.gif`;await(async(e,t,r,n,i,o)=>{await ad(e,{animated:!1}).extract({left:r,top:n,width:i,height:o}).toFile(t)})(r,n,364,199,276,204)};at(h)||(h=b);let v=async e=>{let t=`${a}/${e[i]}`;ct(t)&&ht(t),await Wa(t,e)};at(f)||(f=v);let w={fdDwAttime:o,fdDwCurrent:s,fdResult:a,fdTaskCpSrc:l,funDownload:c,funGetCurrent:u,funRemove:d,funAdd:h,funModify:f};return await io(w)}});
8
+ //# sourceMappingURL=w-dwdata-tweq.umd.js.map