text: (()=>{var e={7105:e=>{"use strict";e.exports=function(e){return function(){var t=arguments.length;if(t){for(var r=[],n=-1;++n<t;)r[n]=arguments[n];return e.call(this,r)}return e.call(this,[])}}},9282:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i,o,a=r(2136).codes,s=a.ERR_AMBIGUOUS_ARGUMENT,u=a.ERR_INVALID_ARG_TYPE,c=a.ERR_INVALID_ARG_VALUE,f=a.ERR_INVALID_RETURN_VALUE,l=a.ERR_MISSING_ARGS,h=r(5961),p=r(9539).inspect,d=r(9539).types,y=d.isPromise,g=d.isRegExp,v=Object.assign?Object.assign:r(8091).assign,b=Object.is?Object.is:r(609);new Map;function m(){var e=r(9158);i=e.isDeepEqual,o=e.isDeepStrictEqual}var _=!1,w=e.exports=O,E={};function k(e){if(e.message instanceof Error)throw e.message;throw new h(e)}function S(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new h({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function O(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];S.apply(void 0,[O,t.length].concat(t))}w.fail=function e(t,r,n,i,o){var a,s=arguments.length;if(0===s)a="Failed";else if(1===s)n=t,t=void 0;else{if(!1===_){_=!0;var u=process.emitWarning?process.emitWarning:console.warn.bind(console);u("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===s&&(i="!=")}if(n instanceof Error)throw n;var c={actual:t,expected:r,operator:void 0===i?"fail":i,stackStartFn:o||e};void 0!==n&&(c.message=n);var f=new h(c);throw a&&(f.message=a,f.generatedMessage=!0),f},w.AssertionError=h,w.ok=O,w.equal=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");t!=r&&k({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},w.notEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");t==r&&k({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},w.deepEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&m(),i(t,r)||k({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},w.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&m(),i(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},w.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&m(),o(t,r)||k({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},w.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===i&&m();o(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},w.strictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");b(t,r)||k({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},w.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");b(t,r)&&k({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var A=function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&g(t[e])&&t[e].test(n[e])?i[e]=n[e]:i[e]=t[e])}))};function x(e,t,r,n,i,a){if(!(r in e)||!o(e[r],t[r])){if(!n){var s=new A(e,i),u=new A(t,i,e),c=new h({actual:s,expected:u,operator:"deepStrictEqual",stackStartFn:a});throw c.actual=e,c.expected=t,c.operator=a.name,c}k({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}function j(e,t,r,o){if("function"!=typeof t){if(g(t))return t.test(e);if(2===arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==n(e)||null===e){var a=new h({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:o});throw a.operator=o.name,a}var s=Object.keys(t);if(t instanceof Error)s.push("name","message");else if(0===s.length)throw new c("error",t,"may not be an empty object");return void 0===i&&m(),s.forEach((function(n){"string"==typeof e[n]&&g(t[n])&&t[n].test(e[n])||x(e,t,n,r,s,o)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function T(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return E}function P(e){return y(e)||null!==e&&"object"===n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function R(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!P(t=e()))throw new f("instance of Promise","promiseFn",t)}else{if(!P(e))throw new u("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return E})).catch((function(e){return e}))}))}function B(e,t,r,i){if("string"==typeof r){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===n(t)&&null!==t){if(t.message===r)throw new s("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new s("error/message",'The error "'.concat(t,'" is identical to the message.'));i=r,r=void 0}else if(null!=r&&"object"!==n(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(t===E){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=i?": ".concat(i):".";var a="rejects"===e.name?"rejection":"exception";k({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!j(t,r,i,e))throw t}function M(e,t,r,n){if(t!==E){if("string"==typeof r&&(n=r,r=void 0),!r||j(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";k({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function I(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];S.apply(void 0,[I,t.length].concat(t))}w.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];B.apply(void 0,[e,T(t)].concat(n))},w.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return R(t).then((function(t){return B.apply(void 0,[e,t].concat(n))}))},w.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];M.apply(void 0,[e,T(t)].concat(n))},w.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return R(t).then((function(t){return M.apply(void 0,[e,t].concat(n))}))},w.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===n(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=p(t);var i=new h({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=i.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}i.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw i}},w.strict=v(I,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict},5961:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},s(e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,r){return c=u()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&f(i,r.prototype),i},c.apply(null,arguments)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}var p=r(9539).inspect,d=r(2136).codes.ERR_INVALID_ARG_TYPE;function y(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var g="",v="",b="",m="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function E(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function k(e,t,r){var n="",i="",o=0,a="",s=!1,u=E(e),c=u.split("\n"),f=E(t).split("\n"),l=0,p="";if("strictEqual"===r&&"object"===h(e)&&"object"===h(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===f.length&&c[0]!==f[0]){var d=c[0].length+f[0].length;if(d<=10){if(!("object"===h(e)&&null!==e||"object"===h(t)&&null!==t||0===e&&0===t))return"".concat(_[r],"\n\n")+"".concat(c[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r){if(d<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;c[0][l]===f[0][l];)l++;l>2&&(p="\n  ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",l),"^"),l=0)}}}for(var w=c[c.length-1],k=f[f.length-1];w===k&&(l++<2?a="\n  ".concat(w).concat(a):n=w,c.pop(),f.pop(),0!==c.length&&0!==f.length);)w=c[c.length-1],k=f[f.length-1];var S=Math.max(c.length,f.length);if(0===S){var O=u.split("\n");if(O.length>30)for(O[26]="".concat(g,"...").concat(m);O.length>27;)O.pop();return"".concat(_.notIdentical,"\n\n").concat(O.join("\n"),"\n")}l>3&&(a="\n".concat(g,"...").concat(m).concat(a),s=!0),""!==n&&(a="\n  ".concat(n).concat(a),n="");var A=0,x=_[r]+"\n".concat(v,"+ actual").concat(m," ").concat(b,"- expected").concat(m),j=" ".concat(g,"...").concat(m," Lines skipped");for(l=0;l<S;l++){var T=l-o;if(c.length<l+1)T>1&&l>2&&(T>4?(i+="\n".concat(g,"...").concat(m),s=!0):T>3&&(i+="\n  ".concat(f[l-2]),A++),i+="\n  ".concat(f[l-1]),A++),o=l,n+="\n".concat(b,"-").concat(m," ").concat(f[l]),A++;else if(f.length<l+1)T>1&&l>2&&(T>4?(i+="\n".concat(g,"...").concat(m),s=!0):T>3&&(i+="\n  ".concat(c[l-2]),A++),i+="\n  ".concat(c[l-1]),A++),o=l,i+="\n".concat(v,"+").concat(m," ").concat(c[l]),A++;else{var P=f[l],R=c[l],B=R!==P&&(!y(R,",")||R.slice(0,-1)!==P);B&&y(P,",")&&P.slice(0,-1)===R&&(B=!1,R+=","),B?(T>1&&l>2&&(T>4?(i+="\n".concat(g,"...").concat(m),s=!0):T>3&&(i+="\n  ".concat(c[l-2]),A++),i+="\n  ".concat(c[l-1]),A++),o=l,i+="\n".concat(v,"+").concat(m," ").concat(R),n+="\n".concat(b,"-").concat(m," ").concat(P),A+=2):(i+=n,n="",1!==T&&0!==l||(i+="\n  ".concat(R),A++))}if(A>20&&l<S-2)return"".concat(x).concat(j,"\n").concat(i,"\n").concat(g,"...").concat(m).concat(n,"\n")+"".concat(g,"...").concat(m)}return"".concat(x).concat(s?j:"","\n").concat(i).concat(n).concat(a).concat(p)}var S=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==h(e)||null===e)throw new d("options","Object",e);var n=e.message,i=e.operator,s=e.stackStartFn,u=e.actual,c=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=o(this,l(t).call(this,String(n)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(g="[34m",v="[32m",m="[39m",b="[31m"):(g="",v="",m="",b="")),"object"===h(u)&&null!==u&&"object"===h(c)&&null!==c&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=w(u),c=w(c)),"deepStrictEqual"===i||"strictEqual"===i)r=o(this,l(t).call(this,k(u,c,i)));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var p=_[i],y=E(u).split("\n");if("notStrictEqual"===i&&"object"===h(u)&&null!==u&&(p=_.notStrictEqualObject),y.length>30)for(y[26]="".concat(g,"...").concat(m);y.length>27;)y.pop();r=1===y.length?o(this,l(t).call(this,"".concat(p," ").concat(y[0]))):o(this,l(t).call(this,"".concat(p,"\n\n").concat(y.join("\n"),"\n")))}else{var S=E(u),O="",A=_[i];"notDeepEqual"===i||"notEqual"===i?(S="".concat(_[i],"\n\n").concat(S)).length>1024&&(S="".concat(S.slice(0,1021),"...")):(O="".concat(E(c)),S.length>512&&(S="".concat(S.slice(0,509),"...")),O.length>512&&(O="".concat(O.slice(0,509),"...")),"deepEqual"===i||"equal"===i?S="".concat(A,"\n\n").concat(S,"\n\nshould equal\n\n"):O=" ".concat(i," ").concat(O)),r=o(this,l(t).call(this,"".concat(S).concat(O)))}return Error.stackTraceLimit=f,r.generatedMessage=!n,Object.defineProperty(a(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=c,r.operator=i,Error.captureStackTrace&&Error.captureStackTrace(a(r),s),r.stack,r.name="AssertionError",o(r)}var r,s,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,e),r=t,s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),i.forEach((function(t){n(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],s&&i(r.prototype,s),u&&i(r,u),t}(s(Error));e.exports=S},2136:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}var s,u,c={};function f(e,t,r){r||(r=Error);var n=function(r){function n(r,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),u=i(this,o(n).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,a,s))),u.code=e,u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,r),n}(r);c[e]=n}function l(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,u,c;if(void 0===s&&(s=r(9282)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!u||u<0?0:+u,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))c="The ".concat(e," ").concat(o," ").concat(l(t,"type"));else{var f=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";c='The "'.concat(e,'" ').concat(f," ").concat(o," ").concat(l(t,"type"))}return c+=". Received type ".concat(n(i))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=r(9539));var i=u.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===s&&(s=r(9282)),s(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=c},9158:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},u=Object.is?Object.is:r(609),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(360);function l(e){return e.call.bind(e)}var h=l(Object.prototype.hasOwnProperty),p=l(Object.prototype.propertyIsEnumerable),d=l(Object.prototype.toString),y=r(9539).types,g=y.isAnyArrayBuffer,v=y.isArrayBufferView,b=y.isDate,m=y.isMap,_=y.isRegExp,w=y.isSet,E=y.isNativeError,k=y.isBoxedPrimitive,S=y.isNumberObject,O=y.isStringObject,A=y.isBooleanObject,x=y.isBigIntObject,j=y.isSymbolObject,T=y.isFloat32Array,P=y.isFloat64Array;function R(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function B(e){return Object.keys(e).filter(R).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function M(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function I(e,t,r,n){if(e===t)return 0!==e||(!r||u(e,t));if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var a,s,c,l,h=d(e);if(h!==d(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var p=B(e),y=B(t);return p.length===y.length&&U(e,t,r,n,1,p)}if("[object Object]"===h&&(!m(e)&&m(t)||!w(e)&&w(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(_(e)){if(!_(t)||(c=e,l=t,!(o?c.source===l.source&&c.flags===l.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(l))))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(r||!T(e)&&!P(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===M(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var R=B(e),I=B(t);return R.length===I.length&&U(e,t,r,n,0,R)}if(w(e))return!(!w(t)||e.size!==t.size)&&U(e,t,r,n,2);if(m(e))return!(!m(t)||e.size!==t.size)&&U(e,t,r,n,3);if(g(e)){if(s=t,(a=e).byteLength!==s.byteLength||0!==M(new Uint8Array(a),new Uint8Array(s)))return!1}else if(k(e)&&!function(e,t){return S(e)?S(t)&&u(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):A(e)?A(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):x(e)?x(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):j(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return U(e,t,r,n,0)}function L(e,t){return t.filter((function(t){return p(e,t)}))}function U(e,t,r,n,i,o){if(5===arguments.length){o=Object.keys(e);var a=Object.keys(t);if(o.length!==a.length)return!1}for(var s=0;s<o.length;s++)if(!h(t,o[s]))return!1;if(r&&5===arguments.length){var u=c(e);if(0!==u.length){var f=0;for(s=0;s<u.length;s++){var l=u[s];if(p(e,l)){if(!p(t,l))return!1;o.push(l),f++}else if(p(t,l))return!1}var d=c(t);if(u.length!==d.length&&L(t,d).length!==f)return!1}else{var y=c(t);if(0!==y.length&&0!==L(t,y).length)return!1}}if(0===o.length&&(0===i||1===i&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var g=n.val1.get(e);if(void 0!==g){var v=n.val2.get(t);if(void 0!==v)return g===v}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var b=W(e,t,r,o,n,i);return n.val1.delete(e),n.val2.delete(t),b}function C(e,t,r,n){for(var i=a(e),o=0;o<i.length;o++){var s=i[o];if(I(t,s,r,n))return e.delete(s),!0}return!1}function D(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function N(e,t,r){var n=D(r);return null!=n?n:t.has(n)&&!e.has(n)}function q(e,t,r,n,i){var o=D(r);if(null!=o)return o;var a=t.get(o);return!(void 0===a&&!t.has(o)||!I(n,a,!1,i))&&(!e.has(o)&&I(n,a,!1,i))}function F(e,t,r,n,i,o){for(var s=a(e),u=0;u<s.length;u++){var c=s[u];if(I(r,c,i,o)&&I(n,t.get(c),i,o))return e.delete(c),!0}return!1}function W(e,t,r,o,u,c){var f=0;if(2===c){if(!function(e,t,r,n){for(var o=null,s=a(e),u=0;u<s.length;u++){var c=s[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!N(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var f=a(t),l=0;l<f.length;l++){var h=f[l];if("object"===i(h)&&null!==h){if(!C(o,h,r,n))return!1}else if(!r&&!e.has(h)&&!C(o,h,r,n))return!1}return 0===o.size}return!0}(e,t,r,u))return!1}else if(3===c){if(!function(e,t,r,o){for(var a=null,u=s(e),c=0;c<u.length;c++){var f=n(u[c],2),l=f[0],h=f[1];if("object"===i(l)&&null!==l)null===a&&(a=new Set),a.add(l);else{var p=t.get(l);if(void 0===p&&!t.has(l)||!I(h,p,r,o)){if(r)return!1;if(!q(e,t,l,h,o))return!1;null===a&&(a=new Set),a.add(l)}}}if(null!==a){for(var d=s(t),y=0;y<d.length;y++){var g=n(d[y],2),v=(l=g[0],g[1]);if("object"===i(l)&&null!==l){if(!F(a,e,l,v,r,o))return!1}else if(!(r||e.has(l)&&I(e.get(l),v,!1,o)||F(a,e,l,v,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,u))return!1}else if(1===c)for(;f<e.length;f++){if(!h(e,f)){if(h(t,f))return!1;for(var l=Object.keys(e);f<l.length;f++){var p=l[f];if(!h(t,p)||!I(e[p],t[p],r,u))return!1}return l.length===Object.keys(t).length}if(!h(t,f)||!I(e[f],t[f],r,u))return!1}for(f=0;f<o.length;f++){var d=o[f];if(!I(e[d],t[d],r,u))return!1}return!0}e.exports={isDeepEqual:function(e,t){return I(e,t,false)},isDeepStrictEqual:function(e,t){return I(e,t,true)}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),a=o[0],s=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[f++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";var n=r(9742),i=r(645);t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=a(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=s.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var i=function(e){if(s.isBuffer(e)){var t=0|h(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||W(e.length)?a(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),a(e<0?0:0|h(e))}function l(e){for(var t=e.length<0?0:0|h(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(i)return n?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(W(s))return a;e[r+a]=s}return a}function m(e,t,r,n){return q(D(t,e.length-r),e,r,n)}function _(e,t,r,n){return q(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return _(e,t,r,n)}function E(e,t,r,n){return q(N(t),e,r,n)}function k(e,t,r,n){return q(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=A));return r}(n)}t.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,r){return u(e,t,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},s.allocUnsafe=function(e){return f(e)},s.allocUnsafeSlow=function(e){return f(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(F(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):d.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<u;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return m(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=C(e[o]);return i}function P(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||B(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||B(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=a[o%u]}return this};var U=/[^+/0-9A-Za-z-_]/g;function C(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,a,arguments);if(u&&c){var r=u(t,"length");r.configurable&&c(t,"length",{value:1+f(0,e.length-(arguments.length-1))})}return t};var l=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},6313:e=>{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,r,n;try{t=Map}catch(e){t=function(){}}try{r=Set}catch(e){r=function(){}}try{n=Promise}catch(e){n=function(){}}function i(o,s,u,c,f){"object"==typeof s&&(u=s.depth,c=s.prototype,f=s.includeNonEnumerable,s=s.circular);var l=[],h=[],p="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===u&&(u=1/0),function o(u,d){if(null===u)return null;if(0===d)return u;var y,g;if("object"!=typeof u)return u;if(e(u,t))y=new t;else if(e(u,r))y=new r;else if(e(u,n))y=new n((function(e,t){u.then((function(t){e(o(t,d-1))}),(function(e){t(o(e,d-1))}))}));else if(i.__isArray(u))y=[];else if(i.__isRegExp(u))y=new RegExp(u.source,a(u)),u.lastIndex&&(y.lastIndex=u.lastIndex);else if(i.__isDate(u))y=new Date(u.getTime());else{if(p&&Buffer.isBuffer(u))return y=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(y),y;e(u,Error)?y=Object.create(u):void 0===c?(g=Object.getPrototypeOf(u),y=Object.create(g)):(y=Object.create(c),g=c)}if(s){var v=l.indexOf(u);if(-1!=v)return h[v];l.push(u),h.push(y)}for(var b in e(u,t)&&u.forEach((function(e,t){var r=o(t,d-1),n=o(e,d-1);y.set(r,n)})),e(u,r)&&u.forEach((function(e){var t=o(e,d-1);y.add(t)})),u){var m;g&&(m=Object.getOwnPropertyDescriptor(g,b)),m&&null==m.set||(y[b]=o(u[b],d-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(u);for(b=0;b<_.length;b++){var w=_[b];(!(k=Object.getOwnPropertyDescriptor(u,w))||k.enumerable||f)&&(y[w]=o(u[w],d-1),k.enumerable||Object.defineProperty(y,w,{enumerable:!1}))}}if(f){var E=Object.getOwnPropertyNames(u);for(b=0;b<E.length;b++){var k,S=E[b];(k=Object.getOwnPropertyDescriptor(u,S))&&k.enumerable||(y[S]=o(u[S],d-1),Object.defineProperty(y,S,{enumerable:!1}))}}return y}(o,u)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();e.exports&&(e.exports=t)},6497:(e,t,r)=>{function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(8764).Buffer.isBuffer},2790:(e,t,r)=>{var n=r(9984).AbstractIterator;function i(e,t){n.call(this,e),this._options=t,this._iterator=null,this._operations=[]}r(5717)(i,n),i.prototype.setDb=function(e){var t=this._iterator=e.iterator(this._options);this._operations.forEach((function(e){t[e.method].apply(t,e.args)}))},i.prototype._operation=function(e,t){if(this._iterator)return this._iterator[e].apply(this._iterator,t);this._operations.push({method:e,args:t})},"next end".split(" ").forEach((function(e){i.prototype["_"+e]=function(){this._operation(e,arguments)}})),i.prototype.seek=function(){this._operation("seek",arguments)},e.exports=i},6944:(e,t,r)=>{var n=r(9984).AbstractLevelDOWN,i=r(5717),o=r(2790),a="put get del batch clear".split(" "),s="approximateSize compactRange".split(" ");function u(e){n.call(this,e.supports||{}),s.forEach((function(t){"function"!=typeof e[t]||this.supports.additionalMethods[t]||(this.supports.additionalMethods[t]=!0)}),this),this._db=e,this._operations=[],c(this)}function c(e){a.forEach((function(t){e["_"+t]=function(){this._operations.push({method:t,args:arguments})}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){this._operations.push({method:t,args:arguments})}})),e._iterator=function(t){var r=new o(e,t);return this._operations.push({iterator:r}),r}}i(u,n),u.prototype.type="deferred-leveldown",u.prototype._open=function(e,t){var r=this;this._db.open(e,(function(e){if(e)return t(e);r._operations.forEach((function(e){e.iterator?e.iterator.setDb(r._db):r._db[e.method].apply(r._db,e.args)})),r._operations=[],function(e){a.concat("iterator").forEach((function(t){e["_"+t]=function(){return this._db[t].apply(this._db,arguments)}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){return this._db[t].apply(this._db,arguments)}}))}(r),t()}))},u.prototype._close=function(e){var t=this;this._db.close((function(r){if(r)return e(r);c(t),e()}))},u.prototype._serializeKey=function(e){return e},u.prototype._serializeValue=function(e){return e},e.exports=u,e.exports.DeferredIterator=o},2845:(e,t,r)=>{var n=r(3224);function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}i.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},i.prototype.put=function(e,t){this._checkWritten();var r=this.db._checkKey(e)||this.db._checkValue(t);if(r)throw r;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t),this},i.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},i.prototype.del=function(e){this._checkWritten();var t=this.db._checkKey(e);if(t)throw t;return e=this.db._serializeKey(e),this._del(e),this},i.prototype._del=function(e){this._operations.push({type:"del",key:e})},i.prototype.clear=function(){return this._checkWritten(),this._clear(),this},i.prototype._clear=function(){this._operations=[]},i.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},i.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},i.prototype._nextTick=n,e.exports=i},2861:(e,t,r)=>{var n=r(3224);function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}i.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?(n(e,new Error("cannot call next() after end()")),t):t._nexting?(n(e,new Error("cannot call next() before previous next() has completed")),t):(t._nexting=!0,t._next((function(){t._nexting=!1,e.apply(null,arguments)})),t)},i.prototype._next=function(e){n(e)},i.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},i.prototype._seek=function(e){},i.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return n(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},i.prototype._end=function(e){n(e)},i.prototype._nextTick=n,e.exports=i},7793:(e,t,r)=>{var n=r(7529),i=r(865),o=r(5788).lW,a=r(2861),s=r(2845),u=r(3224),c=Object.prototype.hasOwnProperty,f="start end gt gte lt lte".split(" ");function l(e){this.status="new",this.supports=i(e,{status:!0})}function h(e,t){var r={};for(var n in t)if(c.call(t,n)){var i=t[n];p(n)&&(i=e._serializeKey(i)),r[n]=i}return r}function p(e){return-1!==f.indexOf(e)}l.prototype.open=function(e,t){var r=this,n=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"==typeof e&&null!==e||(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,(function(e){if(e)return r.status=n,t(e);r.status="open",t()}))},l.prototype._open=function(e,t){u(t)},l.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close((function(n){if(n)return t.status=r,e(n);t.status="closed",e()}))},l.prototype._close=function(e){u(e)},l.prototype.get=function(e,t,r){if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("get() requires a callback argument");var n=this._checkKey(e);if(n)return u(r,n);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),t.asBuffer=!1!==t.asBuffer,this._get(e,t,r)},l.prototype._get=function(e,t,r){u((function(){r(new Error("NotFound"))}))},l.prototype.put=function(e,t,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("put() requires a callback argument");var i=this._checkKey(e)||this._checkValue(t);if(i)return u(n,i);e=this._serializeKey(e),t=this._serializeValue(t),"object"==typeof r&&null!==r||(r={}),this._put(e,t,r,n)},l.prototype._put=function(e,t,r,n){u(n)},l.prototype.del=function(e,t,r){if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("del() requires a callback argument");var n=this._checkKey(e);if(n)return u(r,n);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),this._del(e,t,r)},l.prototype._del=function(e,t,r){u(r)},l.prototype.batch=function(e,t,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(r=t),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return u(r,new Error("batch(array) requires an array argument"));if(0===e.length)return u(r);"object"==typeof t&&null!==t||(t={});for(var i=new Array(e.length),o=0;o<e.length;o++){if("object"!=typeof e[o]||null===e[o])return u(r,new Error("batch(array) element must be an object and not `null`"));var a=n(e[o]);if("put"!==a.type&&"del"!==a.type)return u(r,new Error("`type` must be 'put' or 'del'"));var s=this._checkKey(a.key);if(s)return u(r,s);if(a.key=this._serializeKey(a.key),"put"===a.type){var c=this._checkValue(a.value);if(c)return u(r,c);a.value=this._serializeValue(a.value)}i[o]=a}this._batch(i,t,r)},l.prototype._batch=function(e,t,r){u(r)},l.prototype.clear=function(e,t){if("function"==typeof e)t=e;else if("function"!=typeof t)throw new Error("clear() requires a callback argument");(e=h(this,e)).reverse=!!e.reverse,e.limit="limit"in e?e.limit:-1,this._clear(e,t)},l.prototype._clear=function(e,t){e.keys=!0,e.values=!1,e.keyAsBuffer=!0,e.valueAsBuffer=!0;var r=this._iterator(e),n={},i=this,o=function(e){if(e)return r.end((function(){t(e)}));r.next((function(e,a){return e?o(e):void 0===a?r.end(t):void i._del(a,n,o)}))};o()},l.prototype._setupIteratorOptions=function(e){return(e=h(this,e)).reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},l.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},l.prototype._iterator=function(e){return new a(this)},l.prototype._chainedBatch=function(){return new s(this)},l.prototype._serializeKey=function(e){return e},l.prototype._serializeValue=function(e){return e},l.prototype._checkKey=function(e){return null==e?new Error("key cannot be `null` or `undefined`"):o.isBuffer(e)&&0===e.length?new Error("key cannot be an empty Buffer"):""===e?new Error("key cannot be an empty String"):Array.isArray(e)&&0===e.length?new Error("key cannot be an empty Array"):void 0},l.prototype._checkValue=function(e){if(null==e)return new Error("value cannot be `null` or `undefined`")},l.prototype._nextTick=u,e.exports=l},9984:(e,t,r)=>{t.AbstractLevelDOWN=r(7793),t.AbstractIterator=r(2861),r(2845)},3224:(e,t,r)=>{e.exports=r(1180)},5788:(e,t,r)=>{"use strict";var n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=u,t.h2=50;var a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|y(e,t),n=s(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=function(e){if(u.isBuffer(e)){var t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||W(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return f(e),s(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(i)return n?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function _(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(W(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return q(D(t,e.length-r),e,r,n)}function E(e,t,r,n){return q(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function k(e,t,r,n){return q(N(t),e,r,n)}function S(e,t,r,n){return q(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return l(e)},u.allocUnsafeSlow=function(e){return l(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(F(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(F(o,Uint8Array))i+o.length>n.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=$[e[o]];return i}function R(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function B(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function I(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||I(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||I(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:u.from(e,n),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var C=/[^+/0-9A-Za-z-_]/g;function D(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}var $=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},865:(e,t,r)=>{"use strict";var n=r(7529),i=r(9820);e.exports=function(){var e=n.apply(null,arguments);return i(e,{bufferKeys:e.bufferKeys||!1,snapshots:e.snapshots||!1,permanence:e.permanence||!1,seek:e.seek||!1,clear:e.clear||!1,status:e.status||!1,createIfMissing:e.createIfMissing||!1,errorIfExists:e.errorIfExists||!1,deferredOpen:e.deferredOpen||!1,openCallback:e.openCallback||!1,promises:e.promises||!1,streams:e.streams||!1,encodings:e.encodings||!1,additionalMethods:n(e.additionalMethods)})}},4289:(e,t,r)=>{"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?s(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)c(e,o[s],t[o[s]],r[o[s]])};f.supportsDescriptors=!!u,e.exports=f},7237:e=>{"use strict";function t(e){if(this._capacity=n(e),this._length=0,this._front=0,r(e)){for(var t=e.length,i=0;i<t;++i)this[i]=e[i];this._length=t}}t.prototype.toArray=function(){for(var e=this._length,t=new Array(e),r=this._front,n=this._capacity,i=0;i<e;++i)t[i]=this[r+i&n-1];return t},t.prototype.push=function(e){var t=arguments.length,r=this._length;if(t>1){var n=this._capacity;if(r+t>n){for(var i=0;i<t;++i){this._checkCapacity(r+1),this[o=this._front+r&this._capacity-1]=arguments[i],r++,this._length=r}return r}for(var o=this._front,i=0;i<t;++i)this[o+r&n-1]=arguments[i],o++;return this._length=r+t,r+t}return 0===t?r:(this._checkCapacity(r+1),this[i=this._front+r&this._capacity-1]=e,this._length=r+1,r+1)},t.prototype.pop=function(){var e=this._length;if(0!==e){var t=this._front+e-1&this._capacity-1,r=this[t];return this[t]=void 0,this._length=e-1,r}},t.prototype.shift=function(){var e=this._length;if(0!==e){var t=this._front,r=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length=e-1,r}},t.prototype.unshift=function(e){var t=this._length,r=arguments.length;if(r>1){if(t+r>(i=this._capacity)){for(var n=r-1;n>=0;n--){this._checkCapacity(t+1);var i=this._capacity;this[a=(this._front-1&i-1^i)-i]=arguments[n],t++,this._length=t,this._front=a}return t}var o=this._front;for(n=r-1;n>=0;n--){var a;this[a=(o-1&i-1^i)-i]=arguments[n],o=a}return this._front=o,this._length=t+r,t+r}if(0===r)return t;this._checkCapacity(t+1);i=this._capacity;return this[n=(this._front-1&i-1^i)-i]=e,this._length=t+1,this._front=n,t+1},t.prototype.peekBack=function(){var e=this._length;if(0!==e)return this[this._front+e-1&this._capacity-1]},t.prototype.peekFront=function(){if(0!==this._length)return this[this._front]},t.prototype.get=function(e){var t=e;if(t===(0|t)){var r=this._length;if(t<0&&(t+=r),!(t<0||t>=r))return this[this._front+t&this._capacity-1]}},t.prototype.isEmpty=function(){return 0===this._length},t.prototype.clear=function(){for(var e=this._length,t=this._front,r=this._capacity,n=0;n<e;++n)this[t+n&r-1]=void 0;this._length=0,this._front=0},t.prototype.toString=function(){return this.toArray().toString()},t.prototype.valueOf=t.prototype.toString,t.prototype.removeFront=t.prototype.shift,t.prototype.removeBack=t.prototype.pop,t.prototype.insertFront=t.prototype.unshift,t.prototype.insertBack=t.prototype.push,t.prototype.enqueue=t.prototype.push,t.prototype.dequeue=t.prototype.shift,t.prototype.toJSON=t.prototype.toArray,Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}}),t.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(n(1.5*this._capacity+16))},t.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e;var r=this._front,n=this._length;r+n>t&&function(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+t],e[o+t]=void 0}(this,0,this,t,r+n&t-1)};var r=Array.isArray;function n(e){if("number"!=typeof e){if(!r(e))return 16;e=e.length}return t=Math.min(Math.max(16,e),1073741824),t>>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16);var t}e.exports=t},624:e=>{function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},t.prototype.once=function(e,t){var r=this;function n(){r.off(e,n),t.apply(this,arguments)}return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks[e];if(r)for(var n=0,i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,t);return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},6555:(e,t,r)=>{var n=r(233);function i(e,t,r){t&&"string"!=typeof t&&(t=t.message||t.name),n(this,{type:e,name:e,cause:"string"!=typeof t?t:r,message:t},"ewr")}function o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}o.prototype=new Error,e.exports=function(e){var t=function(t,r){return function(e,t,r){var n=function(r,o){i.call(this,t,r,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,n)};return n.prototype=r?new r:new o,n}(e,t,r)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},7138:(e,t,r)=>{var n=e.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];e.exports.errno={},e.exports.code={},n.forEach((function(t){e.exports.errno[t.errno]=t,e.exports.code[t.code]=t})),e.exports.custom=r(6555)(e.exports),e.exports.create=e.exports.custom.createError},8091:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var u=o[a],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,r)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,a,c;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=a.length,c=f,console&&console.warn&&console.warn(c)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):d(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,f=d(u,c);for(r=0;r<c;++r)n(f[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,l(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,l(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4063:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},9804:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)n.call(i,e[a],a,e);else for(var s in e)t.call(e,s)&&n.call(i,e[s],s,e)}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(t+o);for(var a,s=r.call(arguments,1),u=function(){if(this instanceof a){var t=o.apply(this,s.concat(r.call(arguments)));return Object(t)===t?t:this}return o.apply(e,s.concat(r.call(arguments)))},c=Math.max(0,o.length-s.length),f=[],l=0;l<c;l++)f.push("$"+l);if(a=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var h=function(){};h.prototype=o.prototype,a.prototype=new h,h.prototype=null}return a}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},4977:e=>{"use strict";e.exports=function(e){return new o(e||p,null)};function t(e,t,r,n,i,o){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=o}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function o(e,t){this._compare=e,this.root=t}var a=o.prototype;function s(e,t){var r;if(t.left&&(r=s(e,t.left)))return r;return(r=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function u(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left)if(i=u(e,t,r,n.left))return i;if(i=r(n.key,n.value))return i}if(n.right)return u(e,t,r,n.right)}function c(e,t,r,n,i){var o,a=r(e,i.key),s=r(t,i.key);if(a<=0){if(i.left&&(o=c(e,t,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(e,t,r,n,i.right)}function f(e,t){this.tree=e,this._stack=t}Object.defineProperty(a,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(a,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(e,r){for(var a=this._compare,s=this.root,u=[],c=[];s;){var f=a(e,s.key);u.push(s),c.push(f),s=f<=0?s.left:s.right}u.push(new t(0,e,r,null,null,1));for(var l=u.length-2;l>=0;--l){s=u[l];c[l]<=0?u[l]=new t(s._color,s.key,s.value,u[l+1],s.right,s._count+1):u[l]=new t(s._color,s.key,s.value,s.left,u[l+1],s._count+1)}for(l=u.length-1;l>1;--l){var h=u[l-1];s=u[l];if(1===h._color||1===s._color)break;var p=u[l-2];if(p.left===h)if(h.left===s){if(!(d=p.right)||0!==d._color){if(p._color=0,p.left=h.right,h._color=1,h.right=p,u[l-2]=h,u[l-1]=s,i(p),i(h),l>=3)(y=u[l-3]).left===p?y.left=h:y.right=h;break}h._color=1,p.right=n(1,d),p._color=0,l-=1}else{if(!(d=p.right)||0!==d._color){if(h.right=s.left,p._color=0,p.left=s.right,s._color=1,s.left=h,s.right=p,u[l-2]=s,u[l-1]=h,i(p),i(h),i(s),l>=3)(y=u[l-3]).left===p?y.left=s:y.right=s;break}h._color=1,p.right=n(1,d),p._color=0,l-=1}else if(h.right===s){if(!(d=p.left)||0!==d._color){if(p._color=0,p.right=h.left,h._color=1,h.left=p,u[l-2]=h,u[l-1]=s,i(p),i(h),l>=3)(y=u[l-3]).right===p?y.right=h:y.left=h;break}h._color=1,p.left=n(1,d),p._color=0,l-=1}else{var d;if(!(d=p.left)||0!==d._color){var y;if(h.left=s.right,p._color=0,p.right=s.left,s._color=1,s.right=h,s.left=p,u[l-2]=s,u[l-1]=h,i(p),i(h),i(s),l>=3)(y=u[l-3]).right===p?y.right=s:y.left=s;break}h._color=1,p.left=n(1,d),p._color=0,l-=1}}return u[0]._color=1,new o(a,u[0])},a.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return u(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return c(t,r,this._compare,e,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new f(this,e)}}),Object.defineProperty(a,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new f(this,e)}}),a.at=function(e){if(e<0)return new f(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e<t.left._count){t=t.left;continue}e-=t.left._count}if(!e)return new f(this,r);if(e-=1,!t.right)break;if(e>=t.right._count)break;t=t.right}return new f(this,[])},a.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new f(this,n)},a.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new f(this,n)},a.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new f(this,n)},a.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new f(this,n)},a.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new f(this,n);r=i<=0?r.left:r.right}return new f(this,[])},a.remove=function(e){var t=this.find(e);return t?t.remove():this},a.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var l=f.prototype;function h(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function p(e,t){return e<t?-1:e>t?1:0}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new f(this.tree,this._stack.slice())},l.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var a=new Array(e.length),s=e[e.length-1];a[a.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var u=e.length-2;u>=0;--u){(s=e[u]).left===e[u+1]?a[u]=new t(s._color,s.key,s.value,a[u+1],s.right,s._count):a[u]=new t(s._color,s.key,s.value,s.left,a[u+1],s._count)}if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var f=a[c-1];a.push(new t(s._color,f.key,f.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value;for(u=a.length-2;u>=c;--u)s=a[u],a[u]=new t(s._color,s.key,s.value,s.left,a[u+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var l=a[a.length-2];l.left===s?l.left=null:l.right===s&&(l.right=null),a.pop();for(u=0;u<a.length;++u)a[u]._count--;return new o(this.tree._compare,a[0])}if(s.left||s.right){s.left?h(s,s.left):s.right&&h(s,s.right),s._color=1;for(u=0;u<a.length-1;++u)a[u]._count--;return new o(this.tree._compare,a[0])}if(1===a.length)return new o(this.tree._compare,null);for(u=0;u<a.length;++u)a[u]._count--;var p=a[a.length-2];return function(e){for(var t,o,a,s,u=e.length-1;u>=0;--u){if(t=e[u],0===u)return void(t._color=1);if((o=e[u-1]).left===t){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,t._color=1,o._color=1,s._color=1,i(o),i(a),u>1&&((c=e[u-2]).left===o?c.left=a:c.right=a),void(e[u-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,t._color=1,i(o),i(a),i(s),u>1&&((c=e[u-2]).left===o?c.left=s:c.right=s),void(e[u-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),u>1&&((c=e[u-2]).left===o?c.left=a:c.right=a),e[u-1]=a,e[u]=o,u+1<e.length?e[u+1]=t:e.push(t),u+=2}else{if((a=o.left).left&&0===a.left._color)return s=(a=o.left=r(a)).left=r(a.left),o.left=a.right,a.right=o,a.left=s,a._color=o._color,t._color=1,o._color=1,s._color=1,i(o),i(a),u>1&&((c=e[u-2]).right===o?c.right=a:c.left=a),void(e[u-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,t._color=1,i(o),i(a),i(s),u>1&&((c=e[u-2]).right===o?c.right=s:c.left=s),void(e[u-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),u>1&&((c=e[u-2]).right===o?c.right=a:c.left=a),e[u-1]=a,e[u]=o,u+1<e.length?e[u+1]=t:e.push(t),u+=2}}}(a),p.left===s?p.left=null:p.right=null,new o(this.tree._compare,a[0])},Object.defineProperty(l,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),l.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),l.update=function(e){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new t(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new t(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},l.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},f=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=r(1405)(),h=Object.getPrototypeOf||function(e){return e.__proto__},p={},d="undefined"==typeof Uint8Array?n:h(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?h(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":d,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=h(i.prototype))}return y[t]=r,r},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(8612),m=r(7642),_=b.call(Function.call,Array.prototype.concat),w=b.call(Function.apply,Array.prototype.splice),E=b.call(Function.call,String.prototype.replace),k=b.call(Function.call,String.prototype.slice),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,A=function(e){var t=k(e,0,1),r=k(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,S,(function(e,t,r,i){n[n.length]=r?E(i,O,"$1"):t||e})),n},x=function(e,t){var r,n=e;if(m(v,n)&&(n="%"+(r=v[n])[0]+"%"),m(y,n)){var o=y[n];if(o===p&&(o=g(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var r=A(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),s=o.name,c=o.value,f=!1,l=o.alias;l&&(n=l[0],w(r,_([0,1],l)));for(var h=1,p=!0;h<r.length;h+=1){var d=r[h],g=k(d,0,1),v=k(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new i("property names with quotes must have matching quotes");if("constructor"!==d&&p||(f=!0),m(y,s="%"+(n+="."+d)+"%"))c=y[s];else if(null!=c){if(!(d in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var b=u(c,d);c=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[d]}else p=m(c,d),c=c[d];p&&!f&&(y[s]=c)}}return c}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:(e,t,r)=>{"use strict";var n=r(5419);e.exports=function(){return n()&&!!Symbol.toStringTag}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*y}},1180:(e,t,r)=>{"use strict";var n,i,o,a=[r(5525),r(4785),r(8291),r(2709),r(2506),r(9176)],s=-1,u=[],c=!1;function f(){n&&i&&(n=!1,i.length?u=i.concat(u):s=-1,u.length&&l())}function l(){if(!n){c=!1,n=!0;for(var e=u.length,t=setTimeout(f);e;){for(i=u,u=[];i&&++s<e;)i[s].run();s=-1,e=u.length}i=null,s=-1,n=!1,clearTimeout(t)}}for(var h=-1,p=a.length;++h<p;)if(a[h]&&a[h].test&&a[h].test()){o=a[h].install(l);break}function d(e,t){this.fun=e,this.array=t}d.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},e.exports=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),c||n||(c=!0,o())}},2709:(e,t,r)=>{"use strict";t.test=function(){return!r.g.setImmediate&&void 0!==r.g.MessageChannel},t.install=function(e){var t=new r.g.MessageChannel;return t.port1.onmessage=e,function(){t.port2.postMessage(0)}}},8291:(e,t,r)=>{"use strict";var n=r.g.MutationObserver||r.g.WebKitMutationObserver;t.test=function(){return n},t.install=function(e){var t=0,i=new n(e),o=r.g.document.createTextNode("");return i.observe(o,{characterData:!0}),function(){o.data=t=++t%2}}},4785:(e,t,r)=>{"use strict";t.test=function(){return"function"==typeof r.g.queueMicrotask},t.install=function(e){return function(){r.g.queueMicrotask(e)}}},2506:(e,t,r)=>{"use strict";t.test=function(){return"document"in r.g&&"onreadystatechange"in r.g.document.createElement("script")},t.install=function(e){return function(){var t=r.g.document.createElement("script");return t.onreadystatechange=function(){e(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},r.g.document.documentElement.appendChild(t),e}}},9176:(e,t)=>{"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2584:(e,t,r)=>{"use strict";var n=r(6410)(),i=r(1924)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},a=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},9134:e=>{e.exports=function(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}},8662:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(6410)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},8611:e=>{"use strict";e.exports=function(e){return e!=e}},360:(e,t,r)=>{"use strict";var n=r(5559),i=r(4289),o=r(8611),a=r(9415),s=r(3194),u=n(a(),Number);i(u,{getPolyfill:a,implementation:o,shim:s}),e.exports=u},9415:(e,t,r)=>{"use strict";var n=r(8611);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},3194:(e,t,r)=>{"use strict";var n=r(4289),i=r(9415);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},6898:e=>{"use strict";e.exports=e=>!!e&&("symbol"==typeof Symbol.observable&&"function"==typeof e[Symbol.observable]?e===e[Symbol.observable]():"function"==typeof e["@@observable"]&&e===e["@@observable"]())},5692:(e,t,r)=>{"use strict";var n=r(9804),i=r(3083),o=r(1924),a=o("Object.prototype.toString"),s=r(6410)(),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},l=o("String.prototype.slice"),h={},p=r(882),d=Object.getPrototypeOf;s&&p&&d&&n(c,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var r=d(t),n=p(r,Symbol.toStringTag);if(!n){var i=d(r);n=p(i,Symbol.toStringTag)}h[e]=n.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!s||!(Symbol.toStringTag in e)){var t=l(a(e),8,-1);return f(c,t)>-1}return!!p&&function(e){var t=!1;return n(h,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},5826:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},4124:(e,t,r)=>{var n=r(964);function i(e){if(!(this instanceof i))return new i(e);this.opts=e||{},this.encodings=n}e.exports=i,i.prototype._encoding=function(e){return"string"==typeof e&&(e=n[e]),e||(e=n.id),e},i.prototype._keyEncoding=function(e,t){return this._encoding(t&&t.keyEncoding||e&&e.keyEncoding||this.opts.keyEncoding)},i.prototype._valueEncoding=function(e,t){return this._encoding(t&&(t.valueEncoding||t.encoding)||e&&(e.valueEncoding||e.encoding)||this.opts.valueEncoding||this.opts.encoding)},i.prototype.encodeKey=function(e,t,r){return this._keyEncoding(t,r).encode(e)},i.prototype.encodeValue=function(e,t,r){return this._valueEncoding(t,r).encode(e)},i.prototype.decodeKey=function(e,t){return this._keyEncoding(t).decode(e)},i.prototype.decodeValue=function(e,t){return this._valueEncoding(t).decode(e)},i.prototype.encodeBatch=function(e,t){var r=this;return e.map((function(e){var n={type:e.type,key:r.encodeKey(e.key,t,e)};return r.keyAsBuffer(t,e)&&(n.keyEncoding="binary"),e.prefix&&(n.prefix=e.prefix),"value"in e&&(n.value=r.encodeValue(e.value,t,e),r.valueAsBuffer(t,e)&&(n.valueEncoding="binary")),n}))};var o=["lt","gt","lte","gte","start","end"];i.prototype.encodeLtgt=function(e){var t=this,r={};return Object.keys(e).forEach((function(n){r[n]=o.indexOf(n)>-1?t.encodeKey(e[n],e):e[n]})),r},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(r,n){return{key:t.decodeKey(r,e),value:t.decodeValue(n,e)}}:e.keys?function(r){return t.decodeKey(r,e)}:e.values?function(r,n){return t.decodeValue(n,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},964:(e,t,r)=>{var n=r(5068).lW;t.utf8=t["utf-8"]={encode:function(e){return o(e)?e:String(e)},decode:i,buffer:!1,type:"utf8"},t.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},t.binary={encode:function(e){return o(e)?e:n.from(e)},decode:i,buffer:!0,type:"binary"},t.none={encode:i,decode:i,buffer:!1,type:"id"},t.id=t.none;function i(e){return e}function o(e){return null==e||n.isBuffer(e)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach((function(e){t[e]={encode:function(t){return o(t)?t:n.from(t,e)},decode:function(t){return t.toString(e)},buffer:!0,type:e}}))},5068:(e,t,r)=>{"use strict";var n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=u,t.h2=50;var a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|y(e,t),n=s(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=function(e){if(u.isBuffer(e)){var t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||W(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return f(e),s(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(i)return n?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function _(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(W(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return q(D(t,e.length-r),e,r,n)}function E(e,t,r,n){return q(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function k(e,t,r,n){return q(N(t),e,r,n)}function S(e,t,r,n){return q(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return l(e)},u.allocUnsafeSlow=function(e){return l(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(F(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(F(o,Uint8Array))i+o.length>n.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=$[e[o]];return i}function R(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function B(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function I(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||I(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||I(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:u.from(e,n),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var C=/[^+/0-9A-Za-z-_]/g;function D(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}var $=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},6604:(e,t,r)=>{var n=r(7138).create,i=n("LevelUPError"),o=n("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,e.exports={LevelUPError:i,InitializationError:n("InitializationError",i),OpenError:n("OpenError",i),ReadError:n("ReadError",i),WriteError:n("WriteError",i),NotFoundError:o,EncodingError:n("EncodingError",i)}},3462:(e,t,r)=>{var n=r(5717),i=r(9212).Readable,o=r(7529);function a(e,t){if(!(this instanceof a))return new a(e,t);t=t||{},i.call(this,o(t,{objectMode:!0})),this._iterator=e,this._options=t,this.on("end",this.destroy.bind(this,null,null))}e.exports=a,n(a,i),a.prototype._read=function(){var e=this,t=this._options;this.destroyed||this._iterator.next((function(r,n,i){if(!e.destroyed)return r?e.destroy(r):void(void 0===n&&void 0===i?e.push(null):!1!==t.keys&&!1===t.values?e.push(n):!1===t.keys&&!1!==t.values?e.push(i):e.push({key:n,value:i}))}))},a.prototype._destroy=function(e,t){this._iterator.end((function(r){t(e||r)}))}},5387:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,a,s;if("string"==typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},8190:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(4152),o=r(5932);r(5717)(c,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||process.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},6845:(e,t,r)=>{"use strict";e.exports=i;var n=r(2871);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},4152:(e,t,r)=>{"use strict";var n;e.exports=S,S.ReadableState=k;r(7187).EventEmitter;var i=function(e,t){return e.listeners(t).length},o=r(2574),a=r(8764).Buffer,s=r.g.Uint8Array||function(){};var u,c=r(1367);u=c&&c.debuglog?c.debuglog("stream"):function(){};var f,l,h,p=r(5664),d=r(8931),y=r(7997).getHighWaterMark,g=r(5387).q,v=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,m=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(S,o);var w=d.errorOrDestroy,E=["error","close","destroy","pause","resume"];function k(e,t,i){n=n||r(8190),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(2553).s),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function S(e){if(n=n||r(8190),!(this instanceof S))return new S(e);var t=this instanceof n;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function O(e,t,r,n,i){u("readableAddChunk",t);var o,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,c);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(c,t)),o)w(e,o);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)c.endEmitted?w(e,new _):A(e,c,t,!0);else if(c.ended)w(e,new b);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?A(e,c,t,!1):R(e,c)):A(e,c,t,!1)}else n||(c.reading=!1,R(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&T(e)),R(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},S.prototype.unshift=function(e){return O(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){f||(f=r(2553).s);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var x=1073741824;function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function R(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function M(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){u("readable nexttick read 0"),e.read(0)}function L(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(N,t,e))}function N(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function q(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}S.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=j(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(e){w(this,new m("_read()"))},S.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?s:y;function a(t,i){u("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",d),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function s(){u("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var f=!1;function l(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==q(n.pipes,e))&&!f&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===i(e,"error")&&w(e,t)}function p(){e.removeListener("finish",d),y()}function d(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",d),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=q(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},S.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?T(this):n.reading||process.nextTick(I,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(M,this),r},S.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(M,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(L,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<E.length;o++)e.on(E[o],this.emit.bind(this,E[o]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(1913)),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=C,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===h&&(h=r(5117)),h(S,e,t)})},2871:(e,t,r)=>{"use strict";e.exports=f;var n=r(5387).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(8190);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(5717)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},5932:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=S,S.WritableState=k;var o={deprecate:r(4927)},a=r(2574),s=r(8764).Buffer,u=r.g.Uint8Array||function(){};var c,f=r(8931),l=r(7997).getHighWaterMark,h=r(5387).q,p=h.ERR_INVALID_ARG_TYPE,d=h.ERR_METHOD_NOT_IMPLEMENTED,y=h.ERR_MULTIPLE_CALLBACK,g=h.ERR_STREAM_CANNOT_PIPE,v=h.ERR_STREAM_DESTROYED,b=h.ERR_STREAM_NULL_VALUES,m=h.ERR_STREAM_WRITE_AFTER_END,_=h.ERR_UNKNOWN_ENCODING,w=f.errorOrDestroy;function E(){}function k(e,t,o){i=i||r(8190),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=l(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(P,e,t),e._writableState.errorEmitted=!0,w(e,n)):(i(n),e._writableState.errorEmitted=!0,w(e,n),P(e,t))}(e,r,n,t,i);else{var o=j(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?process.nextTick(A,e,r,o,i):A(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function S(e){var t=this instanceof(i=i||r(8190));if(!t&&!c.call(S,this))return new S(e);this._writableState=new k(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function O(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),P(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,O(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(O(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function j(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit("prefinish"),P(e,t)}))}function P(e,t){var r=j(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(T,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(S,a),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===S&&(e&&e._writableState instanceof k)}})):c=function(e){return e instanceof this},S.prototype.pipe=function(){w(this,new g)},S.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,s.isBuffer(n)||n instanceof u);return a&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new m;w(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new p("chunk",["string","Buffer"],r)),!i||(w(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=s.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=t.objectMode?1:n.length;t.length+=u;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,u,n,i,o);return c}(this,i,a,e,t,r)),o},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,r){r(new d("_write()"))},S.prototype._writev=null,S.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(e,t){t(e)}},1913:(e,t,r)=>{"use strict";var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(9103),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(p(r,!1)))}}function y(e){process.nextTick(d,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(p(void 0,!0)):t[l](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(p(i,!1));r=new Promise(this[l])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[a]=null,r[s]=null,e(p(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),e.on("readable",y.bind(null,r)),r}},5664:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=r(8764).Buffer,s=r(267).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,c;return t=e,r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&o(t.prototype,r),c&&o(t,c),e}()},8931:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},9103:(e,t,r)=>{"use strict";var n=r(5387).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){s=!1,c=!0,a||o.call(t)},l=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,l=!0,s||o.call(t)},p=function(e){o.call(t,e)},d=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},y=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",d),t.req?y():t.on("request",y)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",f),t.removeListener("abort",d),t.removeListener("request",y),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",d)}}},5117:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},1240:(e,t,r)=>{"use strict";var n;var i=r(5387).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=r(9103)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return t.reduce(f)}},7997:(e,t,r)=>{"use strict";var n=r(5387).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},2574:(e,t,r)=>{e.exports=r(7187).EventEmitter},9212:(e,t,r)=>{(t=e.exports=r(4152)).Stream=t,t.Readable=t,t.Writable=r(5932),t.Duplex=r(8190),t.Transform=r(2871),t.PassThrough=r(6845),t.finished=r(9103),t.pipeline=r(1240)},8133:(e,t,r)=>{var n=r(6604).WriteError,i=r(5160),o=r(2369).R,a=r(2369).F;function s(e){this.db=this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}s.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new n(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},s.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new n(e)}return this.ops.push({type:"del",key:e}),this.length++,this},s.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new n(e)}return this.ops=[],this.length=0,this},s.prototype.write=function(e,t){var r,s=this._levelup,u=this.ops;(t=o(e,t))||(r=(t=i()).promise),e=a(e);try{this.batch.write(e,(function(e){if(e)return t(new n(e));s.emit("batch",u),t()}))}catch(e){throw new n(e)}return r},e.exports=s},2369:(e,t)=>{t.R=function(e,t){return"function"==typeof e?e:t},t.F=function(e){return"object"==typeof e&&null!==e?e:{}}},4918:(e,t,r)=>{var n=r(7187).EventEmitter,i=r(9539).inherits,o=r(7529),a=r(6944),s=r(3462),u=r(8133),c=r(6604),f=r(1549),l=r(9282),h=r(5160),p=r(2369).R,d=r(2369).F,y=c.WriteError,g=c.ReadError,v=c.NotFoundError,b=c.OpenError,m=c.InitializationError;function _(e,t,r){if(!(this instanceof _))return new _(e,t,r);var i,o=this;if(n.call(this),this.setMaxListeners(1/0),"function"==typeof t&&(r=t,t={}),t=t||{},!e||"object"!=typeof e){if(i=new m("First argument must be an abstract-leveldown compliant store"),"function"==typeof r)return process.nextTick(r,i);throw i}l.strictEqual(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=d(t),this._db=e,this.db=new a(e),this.open(r||function(e){e&&o.emit("error",e)}),this.supports=f(this.db.supports,{status:!1,deferredOpen:!0,openCallback:!0,promises:!0,streams:!0}),Object.keys(this.supports.additionalMethods).forEach((function(e){null==this[e]&&(this[e]=function(){return this.db[e].apply(this.db,arguments)})}),this)}function w(e,t){if(!e._isOpening()&&!e.isOpen())return process.nextTick(t,new g("Database is not open")),!0}_.prototype.emit=n.prototype.emit,_.prototype.once=n.prototype.once,i(_,n),_.prototype.open=function(e,t){var r,n=this;return"function"==typeof e&&(t=e,e=null),t||(r=(t=h()).promise),e||(e=this.options),this.isOpen()?(process.nextTick(t,null,n),r):this._isOpening()?(this.once("open",(function(){t(null,n)})),r):(this.emit("opening"),this.db.open(e,(function(e){if(e)return t(new b(e));n.db=n._db,t(null,n),n.emit("open"),n.emit("ready")})),r)},_.prototype.close=function(e){var t,r=this;return e||(t=(e=h()).promise),this.isOpen()?(this.db.close((function(){r.emit("closed"),e.apply(null,arguments)})),this.emit("closing"),this.db=new a(this._db)):this.isClosed()?process.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",(function(){r.close(e)})),t},_.prototype.isOpen=function(){return"open"===this.db.status},_.prototype._isOpening=function(){return"opening"===this.db.status},_.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},_.prototype.get=function(e,t,r){var n;return(r=p(t,r))||(n=(r=h()).promise),w(this,r)||(t=d(t),this.db.get(e,t,(function(t,n){if(t)return t=/notfound/i.test(t)||t.notFound?new v("Key not found in database ["+e+"]",t):new g(t),r(t);r(null,n)}))),n},_.prototype.put=function(e,t,r,n){var i,o=this;return(n=p(r,n))||(i=(n=h()).promise),w(this,n)||(r=d(r),this.db.put(e,t,r,(function(r){if(r)return n(new y(r));o.emit("put",e,t),n()}))),i},_.prototype.del=function(e,t,r){var n,i=this;return(r=p(t,r))||(n=(r=h()).promise),w(this,r)||(t=d(t),this.db.del(e,t,(function(t){if(t)return r(new y(t));i.emit("del",e),r()}))),n},_.prototype.batch=function(e,t,r){if(!arguments.length)return new u(this);var n,i=this;return(r="function"==typeof e?e:p(t,r))||(n=(r=h()).promise),w(this,r)||(t=d(t),this.db.batch(e,t,(function(t){if(t)return r(new y(t));i.emit("batch",e),r()}))),n},_.prototype.iterator=function(e){return this.db.iterator(e)},_.prototype.clear=function(e,t){var r,n=this;return t=p(e,t),e=d(e),t||(r=(t=h()).promise),w(this,t)||this.db.clear(e,(function(r){if(r)return t(new y(r));n.emit("clear",e),t()})),r},_.prototype.readStream=_.prototype.createReadStream=function(e){return"number"!=typeof(e=o({keys:!0,values:!0},e)).limit&&(e.limit=-1),new s(this.db.iterator(e),e)},_.prototype.keyStream=_.prototype.createKeyStream=function(e){return this.createReadStream(o(e,{keys:!0,values:!1}))},_.prototype.valueStream=_.prototype.createValueStream=function(e){return this.createReadStream(o(e,{keys:!1,values:!0}))},_.prototype.toString=function(){return"LevelUP"},_.prototype.type="levelup",_.errors=c,e.exports=_.default=_},5160:e=>{e.exports=function(){var e,t=new Promise((function(t,r){e=function(e,n){e?r(e):t(n)}}));return e.promise=t,e}},1549:(e,t,r)=>{"use strict";var n=r(7529),i=r(9820);e.exports=function(){var e=n.apply(null,arguments);return i(e,{bufferKeys:e.bufferKeys||!1,snapshots:e.snapshots||!1,permanence:e.permanence||!1,seek:e.seek||!1,clear:e.clear||!1,status:e.status||!1,createIfMissing:e.createIfMissing||!1,errorIfExists:e.errorIfExists||!1,deferredOpen:e.deferredOpen||!1,openCallback:e.openCallback||!1,promises:e.promises||!1,streams:e.streams||!1,encodings:e.encodings||!1,additionalMethods:n(e.additionalMethods)})}},2303:(e,t)=>{function r(e){return void 0!==e&&""!==e}function n(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}t.compare=function(e,t){if(Buffer.isBuffer(e)){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){var i=e[n]-t[n];if(i)return i}return e.length-t.length}return e<t?-1:e>t?1:0};var o=t.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},a=t.lowerBound=function(e,t){var r=o(e);return r?e[r]:t},s=t.lowerBoundInclusive=function(e){return!n(e,"gt")},u=t.upperBoundInclusive=function(e){return!n(e,"lt")},c=t.lowerBoundExclusive=function(e){return!s(e)},f=t.upperBoundExclusive=function(e){return!u(e)},l=t.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},h=t.upperBound=function(e,t){var r=l(e);return r?e[r]:t};function p(e){return e}t.start=function(e,t){return e.reverse?h(e,t):a(e,t)},t.end=function(e,t){return e.reverse?a(e,t):h(e,t)},t.startInclusive=function(e){return e.reverse?u(e):s(e)},t.endInclusive=function(e){return e.reverse?s(e):u(e)},t.toLtgt=function(e,r,i,o,a){r=r||{},i=i||p;var s=arguments.length>3,u=t.lowerBoundKey(e),c=t.upperBoundKey(e);return u?"gt"===u?r.gt=i(e.gt,!1):r.gte=i(e[u],!1):s&&(r.gte=i(o,!1)),c?"lt"===c?r.lt=i(e.lt,!0):r.lte=i(e[c],!0):s&&(r.lte=i(a,!0)),null!=e.reverse&&(r.reverse=!!e.reverse),n(r,"max")&&delete r.max,n(r,"min")&&delete r.min,n(r,"start")&&delete r.start,n(r,"end")&&delete r.end,r},t.contains=function(e,n,i){i=i||t.compare;var o=a(e);if(r(o)&&((s=i(n,o))<0||0===s&&c(e)))return!1;var s,u=h(e);if(r(u)&&((s=i(n,u))>0||0===s&&f(e)))return!1;return!0},t.filter=function(e,r){return function(n){return t.contains(e,n,r)}}},4244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},609:(e,t,r)=>{"use strict";var n=r(4289),i=r(5559),o=r(4244),a=r(5624),s=r(2281),u=i(a(),Object);n(u,{getPolyfill:a,implementation:o,shim:s}),e.exports=u},5624:(e,t,r)=>{"use strict";var n=r(4244);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:(e,t,r)=>{"use strict";var n=r(5624),i=r(4289);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(1414),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{l(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=c&&r;if(s&&e.length>0&&!i.call(e,0))for(var y=0;y<e.length;++y)h.push(String(y));if(n&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var v in e)d&&"prototype"===v||!i.call(e,v)||h.push(String(v));if(u)for(var b=function(e){if("undefined"==typeof window||!p)return l(e);try{return l(e)}catch(e){return!1}}(e),m=0;m<f.length;++m)b&&"constructor"===f[m]||!i.call(e,f[m])||h.push(f[m]);return h}}e.exports=n},2215:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,a=o?function(e){return o(e)}:r(8987),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},1528:function(e,t){var r,n,i;!function(o,a){"use strict";"object"==typeof e.exports?e.exports=a():(n=[],void 0===(i="function"==typeof(r=a)?r.apply(t,n):r)||(e.exports=i))}(0,(function(){"use strict";var e=Object.prototype.toString;function t(e,t){return null!=e&&Object.prototype.hasOwnProperty.call(e,t)}function r(e){if(!e)return!0;if(i(e)&&0===e.length)return!0;if("string"!=typeof e){for(var r in e)if(t(e,r))return!1;return!0}return!1}function n(t){return e.call(t)}var i=Array.isArray||function(t){return"[object Array]"===e.call(t)};function o(e){var t=parseInt(e);return t.toString()===e?t:e}function a(e){var a,s,u=function(e){return Object.keys(u).reduce((function(t,r){return"create"===r||"function"==typeof u[r]&&(t[r]=u[r].bind(u,e)),t}),{})};function c(e,t){if(a(e,t))return e[t]}function f(e,t,r,n){if("number"==typeof t&&(t=[t]),!t||0===t.length)return e;if("string"==typeof t)return f(e,t.split(".").map(o),r,n);var i=t[0],a=s(e,i);return 1===t.length?(void 0!==a&&n||(e[i]=r),a):(void 0===a&&("number"==typeof t[1]?e[i]=[]:e[i]={}),f(e[i],t.slice(1),r,n))}return a=(e=e||{}).includeInheritedProps?function(){return!0}:function(e,r){return"number"==typeof r&&Array.isArray(e)||t(e,r)},s=e.includeInheritedProps?function(e,t){"string"!=typeof t&&"number"!=typeof t&&(t=String(t));var r=c(e,t);if("__proto__"===t||"prototype"===t||"constructor"===t&&"function"==typeof r)throw new Error("For security reasons, object's magic properties cannot be set");return r}:function(e,t){return c(e,t)},u.has=function(r,n){if("number"==typeof n?n=[n]:"string"==typeof n&&(n=n.split(".")),!n||0===n.length)return!!r;for(var a=0;a<n.length;a++){var s=o(n[a]);if(!("number"==typeof s&&i(r)&&s<r.length||(e.includeInheritedProps?s in Object(r):t(r,s))))return!1;r=r[s]}return!0},u.ensureExists=function(e,t,r){return f(e,t,r,!0)},u.set=function(e,t,r,n){return f(e,t,r,n)},u.insert=function(e,t,r,n){var o=u.get(e,t);n=~~n,i(o)||(o=[],u.set(e,t,o)),o.splice(n,0,r)},u.empty=function(e,t){var o,s;if(!r(t)&&(null!=e&&(o=u.get(e,t)))){if("string"==typeof o)return u.set(e,t,"");if(function(e){return"boolean"==typeof e||"[object Boolean]"===n(e)}(o))return u.set(e,t,!1);if("number"==typeof o)return u.set(e,t,0);if(i(o))o.length=0;else{if(!function(e){return"object"==typeof e&&"[object Object]"===n(e)}(o))return u.set(e,t,null);for(s in o)a(o,s)&&delete o[s]}}},u.push=function(e,t){var r=u.get(e,t);i(r)||(r=[],u.set(e,t,r)),r.push.apply(r,Array.prototype.slice.call(arguments,2))},u.coalesce=function(e,t,r){for(var n,i=0,o=t.length;i<o;i++)if(void 0!==(n=u.get(e,t[i])))return n;return r},u.get=function(e,t,r){if("number"==typeof t&&(t=[t]),!t||0===t.length)return e;if(null==e)return r;if("string"==typeof t)return u.get(e,t.split("."),r);var n=o(t[0]),i=s(e,n);return void 0===i?r:1===t.length?i:u.get(e[n],t.slice(1),r)},u.del=function(e,t){if("number"==typeof t&&(t=[t]),null==e)return e;if(r(t))return e;if("string"==typeof t)return u.del(e,t.split("."));var n=o(t[0]);return s(e,n),a(e,n)?1!==t.length?u.del(e[n],t.slice(1)):(i(e)?e.splice(n,1):delete e[n],e):e},u}var s=a();return s.create=a,s.withInheritedProps=a({includeInheritedProps:!0}),s}))},2109:e=>{var t=Object.prototype.toString,r="function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;e.exports=function(e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return o=e,"ArrayBuffer"===t.call(o).slice(8,-1)?function(e,t,n){t>>>=0;var i=e.byteLength-t;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=i;else if((n>>>=0)>i)throw new RangeError("'length' is out of bounds");return r?Buffer.from(e.slice(t,t+n)):new Buffer(new Uint8Array(e.slice(t,t+n)))}(e,n,i):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return r?Buffer.from(e,t):new Buffer(e,t)}(e,n):r?Buffer.from(e):new Buffer(e);var o}},5620:(e,t,r)=>{var n=r(8473).Transform,i=r(5717);function o(e){n.call(this,e),this._destroyed=!1}function a(e,t,r){r(null,e)}function s(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=a),"function"!=typeof n&&(n=null),e(t,r,n)}}i(o,n),o.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick((function(){e&&t.emit("error",e),t.emit("close")}))}},e.exports=s((function(e,t,r){var n=new o(e);return n._transform=t,r&&(n._flush=r),n})),e.exports.ctor=s((function(e,t,r){function n(t){if(!(this instanceof n))return new n(t);this.options=Object.assign({},e,t),o.call(this,this.options)}return i(n,o),n.prototype._transform=t,r&&(n.prototype._flush=r),n})),e.exports.obj=s((function(e,t,r){var n=new o(Object.assign({objectMode:!0,highWaterMark:16},e));return n._transform=t,r&&(n._flush=r),n}))},9253:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ae});var n=r(3132),i=r(4918),o=r.n(i),a=r(2303),s=r(7187),u=r.n(s),c=r(4124),f=r.n(c),l=r(8470),h=r.n(l),p=r(5717),d=r.n(p);function y(e){return"function"==typeof e.prefix?e.prefix():e}function g(){Error.call(this)}d()(g,Error),g.prototype.name="NotFoundError";var v=u().EventEmitter,b=new g,m=function(e,t,r,n){var i=new v;function o(e){var t,r={};if(n)for(t in n)void 0!==n[t]&&(r[t]=n[t]);if(e)for(t in e)void 0!==e[t]&&(r[t]=e[t]);return r}return i.sublevels={},i.options=n,i.version="6.5.4",i.methods={},t=t||[],i.put=function(r,n,a,s){"function"==typeof a&&(s=a,a={}),e.apply([{key:r,value:n,prefix:t.slice(),type:"put"}],o(a),(function(e){if(e)return s(e);i.emit("put",r,n),s(null)}))},i.prefix=function(){return t.slice()},i.batch=function(r,n,a){"function"==typeof n&&(a=n,n={}),r=r.map((function(e){return{key:e.key,value:e.value,prefix:e.prefix||t,keyEncoding:e.keyEncoding,valueEncoding:e.valueEncoding,type:e.type}})),e.apply(r,o(n),(function(e){if(e)return a(e);i.emit("batch",r),a(null)}))},i.get=function(r,n,i){"function"==typeof n&&(i=n,n={}),e.get(r,t,o(n),(function(e,t){e?i(b):i(null,t)}))},i.sublevel=function(n,a){return i.sublevels[n]=i.sublevels[n]||m(e,t.concat(n),r,o(a))},i.readStream=i.createReadStream=function(n){var i;(n=o(n)).prefix=t;var a=e.iterator(n);return(i=r(n,e.createDecoder(n))).setIterator(a),i},i.close=function(t){e.close(t)},i.isOpen=e.isOpen,i.isClosed=e.isClosed,i},_=h().Readable;function w(e,t){if(!(this instanceof w))return new w(e,t);_.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this._waiting=!1,this._options=e,this._makeData=t}d()(w,_),w.prototype.setIterator=function(e){return this._iterator=e,this._destroyed?e.end((function(){})):this._waiting?(this._waiting=!1,this._read()):this},w.prototype._read=function(){var e=this;if(!e._destroyed)return e._iterator?void e._iterator.next((function(t,r,n){if(t||void 0===r&&void 0===n)return t||e._destroyed||e.push(null),e._cleanup(t);n=e._makeData(r,n),e._destroyed||e.push(n)})):this._waiting=!0},w.prototype._cleanup=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;e&&"iterator has ended"!==e.message&&t.emit("error",e),t._iterator?t._iterator.end((function(){t._iterator=null,t.emit("close")})):t.emit("close")}},w.prototype.destroy=function(){this._cleanup()};var E={encode:function(e){return"ÿ"+e[0]+"ÿ"+e[1]},decode:function(e){var t=e.toString(),r=t.indexOf("ÿ",1);return[t.substring(1,r),t.substring(r+1)]},lowerBound:"\0",upperBound:"ÿ"},k=new(f());const S=function(e){return m(function(e,t,r){function n(e,n,i,o){return t.encode([e,r.encodeKey(n,i,o)])}function i(e,t){return t&&t.options&&(e.keyEncoding=e.keyEncoding||t.options.keyEncoding,e.valueEncoding=e.valueEncoding||t.options.valueEncoding),e}return e.open((function(){})),{apply:function(t,o,a){o=o||{};for(var s=[],u=-1,c=t.length;++u<c;){var f=t[u];i(f,f.prefix),f.prefix=y(f.prefix),s.push({key:n(f.prefix,f.key,o,f),value:"del"!==f.type&&r.encodeValue(f.value,o,f),type:f.type})}e.db.batch(s,o,a)},get:function(t,i,o,a){return o.asBuffer=r.valueAsBuffer(o),e.db.get(n(i,t,o),o,(function(e,t){e?a(e):a(null,r.decodeValue(t,o))}))},createDecoder:function(e){return function(n,i){return{key:r.decodeKey(t.decode(n)[1],e),value:r.decodeValue(i,e)}}},isClosed:function(){return e.isClosed()},close:function(t){return e.close(t)},iterator:function(i){var o,s=function(e){var t={};for(var r in e)t[r]=e[r];return t}(i||{}),u=i.prefix||[];return a.toLtgt(i,s,(function(e){return n(u,e,s,{})}),t.lowerBound,t.upperBound),s.prefix=null,s.keyAsBuffer=s.valueAsBuffer=!1,"number"!=typeof s.limit&&(s.limit=-1),s.keyAsBuffer=t.buffer,s.valueAsBuffer=r.valueAsBuffer(s),o=e.db.iterator(s),{next:function(e){return o.next(e)},end:function(e){o.end(e)}}}}}(e,E,k),[],w,e.options)};var O=r(5620),A=r(7105),x=r.n(A),j=r(7237),T=r.n(j),P=r(2109),R=r.n(P),B=r(7239),M=r(2694),I=r(2733),L=r(8621);function U(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}var C=U(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),D=U(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function N(e){if(!/^\d+-/.test(e))return(0,I.Tr)(I.Dq);var t=e.indexOf("-"),r=e.substring(0,t),n=e.substring(t+1);return{prefix:parseInt(r,10),id:n}}function q(e,t,r){var i,o,a;r||(r={deterministic_revs:!0});var s={status:"available"};if(e._deleted&&(s.deleted=!0),t)if(e._id||(e._id=(0,n.Vj)()),o=(0,n.OD)(e,r.deterministic_revs),e._rev){if((a=N(e._rev)).error)return a;e._rev_tree=[{pos:a.prefix,ids:[a.id,{status:"missing"},[[o,s,[]]]]}],i=a.prefix+1}else e._rev_tree=[{pos:1,ids:[o,s,[]]}],i=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var r=e.start-e.ids.length+1,n=e.ids,i=[n[0],t,[]],o=1,a=n.length;o<a;o++)i=[n[o],{status:"missing"},[i]];return[{pos:r,ids:i}]}(e._revisions,s),i=e._revisions.start,o=e._revisions.ids[0]),!e._rev_tree){if((a=N(e._rev)).error)return a;i=a.prefix,o=a.id,e._rev_tree=[{pos:i,ids:[o,s,[]]}]}(0,n.GE)(e._id),e._rev=i+"-"+o;var u={metadata:{},data:{}};for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c)){var f="_"===c[0];if(f&&!C[c]){var l=(0,I.Tr)(I.cI,c);throw l.message=I.cI.message+": "+c,l}f&&!D[c]?u.metadata[c.slice(1)]=e[c]:u.data[c]=e[c]}return u}function F(e,t,r,n,i,o,a,s,u){e=e||1e3;var c=s.new_edits,f=new M.D,l=0,h=t.length;function p(){++l===h&&u&&u()}t.forEach((function(e,t){if(e._id&&(0,L.zB)(e._id)){var n=e._deleted?"_removeLocal":"_putLocal";r[n](e,{ctx:i},(function(e,r){o[t]=e||r,p()}))}else{var a=e.metadata.id;f.has(a)?(h--,f.get(a).push([e,t])):f.set(a,[[e,t]])}})),f.forEach((function(t,r){var i=0;function u(){++i<t.length?f():p()}function f(){var f=t[i],l=f[0],h=f[1];if(n.has(r))!function(e,t,r,n,i,o,a,s){if((0,L.FS)(t.rev_tree,r.metadata.rev)&&!s)return n[i]=r,o();var u=t.winningRev||(0,L.S)(t),c="deleted"in t?t.deleted:(0,L.uY)(t,u),f="deleted"in r.metadata?r.metadata.deleted:(0,L.uY)(r.metadata),l=/^1-/.test(r.metadata.rev);if(c&&!f&&s&&l){var h=r.data;h._rev=u,h._id=r.metadata.id,r=q(h,s)}var p=(0,L.TS)(t.rev_tree,r.metadata.rev_tree[0],e);if(s&&(c&&f&&"new_leaf"!==p.conflicts||!c&&"new_leaf"!==p.conflicts||c&&!f&&"new_branch"===p.conflicts)){var d=(0,I.Tr)(I.gW);return n[i]=d,o()}var y=r.metadata.rev;r.metadata.rev_tree=p.tree,r.stemmedRevs=p.stemmedRevs||[],t.rev_map&&(r.metadata.rev_map=t.rev_map);var g=(0,L.S)(r.metadata),v=(0,L.uY)(r.metadata,g),b=c===v?0:c<v?-1:1;a(r,g,v,y===g?v:(0,L.uY)(r.metadata,y),!0,b,i,o)}(e,n.get(r),l,o,h,u,a,c);else{var p=(0,L.TS)([],l.metadata.rev_tree[0],e);l.metadata.rev_tree=p.tree,l.stemmedRevs=p.stemmedRevs||[],function(e,t,r){var n=(0,L.S)(e.metadata),i=(0,L.uY)(e.metadata,n);if("was_delete"in s&&i)return o[t]=(0,I.Tr)(I.Uc,"deleted"),r();var u=c&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e);if(u){var f=(0,I.Tr)(I.gW);return o[t]=f,r()}a(e,n,i,i,!1,i?0:1,t,r)}(l,h,u)}}f()}))}var W=r(3684);var $=r(807);function z(e,t){var r=new Uint8Array(e);return(0,$.Ik)([r],{type:t})}function V(e,t){var r=t.prefix()[0],n=e._cache,i=n.get(r);return i||(i=new M.D,n.set(r,i)),i}function K(){this._batch=[],this._cache=new M.D}K.prototype.get=function(e,t,r){var i=V(this,e),o=i.get(t);return o?(0,n.Y3)((function(){r(null,o)})):null===o?(0,n.Y3)((function(){r({name:"NotFoundError"})})):void e.get(t,(function(e,n){if(e)return"NotFoundError"===e.name&&i.set(t,null),r(e);i.set(t,n),r(null,n)}))},K.prototype.batch=function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],i=V(this,n.prefix);"put"===n.type?i.set(n.key,n.value):i.set(n.key,null)}this._batch=this._batch.concat(e)},K.prototype.execute=function(e,t){for(var r=new M.l,n=[],i=this._batch.length-1;i>=0;i--){var o=this._batch[i],a=o.prefix.prefix()[0]+"ÿ"+o.key;r.has(a)||(r.add(a),n.push(o))}e.batch(n,t)};var H=new M.D,G="_local_last_update_seq",Y="_local_doc_count",J="_local_uuid",Q={encode:function(e){try{return JSON.stringify(e)}catch(t){return W.stringify(e)}},decode:function(e){try{return JSON.parse(e)}catch(t){return W.parse(e)}},buffer:!1,type:"cheap-json"},X=new n.b6;function Z(e){return"winningRev"in e?e.winningRev:(0,L.S)(e)}function ee(e,t){return"deleted"in e?e.deleted:(0,L.uY)(e,t)}function te(e,t,r){var n=[];return e.forEach((function(e){e.doc&&e.doc._attachments&&Object.keys(e.doc._attachments).forEach((function(t){var r=e.doc._attachments[t];"data"in r||n.push(r)}))})),Promise.all(n.map((function(e){return function(e,t,r){var n=e.content_type;return new Promise((function(i,o){t.binaryStore.get(e.digest,(function(t,a){var s;if(t){if("NotFoundError"!==t.name)return o(t);s=r.binary?(0,$.sG)("",n):""}else s=r.binary?z(a,n):a.toString("base64");delete e.stub,delete e.length,e.data=s,i()}))}))}(e,t,r)})))}const re=function(e,t){e=(0,n.d9)(e);var r,i,a=this,s={},u=e.revs_limit,c=e.name;void 0===e.createIfMissing&&(e.createIfMissing=!0);var f,l=e.db,h=(0,n.QL)(l);function p(){s.docStore=i.sublevel("document-store",{valueEncoding:Q}),s.bySeqStore=i.sublevel("by-sequence",{valueEncoding:"json"}),s.attachmentStore=i.sublevel("attach-store",{valueEncoding:"json"}),s.binaryStore=i.sublevel("attach-binary-store",{valueEncoding:"binary"}),s.localStore=i.sublevel("local-store",{valueEncoding:"json"}),s.metaStore=i.sublevel("meta-store",{valueEncoding:"json"}),"object"==typeof e.migrate?e.migrate.doMigrationTwo(i,s,d):d()}function d(){s.metaStore.get(G,(function(e,o){void 0===i._updateSeq&&(i._updateSeq=o||0),s.metaStore.get(Y,(function(e,o){i._docCount=e?0:o,s.metaStore.get(J,(function(e,i){r=e?(0,n.Vj)():i,s.metaStore.put(J,r,(function(){(0,n.Y3)((function(){t(null,a)}))}))}))}))}))}function y(e,t){try{e.apply(null,t)}catch(e){t[t.length-1](e)}}function g(){var e=i._queue.peekFront();"read"===e.type?function(e){var t=[e],r=1,o=i._queue.get(r);for(;void 0!==o&&"read"===o.type;)t.push(o),r++,o=i._queue.get(r);var a=0;t.forEach((function(e){var r=e.args,o=r[r.length-1];r[r.length-1]=x()((function(e){o.apply(null,e),++a===t.length&&(0,n.Y3)((function(){t.forEach((function(){i._queue.shift()})),i._queue.length&&g()}))})),y(e.fun,r)}))}(e):function(e){var t=e.args,r=t[t.length-1];t[t.length-1]=x()((function(e){r.apply(null,e),(0,n.Y3)((function(){i._queue.shift(),i._queue.length&&g()}))})),y(e.fun,t)}(e)}function v(e){return x()((function(t){i._queue.push({fun:e,args:t,type:"write"}),1===i._queue.length&&(0,n.Y3)(g)}))}function b(e){return x()((function(t){i._queue.push({fun:e,args:t,type:"read"}),1===i._queue.length&&(0,n.Y3)(g)}))}function m(e){return("0000000000000000"+e).slice(-16)}function _(e,t){"destroy"in l?l.destroy(e,t):t(null)}H.has(h)?f=H.get(h):(f=new M.D,H.set(h,f)),f.has(c)?(i=f.get(c),p()):f.set(c,S(o()(l(c),e,(function(r){if(r)return f.delete(c),t(r);(i=f.get(c))._docCount=-1,i._queue=new(T()),"object"==typeof e.migrate?e.migrate.doMigrationOne(c,i,p):p()})))),a._remote=!1,a.type=function(){return"leveldb"},a._id=function(e){e(null,r)},a._info=function(e){var t={doc_count:i._docCount,update_seq:i._updateSeq,backend_adapter:(0,n.QL)(l)};return(0,n.Y3)((function(){e(null,t)}))},a._get=b((function(e,t,r){t=(0,n.d9)(t),s.docStore.get(e,(function(e,n){if(e||!n)return r((0,I.Tr)(I.Uc,"missing"));var i;if(t.rev)i=t.latest?(0,L.pA)(t.rev,n):t.rev;else if(i=Z(n),ee(n,i))return r((0,I.Tr)(I.Uc,"deleted"));var o=n.rev_map[i];s.bySeqStore.get(m(o),(function(e,t){if(!t)return r((0,I.Tr)(I.Uc));if("_id"in t&&t._id!==n.id)return r(new Error("wrong doc returned"));if(t._id=n.id,"_rev"in t){if(t._rev!==i)return r(new Error("wrong doc returned"))}else t._rev=i;return r(null,{doc:t,metadata:n})}))}))})),a._getAttachment=function(e,t,r,n,i){var o=r.digest,a=r.content_type;s.binaryStore.get(o,(function(e,t){if(e)return"NotFoundError"!==e.name?i(e):i(null,n.binary?function(e){return(0,$.Ik)([""],{type:e})}(a):"");n.binary?i(null,z(t,a)):i(null,t.toString("base64"))}))},a._bulkDocs=v((function(e,t,r){var o=t.new_edits,f=new Array(e.docs.length),l=new M.D,h=new M.D,p=new K,d=0,y=i._updateSeq,g=e.docs,v=g.map((function(e){if(e._id&&(0,L.zB)(e._id))return e;var t=q(e,o,a.__opts);return t.metadata&&!t.metadata.rev_map&&(t.metadata.rev_map={}),t})),b=v.filter((function(e){return e.error}));if(b.length)return r(b[0]);function _(e,t){var r=Promise.resolve();e.forEach((function(e,t){r=r.then((function(){return new Promise((function(r,n){a._doCompactionNoLock(t,e,{ctx:p},(function(e){if(e)return n(e);r()}))}))}))})),r.then((function(){t()}),t)}function w(){_(h,(function(e){if(e&&O(e),a.auto_compaction)return function(e){var t=new M.D;l.forEach((function(e,r){t.set(r,(0,L.UB)(e))})),_(t,e)}(O);O()}))}function E(e,t,n,i,o,a,u,c){d+=a;var g=null,v=0;e.metadata.winningRev=t,e.metadata.deleted=n,e.data._id=e.metadata.id,e.data._rev=e.metadata.rev,i&&(e.data._deleted=!0),e.stemmedRevs.length&&h.set(e.metadata.id,e.stemmedRevs);var b,_,w=e.data._attachments?Object.keys(e.data._attachments):[];function E(e){v++,g||(e?c(g=e):v===w.length&&P())}function k(e,t,r,n){return function(i){!function(e,t,r,n,i){var o=e.data._attachments[r];delete o.data,o.digest=t,o.length=n.length;var a=e.metadata.id,u=e.metadata.rev;o.revpos=parseInt(u,10),S(a,u,t,(function(e,r){return e||0===n.length?i(e):r?(p.batch([{type:"put",prefix:s.binaryStore,key:t,value:R()(n,"binary")}]),void i()):i(e)}))}(e,"md5-"+i,t,r,n)}}function O(e,t,r){return function(n){(0,B.u)(n,k(e,t,n,r))}}for(var A=0;A<w.length;A++){var x,j=w[A],T=e.data._attachments[j];if(T.stub)S(e.data._id,e.data._rev,T.digest,E);else if("string"==typeof T.data){try{x=(0,$.ty)(T.data)}catch(e){return void r((0,I.Tr)(I.eC,"Attachment is not a valid base64 string"))}O(e,j,E)(x)}else b=T.data,_=O(e,j,E),(0,$.fM)(b,_)}function P(){var t=e.metadata.rev_map[e.metadata.rev];if(t)return c();t=++y,e.metadata.rev_map[e.metadata.rev]=e.metadata.seq=t;var r=[{key:m(t),value:e.data,prefix:s.bySeqStore,type:"put"},{key:e.metadata.id,value:e.metadata,prefix:s.docStore,type:"put"}];p.batch(r),f[u]={ok:!0,id:e.metadata.id,rev:e.metadata.rev},l.set(e.metadata.id,e.metadata),c()}w.length||P()}var k={};function S(e,t,r,n){function i(n){var i=[e,t].join("@"),o={};return n?n.refs&&(o.refs=n.refs,o.refs[i]=!0):(o.refs={},o.refs[i]=!0),new Promise((function(e){p.batch([{type:"put",prefix:s.attachmentStore,key:r,value:o}]),e(!n)}))}var o=k[r]||Promise.resolve();k[r]=o.then((function(){return new Promise((function(e,t){p.get(s.attachmentStore,r,(function(r,n){if(r&&"NotFoundError"!==r.name)return t(r);e(n)}))})).then(i).then((function(e){n(null,e)}),n)}))}function O(e){if(e)return(0,n.Y3)((function(){r(e)}));p.batch([{prefix:s.metaStore,type:"put",key:G,value:y},{prefix:s.metaStore,type:"put",key:Y,value:i._docCount+d}]),p.execute(i,(function(e){if(e)return r(e);i._docCount+=d,i._updateSeq=y,X.notify(c),(0,n.Y3)((function(){r(null,f)}))}))}if(!v.length)return r(null,[]);!function(e){var t=[];if(g.forEach((function(e){e&&e._attachments&&Object.keys(e._attachments).forEach((function(r){var n=e._attachments[r];n.stub&&t.push(n.digest)}))})),!t.length)return e();var r,n=0;t.forEach((function(i){!function(e,t){p.get(s.attachmentStore,e,(function(r){if(r){var n=(0,I.Tr)(I.wp,"unknown stub attachment with digest "+e);t(n)}else t()}))}(i,(function(i){i&&!r&&(r=i),++n===t.length&&e(r)}))}))}((function(e){if(e)return r(e);!function(e){var t,r=0;function n(){if(++r===g.length)return e(t)}g.forEach((function(e){if(e._id&&(0,L.zB)(e._id))return n();p.get(s.docStore,e._id,(function(r,i){r?"NotFoundError"!==r.name&&(t=r):l.set(e._id,i),n()}))}))}((function(e){if(e)return r(e);F(u,v,a,l,p,f,E,t,w)}))}))})),a._allDocs=function(e,t){return"keys"in e?function(e,t){var r=t.keys,i={offset:t.skip};return Promise.all(r.map((function(r){var o=(0,n.f0)({key:r,deleted:"ok"},t);return["limit","skip","keys"].forEach((function(e){delete o[e]})),new Promise((function(n,a){e._allDocs(o,(function(e,o){if(e)return a(e);t.update_seq&&void 0!==o.update_seq&&(i.update_seq=o.update_seq),i.total_rows=o.total_rows,n(o.rows[0]||{key:r,error:"not_found"})}))}))}))).then((function(e){return i.rows=e,i}))}(this,e):b((function(e,t){e=(0,n.d9)(e),function(e){i.isClosed()?e(new Error("database is closed")):e(null,i._docCount)}((function(r,n){if(r)return t(r);var o,a={},u=e.skip||0;if(e.startkey&&(a.gte=e.startkey),e.endkey&&(a.lte=e.endkey),e.key&&(a.gte=a.lte=e.key),e.descending){a.reverse=!0;var c=a.lte;a.lte=a.gte,a.gte=c}if("number"==typeof e.limit&&(o=e.limit),0===o||"gte"in a&&"lte"in a&&a.gte>a.lte){var f={total_rows:n,offset:e.skip,rows:[]};return e.update_seq&&(f.update_seq=i._updateSeq),t(null,f)}var l=[],h=s.docStore.readStream(a),p=(0,O.obj)((function(t,r,n){var i=t.value,a=Z(i),c=ee(i,a);if(c){if("ok"!==e.deleted)return void n()}else{if(u-- >0)return void n();if("number"==typeof o&&o--<=0)return h.unpipe(),h.destroy(),void n()}function f(t){var r={id:i.id,key:i.id,value:{rev:a}};if(e.include_docs){if(r.doc=t,r.doc._rev=r.value.rev,e.conflicts){var o=(0,L.DJ)(i);o.length&&(r.doc._conflicts=o)}for(var s in r.doc._attachments)r.doc._attachments.hasOwnProperty(s)&&(r.doc._attachments[s].stub=!0)}if(!1===e.inclusive_end&&i.id===e.endkey)return n();if(c){if("ok"!==e.deleted)return n();r.value.deleted=!0,r.doc=null}l.push(r),n()}if(e.include_docs){var p=i.rev_map[a];s.bySeqStore.get(m(p),(function(e,t){f(t)}))}else f()}),(function(r){Promise.resolve().then((function(){if(e.include_docs&&e.attachments)return te(l,s,e)})).then((function(){var r={total_rows:n,offset:e.skip,rows:l};e.update_seq&&(r.update_seq=i._updateSeq),t(null,r)}),t),r()})).on("unpipe",(function(){p.end()}));h.on("error",t),h.pipe(p)}))}))(e,t)},a._changes=function(e){if((e=(0,n.d9)(e)).continuous){var t=c+":"+(0,n.Vj)();return X.addListener(c,t,a,e),X.notify(c),{cancel:function(){X.removeListener(c,t)}}}var r,o=e.descending,u=[],f=e.since||0,l=0,h={reverse:o};"limit"in e&&e.limit>0&&(r=e.limit),h.reverse||(h.start=m(e.since||0));var p=e.doc_ids&&new M.l(e.doc_ids),d=(0,n.sP)(e),y=new M.D;function g(){e.done=!0,e.return_docs&&e.limit&&e.limit<u.length&&(u.length=e.limit),v.unpipe(b),v.destroy(),e.continuous||e.cancelled||(e.include_docs&&e.attachments&&e.return_docs?te(u,s,e).then((function(){e.complete(null,{results:u,last_seq:f})})):e.complete(null,{results:u,last_seq:f}))}var v=s.bySeqStore.readStream(h),b=(0,O.obj)((function(t,n,a){if(r&&l>=r)return g(),a();if(e.cancelled||e.done)return a();var c,h,v=(c=t.key,parseInt(c,10)),b=t.value;if(v===e.since&&!o)return a();if(p&&!p.has(b._id))return a();function _(t){var r=Z(t);function n(r){var n=e.processChange(r,t,e);n.seq=t.seq;var i=d(n);if("object"==typeof i)return e.complete(i);i&&(l++,e.attachments&&e.include_docs?te([n],s,e).then((function(){e.onChange(n)})):e.onChange(n),e.return_docs&&u.push(n)),a()}if(t.seq!==v)return a();if(f=v,r===b._rev)return n(b);var i=t.rev_map[r];s.bySeqStore.get(m(i),(function(e,t){n(t)}))}if(h=y.get(b._id))return _(h);s.docStore.get(b._id,(function(t,r){if(e.cancelled||e.done||i.isClosed()||(0,L.zB)(r.id))return a();y.set(b._id,r),_(r)}))}),(function(t){if(e.cancelled)return t();e.return_docs&&e.limit&&e.limit<u.length&&(u.length=e.limit),t()})).on("unpipe",(function(){b.end(),g()}));return v.pipe(b),{cancel:function(){e.cancelled=!0,g()}}},a._close=function(e){if(i.isClosed())return e((0,I.Tr)(I.Mq));i.close((function(t){t?e(t):(f.delete(c),e())}))},a._getRevisionTree=function(e,t){s.docStore.get(e,(function(e,r){e?t((0,I.Tr)(I.Uc)):t(null,r.rev_tree)}))},a._doCompaction=v((function(e,t,r,n){a._doCompactionNoLock(e,t,r,n)})),a._doCompactionNoLock=function(e,t,r,n){if("function"==typeof r&&(n=r,r={}),!t.length)return n();var o=r.ctx||new K;o.get(s.docStore,e,(function(a,u){if(a)return n(a);var c=t.map((function(e){var t=u.rev_map[e];return delete u.rev_map[e],t}));(0,L.fE)(u.rev_tree,(function(e,r,n,i,o){var a=r+"-"+n;-1!==t.indexOf(a)&&(o.status="missing")}));var f=[];f.push({key:u.id,value:u,type:"put",prefix:s.docStore});var l,h={},p=0;function d(r){if(r&&(l=r),++p===t.length){if(l)return n(l);!function(){var r=Object.keys(h);if(!r.length)return y();var n,i=0;function a(e){e&&(n=e),++i===r.length&&y(n)}var u=new M.D;t.forEach((function(t){u.set(e+"@"+t,!0)})),r.forEach((function(e){o.get(s.attachmentStore,e,(function(t,r){if(t)return"NotFoundError"===t.name?a():a(t);var n=Object.keys(r.refs||{}).filter((function(e){return!u.has(e)})),i={};n.forEach((function(e){i[e]=!0})),n.length?f.push({key:e,type:"put",value:{refs:i},prefix:s.attachmentStore}):f=f.concat([{key:e,type:"del",prefix:s.attachmentStore},{key:e,type:"del",prefix:s.binaryStore}]),a()}))}))}()}}function y(e){return e?n(e):(o.batch(f),r.ctx?n():void o.execute(i,n))}c.forEach((function(e){f.push({key:m(e),type:"del",prefix:s.bySeqStore}),o.get(s.bySeqStore,m(e),(function(e,t){if(e)return"NotFoundError"===e.name?d():d(e);Object.keys(t._attachments||{}).forEach((function(e){var r=t._attachments[e].digest;h[r]=!0})),d()}))}))}))},a._getLocal=function(e,t){s.localStore.get(e,(function(e,r){e?t((0,I.Tr)(I.Uc)):t(null,r)}))},a._putLocal=function(e,t,r){"function"==typeof t&&(r=t,t={}),t.ctx?a._putLocalNoLock(e,t,r):a._putLocalWithLock(e,t,r)},a._putLocalWithLock=v((function(e,t,r){a._putLocalNoLock(e,t,r)})),a._putLocalNoLock=function(e,t,r){delete e._revisions;var n=e._rev,o=e._id,a=t.ctx||new K;a.get(s.localStore,o,(function(u,c){if(u&&n)return r((0,I.Tr)(I.gW));if(c&&c._rev!==n)return r((0,I.Tr)(I.gW));e._rev=n?"0-"+(parseInt(n.split("-")[1],10)+1):"0-1";var f=[{type:"put",prefix:s.localStore,key:o,value:e}];a.batch(f);var l={ok:!0,id:e._id,rev:e._rev};if(t.ctx)return r(null,l);a.execute(i,(function(e){if(e)return r(e);r(null,l)}))}))},a._removeLocal=function(e,t,r){"function"==typeof t&&(r=t,t={}),t.ctx?a._removeLocalNoLock(e,t,r):a._removeLocalWithLock(e,t,r)},a._removeLocalWithLock=v((function(e,t,r){a._removeLocalNoLock(e,t,r)})),a._removeLocalNoLock=function(e,t,r){var n=t.ctx||new K;n.get(s.localStore,e._id,(function(o,a){if(o)return"NotFoundError"!==o.name?r(o):r((0,I.Tr)(I.Uc));if(a._rev!==e._rev)return r((0,I.Tr)(I.gW));n.batch([{prefix:s.localStore,type:"del",key:e._id}]);var u={ok:!0,id:e._id,rev:"0-0"};if(t.ctx)return r(null,u);n.execute(i,(function(e){if(e)return r(e);r(null,u)}))}))},a._destroy=function(e,t){var r,i=(0,n.QL)(l);if(!H.has(i))return _(c,t);(r=H.get(i)).has(c)?(X.removeAllListeners(c),r.get(c).close((function(){r.delete(c),_(c,t)}))):_(c,t)}};var ne=r(4485),ie=r.n(ne);function oe(e,t){var r=(0,n.f0)({db:ie()},e);re.call(this,r,t)}oe.valid=function(){return!0},oe.use_prefix=!1;const ae=function(e){e.adapter("memory",oe,!0)}},359:e=>{function t(e){this._db=e,this._operations=[],this._written=!1}t.prototype._serializeKey=function(e){return this._db._serializeKey(e)},t.prototype._serializeValue=function(e){return this._db._serializeValue(e)},t.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},t.prototype.put=function(e,t){this._checkWritten();var r=this._db._checkKey(e,"key",this._db._isBuffer);if(r)throw r;return e=this._serializeKey(e),t=this._serializeValue(t),"function"==typeof this._put?this._put(e,t):this._operations.push({type:"put",key:e,value:t}),this},t.prototype.del=function(e){this._checkWritten();var t=this._db._checkKey(e,"key",this._db._isBuffer);if(t)throw t;return e=this._serializeKey(e),"function"==typeof this._del?this._del(e):this._operations.push({type:"del",key:e}),this},t.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},t.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");return"object"!=typeof e&&(e={}),this._written=!0,"function"==typeof this._write?this._write(t):"function"==typeof this._db._batch?this._db._batch(this._operations,e,t):void process.nextTick(t)},e.exports=t},3726:e=>{function t(e){this.db=e,this._ended=!1,this._nexting=!1}t.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?e(new Error("cannot call next() after end()")):t._nexting?e(new Error("cannot call next() before previous next() has completed")):(t._nexting=!0,"function"==typeof t._next?t._next((function(){t._nexting=!1,e.apply(null,arguments)})):void process.nextTick((function(){t._nexting=!1,e()})))},t.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");return this._ended?e(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(e):void process.nextTick(e))},e.exports=t},520:(e,t,r)=>{var n=r(7529),i=r(3726),o=r(359);function a(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}a.prototype.open=function(e,t){var r=this,n=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=0!=e.createIfMissing,e.errorIfExists=!!e.errorIfExists,"function"==typeof this._open?(this.status="opening",this._open(e,(function(e){if(e)return r.status=n,t(e);r.status="open",t()}))):(this.status="open",process.nextTick(t))},a.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");"function"==typeof this._close?(this.status="closing",this._close((function(n){if(n)return t.status=r,e(n);t.status="closed",e()}))):(this.status="closed",process.nextTick(e))},a.prototype.get=function(e,t,r){var n;if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("get() requires a callback argument");return(n=this._checkKey(e,"key"))?r(n):(e=this._serializeKey(e),"object"!=typeof t&&(t={}),t.asBuffer=0!=t.asBuffer,"function"==typeof this._get?this._get(e,t,r):void process.nextTick((function(){r(new Error("NotFound"))})))},a.prototype.put=function(e,t,r,n){var i;if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("put() requires a callback argument");return(i=this._checkKey(e,"key"))?n(i):(e=this._serializeKey(e),t=this._serializeValue(t),"object"!=typeof r&&(r={}),"function"==typeof this._put?this._put(e,t,r,n):void process.nextTick(n))},a.prototype.del=function(e,t,r){var n;if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("del() requires a callback argument");return(n=this._checkKey(e,"key"))?r(n):(e=this._serializeKey(e),"object"!=typeof t&&(t={}),"function"==typeof this._del?this._del(e,t,r):void process.nextTick(r))},a.prototype.batch=function(e,t,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(r=t),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return r(new Error("batch(array) requires an array argument"));t&&"object"==typeof t||(t={});for(var n,i,o=0,a=e.length;o<a;o++)if("object"==typeof(n=e[o])){if(i=this._checkKey(n.type,"type"))return r(i);if(i=this._checkKey(n.key,"key"))return r(i)}if("function"==typeof this._batch)return this._batch(e,t,r);process.nextTick(r)},a.prototype.approximateSize=function(e,t,r){if(null==e||null==t||"function"==typeof e||"function"==typeof t)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof r)throw new Error("approximateSize() requires a callback argument");if(e=this._serializeKey(e),t=this._serializeKey(t),"function"==typeof this._approximateSize)return this._approximateSize(e,t,r);process.nextTick((function(){r(null,0)}))},a.prototype._setupIteratorOptions=function(e){var t=this;return e=n(e),["start","end","gt","gte","lt","lte"].forEach((function(r){e[r]&&t._isBuffer(e[r])&&0===e[r].length&&delete e[r]})),e.reverse=!!e.reverse,e.keys=0!=e.keys,e.values=0!=e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=0!=e.keyAsBuffer,e.valueAsBuffer=0!=e.valueAsBuffer,e},a.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new i(this)},a.prototype._chainedBatch=function(){return new o(this)},a.prototype._isBuffer=function(e){return Buffer.isBuffer(e)},a.prototype._serializeKey=function(e){return this._isBuffer(e)?e:String(e)},a.prototype._serializeValue=function(e){return null==e?"":this._isBuffer(e)||process.browser?e:String(e)},a.prototype._checkKey=function(e,t){return null==e?new Error(t+" cannot be `null` or `undefined`"):this._isBuffer(e)&&0===e.length?new Error(t+" cannot be an empty Buffer"):""===String(e)?new Error(t+" cannot be an empty String"):void 0},e.exports=a},2513:(e,t,r)=>{t.AbstractLevelDOWN=r(520),t.AbstractIterator=r(3726),r(359),r(7211)},7211:(e,t,r)=>{var n=r(520);e.exports=function(e){return!(!e||"object"!=typeof e)&&Object.keys(n.prototype).filter((function(e){return"_"!=e[0]&&"approximateSize"!=e})).every((function(t){return"function"==typeof e[t]}))}},1081:(e,t,r)=>{e.exports=r(1180)},4485:(e,t,r)=>{var n=r(5717),i=r(2513).AbstractLevelDOWN,o=r(2513).AbstractIterator,a=r(2303),s=r(4977),u=r(2021).Buffer,c={},f=r(1081);function l(e){return a.compare(e,this._end)>0}function h(e){return a.compare(e,this._end)>=0}function p(e){return a.compare(e,this._end)<0}function d(e){return a.compare(e,this._end)<=0}function y(e,t){o.call(this,e),this._limit=t.limit,-1===this._limit&&(this._limit=1/0);var r=e._store[e._location];this.keyAsBuffer=!1!==t.keyAsBuffer,this.valueAsBuffer=!1!==t.valueAsBuffer,this._reverse=t.reverse,this._options=t,this._done=0,this._reverse?(this._incr="prev",this._start=a.upperBound(t),this._end=a.lowerBound(t),void 0===this._start?this._tree=r.end:a.upperBoundInclusive(t)?this._tree=r.le(this._start):this._tree=r.lt(this._start),this._end&&(a.lowerBoundInclusive(t)?this._test=h:this._test=l)):(this._incr="next",this._start=a.lowerBound(t),this._end=a.upperBound(t),void 0===this._start?this._tree=r.begin:a.lowerBoundInclusive(t)?this._tree=r.ge(this._start):this._tree=r.gt(this._start),this._end&&(a.upperBoundInclusive(t)?this._test=d:this._test=p))}function g(e){if(!(this instanceof g))return new g(e);i.call(this,"string"==typeof e?e:""),this._location=this.location?"$"+this.location:"_tree",this._store=this.location?c:this,this._store[this._location]=this._store[this._location]||s(a.compare)}n(y,o),y.prototype._next=function(e){var t,r;return this._done++>=this._limit?f(e):this._tree.valid?(t=this._tree.key,r=this._tree.value,this._test(t)?(this.keyAsBuffer&&(t=u.from(t)),this.valueAsBuffer&&(r=u.from(r)),this._tree[this._incr](),void f((function(){e(null,t,r)}))):f(e)):f(e)},y.prototype._test=function(){return!0},g.clearGlobalStore=function(e){e?Object.keys(c).forEach((function(e){delete c[e]})):c={}},n(g,i),g.prototype._open=function(e,t){var r=this;f((function(){t(null,r)}))},g.prototype._put=function(e,t,r,n){null==t&&(t="");var i=this._store[this._location].find(e);i.valid?this._store[this._location]=i.update(t):this._store[this._location]=this._store[this._location].insert(e,t),f(n)},g.prototype._get=function(e,t,r){var n=this._store[this._location].get(e);if(void 0===n)return f((function(){r(new Error("NotFound"))}));!1===t.asBuffer||this._isBuffer(n)||(n=u.from(String(n))),f((function(){r(null,n)}))},g.prototype._del=function(e,t,r){this._store[this._location]=this._store[this._location].remove(e),f(r)},g.prototype._batch=function(e,t,r){for(var n,i,o,a=-1,s=e.length,u=this._store[this._location];++a<s;)e[a]&&(n=this._isBuffer(e[a].key)?e[a].key:String(e[a].key),o=u.find(n),"put"===e[a].type?(i=this._isBuffer(e[a].value)?e[a].value:String(e[a].value),u=o.valid?o.update(i):u.insert(n,i)):u=o.remove());this._store[this._location]=u,f(r)},g.prototype._iterator=function(e){return new y(this,e)},g.prototype._isBuffer=function(e){return u.isBuffer(e)},g.destroy=function(e,t){var r="$"+e;r in c&&delete c[r],f(t)},e.exports=g.default=g},2021:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},807:(e,t,r)=>{"use strict";r.d(t,{ty:()=>n,r3:()=>i,W7:()=>u,sG:()=>s,Ik:()=>o,LX:()=>f,fM:()=>c});var n=function(e){return atob(e)},i=function(e){return btoa(e)};function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}function a(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}function s(e,t){return o([a(e)],{type:t})}function u(e,t){return s(n(e),t)}function c(e,t){var r=new FileReader,n="function"==typeof r.readAsBinaryString;r.onloadend=function(e){var r=e.target.result||"";if(n)return t(r);t(function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return t}(r))},n?r.readAsBinaryString(e):r.readAsArrayBuffer(e)}function f(e,t){var r=new FileReader;r.onloadend=function(e){var r=e.target.result||new ArrayBuffer(0);t(r)},r.readAsArrayBuffer(e)}},2694:(e,t,r)=>{"use strict";function n(e){return"$"+e}function i(e){return e.substring(1)}function o(){this._store={}}function a(e){if(this._store=new o,e&&Array.isArray(e))for(var t=0,r=e.length;t<r;t++)this.add(e[t])}var s,u;r.d(t,{l:()=>s,D:()=>u}),o.prototype.get=function(e){var t=n(e);return this._store[t]},o.prototype.set=function(e,t){var r=n(e);return this._store[r]=t,!0},o.prototype.has=function(e){return n(e)in this._store},o.prototype.delete=function(e){var t=n(e),r=t in this._store;return delete this._store[t],r},o.prototype.forEach=function(e){for(var t=Object.keys(this._store),r=0,n=t.length;r<n;r++){var o=t[r];e(this._store[o],o=i(o))}},Object.defineProperty(o.prototype,"size",{get:function(){return Object.keys(this._store).length}}),a.prototype.add=function(e){return this._store.set(e,!0)},a.prototype.has=function(e){return this._store.has(e)},a.prototype.forEach=function(e){this._store.forEach((function(t,r){e(r)}))},Object.defineProperty(a.prototype,"size",{get:function(){return this._store.size}}),!function(){if("undefined"==typeof Symbol||"undefined"==typeof Map||"undefined"==typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?(s=a,u=o):(s=Set,u=Map)},2733:(e,t,r)=>{"use strict";r.d(t,{kD:()=>o,Uc:()=>a,gW:()=>s,JE:()=>u,Xt:()=>c,zG:()=>f,Mq:()=>l,I4:()=>h,eC:()=>p,bi:()=>d,cI:()=>y,y3:()=>g,nM:()=>v,Dq:()=>b,wp:()=>m,Tr:()=>_,G3:()=>w});var n=r(5717);function i(e,t,r){Error.call(this,r),this.status=e,this.name=t,this.message=r,this.error=!0}r.n(n)()(i,Error),i.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};new i(401,"unauthorized","Name or password is incorrect.");var o=new i(400,"bad_request","Missing JSON list of 'docs'"),a=new i(404,"not_found","missing"),s=new i(409,"conflict","Document update conflict"),u=new i(400,"bad_request","_id field must contain a string"),c=new i(412,"missing_id","_id is required for puts"),f=new i(400,"bad_request","Only reserved document ids may start with underscore."),l=new i(412,"precondition_failed","Database not open"),h=new i(500,"unknown_error","Database encountered an unknown error"),p=new i(500,"badarg","Some query argument is invalid"),d=(new i(400,"invalid_request","Request was invalid"),new i(400,"query_parse_error","Some query parameter is invalid")),y=new i(500,"doc_validation","Bad special document member"),g=new i(400,"bad_request","Something wrong with the request"),v=new i(400,"bad_request","Document must be a JSON object"),b=(new i(404,"not_found","Database not found"),new i(500,"indexed_db_went_bad","unknown"),new i(500,"web_sql_went_bad","unknown"),new i(500,"levelDB_went_went_bad","unknown"),new i(403,"forbidden","Forbidden by design doc validate_doc_update function"),new i(400,"bad_request","Invalid rev format")),m=(new i(412,"file_exists","The database could not be created, the file already exists."),new i(412,"missing_stub","A pre-existing attachment stub wasn't found"));new i(413,"invalid_url","Provided URL is invalid");function _(e,t){function r(t){for(var r=Object.getOwnPropertyNames(e),n=0,i=r.length;n<i;n++)"function"!=typeof e[r[n]]&&(this[r[n]]=e[r[n]]);void 0!==t&&(this.reason=t)}return r.prototype=i.prototype,new r(t)}function w(e){if("object"!=typeof e){var t=e;(e=h).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}},7239:(e,t,r)=>{"use strict";r.d(t,{u:()=>c,$:()=>f});var n=r(807),i=r(1368),o=r.n(i),a=self.setImmediate||self.setTimeout;function s(e,t,r,i,o){(r>0||i<t.size)&&(t=function(e,t,r){return e.webkitSlice?e.webkitSlice(t,r):e.slice(t,r)}(t,r,i)),(0,n.LX)(t,(function(t){e.append(t),o()}))}function u(e,t,r,n,i){(r>0||n<t.length)&&(t=t.substring(r,n)),e.appendBinary(t),i()}function c(e,t){var r="string"==typeof e,i=r?e.length:e.size,c=Math.min(32768,i),f=Math.ceil(i/c),l=0,h=r?new(o()):new(o().ArrayBuffer),p=r?u:s;function d(){a(g)}function y(){var e=function(e){return(0,n.r3)(e)}(h.end(!0));t(e),h.destroy()}function g(){var t=l*c,r=t+c;l++,p(h,e,t,r,l<f?d:y)}g()}function f(e){return o().hash(e)}},1368:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,i,o,a,s,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(f,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(f,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(f,o),f}function a(e){var t,n,o,a,s,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(f,i(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(f,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(f,o),f}function s(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function f(e,t){var r,n=e.length,i=new ArrayBuffer(n),o=new Uint8Array(i);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:i}function l(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,r){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e)),n.set(new Uint8Array(t),e.byteLength),r?n:n.buffer}function p(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function d(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(r,n){var i,o,a,s,u=this.byteLength,c=t(r,u),f=u;return n!==e&&(f=t(n,u)),c>f?new ArrayBuffer(0):(i=f-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),d.prototype.append=function(e){return this.appendBinary(c(e)),this},d.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},d.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),r=u(this._hash),e&&(r=p(r)),this.reset(),r},d.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},d.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(e,t){var n,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(r(this._hash,e),a=0;a<16;a+=1)e[a]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=i,e[15]=o,r(this._hash,e)},d.hash=function(e,t){return d.hashBinary(c(e),t)},d.hashBinary=function(e,t){var r=u(o(e));return t?p(r):r},d.ArrayBuffer=function(){this.reset()},d.ArrayBuffer.prototype.append=function(e){var t,n=h(this._buff.buffer,e,!0),o=n.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)r(this._hash,i(n.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(n.buffer.slice(t-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,i),r=u(this._hash),e&&(r=p(r)),this.reset(),r},d.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.ArrayBuffer.prototype.getState=function(){var e=d.prototype.getState.call(this);return e.buff=l(e.buff),e},d.ArrayBuffer.prototype.setState=function(e){return e.buff=f(e.buff,!0),d.prototype.setState.call(this,e)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(e,t){var r=u(a(new Uint8Array(e)));return t?p(r):r},d}()},8621:(e,t,r)=>{"use strict";function n(e){for(var t,r,n,i,o=e.rev_tree.slice();i=o.pop();){var a=i.ids,s=a[2],u=i.pos;if(s.length)for(var c=0,f=s.length;c<f;c++)o.push({pos:u+1,ids:s[c]});else{var l=!!a[1].deleted,h=a[0];t&&!(n!==l?n:r!==u?r<u:t<h)||(t=h,r=u,n=l)}}return r+"-"+t}function i(e,t){for(var r,n=e.slice();r=n.pop();)for(var i=r.pos,o=r.ids,a=o[2],s=t(0===a.length,i,o[0],r.ctx,o[1]),u=0,c=a.length;u<c;u++)n.push({pos:i+1,ids:a[u],ctx:s})}function o(e,t){return e.pos-t.pos}function a(e){var t=[];i(e,(function(e,r,n,i,o){e&&t.push({rev:r+"-"+n,pos:r,opts:o})})),t.sort(o).reverse();for(var r=0,n=t.length;r<n;r++)delete t[r].pos;return t}function s(e){for(var t=n(e),r=a(e.rev_tree),i=[],o=0,s=r.length;o<s;o++){var u=r[o];u.rev===t||u.opts.deleted||i.push(u.rev)}return i}function u(e){var t=[];return i(e.rev_tree,(function(e,r,n,i,o){"available"!==o.status||e||(t.push(r+"-"+n),o.status="missing")})),t}function c(e){for(var t,r=[],n=e.slice();t=n.pop();){var i=t.pos,o=t.ids,a=o[0],s=o[1],u=o[2],c=0===u.length,f=t.history?t.history.slice():[];f.push({id:a,opts:s}),c&&r.push({pos:i+1-f.length,ids:f});for(var l=0,h=u.length;l<h;l++)n.push({pos:i+1,ids:u[l],history:f})}return r.reverse()}function f(e,t){return e.pos-t.pos}function l(e,t,r){var n=function(e,t,r){for(var n,i=0,o=e.length;i<o;)r(e[n=i+o>>>1],t)<0?i=n+1:o=n;return i}(e,t,r);e.splice(n,0,t)}function h(e,t){for(var r,n,i=t,o=e.length;i<o;i++){var a=e[i],s=[a.id,a.opts,[]];n?(n[2].push(s),n=s):r=n=s}return r}function p(e,t){return e[0]<t[0]?-1:1}function d(e,t){for(var r=[{tree1:e,tree2:t}],n=!1;r.length>0;){var i=r.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(o[2][0]){for(var u=!1,c=0;c<o[2].length;c++)o[2][c][0]===a[2][s][0]&&(r.push({tree1:o[2][c],tree2:a[2][s]}),u=!0);u||(n="new_branch",l(o[2],a[2][s],p))}else n="new_leaf",o[2][0]=a[2][s]}return{conflicts:n,tree:e}}function y(e,t,r){var n,i=[],o=!1,a=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var s=0,u=e.length;s<u;s++){var c=e[s];if(c.pos===t.pos&&c.ids[0]===t.ids[0])n=d(c.ids,t.ids),i.push({pos:c.pos,ids:n.tree}),o=o||n.conflicts,a=!0;else if(!0!==r){var l=c.pos<t.pos?c:t,h=c.pos<t.pos?t:c,p=h.pos-l.pos,y=[],g=[];for(g.push({ids:l.ids,diff:p,parent:null,parentIdx:null});g.length>0;){var v=g.pop();if(0!==v.diff)for(var b=v.ids[2],m=0,_=b.length;m<_;m++)g.push({ids:b[m],diff:v.diff-1,parent:v.ids,parentIdx:m});else v.ids[0]===h.ids[0]&&y.push(v)}var w=y[0];w?(n=d(w.ids,h.ids),w.parent[2][w.parentIdx]=n.tree,i.push({pos:l.pos,ids:l.ids}),o=o||n.conflicts,a=!0):i.push(c)}else i.push(c)}return a||i.push(t),i.sort(f),{tree:i,conflicts:o||"internal_node"}}function g(e,t,r){var n=y(e,t),o=function(e,t){for(var r,n,o=c(e),a=0,s=o.length;a<s;a++){var u,f=o[a],l=f.ids;if(l.length>t){r||(r={});var p=l.length-t;u={pos:f.pos+p,ids:h(l,p)};for(var d=0;d<p;d++){var g=f.pos+d+"-"+l[d].id;r[g]=!0}}else u={pos:f.pos,ids:h(l,0)};n=n?y(n,u,!0).tree:[u]}return r&&i(n,(function(e,t,n){delete r[t+"-"+n]})),{tree:n,revs:r?Object.keys(r):[]}}(n.tree,r);return{tree:o.tree,stemmedRevs:o.revs,conflicts:n.conflicts}}function v(e,t){for(var r,n=e.slice(),i=t.split("-"),o=parseInt(i[0],10),a=i[1];r=n.pop();){if(r.pos===o&&r.ids[0]===a)return!0;for(var s=r.ids[2],u=0,c=s.length;u<c;u++)n.push({pos:r.pos+1,ids:s[u]})}return!1}function b(e){return e.ids}function m(e,t){t||(t=n(e));for(var r,i=t.substring(t.indexOf("-")+1),o=e.rev_tree.map(b);r=o.pop();){if(r[0]===i)return!!r[1].deleted;o=o.concat(r[2])}}function _(e){return/^_local/.test(e)}function w(e,t){for(var r,n=t.rev_tree.slice();r=n.pop();){var i=r.pos,o=r.ids,a=o[0],s=o[1],u=o[2],c=0===u.length,f=r.history?r.history.slice():[];if(f.push({id:a,pos:i,opts:s}),c)for(var l=0,h=f.length;l<h;l++){var p=f[l];if(p.pos+"-"+p.id===e)return i+"-"+a}for(var d=0,y=u.length;d<y;d++)n.push({pos:i+1,ids:u[d],history:f})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}r.d(t,{DJ:()=>s,cI:()=>a,UB:()=>u,uY:()=>m,zB:()=>_,TS:()=>g,FS:()=>v,vc:()=>c,fE:()=>i,S:()=>n,pA:()=>w})},3132:(e,t,r)=>{"use strict";r.d(t,{D3:()=>E,f0:()=>R,o:()=>x,b6:()=>T,d9:()=>m,sP:()=>B,xH:()=>M,QL:()=>I,yq:()=>P,eW:()=>j,GE:()=>L,Q1:()=>U,xS:()=>C,Y3:()=>c(),Rc:()=>N,IH:()=>_,VO:()=>D,ei:()=>k,OD:()=>W,m6:()=>q,Vi:()=>w,H:()=>F,Vj:()=>$});var n=r(7105),i=r.n(n),o=r(2694),a=r(5717),s=r.n(a),u=r(1180),c=r.n(u),f=r(2733),l=r(7187),h=r.n(l),p=r(1074);p.v1,p.v3;const d=p.v4;p.v5;var y=r(7239);function g(e){if(e instanceof ArrayBuffer)return function(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),r=new Uint8Array(t),n=new Uint8Array(e);return r.set(n),t}(e);var t=e.size,r=e.type;return"function"==typeof e.slice?e.slice(0,t,r):e.webkitSlice(0,t,r)}var v=Function.prototype.toString,b=v.call(Object);function m(e){var t,r,n;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],r=0,n=e.length;r<n;r++)t[r]=m(e[r]);return t}if(e instanceof Date)return e.toISOString();if(function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}(e))return g(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=t.constructor;return"function"==typeof r&&r instanceof r&&v.call(r)==b}(e))return e;for(r in t={},e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=m(e[r]);void 0!==i&&(t[r]=i)}return t}function _(e){var t=!1;return i()((function(r){if(t)throw new Error("once called more than once");t=!0,e.apply(this,r)}))}function w(e){return i()((function(t){t=m(t);var r=this,n="function"==typeof t[t.length-1]&&t.pop(),i=new Promise((function(n,i){var o;try{var a=_((function(e,t){e?i(e):n(t)}));t.push(a),(o=e.apply(r,t))&&"function"==typeof o.then&&n(o)}catch(e){i(e)}}));return n&&i.then((function(e){n(null,e)}),n),i}))}function E(e,t){return w(i()((function(r){if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var n=this;return function(e,t,r){if(e.constructor.listeners("debug").length){for(var n=["api",e.name,t],i=0;i<r.length-1;i++)n.push(r[i]);e.constructor.emit("debug",n);var o=r[r.length-1];r[r.length-1]=function(r,n){var i=["api",e.name,t];i=i.concat(r?["error",r]:["success",n]),e.constructor.emit("debug",i),o(r,n)}}}(n,e,r),this.taskqueue.isReady?t.apply(this,r):new Promise((function(t,i){n.taskqueue.addTask((function(o){o?i(o):t(n[e].apply(n,r))}))}))})))}function k(e,t){for(var r={},n=0,i=t.length;n<i;n++){var o=t[n];o in e&&(r[o]=e[o])}return r}var S;function O(e){return e}function A(e){return[{ok:e}]}function x(e,t,r){var n=t.docs,i=new o.D;n.forEach((function(e){i.has(e.id)?i.get(e.id).push(e):i.set(e.id,[e])}));var a=i.size,s=0,u=new Array(a);function c(){var e;++s===a&&(e=[],u.forEach((function(t){t.docs.forEach((function(r){e.push({id:t.id,docs:[r]})}))})),r(null,{results:e}))}var f=[];i.forEach((function(e,t){f.push(t)}));var l=0;function h(){if(!(l>=f.length)){var r=Math.min(l+6,f.length),n=f.slice(l,r);!function(r,n){r.forEach((function(r,o){var a=n+o,s=i.get(r),f=k(s[0],["atts_since","attachments"]);f.open_revs=s.map((function(e){return e.rev})),f.open_revs=f.open_revs.filter(O);var l=O;0===f.open_revs.length&&(delete f.open_revs,l=A),["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(f[e]=t[e])})),e.get(r,f,(function(e,t){var n,i,o;n=e?[{error:e}]:l(t),i=r,o=n,u[a]={id:i,docs:o},c(),h()}))}))}(n,l),l+=n.length}}h()}try{localStorage.setItem("_pouch_check_localstorage",1),S=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){S=!1}function j(){return S}function T(){h().call(this),this._listeners={},function(e){j()&&addEventListener("storage",(function(t){e.emit(t.key)}))}(this)}function P(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}s()(T,h()),T.prototype.addListener=function(e,t,r,n){if(!this._listeners[t]){var i=this,o=!1;this._listeners[t]=a,this.on(e,a)}function a(){if(i._listeners[t])if(o)o="waiting";else{o=!0;var e=k(n,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);r.changes(e).on("change",(function(e){e.seq>n.since&&!n.cancelled&&(n.since=e.seq,n.onChange(e))})).on("complete",(function(){"waiting"===o&&c()(a),o=!1})).on("error",(function(){o=!1}))}}},T.prototype.removeListener=function(e,t){t in this._listeners&&(h().prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},T.prototype.notifyLocalWindows=function(e){j()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},T.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var R="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function B(e){var t={},r=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(n){n.doc||(n.doc={});var i=r&&function(e,t,r){try{return!e(t,r)}catch(e){var n="Filter function threw: "+e.toString();return(0,f.Tr)(f.y3,n)}}(e.filter,n.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in n.doc._attachments)n.doc._attachments.hasOwnProperty(o)&&(n.doc._attachments[o].stub=!0)}else delete n.doc;return!0}}function M(e){for(var t=[],r=0,n=e.length;r<n;r++)t=t.concat(e[r]);return t}var I=function(){}.name?function(e){return e.name}:function(e){var t=e.toString().match(/^\s*function\s*(?:(\S+)\s*)?\(/);return t&&t[1]?t[1]:""};function L(e){var t;if(e?"string"!=typeof e?t=(0,f.Tr)(f.JE):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=(0,f.Tr)(f.zG)):t=(0,f.Tr)(f.Xt),t)throw t}function U(e){return"boolean"==typeof e._remote?e._remote:"function"==typeof e.type&&(P("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())}function C(e,t){return"listenerCount"in e?e.listenerCount(t):h().listenerCount(e,t)}function D(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function N(e){var t=D(e);return t?t.join("/"):null}function q(e,t){var r=[],n=[];for(var i in t)t.hasOwnProperty(i)&&(r.push(i),n.push(t[i]));return r.push(e),Function.apply(null,r).apply(null,n)}function F(e,t,r){return new Promise((function(n,i){e.get(t,(function(o,a){if(o){if(404!==o.status)return i(o);a={}}var s=a._rev,u=r(a);if(!u)return n({updated:!1,rev:s});u._id=t,u._rev=s,n(function(e,t,r){return e.put(t).then((function(e){return{updated:!0,rev:e.rev}}),(function(n){if(409!==n.status)throw n;return F(e,t._id,r)}))}(e,u,r))}))}))}function W(e,t){var r=m(e);return t?(delete r._rev_tree,(0,y.$)(JSON.stringify(r))):d().replace(/-/g,"").toLowerCase()}var $=d},5334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).substr(1));var n=function(e,t){const n=t||0,i=r;return(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase()};t.default=n},1074:(e,t,r)=>{"use strict";Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}});var n=s(r(8828)),i=s(r(2046)),o=s(r(6287)),a=s(r(7056));function s(e){return e&&e.__esModule?e:{default:e}}},2557:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(u=o)|s>>>32-u,r);var s,u}function o(e,t,r,n,o,a,s){return i(t&r|~t&n,e,t,o,a,s)}function a(e,t,r,n,o,a,s){return i(t&n|r&~n,e,t,o,a,s)}function s(e,t,r,n,o,a,s){return i(t^r^n,e,t,o,a,s)}function u(e,t,r,n,o,a,s){return i(r^(t|~n),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let i=0;i<r;i+=8){const r=e[i>>5]>>>i%32&255,o=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let i=1732584193,c=-271733879,f=-1732584194,l=271733878;for(let t=0;t<e.length;t+=16){const r=i,h=c,p=f,d=l;i=o(i,c,f,l,e[t],7,-680876936),l=o(l,i,c,f,e[t+1],12,-389564586),f=o(f,l,i,c,e[t+2],17,606105819),c=o(c,f,l,i,e[t+3],22,-1044525330),i=o(i,c,f,l,e[t+4],7,-176418897),l=o(l,i,c,f,e[t+5],12,1200080426),f=o(f,l,i,c,e[t+6],17,-1473231341),c=o(c,f,l,i,e[t+7],22,-45705983),i=o(i,c,f,l,e[t+8],7,1770035416),l=o(l,i,c,f,e[t+9],12,-1958414417),f=o(f,l,i,c,e[t+10],17,-42063),c=o(c,f,l,i,e[t+11],22,-1990404162),i=o(i,c,f,l,e[t+12],7,1804603682),l=o(l,i,c,f,e[t+13],12,-40341101),f=o(f,l,i,c,e[t+14],17,-1502002290),c=o(c,f,l,i,e[t+15],22,1236535329),i=a(i,c,f,l,e[t+1],5,-165796510),l=a(l,i,c,f,e[t+6],9,-1069501632),f=a(f,l,i,c,e[t+11],14,643717713),c=a(c,f,l,i,e[t],20,-373897302),i=a(i,c,f,l,e[t+5],5,-701558691),l=a(l,i,c,f,e[t+10],9,38016083),f=a(f,l,i,c,e[t+15],14,-660478335),c=a(c,f,l,i,e[t+4],20,-405537848),i=a(i,c,f,l,e[t+9],5,568446438),l=a(l,i,c,f,e[t+14],9,-1019803690),f=a(f,l,i,c,e[t+3],14,-187363961),c=a(c,f,l,i,e[t+8],20,1163531501),i=a(i,c,f,l,e[t+13],5,-1444681467),l=a(l,i,c,f,e[t+2],9,-51403784),f=a(f,l,i,c,e[t+7],14,1735328473),c=a(c,f,l,i,e[t+12],20,-1926607734),i=s(i,c,f,l,e[t+5],4,-378558),l=s(l,i,c,f,e[t+8],11,-2022574463),f=s(f,l,i,c,e[t+11],16,1839030562),c=s(c,f,l,i,e[t+14],23,-35309556),i=s(i,c,f,l,e[t+1],4,-1530992060),l=s(l,i,c,f,e[t+4],11,1272893353),f=s(f,l,i,c,e[t+7],16,-155497632),c=s(c,f,l,i,e[t+10],23,-1094730640),i=s(i,c,f,l,e[t+13],4,681279174),l=s(l,i,c,f,e[t],11,-358537222),f=s(f,l,i,c,e[t+3],16,-722521979),c=s(c,f,l,i,e[t+6],23,76029189),i=s(i,c,f,l,e[t+9],4,-640364487),l=s(l,i,c,f,e[t+12],11,-421815835),f=s(f,l,i,c,e[t+15],16,530742520),c=s(c,f,l,i,e[t+2],23,-995338651),i=u(i,c,f,l,e[t],6,-198630844),l=u(l,i,c,f,e[t+7],10,1126891415),f=u(f,l,i,c,e[t+14],15,-1416354905),c=u(c,f,l,i,e[t+5],21,-57434055),i=u(i,c,f,l,e[t+12],6,1700485571),l=u(l,i,c,f,e[t+3],10,-1894986606),f=u(f,l,i,c,e[t+10],15,-1051523),c=u(c,f,l,i,e[t+1],21,-2054922799),i=u(i,c,f,l,e[t+8],6,1873313359),l=u(l,i,c,f,e[t+15],10,-30611744),f=u(f,l,i,c,e[t+6],15,-1560198380),c=u(c,f,l,i,e[t+13],21,1309151649),i=u(i,c,f,l,e[t+4],6,-145523070),l=u(l,i,c,f,e[t+11],10,-1120210379),f=u(f,l,i,c,e[t+2],15,718787259),c=u(c,f,l,i,e[t+9],21,-343485551),i=n(i,r),c=n(c,h),f=n(f,p),l=n(l,d)}return[i,c,f,l]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};t.default=c},6041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),n=new Uint8Array(16)},2751:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}e.push(128);const o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a);for(let t=0;t<a;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];s[t]=r}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<a;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=s[e][t];for(let e=16;e<80;++e)o[e]=n(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let a=i[0],u=i[1],c=i[2],f=i[3],l=i[4];for(let e=0;e<80;++e){const i=Math.floor(e/20),s=n(a,5)+r(i,u,c,f)+l+t[i]+o[e]>>>0;l=f,f=c,c=n(u,30)>>>0,u=a,a=s}i[0]=i[0]+a>>>0,i[1]=i[1]+u>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+f>>>0,i[4]=i[4]+l>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]};t.default=i},8828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6041)),i=o(r(5334));function o(e){return e&&e.__esModule?e:{default:e}}let a,s,u=0,c=0;var f=function(e,t,r){let o=t&&r||0;const f=t||[];let l=(e=e||{}).node||a,h=void 0!==e.clockseq?e.clockseq:s;if(null==l||null==h){const t=e.random||(e.rng||n.default)();null==l&&(l=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),d=void 0!==e.nsecs?e.nsecs:c+1;const y=p-u+(d-c)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>u)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=d,s=h,p+=122192928e5;const g=(1e4*(268435455&p)+d)%4294967296;f[o++]=g>>>24&255,f[o++]=g>>>16&255,f[o++]=g>>>8&255,f[o++]=255&g;const v=p/4294967296*1e4&268435455;f[o++]=v>>>8&255,f[o++]=255&v,f[o++]=v>>>24&15|16,f[o++]=v>>>16&255,f[o++]=h>>>8|128,f[o++]=255&h;for(let e=0;e<6;++e)f[o+e]=l[e];return t||(0,i.default)(f)};t.default=f},2046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(7117)),i=o(r(2557));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);t.default=a},7117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){function n(e,n,o,a){const s=o&&a||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=function(e){const t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(n)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(n)||16!==n.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");const u=r(n.concat(e));if(u[6]=15&u[6]|t,u[8]=63&u[8]|128,o)for(let e=0;e<16;++e)o[s+e]=u[e];return o||(0,i.default)(u)}try{n.name=e}catch(e){}return n.DNS=o,n.URL=a,n},t.URL=t.DNS=void 0;var n,i=(n=r(5334))&&n.__esModule?n:{default:n};const o="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=o;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=a},6287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6041)),i=o(r(5334));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e,t,r){"string"==typeof e&&(t="binary"===e?new Uint8Array(16):null,e=null);const o=(e=e||{}).random||(e.rng||n.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){const e=r||0;for(let r=0;r<16;++r)t[e+r]=o[r];return t}return(0,i.default)(o)};t.default=a},7056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(7117)),i=o(r(2751));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v5",80,i.default);t.default=a},8212:e=>{"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return process.nextTick((function(){e.apply(null,i)}))}}}:e.exports=process},233:function(e){var t,r;t=this,r=function(){var e="function"==typeof Object.defineProperty?function(e,t,r){return Object.defineProperty(e,t,r),e}:function(e,t,r){return e[t]=r.value,e};return function(t,r,n,i){var o;if(i=function(e,t){var r="object"==typeof t,n=!r&&"string"==typeof t,i=function(e){return r?!!t[e]:!!n&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}}(n,i),"object"==typeof r){for(o in r)Object.hasOwnProperty.call(r,o)&&(i.value=r[o],e(t,o,i));return t}return e(t,r,i)}},e.exports?e.exports=r():t.prr=r()},6753:(e,t,r)=>{"use strict";var n=r(8212),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=Object.create(r(6497));o.inherits=r(5717);var a=r(9481),s=r(4229);o.inherits(l,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var f=u[c];l.prototype[f]||(l.prototype[f]=s.prototype[f])}function l(e){if(!(this instanceof l))return new l(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},2725:(e,t,r)=>{"use strict";e.exports=o;var n=r(4605),i=Object.create(r(6497));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(5717),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n=r(8212);e.exports=b;var i,o=r(5826);b.ReadableState=v;r(7187).EventEmitter;var a=function(e,t){return e.listeners(t).length},s=r(2503),u=r(3545).Buffer,c=r.g.Uint8Array||function(){};var f=Object.create(r(6497));f.inherits=r(5717);var l=r(4616),h=void 0;h=l&&l.debuglog?l.debuglog("stream"):function(){};var p,d=r(5057),y=r(1195);f.inherits(b,s);var g=["error","close","destroy","pause","resume"];function v(e,t){e=e||{};var n=t instanceof(i=i||r(6753));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(4626).s),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||r(6753),!(this instanceof b))return new b(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function m(e,t,r,n,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,a)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):O(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function _(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),O(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),m(this,e,t,!1,r)},b.prototype.unshift=function(e){return m(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return p||(p=r(4626).s),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var w=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=w?e=w:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e))}function S(e){h("emit readable"),e.emit("readable"),T(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function x(e){h("readable nexttick read 0"),e.read(0)}function j(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),T(e),t.flowing&&!t.reading&&e.read(0)}function T(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(B,t,e))}function B(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}b.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):k(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",i=!0),t.ended||t.reading?h("reading or ended",i=!1):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?P(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:b;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",b),r.removeListener("data",d),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function c(){h("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,T(e))}}(r);e.on("drain",f);var l=!1;var p=!1;function d(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!l&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function y(t){h("onerror",t),b(),e.removeListener("error",y),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",v),b()}function v(){h("onfinish"),e.removeListener("close",g),b()}function b(){h("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",g),e.once("finish",v),e.emit("pipe",r),i.flowing||(h("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var a=M(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},b.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&k(this):n.nextTick(x,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),this},b.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(h("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<g.length;o++)e.on(g[o],this.emit.bind(this,g[o]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=P},4605:(e,t,r)=>{"use strict";e.exports=a;var n=r(6753),i=Object.create(r(6497));function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(5717),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},4229:(e,t,r)=>{"use strict";var n=r(8212);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var o,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:n.nextTick;g.WritableState=y;var s=Object.create(r(6497));s.inherits=r(5717);var u={deprecate:r(4927)},c=r(2503),f=r(3545).Buffer,l=r.g.Uint8Array||function(){};var h,p=r(1195);function d(){}function y(e,t){o=o||r(6753),e=e||{};var s=t instanceof o;this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,c=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:s&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,o);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?a(b,e,r,s,o):b(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function g(e){if(o=o||r(6753),!(h.call(g,this)||this instanceof o))return new g(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function v(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function b(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,v(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(v(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}s.inherits(g,c),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===g&&(e&&e._writableState instanceof y)}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,f.isBuffer(i)||i instanceof l);return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=d),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(i,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,s,n,i,o);return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=p.destroy,g.prototype._undestroy=p.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}},5057:(e,t,r)=>{"use strict";var n=r(3545).Buffer,i=r(2361);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},1195:(e,t,r)=>{"use strict";var n=r(8212);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},3545:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},4626:(e,t,r)=>{"use strict";var n=r(3545).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8473:(e,t,r)=>{(t=e.exports=r(9481)).Stream=t,t.Readable=t,t.Writable=r(4229),t.Duplex=r(6753),t.Transform=r(4605),t.PassThrough=r(2725)},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},8322:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,i,o,a,s,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(f,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(f,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(f,o),f}function a(e){var t,n,o,a,s,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(f,i(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(f,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(f,o),f}function s(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function f(e,t){var r,n=e.length,i=new ArrayBuffer(n),o=new Uint8Array(i);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:i}function l(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,r){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e)),n.set(new Uint8Array(t),e.byteLength),r?n:n.buffer}function p(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function d(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(r,n){var i,o,a,s,u=this.byteLength,c=t(r,u),f=u;return n!==e&&(f=t(n,u)),c>f?new ArrayBuffer(0):(i=f-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),d.prototype.append=function(e){return this.appendBinary(c(e)),this},d.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},d.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),r=u(this._hash),e&&(r=p(r)),this.reset(),r},d.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},d.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},d.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},d.prototype._finish=function(e,t){var n,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(r(this._hash,e),a=0;a<16;a+=1)e[a]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=i,e[15]=o,r(this._hash,e)},d.hash=function(e,t){return d.hashBinary(c(e),t)},d.hashBinary=function(e,t){var r=u(o(e));return t?p(r):r},d.ArrayBuffer=function(){this.reset()},d.ArrayBuffer.prototype.append=function(e){var t,n=h(this._buff.buffer,e,!0),o=n.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)r(this._hash,i(n.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(n.buffer.slice(t-64)):new Uint8Array(0),this},d.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,i),r=u(this._hash),e&&(r=p(r)),this.reset(),r},d.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},d.ArrayBuffer.prototype.getState=function(){var e=d.prototype.getState.call(this);return e.buff=l(e.buff),e},d.ArrayBuffer.prototype.setState=function(e){return e.buff=f(e.buff,!0),d.prototype.setState.call(this,e)},d.ArrayBuffer.prototype.destroy=d.prototype.destroy,d.ArrayBuffer.prototype._finish=d.prototype._finish,d.ArrayBuffer.hash=function(e,t){var r=u(a(new Uint8Array(e)));return t?p(r):r},d}()},3086:(e,t,r)=>{var n=r(624);function i(){n.call(this)}i.prototype=new n,e.exports=i,i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),!this.hasListeners("error"))throw e}function c(){r.off("data",n),e.off("drain",i),r.off("end",a),r.off("close",s),r.off("error",u),e.off("error",u),r.off("end",c),r.off("close",c),e.off("end",c),e.off("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("end",c),e.on("close",c),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8992:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},113:(e,t,r)=>{e.exports=s;var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},i=r(6497);i.inherits=r(5717);var o=r(9521),a=r(793);function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}i.inherits(s,o),function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(n(a.prototype),(function(e){s.prototype[e]||(s.prototype[e]=a.prototype[e])}))},9284:(e,t,r)=>{e.exports=o;var n=r(952),i=r(6497);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(5717),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},9521:(e,t,r)=>{e.exports=l;var n=r(8992),i=r(8764).Buffer;l.ReadableState=f;var o=r(7187).EventEmitter;o.listenerCount||(o.listenerCount=function(e,t){return e.listeners(t).length});var a,s=r(3086),u=r(6497);u.inherits=r(5717);var c=r(1315);function f(e,t){var n=r(113),i=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(a||(a=r(8274).s),this.decoder=new a(e.encoding),this.encoding=e.encoding)}function l(e){r(113);if(!(this instanceof l))return new l(e);this._readableState=new f(e,this),this.readable=!0,s.call(this)}function h(e,t,r,n,i){var o=function(e,t){var r=null;u.isBuffer(t)||u.isString(t)||u.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(o)e.emit("error",o);else if(u.isNullOrUndefined(r))t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,y(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){a=new Error("stream.unshift() after end event");e.emit("error",a)}else!t.decoder||i||n||(r=t.decoder.write(r)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&y(e)),function(e,t){t.readingMore||(t.readingMore=!0,process.nextTick((function(){!function(e,t){var r=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(c("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}(e,t)})))}(e,t);else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}c=c&&c.debuglog?c.debuglog("stream"):function(){},u.inherits(l,s),l.prototype.push=function(e,t){var r=this._readableState;return u.isString(e)&&!r.objectMode&&(t=t||r.defaultEncoding)!==r.encoding&&(e=new i(e,t),t=""),h(this,r,e,t,!1)},l.prototype.unshift=function(e){return h(this,this._readableState,e,"",!0)},l.prototype.setEncoding=function(e){return a||(a=r(8274).s),this._readableState.decoder=new a(e),this._readableState.encoding=e,this};var p=8388608;function d(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||u.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=p)e=p;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function y(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?process.nextTick((function(){g(e)})):g(e))}function g(e){c("emit readable"),e.emit("readable"),v(e)}function v(e){var t=e._readableState;if(c("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function b(e,t){var r,n=t.buffer,o=t.length,a=!!t.decoder,s=!!t.objectMode;if(0===n.length)return null;if(0===o)r=null;else if(s)r=n.shift();else if(!e||e>=o)r=a?n.join(""):i.concat(n,o),n.length=0;else{if(e<n[0].length)r=(l=n[0]).slice(0,e),n[0]=l.slice(e);else if(e===n[0].length)r=n.shift();else{r=a?"":new i(e);for(var u=0,c=0,f=n.length;c<f&&u<e;c++){var l=n[0],h=Math.min(e-u,l.length);a?r+=l.slice(0,h):l.copy(r,u,0,h),h<l.length?n[0]=l.slice(h):n.shift(),u+=h}}}return r}function m(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,process.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}l.prototype.read=function(e){c("read",e);var t=this._readableState,r=e;if((!u.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?m(this):y(this),null;if(0===(e=d(e,t))&&t.ended)return 0===t.length&&m(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),(t.ended||t.reading)&&c("reading or ended",i=!1),i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=d(r,t)),n=e>0?b(e,t):null,u.isNull(n)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&m(this),u.isNull(n)||this.emit("data",n),n},l.prototype._read=function(e){this.emit("error",new Error("not implemented"))},l.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?u:l;function s(e){c("onunpipe"),e===r&&l()}function u(){c("onend"),e.end()}i.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o.listenerCount(e,"data")&&(t.flowing=!0,v(e))}}(r);function l(){c("cleanup"),e.removeListener("close",d),e.removeListener("finish",y),e.removeListener("drain",f),e.removeListener("error",p),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",l),r.removeListener("data",h),!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}function h(t){c("ondata"),!1===e.write(t)&&(c("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,r.pause())}function p(t){c("onerror",t),g(),e.removeListener("error",p),0===o.listenerCount(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",y),g()}function y(){c("onfinish"),e.removeListener("close",d),g()}function g(){c("unpipe"),r.unpipe(e)}return e.on("drain",f),r.on("data",h),e._events&&e._events.error?n(e._events.error)?e._events.error.unshift(p):e._events.error=[p,e._events.error]:e.on("error",p),e.once("close",d),e.once("finish",y),e.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),e},l.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}return-1===(i=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}(t.pipes,e))||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},l.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&y(this);else{var i=this;process.nextTick((function(){c("readable nexttick read 0"),i.read(0)}))}}return r},l.prototype.addListener=l.prototype.on,l.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!0,e.reading||(c("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),v(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},l.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},l.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(c("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){(c("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length))&&(n.push(i)||(r=!0,e.pause()))})),e)u.isFunction(e[i])&&u.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},n},l._fromList=b},952:(e,t,r)=>{e.exports=a;var n=r(113),i=r(6497);function o(e,t){this.afterTransform=function(e,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,i.isNullOrUndefined(r)||e.push(r);o&&o(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState=new o(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",(function(){i.isFunction(this._flush)?this._flush((function(e){s(t,e)})):s(t)}))}function s(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=r(5717),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;i.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},793:(e,t,r)=>{e.exports=u;var n=r(8764).Buffer;u.WritableState=s;var i=r(6497);i.inherits=r(5717);var o=r(3086);function a(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function s(e,t){var n=r(113),i=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){r?process.nextTick((function(){t.pendingcb--,i(n)})):(t.pendingcb--,i(n));e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,i);else{var o=h(e,r);o||r.corked||r.bufferProcessing||!r.buffer.length||l(e,r),n?process.nextTick((function(){f(e,r,o,i)})):f(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function u(e){var t=r(113);if(!(this instanceof u||this instanceof t))return new u(e);this._writableState=new s(e,this),this.writable=!0,o.call(this)}function c(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function f(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),d(e,t)}function l(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,c(e,t,!0,t.length,t.buffer,"",(function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)})),t.buffer=[]}else{for(n=0;n<t.buffer.length;n++){var i=t.buffer[n],o=i.chunk,a=i.encoding,s=i.callback,u=t.objectMode?1:o.length;if(c(e,t,!1,u,o,a,s),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function h(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function p(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function d(e,t){var r=h(0,t);return r&&(0===t.pendingcb?(p(e,t),t.finished=!0,e.emit("finish")):p(e,t)),r}i.inherits(u,o),u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},u.prototype.write=function(e,t,r){var o=this._writableState,s=!1;return i.isFunction(t)&&(r=t,t=null),i.isBuffer(e)?t="buffer":t||(t=o.defaultEncoding),i.isFunction(r)||(r=function(){}),o.ended?function(e,t,r){var n=new Error("write after end");e.emit("error",n),process.nextTick((function(){r(n)}))}(this,0,r):function(e,t,r,n){var o=!0;if(!(i.isBuffer(r)||i.isString(r)||i.isNullOrUndefined(r)||t.objectMode)){var a=new TypeError("Invalid non-string/buffer chunk");e.emit("error",a),process.nextTick((function(){n(a)})),o=!1}return o}(this,o,e,r)&&(o.pendingcb++,s=function(e,t,r,o,s){r=function(e,t,r){!e.objectMode&&!1!==e.decodeStrings&&i.isString(t)&&(t=new n(t,r));return t}(t,r,o),i.isBuffer(r)&&(o="buffer");var u=t.objectMode?1:r.length;t.length+=u;var f=t.length<t.highWaterMark;f||(t.needDrain=!0);t.writing||t.corked?t.buffer.push(new a(r,o,s)):c(e,t,!1,u,r,o,s);return f}(this,o,e,t,r)),s},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||l(this,e))},u.prototype._write=function(e,t,r){r(new Error("not implemented"))},u.prototype._writev=null,u.prototype.end=function(e,t,r){var n=this._writableState;i.isFunction(e)?(r=e,e=null,t=null):i.isFunction(t)&&(r=t,t=null),i.isNullOrUndefined(e)||this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,d(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0}(this,n,r)}},8470:(e,t,r)=>{(t=e.exports=r(9521)).Stream=r(3086),t.Readable=t,t.Writable=r(793),t.Duplex=r(113),t.Transform=r(952),t.PassThrough=r(9284),process.browser||"disable"!==process.env.READABLE_STREAM||(e.exports=r(3086))},8274:(e,t,r)=>{var n=r(8764).Buffer,i=n.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var o=t.s=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!i(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=a)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function a(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function u(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},2467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.deserialize=t.registerSerializer=void 0;const n=r(7381);let i=n.DefaultSerializer;t.registerSerializer=function(e){i=n.extendSerializer(i,e)},t.deserialize=function(e){return i.deserialize(e)},t.serialize=function(e){return i.serialize(e)}},7381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSerializer=t.extendSerializer=void 0,t.extendSerializer=function(e,t){const r=e.deserialize.bind(e),n=e.serialize.bind(e);return{deserialize:e=>t.deserialize(e,r),serialize:e=>t.serialize(e,n)}};const r={deserialize:e=>Object.assign(Error(e.message),{name:e.name,stack:e.stack}),serialize:e=>({__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack})};t.DefaultSerializer={deserialize(e){return(t=e)&&"object"==typeof t&&"__error_marker"in t&&"$$error"===t.__error_marker?r.deserialize(e):e;var t},serialize:e=>e instanceof Error?r.serialize(e):e}},8258:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$worker=t.$transferable=t.$terminate=t.$events=t.$errors=void 0,t.$errors=Symbol("thread.errors"),t.$events=Symbol("thread.events"),t.$terminate=Symbol("thread.terminate"),t.$transferable=Symbol("thread.transferable"),t.$worker=Symbol("thread.worker")},8180:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transfer=t.isTransferDescriptor=void 0;const n=r(8258);t.isTransferDescriptor=function(e){return e&&"object"==typeof e&&e[n.$transferable]},t.Transfer=function(e,t){if(!t){if(!(r=e)||"object"!=typeof r)throw Error();t=[e]}var r;return{[n.$transferable]:!0,send:e,transferables:t}}},3229:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageType=t.MasterMessageType=void 0,function(e){e.cancel="cancel",e.run="run"}(t.MasterMessageType||(t.MasterMessageType={})),function(e){e.error="error",e.init="init",e.result="result",e.running="running",e.uncaughtError="uncaughtError"}(t.WorkerMessageType||(t.WorkerMessageType={}))},3447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={isWorkerRuntime:function(){const e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)},postMessageToMaster:function(e,t){self.postMessage(e,t)},subscribeToMasterMessages:function(e){const t=t=>{e(t.data)};return self.addEventListener("message",t),()=>{self.removeEventListener("message",t)}}}},1934:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expose=t.isWorkerRuntime=t.Transfer=t.registerSerializer=void 0;const o=i(r(6898)),a=r(2467),s=r(8180),u=r(3229),c=i(r(3447));var f=r(2467);Object.defineProperty(t,"registerSerializer",{enumerable:!0,get:function(){return f.registerSerializer}});var l=r(8180);Object.defineProperty(t,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),t.isWorkerRuntime=c.default.isWorkerRuntime;let h=!1;const p=new Map,d=e=>e&&e.type===u.MasterMessageType.run,y=e=>o.default(e)||function(e){return e&&"object"==typeof e&&"function"==typeof e.subscribe}(e);function g(e){return s.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function v(e,t){const{payload:r,transferables:n}=g(t),i={type:u.WorkerMessageType.error,uid:e,error:a.serialize(r)};c.default.postMessageToMaster(i,n)}function b(e,t,r){const{payload:n,transferables:i}=g(r),o={type:u.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:n};c.default.postMessageToMaster(o,i)}function m(e){try{const t={type:u.WorkerMessageType.uncaughtError,error:a.serialize(e)};c.default.postMessageToMaster(t)}catch(t){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\nLatest error:",t,"\nOriginal error:",e)}}function _(e,t,r){return n(this,void 0,void 0,(function*(){let n;try{n=t(...r)}catch(t){return v(e,t)}const i=y(n)?"observable":"promise";if(function(e,t){const r={type:u.WorkerMessageType.running,uid:e,resultType:t};c.default.postMessageToMaster(r)}(e,i),y(n)){const t=n.subscribe((t=>b(e,!1,a.serialize(t))),(t=>{v(e,a.serialize(t)),p.delete(e)}),(()=>{b(e,!0),p.delete(e)}));p.set(e,t)}else try{const t=yield n;b(e,!0,a.serialize(t))}catch(t){v(e,a.serialize(t))}}))}t.expose=function(e){if(!c.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(h)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(h=!0,"function"==typeof e)c.default.subscribeToMasterMessages((t=>{d(t)&&!t.method&&_(t.uid,e,t.args.map(a.deserialize))})),function(){const e={type:u.WorkerMessageType.init,exposed:{type:"function"}};c.default.postMessageToMaster(e)}();else{if("object"!=typeof e||!e)throw Error(`Invalid argument passed to expose(). Expected a function or an object, got: ${e}`);c.default.subscribeToMasterMessages((t=>{d(t)&&t.method&&_(t.uid,e[t.method],t.args.map(a.deserialize))}));!function(e){const t={type:u.WorkerMessageType.init,exposed:{type:"module",methods:e}};c.default.postMessageToMaster(t)}(Object.keys(e).filter((t=>"function"==typeof e[t])))}c.default.subscribeToMasterMessages((e=>{if((t=e)&&t.type===u.MasterMessageType.cancel){const t=e.uid,r=p.get(t);r&&(r.unsubscribe(),p.delete(t))}var t}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&c.default.isWorkerRuntime()&&(self.addEventListener("error",(e=>{setTimeout((()=>m(e.error||e)),250)})),self.addEventListener("unhandledrejection",(e=>{const t=e.reason;t&&"string"==typeof t.message&&setTimeout((()=>m(t)),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&c.default.isWorkerRuntime()&&(process.on("uncaughtException",(e=>{setTimeout((()=>m(e)),250)})),process.on("unhandledRejection",(e=>{e&&"string"==typeof e.message&&setTimeout((()=>m(e)),250)})))},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},384:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},5955:(e,t,r)=>{"use strict";var n=r(2584),i=r(8662),o=r(6430),a=r(5692);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=s(Object.prototype.toString),l=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(u)var d=s(BigInt.prototype.valueOf);if(c)var y=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===f(e)}function b(e){return"[object Set]"===f(e)}function m(e){return"[object WeakMap]"===f(e)}function _(e){return"[object WeakSet]"===f(e)}function w(e){return"[object ArrayBuffer]"===f(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function k(e){return"[object DataView]"===f(e)}function S(e){return"undefined"!=typeof DataView&&(k.working?k(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||S(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},m.working="undefined"!=typeof WeakMap&&m(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(m.working?m(e):e instanceof WeakMap)},_.working="undefined"!=typeof WeakSet&&_(new WeakSet),t.isWeakSet=function(e){return _(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=E,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=S;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(e){return"[object SharedArrayBuffer]"===f(e)}function x(e){return void 0!==O&&(void 0===A.working&&(A.working=A(new O)),A.working?A(e):e instanceof O)}function j(e){return g(e,l)}function T(e){return g(e,h)}function P(e){return g(e,p)}function R(e){return u&&g(e,d)}function B(e){return c&&g(e,y)}t.isSharedArrayBuffer=x,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===f(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===f(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===f(e)},t.isGeneratorObject=function(e){return"[object Generator]"===f(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===f(e)},t.isNumberObject=j,t.isStringObject=T,t.isBooleanObject=P,t.isBigIntObject=R,t.isSymbolObject=B,t.isBoxedPrimitive=function(e){return j(e)||T(e)||P(e)||R(e)||B(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||x(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},9539:(e,t,r)=>{var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])g(s)||!w(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var o={},a=/^$/;if(process.env.NODE_DEBUG){var s=process.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+s+"$","i")}function u(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,e,n.depth)}function c(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function f(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=l(e,i,n)),i}var o=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),k(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r);if(0===a.length){if(S(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(k(r))return h(r)}var c,f="",w=!1,O=["{","}"];(d(r)&&(w=!0,O=["[","]"]),S(r))&&(f=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),k(r)&&(f=" "+h(r)),0!==a.length||w&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=w?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)T(t,String(a))?o.push(p(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))})),o}(e,r,n,s,a):a.map((function(t){return p(e,r,n,s,t,w)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,f,O)):O[0]+f+O[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=g(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),m(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function m(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===O(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===O(e)}function k(e){return w(e)&&("[object Error]"===O(e)||e instanceof Error)}function S(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(a.test(e)){var r=process.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(5955),t.isArray=d,t.isBoolean=y,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=_,t.types.isRegExp=_,t.isObject=w,t.isDate=E,t.types.isDate=E,t.isError=k,t.types.isNativeError=k,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(384);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",j(),t.format.apply(t,arguments))},t.inherits=r(5717),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=P,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};e.apply(this,t).then((function(e){process.nextTick(o.bind(null,null,e))}),(function(e){process.nextTick(R.bind(null,e,o))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},3684:(e,t)=>{"use strict";function r(e,t,r){var n=r[r.length-1];e===n.element&&(r.pop(),n=r[r.length-1]);var i=n.element,o=n.index;if(Array.isArray(i))i.push(e);else if(o===t.length-2){i[t.pop()]=e}else t.push(e)}t.stringify=function(e){var t=[];t.push({obj:e});for(var r,n,i,o,a,s,u,c,f,l,h="";r=t.pop();)if(n=r.obj,h+=r.prefix||"",i=r.val||"")h+=i;else if("object"!=typeof n)h+=void 0===n?null:JSON.stringify(n);else if(null===n)h+="null";else if(Array.isArray(n)){for(t.push({val:"]"}),o=n.length-1;o>=0;o--)a=0===o?"":",",t.push({obj:n[o],prefix:a});t.push({val:"["})}else{for(u in s=[],n)n.hasOwnProperty(u)&&s.push(u);for(t.push({val:"}"}),o=s.length-1;o>=0;o--)f=n[c=s[o]],l=o>0?",":"",l+=JSON.stringify(c)+":",t.push({obj:f,prefix:l});t.push({val:"{"})}return h},t.parse=function(e){for(var t,n,i,o,a,s,u,c,f,l=[],h=[],p=0;;)if("}"!==(t=e[p++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":p+=3,r(null,l,h);break;case"t":p+=3,r(!0,l,h);break;case"f":p+=4,r(!1,l,h);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",p--;;){if(i=e[p++],!/[\d\.\-e\+]/.test(i)){p--;break}n+=i}r(parseFloat(n),l,h);break;case'"':for(o="",a=void 0,s=0;'"'!==(u=e[p++])||"\\"===a&&s%2==1;)o+=u,"\\"===(a=u)?s++:s=0;r(JSON.parse('"'+o+'"'),l,h);break;case"[":c={element:[],index:l.length},l.push(c.element),h.push(c);break;case"{":f={element:{},index:l.length},l.push(f.element),h.push(f);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===l.length)return l.pop();r(l.pop(),l,h)}}},6430:(e,t,r)=>{"use strict";var n=r(9804),i=r(3083),o=r(1924),a=o("Object.prototype.toString"),s=r(6410)(),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=o("String.prototype.slice"),l={},h=r(882),p=Object.getPrototypeOf;s&&h&&p&&n(c,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var r=p(t),n=h(r,Symbol.toStringTag);if(!n){var i=p(r);n=h(i,Symbol.toStringTag)}l[e]=n.get}}}));var d=r(5692);e.exports=function(e){return!!d(e)&&(s&&Symbol.toStringTag in e?function(e){var t=!1;return n(l,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):f(a(e),8,-1))}},7529:e=>{e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},9820:e=>{e.exports=function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},5525:()=>{},267:()=>{},1367:()=>{},2361:()=>{},4616:()=>{},1315:()=>{},3083:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}},882:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=r(2694),t=r(7105),n=r.n(t),i=r(8621),o=r(2733),a=r(3132),s=r(5717),u=r.n(s),c=r(7187),f=r.n(c),l=("undefined"!=typeof AbortController&&AbortController,fetch),h=Headers;var p=-324;function d(e,t){if(e===t)return 0;e=y(e),t=y(t);var r=_(e),n=_(t);if(r-n!=0)return r-n;switch(typeof e){case"number":return e-t;case"boolean":return e<t?-1:1;case"string":return function(e,t){return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){var i=d(e[n],t[n]);if(0!==i)return i}return e.length===t.length?0:e.length>t.length?1:-1}(e,t):function(e,t){for(var r=Object.keys(e),n=Object.keys(t),i=Math.min(r.length,n.length),o=0;o<i;o++){var a=d(r[o],n[o]);if(0!==a)return a;if(0!==(a=d(e[r[o]],t[n[o]])))return a}return r.length===n.length?0:r.length>n.length?1:-1}(e,t)}function y(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var r=e.length;e=new Array(r);for(var n=0;n<r;n++)e[n]=y(t[n])}else{if(e instanceof Date)return e.toJSON();if(null!==e)for(var i in e={},t)if(t.hasOwnProperty(i)){var o=t[i];void 0!==o&&(e[i]=y(o))}}}return e}function g(e){if(null!==e)switch(typeof e){case"boolean":return e?1:0;case"number":return function(e){if(0===e)return"1";var t=e.toExponential().split(/e\+?/),r=parseInt(t[1],10),n=e<0,i=n?"0":"2",o=(a=((n?-r:r)-p).toString(),s="0",u=3,c=function(e,t,r){for(var n="",i=r-e.length;n.length<i;)n+=t;return n}(a,s,u),c+a);var a,s,u,c;i+=""+o;var f=Math.abs(parseFloat(t[0]));n&&(f=10-f);var l=f.toFixed(20);return l=l.replace(/\.?0+$/,""),i+=""+l}(e);case"string":return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"");case"object":var t=Array.isArray(e),r=t?e:Object.keys(e),n=-1,i=r.length,o="";if(t)for(;++n<i;)o+=v(r[n]);else for(;++n<i;){var a=r[n];o+=v(a)+v(e[a])}return o}return""}function v(e){return _(e=y(e))+""+g(e)+"\0"}function b(e,t){var r,n=t;if("1"===e[t])r=0,t++;else{var i="0"===e[t];t++;var o="",a=e.substring(t,t+3),s=parseInt(a,10)+p;for(i&&(s=-s),t+=3;;){var u=e[t];if("\0"===u)break;o+=u,t++}r=1===(o=o.split(".")).length?parseInt(o,10):parseFloat(o[0]+"."+o[1]),i&&(r-=10),0!==s&&(r=parseFloat(r+"e"+s))}return{num:r,length:t-n}}function m(e,t){var r=e.pop();if(t.length){var n=t[t.length-1];r===n.element&&(t.pop(),n=t[t.length-1]);var i=n.element,o=n.index;if(Array.isArray(i))i.push(r);else if(o===e.length-2){i[e.pop()]=r}else e.push(r)}}function _(e){var t=["boolean","number","string","object"].indexOf(typeof e);return~t?null===e?1:Array.isArray(e)?5:t<3?t+2:t+3:Array.isArray(e)?5:void 0}function w(e,t){for(var r=e,n=0,i=t.length;n<i;n++){if(!(r=r[t[n]]))break}return r}function E(e,t,r){for(var n=0,i=t.length;n<i-1;n++){var o=t[n];e=e[o]=e[o]||{}}e[t[i-1]]=r}function k(e,t){return e<t?-1:e>t?1:0}function S(e){for(var t=[],r="",n=0,i=e.length;n<i;n++){var o=e[n];"."===o?n>0&&"\\"===e[n-1]?r=r.substring(0,r.length-1)+".":(t.push(r),r=""):r+=o}return t.push(r),t}var O=["$or","$nor","$not"];function A(e){return O.indexOf(e)>-1}function x(e){return Object.keys(e)[0]}function j(e){return e[x(e)]}function T(e){var t={};return e.forEach((function(e){Object.keys(e).forEach((function(r){var n=e[r];if("object"!=typeof n&&(n={$eq:n}),A(r))t[r]=n instanceof Array?n.map((function(e){return T([e])})):T([n]);else{var i=t[r]=t[r]||{};Object.keys(n).forEach((function(e){var t=n[e];return"$gt"===e||"$gte"===e?function(e,t,r){if(void 0!==r.$eq)return;void 0!==r.$gte?"$gte"===e?t>r.$gte&&(r.$gte=t):t>=r.$gte&&(delete r.$gte,r.$gt=t):void 0!==r.$gt?"$gte"===e?t>r.$gt&&(delete r.$gt,r.$gte=t):t>r.$gt&&(r.$gt=t):r[e]=t}(e,t,i):"$lt"===e||"$lte"===e?function(e,t,r){if(void 0!==r.$eq)return;void 0!==r.$lte?"$lte"===e?t<r.$lte&&(r.$lte=t):t<=r.$lte&&(delete r.$lte,r.$lt=t):void 0!==r.$lt?"$lte"===e?t<r.$lt&&(delete r.$lt,r.$lte=t):t<r.$lt&&(r.$lt=t):r[e]=t}(e,t,i):"$ne"===e?function(e,t){"$ne"in t?t.$ne.push(e):t.$ne=[e]}(t,i):"$eq"===e?function(e,t){delete t.$gt,delete t.$gte,delete t.$lt,delete t.$lte,delete t.$ne,t.$eq=e}(t,i):void(i[e]=t)}))}}))})),t}function P(e){for(var t in e){if(Array.isArray(e))for(var r in e)e[r].$and&&(e[r]=T(e[r].$and));var n=e[t];"object"==typeof n&&P(n)}return e}function R(e,t){for(var r in e){"$and"===r&&(t=!0);var n=e[r];"object"==typeof n&&(t=R(n,t))}return t}function B(e){var t=(0,a.d9)(e),r=!1;R(t,!1)&&("$and"in(t=P(t))&&(t=T(t.$and)),r=!0),["$or","$nor"].forEach((function(e){e in t&&t[e].forEach((function(e){for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r],i=e[n];"object"==typeof i&&null!==i||(e[n]={$eq:i})}}))})),"$not"in t&&(t.$not=T([t.$not]));for(var n=Object.keys(t),i=0;i<n.length;i++){var o=n[i],s=t[o];"object"!=typeof s||null===s?s={$eq:s}:"$ne"in s&&!r&&(s.$ne=[s.$ne]),t[o]=s}return t}function M(e,t,r){if(e=e.filter((function(e){return I(e.doc,t.selector,r)})),t.sort){var n=function(e){function t(t){return e.map((function(e){var r=S(x(e));return w(t,r)}))}return function(e,r){var n=d(t(e.doc),t(r.doc));return 0!==n?n:k(e.doc._id,r.doc._id)}}(t.sort);e=e.sort(n),"string"!=typeof t.sort[0]&&"desc"===j(t.sort[0])&&(e=e.reverse())}if("limit"in t||"skip"in t){var i=t.skip||0,o=("limit"in t?t.limit:e.length)+i;e=e.slice(i,o)}return e}function I(e,t,r){return r.every((function(r){var n=t[r],i=S(r),o=w(e,i);return A(r)?function(e,t,r){if("$or"===e)return t.some((function(e){return I(r,e,Object.keys(e))}));if("$not"===e)return!I(r,t,Object.keys(t));return!t.find((function(e){return I(r,e,Object.keys(e))}))}(r,n,e):L(n,e,i,o)}))}function L(e,t,r,n){return!e||("object"==typeof e?Object.keys(e).every((function(i){var o=e[i];return function(e,t,r,n,i){if(!N[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return N[e](t,r,n,i)}(i,t,o,r,n)})):e===n)}function U(e){return null!=e}function C(e){return void 0!==e}function D(e,t){return t.some((function(t){return e instanceof Array?e.indexOf(t)>-1:e===t}))}var N={$elemMatch:function(e,t,r,n){return!!Array.isArray(n)&&(0!==n.length&&("object"==typeof n[0]?n.some((function(e){return I(e,t,Object.keys(t))})):n.some((function(n){return L(t,e,r,n)}))))},$allMatch:function(e,t,r,n){return!!Array.isArray(n)&&(0!==n.length&&("object"==typeof n[0]?n.every((function(e){return I(e,t,Object.keys(t))})):n.every((function(n){return L(t,e,r,n)}))))},$eq:function(e,t,r,n){return C(n)&&0===d(n,t)},$gte:function(e,t,r,n){return C(n)&&d(n,t)>=0},$gt:function(e,t,r,n){return C(n)&&d(n,t)>0},$lte:function(e,t,r,n){return C(n)&&d(n,t)<=0},$lt:function(e,t,r,n){return C(n)&&d(n,t)<0},$exists:function(e,t,r,n){return t?C(n):!C(n)},$mod:function(e,t,r,n){return U(n)&&function(e,t){var r=t[0],n=t[1];if(0===r)throw new Error("Bad divisor, cannot divide by zero");if(parseInt(r,10)!==r)throw new Error("Divisor is not an integer");if(parseInt(n,10)!==n)throw new Error("Modulus is not an integer");return parseInt(e,10)===e&&e%r===n}(n,t)},$ne:function(e,t,r,n){return t.every((function(e){return 0!==d(n,e)}))},$in:function(e,t,r,n){return U(n)&&D(n,t)},$nin:function(e,t,r,n){return U(n)&&!D(n,t)},$size:function(e,t,r,n){return U(n)&&function(e,t){return e.length===t}(n,t)},$all:function(e,t,r,n){return Array.isArray(n)&&function(e,t){return t.every((function(t){return e.indexOf(t)>-1}))}(n,t)},$regex:function(e,t,r,n){return U(n)&&function(e,t){return new RegExp(t).test(e)}(n,t)},$type:function(e,t,r,n){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}throw new Error(t+" not supported as a type.Please use one of object, string, array, number, boolean or null.")}(n,t)}};function q(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var r="string"==typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+r+'"'))}t()}function F(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=(0,a.Rc)(e.view):e.filter=(0,a.Rc)(e.filter))}function W(e,t){return t.filter&&"string"==typeof t.filter&&!t.doc_ids&&!(0,a.Q1)(e.db)}function $(e,t){var r=t.complete;if("_view"===t.filter){if(!t.view||"string"!=typeof t.view){var n=(0,o.Tr)(o.y3,"`view` filter parameter not found or invalid.");return r(n)}var i=(0,a.VO)(t.view);e.db.get("_design/"+i[0],(function(n,s){if(e.isCancelled)return r(null,{status:"cancelled"});if(n)return r((0,o.G3)(n));var u,c=s&&s.views&&s.views[i[1]]&&s.views[i[1]].map;if(!c)return r((0,o.Tr)(o.Uc,s.views?"missing json key: "+i[1]:"missing json key: views"));t.filter=(u=["return function(doc) {",'  "use strict";',"  var emitted = false;","  var emit = function (a, b) {","    emitted = true;","  };","  var view = "+c+";","  view(doc);","  if (emitted) {","    return true;","  }","};"].join("\n"),(0,a.m6)(u,{})),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){if("object"!=typeof t)throw new Error("Selector error: expected a JSON object");var r=M([{doc:e}],{selector:t=B(t)},Object.keys(t));return r&&1===r.length}(e,t.selector)},e.doChanges(t);else{var s=(0,a.VO)(t.filter);e.db.get("_design/"+s[0],(function(n,i){if(e.isCancelled)return r(null,{status:"cancelled"});if(n)return r((0,o.G3)(n));var u,c=i&&i.filters&&i.filters[s[1]];if(!c)return r((0,o.Tr)(o.Uc,i&&i.filters?"missing json key: "+s[1]:"missing json key: filters"));t.filter=(u=c,(0,a.m6)('"use strict";\nreturn '+u+";",{})),e.doChanges(t)}))}}const z=function(e){e._changesFilterPlugin={validate:q,normalize:F,shouldFilter:W,filter:$}};function V(e,t,r){f().call(this);var n=this;this.db=e;var i=(t=t?(0,a.d9)(t):{}).complete=(0,a.IH)((function(t,r){t?(0,a.xS)(n,"error")>0&&n.emit("error",t):n.emit("complete",r),n.removeAllListeners(),e.removeListener("destroyed",o)}));function o(){n.cancel()}r&&(n.on("complete",(function(e){r(null,e)})),n.on("error",r)),e.once("destroyed",o),t.onChange=function(e,t,r){n.isCancelled||function(e,t,r,n){try{e.emit("change",t,r,n)}catch(e){(0,a.yq)("error",'Error in .on("change", function):',e)}}(n,e,t,r)};var s=new Promise((function(e,r){t.complete=function(t,n){t?r(t):e(n)}}));n.once("cancel",(function(){e.removeListener("destroyed",o),t.complete(null,{status:"cancelled"})})),this.then=s.then.bind(s),this.catch=s.catch.bind(s),this.then((function(e){i(null,e)}),i),e.taskqueue.isReady?n.validateChanges(t):e.taskqueue.addTask((function(e){e?t.complete(e):n.isCancelled?n.emit("cancel"):n.validateChanges(t)}))}function K(e,t,r){var n=[{rev:e._rev}];"all_docs"===r.style&&(n=(0,i.cI)(t.rev_tree).map((function(e){return{rev:e.rev}})));var o={id:t.id,changes:n,doc:e};return(0,i.uY)(t,e._rev)&&(o.deleted=!0),r.conflicts&&(o.doc._conflicts=(0,i.DJ)(t),o.doc._conflicts.length||delete o.doc._conflicts),o}function H(e,t){return e<t?-1:e>t?1:0}function G(e,t){return function(r,n){r||n[0]&&n[0].error?((r=r||n[0]).docId=t,e(r)):e(null,n.length?n[0]:n)}}function Y(e,t){var r=H(e._id,t._id);return 0!==r?r:H(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}function J(e){var t=e._compactionQueue[0],r=t.opts,n=t.callback;e.get("_local/compaction").catch((function(){return!1})).then((function(t){t&&t.last_seq&&(r.last_seq=t.last_seq),e._compact(r,(function(t,r){t?n(t):n(null,r),(0,a.Y3)((function(){e._compactionQueue.shift(),e._compactionQueue.length&&J(e)}))}))}))}function Q(){for(var e in f().call(this),Q.prototype)"function"==typeof this[e]&&(this[e]=this[e].bind(this))}function X(){this.isReady=!1,this.failed=!1,this.queue=[]}function Z(e,t){if(!(this instanceof Z))return new Z(e,t);var r=this;if(t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=(0,a.d9)(t),r.auto_compaction=t.auto_compaction,r.prefix=Z.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var n=function(e,t){var r=e.match(/([a-z-]*):\/\/(.*)/);if(r)return{name:/https?/.test(r[1])?r[1]+"://"+r[2]:r[2],adapter:r[1]};var n=Z.adapters,i=Z.preferredAdapters,o=Z.prefix,s=t.adapter;if(!s)for(var u=0;u<i.length&&"idb"===(s=i[u])&&"websql"in n&&(0,a.eW)()&&localStorage["_pouch__websqldb_"+o+e];++u)(0,a.yq)("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');var c=n[s];return{name:c&&"use_prefix"in c&&!c.use_prefix?e:o+e,adapter:s}}((t.prefix||"")+e,t);if(t.name=n.name,t.adapter=t.adapter||n.adapter,r.name=e,r._adapter=t.adapter,Z.emit("debug",["adapter","Picked adapter: ",t.adapter]),!Z.adapters[t.adapter]||!Z.adapters[t.adapter].valid())throw new Error("Invalid Adapter: "+t.adapter);Q.call(r),r.taskqueue=new X,r.adapter=t.adapter,Z.adapters[t.adapter].call(r,t,(function(e){if(e)return r.taskqueue.fail(e);!function(e){function t(t){e.removeListener("closed",r),t||e.constructor.emit("destroyed",e.name)}function r(){e.removeListener("destroyed",t),e.constructor.emit("unref",e)}e.once("destroyed",t),e.once("closed",r),e.constructor.emit("ref",e)}(r),r.emit("created",r),Z.emit("created",r.name),r.taskqueue.ready(r)}))}u()(V,f()),V.prototype.cancel=function(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")},V.prototype.validateChanges=function(e){var t=e.complete,r=this;Z._changesFilterPlugin?Z._changesFilterPlugin.validate(e,(function(n){if(n)return t(n);r.doChanges(e)})):r.doChanges(e)},V.prototype.doChanges=function(e){var t=this,r=e.complete;if("live"in(e=(0,a.d9)(e))&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=K,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"!==e.since){if(Z._changesFilterPlugin){if(Z._changesFilterPlugin.normalize(e),Z._changesFilterPlugin.shouldFilter(this,e))return Z._changesFilterPlugin.filter(this,e)}else["doc_ids","filter","selector","view"].forEach((function(t){t in e&&(0,a.yq)("warn",'The "'+t+'" option was passed in to changes/replicate, but pouchdb-changes-filter plugin is not installed, so it was ignored. Please install the plugin to enable filtering.')}));"descending"in e||(e.descending=!1),e.limit=0===e.limit?1:e.limit,e.complete=r;var i=this.db._changes(e);if(i&&"function"==typeof i.cancel){var o=t.cancel;t.cancel=n()((function(e){i.cancel(),o.apply(this,e)}))}}else this.db.info().then((function(n){t.isCancelled?r(null,{status:"cancelled"}):(e.since=n.update_seq,t.doChanges(e))}),r)},u()(Q,f()),Q.prototype.post=(0,a.D3)("post",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),"object"!=typeof e||Array.isArray(e))return r((0,o.Tr)(o.nM));this.bulkDocs({docs:[e]},t,G(r,e._id))})),Q.prototype.put=(0,a.D3)("put",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),"object"!=typeof e||Array.isArray(e))return r((0,o.Tr)(o.nM));if((0,a.GE)(e._id),(0,i.zB)(e._id)&&"function"==typeof this._putLocal)return e._deleted?this._removeLocal(e,r):this._putLocal(e,r);var n,s,u,c,f=this;function l(r){"function"==typeof f._put&&!1!==t.new_edits?f._put(e,t,r):f.bulkDocs({docs:[e]},t,G(r,e._id))}t.force&&e._rev?(n=e._rev.split("-"),s=n[1],u=parseInt(n[0],10)+1,c=(0,a.OD)(),e._revisions={start:u,ids:[c,s]},e._rev=u+"-"+c,t.new_edits=!1,l((function(t){var n=t?null:{ok:!0,id:e._id,rev:e._rev};r(t,n)}))):l(r)})),Q.prototype.putAttachment=(0,a.D3)("putAttachment",(function(e,t,r,n,i){var s=this;function u(e){var r="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:i,data:n,revpos:++r},s.put(e)}return"function"==typeof i&&(i=n,n=r,r=null),void 0===i&&(i=n,n=r,r=null),i||(0,a.yq)("warn","Attachment",t,"on document",e,"is missing content_type"),s.get(e).then((function(e){if(e._rev!==r)throw(0,o.Tr)(o.gW);return u(e)}),(function(t){if(t.reason===o.Uc.message)return u({_id:e});throw t}))})),Q.prototype.removeAttachment=(0,a.D3)("removeAttachment",(function(e,t,r,n){var i=this;i.get(e,(function(e,a){if(e)n(e);else if(a._rev===r){if(!a._attachments)return n();delete a._attachments[t],0===Object.keys(a._attachments).length&&delete a._attachments,i.put(a,n)}else n((0,o.Tr)(o.gW))}))})),Q.prototype.remove=(0,a.D3)("remove",(function(e,t,r,n){var o;"string"==typeof t?(o={_id:e,_rev:t},"function"==typeof r&&(n=r,r={})):(o=e,"function"==typeof t?(n=t,r={}):(n=r,r=t)),(r=r||{}).was_delete=!0;var a={_id:o._id,_rev:o._rev||r.rev,_deleted:!0};if((0,i.zB)(a._id)&&"function"==typeof this._removeLocal)return this._removeLocal(o,n);this.bulkDocs({docs:[a]},r,G(n,a._id))})),Q.prototype.revsDiff=(0,a.D3)("revsDiff",(function(t,r,n){"function"==typeof r&&(n=r,r={});var o=Object.keys(t);if(!o.length)return n(null,{});var a=0,s=new e.D;function u(e,t){s.has(e)||s.set(e,{missing:[]}),s.get(e).missing.push(t)}o.map((function(e){this._getRevisionTree(e,(function(r,c){if(r&&404===r.status&&"missing"===r.message)s.set(e,{missing:t[e]});else{if(r)return n(r);!function(e,r){var n=t[e].slice(0);(0,i.fE)(r,(function(t,r,i,o,a){var s=r+"-"+i,c=n.indexOf(s);-1!==c&&(n.splice(c,1),"available"!==a.status&&u(e,s))})),n.forEach((function(t){u(e,t)}))}(e,c)}if(++a===o.length){var f={};return s.forEach((function(e,t){f[t]=e})),n(null,f)}}))}),this)})),Q.prototype.bulkGet=(0,a.D3)("bulkGet",(function(e,t){(0,a.o)(this,e,t)})),Q.prototype.compactDocument=(0,a.D3)("compactDocument",(function(e,t,r){var n=this;this._getRevisionTree(e,(function(o,a){if(o)return r(o);var s=function(e){var t={},r=[];return(0,i.fE)(e,(function(e,n,i,o){var a=n+"-"+i;return e&&(t[a]=0),void 0!==o&&r.push({from:o,to:a}),a})),r.reverse(),r.forEach((function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])})),t}(a),u=[],c=[];Object.keys(s).forEach((function(e){s[e]>t&&u.push(e)})),(0,i.fE)(a,(function(e,t,r,n,i){var o=t+"-"+r;"available"===i.status&&-1!==u.indexOf(o)&&c.push(o)})),n._doCompaction(e,c,r)}))})),Q.prototype.compact=(0,a.D3)("compact",(function(e,t){"function"==typeof e&&(t=e,e={});var r=this;e=e||{},r._compactionQueue=r._compactionQueue||[],r._compactionQueue.push({opts:e,callback:t}),1===r._compactionQueue.length&&J(r)})),Q.prototype._compact=function(e,t){var r=this,n={return_docs:!1,last_seq:e.last_seq||0},i=[];r.changes(n).on("change",(function(e){i.push(r.compactDocument(e.id,0))})).on("complete",(function(e){var n=e.last_seq;Promise.all(i).then((function(){return(0,a.H)(r,"_local/compaction",(function(e){return(!e.last_seq||e.last_seq<n)&&(e.last_seq=n,e)}))})).then((function(){t(null,{ok:!0})})).catch(t)})).on("error",t)},Q.prototype.get=(0,a.D3)("get",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),"string"!=typeof e)return r((0,o.Tr)(o.JE));if((0,i.zB)(e)&&"function"==typeof this._getLocal)return this._getLocal(e,r);var n=[],a=this;function s(){var i=[],o=n.length;if(!o)return r(null,i);n.forEach((function(n){a.get(e,{rev:n,revs:t.revs,latest:t.latest,attachments:t.attachments,binary:t.binary},(function(e,t){if(e)i.push({missing:n});else{for(var a,s=0,u=i.length;s<u;s++)if(i[s].ok&&i[s].ok._rev===t._rev){a=!0;break}a||i.push({ok:t})}--o||r(null,i)}))}))}if(!t.open_revs)return this._get(e,t,(function(n,o){if(n)return n.docId=e,r(n);var s=o.doc,u=o.metadata,c=o.ctx;if(t.conflicts){var f=(0,i.DJ)(u);f.length&&(s._conflicts=f)}if((0,i.uY)(u,s._rev)&&(s._deleted=!0),t.revs||t.revs_info){for(var l=s._rev.split("-"),h=parseInt(l[0],10),p=l[1],d=(0,i.vc)(u.rev_tree),y=null,g=0;g<d.length;g++){var v=d[g],b=v.ids.map((function(e){return e.id})).indexOf(p);(b===h-1||!y&&-1!==b)&&(y=v)}if(!y)return(n=new Error("invalid rev tree")).docId=e,r(n);var m=y.ids.map((function(e){return e.id})).indexOf(s._rev.split("-")[1])+1,_=y.ids.length-m;if(y.ids.splice(m,_),y.ids.reverse(),t.revs&&(s._revisions={start:y.pos+y.ids.length-1,ids:y.ids.map((function(e){return e.id}))}),t.revs_info){var w=y.pos+y.ids.length;s._revs_info=y.ids.map((function(e){return{rev:--w+"-"+e.id,status:e.opts.status}}))}}if(t.attachments&&s._attachments){var E=s._attachments,k=Object.keys(E).length;if(0===k)return r(null,s);Object.keys(E).forEach((function(e){this._getAttachment(s._id,e,E[e],{rev:s._rev,binary:t.binary,ctx:c},(function(t,n){var i=s._attachments[e];i.data=n,delete i.stub,delete i.length,--k||r(null,s)}))}),a)}else{if(s._attachments)for(var S in s._attachments)s._attachments.hasOwnProperty(S)&&(s._attachments[S].stub=!0);r(null,s)}}));if("all"===t.open_revs)this._getRevisionTree(e,(function(e,t){if(e)return r(e);n=(0,i.cI)(t).map((function(e){return e.rev})),s()}));else{if(!Array.isArray(t.open_revs))return r((0,o.Tr)(o.I4,"function_clause"));n=t.open_revs;for(var u=0;u<n.length;u++){var c=n[u];if("string"!=typeof c||!/^\d+-/.test(c))return r((0,o.Tr)(o.Dq))}s()}})),Q.prototype.getAttachment=(0,a.D3)("getAttachment",(function(e,t,r,n){var i=this;r instanceof Function&&(n=r,r={}),this._get(e,r,(function(a,s){return a?n(a):s.doc._attachments&&s.doc._attachments[t]?(r.ctx=s.ctx,r.binary=!0,void i._getAttachment(e,t,s.doc._attachments[t],r,n)):n((0,o.Tr)(o.Uc))}))})),Q.prototype.allDocs=(0,a.D3)("allDocs",(function(e,t){if("function"==typeof e&&(t=e,e={}),e.skip=void 0!==e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var r=["startkey","endkey","key"].filter((function(t){return t in e}))[0];if(r)return void t((0,o.Tr)(o.bi,"Query parameter `"+r+"` is not compatible with multi-get"));if(!(0,a.Q1)(this)&&(function(e){var t="limit"in e?e.keys.slice(e.skip,e.limit+e.skip):e.skip>0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})),Q.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new V(this,e,t)},Q.prototype.close=(0,a.D3)("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})),Q.prototype.info=(0,a.D3)("info",(function(e){var t=this;this._info((function(r,n){if(r)return e(r);n.db_name=n.db_name||t.name,n.auto_compaction=!(!t.auto_compaction||(0,a.Q1)(t)),n.adapter=t.adapter,e(null,n)}))})),Q.prototype.id=(0,a.D3)("id",(function(e){return this._id(e)})),Q.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},Q.prototype.bulkDocs=(0,a.D3)("bulkDocs",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return r((0,o.Tr)(o.kD));for(var n=0;n<e.docs.length;++n)if("object"!=typeof e.docs[n]||Array.isArray(e.docs[n]))return r((0,o.Tr)(o.nM));var i;if(e.docs.forEach((function(e){e._attachments&&Object.keys(e._attachments).forEach((function(t){i=i||function(e){return"_"===e.charAt(0)&&e+" is not a valid attachment name, attachment names cannot start with '_'"}(t),e._attachments[t].content_type||(0,a.yq)("warn","Attachment",t,"on document",e._id,"is missing content_type")}))})),i)return r((0,o.Tr)(o.y3,i));"new_edits"in t||(t.new_edits=!("new_edits"in e)||e.new_edits);var s=this;t.new_edits||(0,a.Q1)(s)||e.docs.sort(Y),function(e){for(var t=0;t<e.length;t++){var r=e[t];if(r._deleted)delete r._attachments;else if(r._attachments)for(var n=Object.keys(r._attachments),i=0;i<n.length;i++){var o=n[i];r._attachments[o]=(0,a.ei)(r._attachments[o],["data","digest","content_type","length","revpos","stub"])}}}(e.docs);var u=e.docs.map((function(e){return e._id}));return this._bulkDocs(e,t,(function(e,n){if(e)return r(e);if(t.new_edits||(n=n.filter((function(e){return e.error}))),!(0,a.Q1)(s))for(var i=0,o=n.length;i<o;i++)n[i].id=n[i].id||u[i];r(null,n)}))})),Q.prototype.registerDependentDatabase=(0,a.D3)("registerDependentDatabase",(function(e,t){var r=new this.constructor(e,this.__opts);(0,a.H)(this,"_local/_pouch_dependentDbs",(function(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)})).then((function(){t(null,{db:r})})).catch(t)})),Q.prototype.destroy=(0,a.D3)("destroy",(function(e,t){"function"==typeof e&&(t=e,e={});var r=this,n=!("use_prefix"in r)||r.use_prefix;function i(){r._destroy(e,(function(e,n){if(e)return t(e);r._destroyed=!0,r.emit("destroyed"),t(null,n||{ok:!0})}))}if((0,a.Q1)(r))return i();r.get("_local/_pouch_dependentDbs",(function(e,o){if(e)return 404!==e.status?t(e):i();var a=o.dependentDbs,s=r.constructor,u=Object.keys(a).map((function(e){var t=n?e.replace(new RegExp("^"+s.prefix),""):e;return new s(t,r.__opts).destroy()}));Promise.all(u).then(i,t)}))})),X.prototype.execute=function(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()},X.prototype.fail=function(e){this.failed=e,this.execute()},X.prototype.ready=function(e){this.isReady=!0,this.db=e,this.execute()},X.prototype.addTask=function(e){this.queue.push(e),this.failed&&this.execute()},u()(Z,Q),Z.adapters={},Z.preferredAdapters=[],Z.prefix="_pouch_";var ee=new(f());!function(t){Object.keys(f().prototype).forEach((function(e){"function"==typeof f().prototype[e]&&(t[e]=ee[e].bind(ee))}));var r=t._destructionListeners=new e.D;t.on("ref",(function(e){r.has(e.name)||r.set(e.name,[]),r.get(e.name).push(e)})),t.on("unref",(function(e){if(r.has(e.name)){var t=r.get(e.name),n=t.indexOf(e);n<0||(t.splice(n,1),t.length>1?r.set(e.name,t):r.delete(e.name))}})),t.on("destroyed",(function(e){if(r.has(e)){var t=r.get(e);r.delete(e),t.forEach((function(e){e.emit("destroyed",!0)}))}}))}(Z),Z.adapter=function(e,t,r){t.valid()&&(Z.adapters[e]=t,r&&Z.preferredAdapters.push(e))},Z.plugin=function(e){if("function"==typeof e)e(Z);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){Z.prototype[t]=e[t]}))}return this.__defaults&&(Z.__defaults=(0,a.f0)({},this.__defaults)),Z},Z.defaults=function(e){function t(e,r){if(!(this instanceof t))return new t(e,r);r=r||{},e&&"object"==typeof e&&(e=(r=e).name,delete r.name),r=(0,a.f0)({},t.__defaults,r),Z.call(this,e,r)}return u()(t,Z),t.preferredAdapters=Z.preferredAdapters.slice(),Object.keys(Z).forEach((function(e){e in t||(t[e]=Z[e])})),t.__defaults=(0,a.f0)({},this.__defaults,e),t},Z.fetch=function(e,t){return l(e,t)};Z.plugin(z),Z.version="7.2.2";const te=Z;var re=r(807),ne=r(7239);function ie(e){this.status=400,this.name="query_parse_error",this.message=e,this.error=!0;try{Error.captureStackTrace(this,ie)}catch(e){}}function oe(e){this.status=404,this.name="not_found",this.message=e,this.error=!0;try{Error.captureStackTrace(this,oe)}catch(e){}}function ae(e){this.status=500,this.name="invalid_value",this.message=e,this.error=!0;try{Error.captureStackTrace(this,ae)}catch(e){}}function se(e,t){return t&&e.then((function(e){(0,a.Y3)((function(){t(null,e)}))}),(function(e){(0,a.Y3)((function(){t(e)}))})),e}function ue(e,t){return function(){var r=arguments,n=this;return e.add((function(){return t.apply(n,r)}))}}function ce(t){var r=new e.l(t),n=new Array(r.size),i=-1;return r.forEach((function(e){n[++i]=e})),n}function fe(e){var t=new Array(e.size),r=-1;return e.forEach((function(e,n){t[++r]=n})),t}function le(){this.promise=new Promise((function(e){e()}))}function he(e){if(!e)return"undefined";switch(typeof e){case"function":case"string":return e.toString();default:return JSON.stringify(e)}}function pe(e,t,r,n,i,o){var s,u=function(e,t){return he(e)+he(t)+"undefined"}(r,n);if(!i&&(s=e._cachedViews=e._cachedViews||{})[u])return s[u];var c=e.info().then((function(c){var f=c.db_name+"-mrview-"+(i?"temp":(0,ne.$)(u));return(0,a.H)(e,"_local/"+o,(function(e){e.views=e.views||{};var r=t;-1===r.indexOf("/")&&(r=t+"/"+t);var n=e.views[r]=e.views[r]||{};if(!n[f])return n[f]=!0,e})).then((function(){return e.registerDependentDatabase(f).then((function(t){var i=t.db;i.auto_compaction=!0;var o={name:f,db:i,sourceDB:e,adapter:e.adapter,mapFun:r,reduceFun:n};return o.db.get("_local/lastSeq").catch((function(e){if(404!==e.status)throw e})).then((function(e){return o.seq=e?e.seq:0,s&&o.db.once("destroyed",(function(){delete s[u]})),o}))}))}))}));return s&&(s[u]=c),c}u()(ie,Error),u()(oe,Error),u()(ae,Error),le.prototype.add=function(e){return this.promise=this.promise.catch((function(){})).then((function(){return e()})),this.promise},le.prototype.finish=function(){return this.promise};var de={},ye=new le;function ge(e){return-1===e.indexOf("/")?[e,e]:e.split("/")}function ve(e,t){try{e.emit("error",t)}catch(e){(0,a.yq)("error","The user's map/reduce function threw an uncaught error.\nYou can debug this error by doing:\nmyDatabase.on('error', function (err) { debugger; });\nPlease double-check your map/reduce function."),(0,a.yq)("error",t)}}const be=function(t,r,i,s){function u(e,t,r){try{t(r)}catch(t){ve(e,t)}}function c(e,t,r,n,i){try{return{output:t(r,n,i)}}catch(t){return ve(e,t),{error:t}}}function f(e,t){var r=d(e.key,t.key);return 0!==r?r:d(e.value,t.value)}function l(e,t,r){return r=r||0,"number"==typeof t?e.slice(r,t+r):r>0?e.slice(r):e}function p(e){var t=e.value;return t&&"object"==typeof t&&t._id||e.id}function g(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach((function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach((function(e){var r=t[e];t[e].data=(0,re.W7)(r.data,r.content_type)}))}))}(t),t}}function _(e,t,r,n){var i=t[e];void 0!==i&&(n&&(i=encodeURIComponent(JSON.stringify(i))),r.push(e+"="+i))}function w(e){if(void 0!==e){var t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function E(e,t){var r=e.descending?"endkey":"startkey",n=e.descending?"startkey":"endkey";if(void 0!==e[r]&&void 0!==e[n]&&d(e[r],e[n])>0)throw new ie("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new ie("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new ie("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach((function(t){var r=function(e){if(e){if("number"!=typeof e)return new ie('Invalid value for integer: "'+e+'"');if(e<0)return new ie('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(r)throw r}))}function k(e){return function(t){if(404===t.status)return e;throw t}}function S(t,r,n){var i="_local/doc_"+t,o={_id:i,keys:[]},a=n.get(t),s=a[0];return(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(a[1])?Promise.resolve(o):r.db.get(i).catch(k(o))).then((function(t){return function(e){return e.keys.length?r.db.allDocs({keys:e.keys,include_docs:!0}):Promise.resolve({rows:[]})}(t).then((function(r){return function(t,r){for(var n=[],i=new e.l,o=0,a=r.rows.length;o<a;o++){var u=r.rows[o].doc;if(u&&(n.push(u),i.add(u._id),u._deleted=!s.has(u._id),!u._deleted)){var c=s.get(u._id);"value"in c&&(u.value=c.value)}}var f=fe(s);return f.forEach((function(e){if(!i.has(e)){var t={_id:e},r=s.get(e);"value"in r&&(t.value=r.value),n.push(t)}})),t.keys=ce(f.concat(t.keys)),n.push(t),n}(t,r)}))}))}function O(e){var t="string"==typeof e?e:e.name,r=de[t];return r||(r=de[t]=new le),r}function A(t){return ue(O(t),(function(){return function(t){var n,i;function o(e,t){var r={id:i._id,key:y(e)};null!=t&&(r.value=y(t)),n.push(r)}var s=r(t.mapFun,o),c=t.seq||0;function l(e,r){return function(){return function(e,t,r){var n="_local/lastSeq";return e.db.get(n).catch(k({_id:n,seq:0})).then((function(n){var i=fe(t);return Promise.all(i.map((function(r){return S(r,e,t)}))).then((function(t){var i=(0,a.xH)(t);return n.seq=r,i.push(n),e.db.bulkDocs({docs:i})}))}))}(t,e,r)}}var h=new le;function p(){return t.sourceDB.changes({return_docs:!0,conflicts:!0,include_docs:!0,style:"all_docs",since:c,limit:50}).then(g)}function g(e){var t=e.results;if(t.length){var r=b(t);if(h.add(l(r,c)),!(t.length<50))return p()}}function b(r){for(var o=new e.D,a=0,l=r.length;a<l;a++){var h=r[a];if("_"!==h.doc._id[0]){n=[],(i=h.doc)._deleted||u(t.sourceDB,s,i),n.sort(f);var p=m(n);o.set(h.doc._id,[p,h.changes])}c=h.seq}return o}function m(t){for(var r,n=new e.D,i=0,o=t.length;i<o;i++){var a=t[i],s=[a.key,a.id];i>0&&0===d(a.key,r)&&s.push(i),n.set(v(s),a),r=a.key}return n}return p().then((function(){return h.finish()})).then((function(){t.seq=c}))}(t)}))()}function x(t,r){return ue(O(t),(function(){return function(t,r){var n,o=t.reduceFun&&!1!==r.reduce,s=r.skip||0;void 0===r.keys||r.keys.length||(r.limit=0,delete r.keys);function u(e){return e.include_docs=!0,t.db.allDocs(e).then((function(e){return n=e.total_rows,e.rows.map((function(e){if("value"in e.doc&&"object"==typeof e.doc.value&&null!==e.doc.value){var t=Object.keys(e.doc.value).sort(),r=["id","key","value"];if(!(t<r||t>r))return e.doc.value}var n=function(e){for(var t=[],r=[],n=0;;){var i=e[n++];if("\0"!==i)switch(i){case"1":t.push(null);break;case"2":t.push("1"===e[n]),n++;break;case"3":var o=b(e,n);t.push(o.num),n+=o.length;break;case"4":for(var a="";;){var s=e[n];if("\0"===s)break;a+=s,n++}a=a.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),t.push(a);break;case"5":var u={element:[],index:t.length};t.push(u.element),r.push(u);break;case"6":var c={element:{},index:t.length};t.push(c.element),r.push(c);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+i)}else{if(1===t.length)return t.pop();m(t,r)}}}(e.doc._id);return{key:n[0],id:n[1],value:"value"in e.doc?e.doc.value:null}}))}))}function f(a){var u;if(u=o?function(e,t,r){0===r.group_level&&delete r.group_level;var n=r.group||r.group_level,o=i(e.reduceFun),a=[],s=isNaN(r.group_level)?Number.POSITIVE_INFINITY:r.group_level;t.forEach((function(e){var t=a[a.length-1],r=n?e.key:null;if(n&&Array.isArray(r)&&(r=r.slice(0,s)),t&&0===d(t.groupKey,r))return t.keys.push([e.key,e.id]),void t.values.push(e.value);a.push({keys:[[e.key,e.id]],values:[e.value],groupKey:r})})),t=[];for(var u=0,f=a.length;u<f;u++){var h=a[u],p=c(e.sourceDB,o,h.keys,h.values,!1);if(p.error&&p.error instanceof ae)throw p.error;t.push({value:p.error?null:p.output,key:h.groupKey})}return{rows:l(t,r.limit,r.skip)}}(t,a,r):{total_rows:n,offset:s,rows:a},r.update_seq&&(u.update_seq=t.seq),r.include_docs){var f=ce(a.map(p));return t.sourceDB.allDocs({keys:f,include_docs:!0,conflicts:r.conflicts,attachments:r.attachments,binary:r.binary}).then((function(t){var r=new e.D;return t.rows.forEach((function(e){r.set(e.id,e.doc)})),a.forEach((function(e){var t=p(e),n=r.get(t);n&&(e.doc=n)})),u}))}return u}if(void 0!==r.keys){var h=r.keys.map((function(e){var t={startkey:v([e]),endkey:v([e,{}])};return r.update_seq&&(t.update_seq=!0),u(t)}));return Promise.all(h).then(a.xH).then(f)}var y,g,_={descending:r.descending};if(r.update_seq&&(_.update_seq=!0),"start_key"in r&&(y=r.start_key),"startkey"in r&&(y=r.startkey),"end_key"in r&&(g=r.end_key),"endkey"in r&&(g=r.endkey),void 0!==y&&(_.startkey=r.descending?v([y,{}]):v([y])),void 0!==g){var w=!1!==r.inclusive_end;r.descending&&(w=!w),_.endkey=v(w?[g,{}]:[g])}if(void 0!==r.key){var E=v([r.key]),k=v([r.key,{}]);_.descending?(_.endkey=E,_.startkey=k):(_.startkey=E,_.endkey=k)}return o||("number"==typeof r.limit&&(_.limit=r.limit),_.skip=s),u(_).then(f)}(t,r)}))()}function j(e,r,n){if("function"==typeof e._query)return function(e,t,r){return new Promise((function(n,i){e._query(t,r,(function(e,t){if(e)return i(e);n(t)}))}))}(e,r,n);if((0,a.Q1)(e))return function(e,t,r){var n,i,a,s=[],u="GET";if(_("reduce",r,s),_("include_docs",r,s),_("attachments",r,s),_("limit",r,s),_("descending",r,s),_("group",r,s),_("group_level",r,s),_("skip",r,s),_("stale",r,s),_("conflicts",r,s),_("startkey",r,s,!0),_("start_key",r,s,!0),_("endkey",r,s,!0),_("end_key",r,s,!0),_("inclusive_end",r,s),_("key",r,s,!0),_("update_seq",r,s),s=""===(s=s.join("&"))?"":"?"+s,void 0!==r.keys){var c="keys="+encodeURIComponent(JSON.stringify(r.keys));c.length+s.length+1<=2e3?s+=("?"===s[0]?"&":"?")+c:(u="POST","string"==typeof t?n={keys:r.keys}:t.keys=r.keys)}if("string"==typeof t){var f=ge(t);return e.fetch("_design/"+f[0]+"/_view/"+f[1]+s,{headers:new h({"Content-Type":"application/json"}),method:u,body:JSON.stringify(n)}).then((function(e){return i=e.ok,a=e.status,e.json()})).then((function(e){if(!i)throw e.status=a,(0,o.G3)(e);return e.rows.forEach((function(e){if(e.value&&e.value.error&&"builtin_reduce_error"===e.value.error)throw new Error(e.reason)})),e})).then(g(r))}return n=n||{},Object.keys(t).forEach((function(e){Array.isArray(t[e])?n[e]=t[e]:n[e]=t[e].toString()})),e.fetch("_temp_view"+s,{headers:new h({"Content-Type":"application/json"}),method:"POST",body:JSON.stringify(n)}).then((function(e){return i=e.ok,a=e.status,e.json()})).then((function(e){if(!i)throw e.status=a,(0,o.G3)(e);return e})).then(g(r))}(e,r,n);if("string"!=typeof r)return E(n,r),ye.add((function(){return pe(e,"temp_view/temp_view",r.map,r.reduce,!0,t).then((function(e){return t=A(e).then((function(){return x(e,n)})),r=function(){return e.db.destroy()},t.then((function(e){return r().then((function(){return e}))}),(function(e){return r().then((function(){throw e}))}));var t,r}))})),ye.finish();var i=r,u=ge(i),c=u[0],f=u[1];return e.get("_design/"+c).then((function(r){var o=r.views&&r.views[f];if(!o)throw new oe("ddoc "+r._id+" has no view named "+f);return s(r,f),E(n,o),pe(e,i,o.map,o.reduce,!1,t).then((function(e){return"ok"===n.stale||"update_after"===n.stale?("update_after"===n.stale&&(0,a.Y3)((function(){A(e)})),x(e,n)):A(e).then((function(){return x(e,n)}))}))}))}var T;return{query:function(e,t,r){var n=this;"function"==typeof t&&(r=t,t={}),t=t?function(e){return e.group_level=w(e.group_level),e.limit=w(e.limit),e.skip=w(e.skip),e}(t):{},"function"==typeof e&&(e={map:e});var i=Promise.resolve().then((function(){return j(n,e,t)}));return se(i,r),i},viewCleanup:(T=function(){var r=this;return"function"==typeof r._viewCleanup?function(e){return new Promise((function(t,r){e._viewCleanup((function(e,n){if(e)return r(e);t(n)}))}))}(r):(0,a.Q1)(r)?function(e){return e.fetch("_view_cleanup",{headers:new h({"Content-Type":"application/json"}),method:"POST"}).then((function(e){return e.json()}))}(r):function(r){return r.get("_local/"+t).then((function(t){var n=new e.D;Object.keys(t.views).forEach((function(t){var r=ge(t),i="_design/"+r[0],o=r[1],a=n.get(i);a||(a=new e.l,n.set(i,a)),a.add(o)}));var i={keys:fe(n),include_docs:!0};return r.allDocs(i).then((function(e){var i={};e.rows.forEach((function(e){var r=e.key.substring(8);n.get(e.key).forEach((function(n){var o=r+"/"+n;t.views[o]||(o=n);var a=Object.keys(t.views[o]),s=e.doc&&e.doc.views&&e.doc.views[n];a.forEach((function(e){i[e]=i[e]||s}))}))}));var o=Object.keys(i).filter((function(e){return!i[e]})).map((function(e){return ue(O(e),(function(){return new r.constructor(e,r.__opts).destroy()}))()}));return Promise.all(o).then((function(){return{ok:!0}}))}))}),k({ok:!0}))}(r)},n()((function(e){var t=e.pop(),r=T.apply(this,e);return"function"==typeof t&&se(r,t),r})))}};function me(e){return(e=(0,a.d9)(e)).index||(e.index={}),["type","name","ddoc"].forEach((function(t){e.index[t]&&(e[t]=e.index[t],delete e.index[t])})),e.fields&&(e.index.fields=e.fields,delete e.fields),e.type||(e.type="json"),e}function _e(e,t,r,n){var i,a;r.headers=new h({"Content-type":"application/json"}),e.fetch(t,r).then((function(e){return i=e.status,a=e.ok,e.json()})).then((function(e){if(a)n(null,e);else{e.status=i;var t=(0,o.G3)(e);n(t)}})).catch(n)}function we(e,t,r){t=me(t),_e(e,"_index",{method:"POST",body:JSON.stringify(t)},r)}function Ee(e,t,r){_e(e,"_find",{method:"POST",body:JSON.stringify(t)},r)}function ke(e,t,r){_e(e,"_explain",{method:"POST",body:JSON.stringify(t)},r)}function Se(e,t){_e(e,"_index",{method:"GET"},t)}function Oe(e,t,r){var n=t.ddoc,i=t.type||"json",o=t.name;return n?o?void _e(e,"_index/"+[n,i,o].map(encodeURIComponent).join("/"),{method:"DELETE"},r):r(new Error("you must provide an index's name")):r(new Error("you must provide an index's ddoc"))}function Ae(e){return function(){for(var t=arguments.length,r=new Array(t),n=-1;++n<t;)r[n]=arguments[n];return e.call(this,r)}}function xe(e){return Ae((function(t){var r=t.pop(),n=e.apply(this,t);return function(e,t){e.then((function(e){(0,a.Y3)((function(){t(null,e)}))}),(function(e){(0,a.Y3)((function(){t(e)}))}))}(n,r),n}))}var je=Ae((function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];Array.isArray(i)?t=t.concat(je.apply(null,i)):t.push(i)}return t}));function Te(e){for(var t={},r=0,n=e.length;r<n;r++)t=(0,a.f0)(t,e[r]);return t}function Pe(e,t){for(var r=0,n=Math.min(e.length,t.length);r<n;r++)if(e[r]!==t[r])return!1;return!0}function Re(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Be(e,t){var r=function(e){for(var t=0,r=e.length;t<r;t++)if(-1!==e[t].indexOf("."))return!1;return!0}(e),n=1===e.length;return r?n?function(e,t){return function(r){t(r[e])}}(e[0],t):function(e,t){return function(r){for(var n=[],i=0,o=e.length;i<o;i++)n.push(r[e[i]]);t(n)}}(e,t):n?function(e,t){var r=S(e);return function(e){for(var n=e,i=0,o=r.length;i<o;i++)if(void 0===(n=n[r[i]]))return;t(n)}}(e[0],t):function(e,t){return function(r){for(var n=[],i=0,o=e.length;i<o;i++){for(var a=S(e[i]),s=r,u=0,c=a.length;u<c;u++)if(void 0===(s=s[a[u]]))return;n.push(s)}t(n)}}(e,t)}var Me=be("indexes",(function(e,t){return Be(Object.keys(e.fields),t)}),(function(){throw new Error("reduce not supported")}),(function(e,t){var r=e.views[t];if(!r.map||!r.map.fields)throw new Error("ddoc "+e._id+" with view "+t+" doesn't have map.fields defined. maybe it wasn't created by this plugin?")}));function Ie(e){return e._customFindAbstractMapper||Me}function Le(e){return e.fields=e.fields.map((function(e){if("string"==typeof e){var t={};return t[e]="asc",t}return e})),e}function Ue(e,t){for(var r=[],n=0;n<t.def.fields.length;n++){var i=x(t.def.fields[n]);r.push(e[i])}return r}function Ce(e){return e.allDocs({startkey:"_design/",endkey:"_design/",include_docs:!0}).then((function(e){var t={indexes:[{ddoc:null,name:"_all_docs",type:"special",def:{fields:[{_id:"asc"}]}}]};return t.indexes=je(t.indexes,e.rows.filter((function(e){return"query"===e.doc.language})).map((function(e){return(void 0!==e.doc.views?Object.keys(e.doc.views):[]).map((function(t){var r=e.doc.views[t];return{ddoc:e.id,name:t,type:"json",def:Le(r.options.def)}}))}))),t.indexes.sort((function(e,t){return k(e.name,t.name)})),t.total_rows=t.indexes.length,t}))}var De=null,Ne={"":{}};const qe={queryOpts:{limit:0,startkey:Ne,endkey:De},inMemoryFields:[]};function Fe(e,t){for(var r=e.def.fields.map(x),n=0,i=r.length;n<i;n++){if(t===r[n])return!0}return!1}function We(e,t){return"$eq"!==x(e[t])}function $e(e,t){var r=t.def.fields.map(x);return e.slice().sort((function(e,t){var n=r.indexOf(e),i=r.indexOf(t);return-1===n&&(n=Number.MAX_VALUE),-1===i&&(i=Number.MAX_VALUE),k(n,i)}))}function ze(e,t,r,n){var i=je(e,function(e,t,r){for(var n=!1,i=0,o=(r=$e(r,e)).length;i<o;i++){var a=r[i];if(n||!Fe(e,a))return r.slice(i);i<o-1&&We(t,a)&&(n=!0)}return[]}(t,r,n),function(e){var t=[];return Object.keys(e).forEach((function(r){var n=e[r];Object.keys(n).forEach((function(e){"$ne"===e&&t.push(r)}))})),t}(r));return $e(function(e){for(var t={},r=0;r<e.length;r++)t["$"+e[r]]=!0;return Object.keys(t).map((function(e){return e.substring(1)}))}(i),t)}function Ve(e,t,r){if(t){var n=(a=e,!((o=t).length>a.length)&&Pe(o,a)),i=Pe(r,e);return n&&i}var o,a;return function(e,t){e=e.slice();for(var r=0,n=t.length;r<n;r++){var i=t[r];if(!e.length)break;var o=e.indexOf(i);if(-1===o)return!1;e.splice(o,1)}return!0}(r,e)}var Ke=["$eq","$gt","$gte","$lt","$lte"];function He(e){return-1===Ke.indexOf(e)}function Ge(e,t,r,n){var i=e.def.fields.map(x);return!!Ve(i,t,r)&&function(e,t){var r=t[e[0]];return void 0===r||!(1===Object.keys(r).length&&"$ne"===x(r))}(i,n)}function Ye(e,t,r,n,i){var o=function(e,t,r,n){return n.filter((function(n){return Ge(n,r,t,e)}))}(e,t,r,n);if(0===o.length){if(i)throw{error:"no_usable_index",message:"There is no index available for this selector."};var a=n[0];return a.defaultUsed=!0,a}if(1===o.length&&!i)return o[0];var s=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e[r]]=!0;return t}(t);if(i){var u="_design/"+i[0],c=2===i.length&&i[1],f=o.find((function(e){return!(!c||e.ddoc!==u||c!==e.name)||e.ddoc===u}));if(!f)throw{error:"unknown_error",message:"Could not find that index or could not use that index for the query"};return f}return function(e,t){for(var r=null,n=-1,i=0,o=e.length;i<o;i++){var a=e[i],s=t(a);s>n&&(n=s,r=a)}return r}(o,(function(e){for(var t=e.def.fields.map(x),r=0,n=0,i=t.length;n<i;n++){var o=t[n];s[o]&&r++}return r}))}function Je(e,t){var r,n=x(t.def.fields[0]),i=e[n]||{},o=[];return Object.keys(i).forEach((function(e){He(e)&&o.push(n);var t=function(e,t){switch(e){case"$eq":return{key:t};case"$lte":return{endkey:t};case"$gte":return{startkey:t};case"$lt":return{endkey:t,inclusive_end:!1};case"$gt":return{startkey:t,inclusive_start:!1}}return{startkey:De}}(e,i[e]);r=r?Te([r,t]):t})),{queryOpts:r,inMemoryFields:o}}function Qe(e,t){switch(e){case"$eq":return{startkey:t,endkey:t};case"$lte":return{endkey:t};case"$gte":return{startkey:t};case"$lt":return{endkey:t,inclusive_end:!1};case"$gt":return{startkey:t,inclusive_start:!1}}}function Xe(e,t){return t.defaultUsed?function(e){return{queryOpts:{startkey:null},inMemoryFields:[Object.keys(e)]}}(e):1===t.def.fields.length?Je(e,t):function(e,t){var r,n,i=t.def.fields.map(x),o=[],a=[],s=[];function u(e){!1!==r&&a.push(De),!1!==n&&s.push(Ne),o=i.slice(e)}for(var c=0,f=i.length;c<f;c++){var l=e[i[c]];if(!l||!Object.keys(l).length){u(c);break}if(Object.keys(l).some(He)){u(c);break}if(c>0){var h="$gt"in l||"$gte"in l||"$lt"in l||"$lte"in l,p=Object.keys(e[i[c-1]]),d=Re(p,["$eq"]),y=Re(p,Object.keys(l));if(h&&!d&&!y){u(c);break}}for(var g=Object.keys(l),v=null,b=0;b<g.length;b++){var m=g[b],_=Qe(m,l[m]);v=v?Te([v,_]):_}a.push("startkey"in v?v.startkey:De),s.push("endkey"in v?v.endkey:Ne),"inclusive_start"in v&&(r=v.inclusive_start),"inclusive_end"in v&&(n=v.inclusive_end)}var w={startkey:a,endkey:s};return void 0!==r&&(w.inclusive_start=r),void 0!==n&&(w.inclusive_end=n),{queryOpts:w,inMemoryFields:o}}(e,t)}function Ze(e,t){var r=e.selector,n=e.sort;if(function(e){return Object.keys(e).map((function(t){return e[t]})).some((function(e){return"object"==typeof e&&0===Object.keys(e).length}))}(r))return(0,a.f0)({},qe,{index:t[0]});var i=function(e,t){var r,n=Object.keys(e),i=t?t.map(x):[];return r=n.length>=i.length?n:i,0===i.length?{fields:r}:{fields:r=r.sort((function(e,t){var r=i.indexOf(e);-1===r&&(r=Number.MAX_VALUE);var n=i.indexOf(t);return-1===n&&(n=Number.MAX_VALUE),r<n?-1:r>n?1:0})),sortOrder:t.map(x)}}(r,n),o=i.fields,s=Ye(r,o,i.sortOrder,t,e.use_index),u=Xe(r,s);return{queryOpts:u.queryOpts,index:s,inMemoryFields:ze(u.inMemoryFields,s,r,o)}}function et(e,t,r){var n,i;return t.selector&&(t.selector=B(t.selector)),t.sort&&(t.sort=function(e){if(!Array.isArray(e))throw new Error("invalid sort json - should be an array");return e.map((function(e){if("string"==typeof e){var t={};return t[e]="asc",t}return e}))}(t.sort)),t.use_index&&(t.use_index=(n=t.use_index,i=[],"string"==typeof n?i.push(n):i=n,i.map((function(e){return e.replace("_design/","")})))),function(e){if("object"!=typeof e.selector)throw new Error("you must provide a selector when you find()")}(t),Ce(e).then((function(n){e.constructor.emit("debug",["find","planning query",t]);var i=Ze(t,n.indexes);e.constructor.emit("debug",["find","query plan",i]);var o=i.index;!function(e,t){if(t.defaultUsed&&e.sort){var r=e.sort.filter((function(e){return"_id"!==Object.keys(e)[0]})).map((function(e){return Object.keys(e)[0]}));if(r.length>0)throw new Error('Cannot sort on field(s) "'+r.join(",")+'" when using the default index')}t.defaultUsed}(t,o);var s=(0,a.f0)({include_docs:!0,reduce:!1,indexes_count:n.total_rows},i.queryOpts);return"startkey"in s&&"endkey"in s&&d(s.startkey,s.endkey)>0?{docs:[]}:(t.sort&&"string"!=typeof t.sort[0]&&"desc"===j(t.sort[0])&&(s.descending=!0,s=function(e){var t=(0,a.d9)(e);return delete t.startkey,delete t.endkey,delete t.inclusive_start,delete t.inclusive_end,"endkey"in e&&(t.startkey=e.endkey),"startkey"in e&&(t.endkey=e.startkey),"inclusive_start"in e&&(t.inclusive_end=e.inclusive_start),"inclusive_end"in e&&(t.inclusive_start=e.inclusive_end),t}(s)),i.inMemoryFields.length||("limit"in t&&(s.limit=t.limit),"skip"in t&&(s.skip=t.skip)),r?Promise.resolve(i,s):Promise.resolve().then((function(){if("_all_docs"===o.name)return function(e,t){var r=(0,a.d9)(t);return r.descending?("endkey"in r&&"string"!=typeof r.endkey&&(r.endkey=""),"startkey"in r&&"string"!=typeof r.startkey&&(r.limit=0)):("startkey"in r&&"string"!=typeof r.startkey&&(r.startkey=""),"endkey"in r&&"string"!=typeof r.endkey&&(r.limit=0)),"key"in r&&"string"!=typeof r.key&&(r.limit=0),r.limit>0&&r.indexes_count&&(r.original_limit=r.limit,r.limit+=r.indexes_count),e.allDocs(r).then((function(e){return e.rows=e.rows.filter((function(e){return!/^_design\//.test(e.id)})),r.original_limit&&(r.limit=r.original_limit),e.rows=e.rows.slice(0,r.limit),e}))}(e,s);var t,r=(t=o).ddoc.substring(8)+"/"+t.name;return Ie(e).query.call(e,r,s)})).then((function(e){!1===s.inclusive_start&&(e.rows=function(e,t,r){for(var n=r.def.fields,i=0,o=e.length;i<o;i++){var a=Ue(e[i].doc,r);if(1===n.length)a=a[0];else for(;a.length>t.length;)a.pop();if(Math.abs(d(a,t))>0)break}return i>0?e.slice(i):e}(e.rows,s.startkey,o)),i.inMemoryFields.length&&(e.rows=M(e.rows,t,i.inMemoryFields));var r={docs:e.rows.map((function(e){var r=e.doc;return t.fields?function(e,t){for(var r={},n=0,i=t.length;n<i;n++){var o=S(t[n]),a=w(e,o);void 0!==a&&E(r,o,a)}return r}(r,t.fields):r}))};return o.defaultUsed&&(r.warning="No matching index found, create an index to optimize query time."),r})))}))}var tt=xe((function(e,t){t=me(t);var r,n=(0,a.d9)(t.index);function i(){return r||(r=(0,ne.$)(JSON.stringify(t)))}t.index=Le(t.index),function(e){var t=e.fields.filter((function(e){return"asc"===j(e)}));if(0!==t.length&&t.length!==e.fields.length)throw new Error("unsupported mixed sorting")}(t.index);var o=t.name||"idx-"+i(),s=t.ddoc||"idx-"+i(),u="_design/"+s,c=!1,f=!1;return e.constructor.emit("debug",["find","creating index",u]),(0,a.H)(e,u,(function(e){return e._rev&&"query"!==e.language&&(c=!0),e.language="query",e.views=e.views||{},!(f=!!e.views[o])&&(e.views[o]={map:{fields:Te(t.index.fields)},reduce:"_count",options:{def:n}},e)})).then((function(){if(c)throw new Error('invalid language for ddoc with id "'+u+'" (should be "query")')})).then((function(){var t=s+"/"+o;return Ie(e).query.call(e,t,{limit:0,reduce:!1}).then((function(){return{id:u,name:o,result:f?"exists":"created"}}))}))})),rt=xe(et),nt=xe((function(e,t){return et(e,t,!0).then((function(r){return{dbname:e.name,index:r.index,selector:t.selector,range:{start_key:r.queryOpts.startkey,end_key:r.queryOpts.endkey},opts:{use_index:t.use_index||[],bookmark:"nil",limit:t.limit,skip:t.skip,sort:t.sort||{},fields:t.fields,conflicts:!1,r:[49]},limit:t.limit,skip:t.skip||0,fields:t.fields}}))})),it=xe(Ce),ot=xe((function(e,t){if(!t.ddoc)throw new Error("you must supply an index.ddoc when deleting");if(!t.name)throw new Error("you must supply an index.name when deleting");var r=t.ddoc,n=t.name;return(0,a.H)(e,r,(function(e){return 1===Object.keys(e.views).length&&e.views[n]?{_id:r,_deleted:!0}:(delete e.views[n],e)})).then((function(){return Ie(e).viewCleanup.apply(e)})).then((function(){return{ok:!0}}))})),at={};at.createIndex=(0,a.Vi)((function(e,t){if("object"!=typeof e)return t(new Error("you must provide an index to create"));((0,a.Q1)(this)?we:tt)(this,e,t)})),at.find=(0,a.Vi)((function(e,t){if(void 0===t&&(t=e,e=void 0),"object"!=typeof e)return t(new Error("you must provide search parameters to find()"));((0,a.Q1)(this)?Ee:rt)(this,e,t)})),at.explain=(0,a.Vi)((function(e,t){if(void 0===t&&(t=e,e=void 0),"object"!=typeof e)return t(new Error("you must provide search parameters to explain()"));((0,a.Q1)(this)?ke:nt)(this,e,t)})),at.getIndexes=(0,a.Vi)((function(e){((0,a.Q1)(this)?Se:it)(this,e)})),at.deleteIndex=(0,a.Vi)((function(e,t){if("object"!=typeof e)return t(new Error("you must provide an index to delete"));((0,a.Q1)(this)?Oe:ot)(this,e,t)}));const st=at;function ut(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ct(e,t,r){return t&&ut(e.prototype,t),r&&ut(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ft(e,t){return ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ft(e,t)}function lt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ft(e,t)}function ht(e){return ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(e)}function pt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function dt(e,t,r){return dt=pt()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&ft(i,r.prototype),i},dt.apply(null,arguments)}function yt(e){var t="function"==typeof Map?new Map:void 0;return yt=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return dt(e,arguments,ht(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ft(n,e)},yt(e)}r(6313),r(8322);var gt=r(9134),vt=r.n(gt);var bt=0;function mt(){var e=(new Date).getTime();return e<=bt&&(e=bt+1),bt=e,e}Promise.resolve(!0),Promise.resolve(!1),Promise.resolve(null);var _t=Promise.resolve();function wt(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t="",r="abcdefghijklmnopqrstuvwxyz",n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*r.length));return t}function Et(e){return Object.assign({},e)}vt()();function kt(e){return function(e){var t=e.split("-");return{height:parseInt(t[0],10),hash:t[1]}}(e).height}function St(e,t){var r=e.get(t);if(!r)throw new Error("missing value from map "+t);return r}var Ot=function(e){return"string"==typeof e?Promise.resolve(e):"undefined"!=typeof Buffer&&e instanceof Buffer?new Promise((function(e){return setTimeout(e,0)})).then((function(){return e.toString()})):new Promise((function(t){var r=new FileReader;r.addEventListener("loadend",(function(e){var r=e.target.result;t(r)})),"[object Uint8Array]"===Object.prototype.toString.call(e)&&(e=new Blob([e])),r.readAsText(e)}))},At=function(e){return"RxDB Error-Code "+e+".\n        - To find out what this means, use the dev-mode-plugin https://pubkey.github.io/rxdb/custom-build.html#dev-mode\n        - Or search for this code https://github.com/pubkey/rxdb/search?q="+e+"\n        "};function xt(e,t,r){return"RxError ("+t+"):\n"+e+"\n"+function(e){var t="";return 0===Object.keys(e).length?t:(t+="Given parameters: {\n",t+=Object.keys(e).map((function(t){var r="[object Object]";try{r=JSON.stringify(e[t],(function(e,t){return void 0===t?null:t}),2)}catch(e){}return t+":"+r})).join("\n"),t+="}")}(r)}var jt=function(e){function t(t,r){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=xt(r,t,i);return(n=e.call(this,o)||this).code=t,n.message=o,n.parameters=i,n.rxdb=!0,n}return lt(t,e),t.prototype.toString=function(){return this.message},ct(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}]),t}(yt(Error)),Tt=function(e){function t(t,r){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=xt(r,t,i);return(n=e.call(this,o)||this).code=t,n.message=o,n.parameters=i,n.rxdb=!0,n}return lt(t,e),t.prototype.toString=function(){return this.message},ct(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}]),t}(yt(TypeError));function Pt(e,t){return new jt(e,At(e),t)}var Rt=function(e,t){return Rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Rt(e,t)};function Bt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Rt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;function Mt(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function It(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Lt(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e}Object.create;function Ut(e){return"function"==typeof e}function Ct(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Dt=Ct((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}}));function Nt(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var qt=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Mt(o),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(Ut(u))try{u()}catch(e){i=e instanceof Dt?e.errors:[e]}var c=this._teardowns;if(c){this._teardowns=null;try{for(var f=Mt(c),l=f.next();!l.done;l=f.next()){var h=l.value;try{$t(h)}catch(e){i=null!=i?i:[],e instanceof Dt?i=Lt(Lt([],It(i)),It(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}}if(i)throw new Dt(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)$t(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._teardowns=null!==(r=this._teardowns)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Nt(t,e)},e.prototype.remove=function(t){var r=this._teardowns;r&&Nt(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),Ft=qt.EMPTY;function Wt(e){return e instanceof qt||e&&"closed"in e&&Ut(e.remove)&&Ut(e.add)&&Ut(e.unsubscribe)}function $t(e){Ut(e)?e():e.unsubscribe()}var zt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Vt={setTimeout:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Vt.delegate;return((null==r?void 0:r.setTimeout)||setTimeout).apply(void 0,Lt([],It(e)))},clearTimeout:function(e){var t=Vt.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Kt(e){Vt.setTimeout((function(){var t=zt.onUnhandledError;if(!t)throw e;t(e)}))}function Ht(){}var Gt=Yt("C",void 0,void 0);function Yt(e,t,r){return{kind:e,value:t,error:r}}var Jt=null;function Qt(e){if(zt.useDeprecatedSynchronousErrorHandling){var t=!Jt;if(t&&(Jt={errorThrown:!1,error:null}),e(),t){var r=Jt,n=r.errorThrown,i=r.error;if(Jt=null,n)throw i}}else e()}function Xt(e){zt.useDeprecatedSynchronousErrorHandling&&Jt&&(Jt.errorThrown=!0,Jt.error=e)}var Zt=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,Wt(t)&&t.add(r)):r.destination=ir,r}return Bt(t,e),t.create=function(e,t,r){return new er(e,t,r)},t.prototype.next=function(e){this.isStopped?nr(function(e){return Yt("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?nr(Yt("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?nr(Gt,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(qt),er=function(e){function t(t,r,n){var i,o=e.call(this)||this;if(Ut(t))i=t;else if(t){var a;i=t.next,r=t.error,n=t.complete,o&&zt.useDeprecatedNextContext?(a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()}:a=t,i=null==i?void 0:i.bind(a),r=null==r?void 0:r.bind(a),n=null==n?void 0:n.bind(a)}return o.destination={next:i?tr(i,o):Ht,error:tr(null!=r?r:rr,o),complete:n?tr(n,o):Ht},o}return Bt(t,e),t}(Zt);function tr(e,t){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{e.apply(void 0,Lt([],It(t)))}catch(e){zt.useDeprecatedSynchronousErrorHandling?Xt(e):Kt(e)}}}function rr(e){throw e}function nr(e,t){var r=zt.onStoppedNotification;r&&Vt.setTimeout((function(){return r(e,t)}))}var ir={closed:!0,next:Ht,error:rr,complete:Ht},or="function"==typeof Symbol&&Symbol.observable||"@@observable";function ar(e){return e}function sr(e){return 0===e.length?ar:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var ur=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,i=this,o=(n=e)&&n instanceof Zt||function(e){return e&&Ut(e.next)&&Ut(e.error)&&Ut(e.complete)}(n)&&Wt(n)?e:new er(e,t,r);return Qt((function(){var e=i,t=e.operator,r=e.source;o.add(t?t.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=cr(t))((function(t,n){var i;i=r.subscribe((function(t){try{e(t)}catch(e){n(e),null==i||i.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[or]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return sr(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=cr(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function cr(e){var t;return null!==(t=null!=e?e:zt.Promise)&&void 0!==t?t:Promise}var fr=Ct((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),lr=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Bt(t,e),t.prototype.lift=function(e){var t=new hr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new fr},t.prototype.next=function(e){var t=this;Qt((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){var i=t.observers.slice();try{for(var o=Mt(i),a=o.next();!a.done;a=o.next()){a.value.next(e)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;Qt((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;Qt((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=t.hasError,n=t.isStopped,i=t.observers;return r||n?Ft:(i.push(e),new qt((function(){return Nt(i,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new ur;return e.source=this,e},t.create=function(e,t){return new hr(e,t)},t}(ur),hr=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return Bt(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:Ft},t}(lr),pr=function(e){try{if(!e)return Promise.resolve({});var t={};return Promise.resolve(Promise.all(Object.entries(e).map((function(e){try{var r=e[0],n=e[1];if(!n.type)throw Pt("SNH",{args:{obj:n}});var i=function(){if(n.data){var e=n;return Promise.resolve(Promise.all([kr(e.data),Ot(e.data)])).then((function(n){var i=n[0],o=n[1].length;t[r]={digest:Sr+"-"+i,length:o,type:e.type}}))}t[r]=n}();return Promise.resolve(i&&i.then?i.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})))).then((function(){return t}))}catch(e){return Promise.reject(e)}},dr=new Set,yr="_local/",gr="_design/";function vr(e,t){return"_id"===e||t[e]||((t=Et(t))[e]=t._id,delete t._id),t}function br(e,t){var r=vr(e,t);return delete(r=Et(r))._revisions,r._attachments={},t._attachments&&Object.entries(t._attachments).forEach((function(e){var t=e[0],n=e[1];n.data?r._attachments[t]={data:n.data,type:n.type?n.type:n.content_type}:r._attachments[t]={digest:n.digest,type:n.type?n.type:n.content_type,length:n.length}})),r}function mr(e,t){var r=_r(e,t);return(r=Et(r))._attachments={},t._attachments&&Object.entries(t._attachments).forEach((function(e){var t=e[0],n=e[1];n.data?r._attachments[t]={data:n.data,content_type:n.type}:r._attachments[t]={digest:n.digest,content_type:n.type,length:n.length,stub:!0}})),r}function _r(e,t){if("_id"===e)return t;var r=t[e],n=Et(t);return delete n[e],n._id=r,n}function wr(e,t,r){if(!t)throw new Error("primary missing !!");return(e?"local":"non-local")+"|"+t+"|"+r}function Er(e,t){if("_id"===t)return e;if(Array.isArray(e))return e.map((function(e){return Er(e,t)}));if("object"==typeof e){var r={};return Object.entries(e).forEach((function(e){var n=e[0],i=e[1];n===t?r._id=i:n.startsWith("$")?r[n]=Er(i,t):r[n]=i})),r}return e}function kr(e){return new Promise((function(t){(0,ne.u)(e,(function(e){t(e)}))}))}var Sr="md5",Or=function(e,t){try{var r=[],n=function(){if(t.writeOptions.hasOwnProperty("new_edits")&&!t.writeOptions.new_edits)return Promise.resolve(Promise.all(t.writeDocs.map((function(n){try{var i=n._id;return n=br(e,n),Promise.resolve(pr(n._attachments)).then((function(o){n._attachments=o;var a=t.previousDocs.get(i);if(a&&(a=br(e,a)),!(a&&kt(a._rev)>kt(n._rev))&&(a||!n._deleted)&&!(a&&a._deleted&&n._deleted)){var s;if(a&&!a._deleted||n._deleted)if(n._deleted&&a&&!a._deleted)a._rev=n._rev,s={operation:"DELETE",doc:null,id:i,previous:a};else{if(!a)throw Pt("SNH",{args:{writeDoc:n}});s={operation:"UPDATE",doc:n,id:i,previous:a}}else s={operation:"INSERT",doc:n,id:i,previous:null};var u=Pr(e,s,t.startTime,t.endTime);r.push(u)}}))}catch(e){return Promise.reject(e)}})))).then((function(){}));var n=function(){if(!t.writeOptions.custom||t.writeOptions.custom&&!t.writeOptions.custom.writeRowById){var n=new Map;return t.writeDocs.forEach((function(e){return n.set(e._id,e)})),Promise.resolve(Promise.all(t.writeResult.map((function(t){try{var i=t.id;if(i.startsWith(gr)||i.startsWith(yr))return Promise.resolve();var o=St(n,t.id);return o=br(e,o),Promise.resolve(pr(o._attachments)).then((function(n){o._attachments=n,(o=Et(o))._rev=t.rev;var i=function(e,t){if(!t)throw Pt("SNH",{args:{pouchDoc:t}});var r=t._id,n=br(e,t),i=n._rev?kt(n._rev):1;return t._deleted?{operation:"DELETE",id:r,doc:null,previous:n}:1===i?{operation:"INSERT",id:r,doc:n,previous:null}:{operation:"UPDATE",id:r,doc:n,previous:"UNKNOWN"}}(e,o),a=Pr(e,i);r.push(a)}))}catch(e){return Promise.reject(e)}})))).then((function(){}))}var i=t.writeOptions.custom.writeRowById;return Promise.resolve(Promise.all(t.writeResult.map((function(n){try{if(n.error)return Promise.resolve();var o=n.id,a=St(i,o),s=br(e,a.document);return Promise.resolve(pr(s._attachments)).then((function(i){function u(){if(!a.document._deleted||a.previous&&!a.previous._deleted){var e=Pr(t.writeOptions.custom.primaryPath,c,t.startTime,t.endTime);r.push(e)}else;}var c;s._attachments=i,s._rev=n.rev;var f=function(){if(!a.previous||a.previous._deleted)c={operation:"INSERT",doc:s,id:o,previous:null};else{var t=function(){if(a.document._deleted){var t=br(e,a.previous);return Promise.resolve(pr(t._attachments)).then((function(e){t._attachments=e,t._rev=n.rev,c={operation:"DELETE",doc:null,id:n.id,previous:t}}))}c={operation:"UPDATE",doc:s,id:n.id,previous:a.previous}}();if(t&&t.then)return t.then((function(){}))}}();return f&&f.then?f.then(u):u()}))}catch(e){return Promise.reject(e)}})))).then((function(){}))}();return n&&n.then?n.then((function(){})):void 0}();return Promise.resolve(n&&n.then?n.then((function(){return r})):r)}catch(e){return Promise.reject(e)}},Ar=!1,xr=new Map;function jr(e){var t=[e.name,e.adapter].join("|"),r=xr.get(t);return r||(r={subject:new lr},xr.set(t,r)),r}var Tr=0;function Pr(e,t,r,n){var i="DELETE"===t.operation?t.previous:t.doc,o=i[e];return{eventId:wr(!1,o,i._rev),documentId:o,change:t,startTime:r,endTime:n}}function Rr(e){if(e.rxdb)throw r={plugin:e},new Tt(t="PL2",At(t),r);var t,r;"object"==typeof e&&e.default&&(e=e.default),te.plugin(e)}Rr(st),function(){if(!Ar){Ar=!0;var e=te.prototype.bulkDocs;te.plugin({bulkDocs:function(t,r,n){try{var i,o=function(){var t=Et(r);return t.isDeeper=!0,e.call(a,i,t,(function(e,t){if(!e)return function(){try{var e=function(){if(!n)return t;n(null,t)},o=function(){if(!r.isDeeper){var e=mt(),n={emitId:u,writeDocs:i,writeOptions:r,writeResult:t,previousDocs:c,startTime:s,endTime:e};return Promise.resolve(Or("_id",n)).then((function(e){var t={id:wt(10),events:e};jr(a).subject.next(t)}))}}();return Promise.resolve(o&&o.then?o.then(e):e())}catch(e){return Promise.reject(e)}}();if(!n)throw e;n(e)}))},a=this,s=mt(),u=Tr++;if("function"==typeof r&&(n=r,r={}),r||(r={}),Array.isArray(t)?i=t:void 0===t?i=[]:(i=t.docs,t.hasOwnProperty("new_edits")&&(r.new_edits=t.new_edits)),0===i.length)throw Pt("SNH",{args:{body:t,options:r}});var c=new Map,f=function(){if(r.hasOwnProperty("new_edits")&&!1===r.new_edits){var e=i.map((function(e){return e._id}));return Promise.resolve(a.changes({live:!1,since:0,doc_ids:e,style:"all_docs"})).then((function(e){return Promise.resolve(Promise.all(e.results.map((function(e){try{return Promise.resolve(a.get(e.id,{rev:e.changes[0].rev,deleted:"ok",revs:!!r.set_new_edit_as_latest_revision,style:"all_docs"}))}catch(e){return Promise.reject(e)}})))).then((function(e){e.forEach((function(e){return c.set(e._id,e)})),r.set_new_edit_as_latest_revision&&i.forEach((function(e){var t=e._id,r=c.get(t);if(r){var n=e._rev.split("-"),i=parseInt(n[0],10),o=n[1];r._revisions||(r._revisions={ids:[]}),e._revisions={start:i,ids:r._revisions.ids},e._revisions.ids.unshift(o),delete r._revisions}}))}))}))}}();return Promise.resolve(f&&f.then?f.then(o):o())}catch(e){return Promise.reject(e)}}})}}();var Br=te,Mr=(r(4063),r(1528)),Ir=r.n(Mr);function Lr(e){return"string"==typeof e?e:e.key}var Ur=function(){function e(e){this.ttl=e,this.set=new Set,this.timeMap=new Map}return e.prototype.has=function(e){return this.set.has(e)},e.prototype.add=function(e){var t=this;this.timeMap.set(e,Cr()),this.set.add(e),setTimeout((function(){!function(e){var t=Cr()-e.ttl,r=e.set[Symbol.iterator]();for(;;){var n=r.next().value;if(!n)return;if(!(e.timeMap.get(n)<t))return;e.timeMap.delete(n),e.set.delete(n)}}(t)}),0)},e.prototype.clear=function(){this.set.clear(),this.timeMap.clear()},e}();function Cr(){return(new Date).getTime()}var Dr=0,Nr=function(){function e(e,t,r,n,i){var o=this;this.id=Dr++,this.changes$=new lr,this.subs=[],this.databaseName=e,this.collectionName=t,this.schema=r,this.internals=n,this.options=i,dr.add(this),this.primaryPath=Lr(this.schema.primaryKey);var a=jr(this.internals.pouch),s=new Ur(6e4),u=a.subject.subscribe((function(e){try{return 0===e.events.length||s.has(e.id)||(s.add(e.id),e.events.forEach((function(e){e.change.doc&&(e.change.doc=vr(o.primaryPath,e.change.doc)),e.change.previous&&(e.change.previous=vr(o.primaryPath,e.change.previous))})),o.changes$.next(e)),Promise.resolve()}catch(e){return Promise.reject(e)}}));this.subs.push(u)}var t=e.prototype;return t.close=function(){return this.subs.forEach((function(e){return e.unsubscribe()})),dr.delete(this),_t},t.remove=function(){try{var e=this;return e.subs.forEach((function(e){return e.unsubscribe()})),dr.delete(e),Promise.resolve(e.internals.pouch.destroy()).then((function(){}))}catch(e){return Promise.reject(e)}},t.bulkAddRevisions=function(e){try{var t=this;if(0===e.length)throw Pt("P3",{args:{documents:e}});var r=e.map((function(e){return mr(t.primaryPath,e)}));return Promise.resolve(t.internals.pouch.bulkDocs(r,{new_edits:!1,set_new_edit_as_latest_revision:!0})).then((function(){}))}catch(e){return Promise.reject(e)}},t.bulkWrite=function(e){try{var t=this;if(0===e.length)throw Pt("P2",{args:{documentWrites:e}});var r=new Map,n=e.map((function(e){var n=e.document[t.primaryPath];r.set(n,e);var i=mr(t.primaryPath,e.document);return e.previous&&(i._rev=e.previous._rev),i}));return Promise.resolve(t.internals.pouch.bulkDocs(n,{custom:{primaryPath:t.primaryPath,writeRowById:r}})).then((function(e){var n={success:{},error:{}};return Promise.resolve(Promise.all(e.map((function(e){try{var i=St(r,e.id),o=function(){if(!e.error){var r=function(){n.success[e.id]=o},o=Et(i.document);(o=vr(t.primaryPath,o))._rev=e.rev,o._attachments={};var a=function(){if(i.document._attachments)return Promise.resolve(pr(i.document._attachments)).then((function(e){o._attachments=e}));i.document._attachments={}}();return a&&a.then?a.then(r):r()}var s={isError:!0,status:409,documentId:e.id,writeRow:i};n.error[e.id]=s}();return Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})))).then((function(){return n}))}))}catch(e){return Promise.reject(e)}},t.query=function(e){try{var t=this;return Promise.resolve(t.internals.pouch.find(e)).then((function(e){return{documents:e.docs.map((function(e){return br(t.primaryPath,e)}))}}))}catch(e){return Promise.reject(e)}},t.getAttachmentData=function(e,t){try{return Promise.resolve(this.internals.pouch.getAttachment(e,t))}catch(e){return Promise.reject(e)}},t.findDocumentsById=function(e,t){try{var r=function(t){return n?t:Promise.resolve(i.internals.pouch.allDocs({include_docs:!0,keys:e})).then((function(e){var t={};return e.rows.filter((function(e){return!!e.doc})).forEach((function(e){var r=e.doc;r=br(i.primaryPath,r),t[e.id]=r})),t}))},n=!1,i=this,o=function(){if(t)return Promise.resolve(i.internals.pouch.changes({live:!1,since:0,doc_ids:e,style:"all_docs"})).then((function(e){var t={};return Promise.resolve(Promise.all(e.results.map((function(e){try{return Promise.resolve(i.internals.pouch.get(e.id,{rev:e.changes[0].rev,deleted:"ok",style:"all_docs"})).then((function(r){var n=br(i.primaryPath,r);t[e.id]=n}))}catch(e){return Promise.reject(e)}})))).then((function(){return n=!0,t}))}))}();return Promise.resolve(o&&o.then?o.then(r):r(o))}catch(e){return Promise.reject(e)}},t.changeStream=function(){return this.changes$.asObservable()},t.getChangedDocuments=function(e){try{var t={live:!1,limit:e.limit,include_docs:!1,since:e.sinceSequence,descending:"before"===e.direction};return Promise.resolve(this.internals.pouch.changes(t)).then((function(e){return{changedDocuments:e.results.filter((function(e){return!e.id.startsWith(gr)})).map((function(e){return{id:e.id,sequence:e.seq}})),lastSequence:e.last_seq}}))}catch(e){return Promise.reject(e)}},e}();var qr=function(){function e(e,t,r,n){this.changes$=new lr,this.databaseName=e,this.collectionName=t,this.internals=r,this.options=n,dr.add(this)}var t=e.prototype;return t.close=function(){return dr.delete(this),_t},t.remove=function(){try{return dr.delete(this),Promise.resolve(this.internals.pouch.destroy()).then((function(){}))}catch(e){return Promise.reject(e)}},t.bulkWrite=function(e){try{var t=this;if(0===e.length)throw Pt("P2",{args:{documentWrites:e}});var r=new Map,n=e.map((function(e){r.set(e.document._id,e);var t=Et(e.document);return t._id=yr+t._id,e.previous&&(t._rev=e.previous._rev),t})),i=mt();return Promise.resolve(t.internals.pouch.bulkDocs(n)).then((function(e){var n=mt(),o={success:{},error:{}},a={id:wt(10),events:[]};return e.forEach((function(e){e.id=e.id.substring(yr.length);var t=St(r,e.id);if(e.error){var s={isError:!0,status:409,documentId:e.id,writeRow:t};o.error[e.id]=s}else{var u,c=Et(t.document);if(c._rev=e.rev,c._attachments={},o.success[e.id]=c,t.previous)if(t.document._deleted){var f=Et(t.previous);f._rev=e.rev,u={operation:"DELETE",doc:null,id:e.id,previous:f}}else u={operation:"UPDATE",doc:c,id:e.id,previous:t.previous};else u={operation:"INSERT",doc:c,id:e.id,previous:null};if(!t.document._deleted||t.previous&&!t.previous._deleted){var l="DELETE"===u.operation?u.previous:u.doc,h={eventId:wr(!0,l._id,l._rev?l._rev:""),documentId:e.id,change:u,startTime:i,endTime:n};a.events.push(h)}else;}})),t.changes$.next(a),o}))}catch(e){return Promise.reject(e)}},t.findLocalDocumentsById=function(e){try{var t=this,r={};return Promise.resolve(Promise.all(e.map((function(e){try{var n=yr+e,i=function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}((function(){return Promise.resolve(t.internals.pouch.get(n)).then((function(t){t._id=e,r[e]=t}))}),(function(){}));return Promise.resolve(i&&i.then?i.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})))).then((function(){return r}))}catch(e){return Promise.reject(e)}},t.changeStream=function(){return this.changes$.asObservable()},e}();var Fr={hash:function(e){return kr(e)},hashKey:Sr,getSortComparator:function(e,t){var r,n=Lr(e.primaryKey),i=t.sort?t.sort:[(r={},r[n]="asc",r)],o=Object.keys(t.selector).filter((function(e){return!e.startsWith("$")}));return function(e,r){if(e[n]===r[n])throw Pt("SNH",{args:{a:e,b:r},primaryPath:n});var a=[e,r].map((function(e){return{doc:_r(n,e)}})),s=M(a,{selector:{},sort:i},o);if(2!==s.length)throw Pt("SNH",{query:t,primaryPath:n,args:{rows:a,sortedRows:s}});return s[0].doc._id===a[0].doc._id?-1:1}},getQueryMatcher:function(e,t){var r=Lr(e.primaryKey),n=B(t.selector);return function(e){var i=M([{doc:_r(r,e)}],{selector:n},Object.keys(t.selector));return i&&1===i.length}},prepareQuery:function(e,t){var r=Lr(e.primaryKey),n=t;if(n.sort&&n.sort.forEach((function(t){var r,i,o=Object.keys(t)[0],a=["$gt","$gte","$lt","$lte"];if(!(n.selector[o]&&Object.keys(n.selector[o]).some((function(e){return a.includes(e)}))||!1)){var s=(r=e,i=function(e){for(;"."===e.charAt(0);)e=e.substr(1);for(;"."===e.slice(-1);)e=e.slice(0,-1);return e}(i="properties."+(i=(i=o).replace(/\./g,".properties."))),Ir().get(r,i));if(!s)throw Pt("QU5",{query:n,key:o,schema:e});switch(n.selector[o]||(n.selector[o]={}),s.type){case"number":case"integer":n.selector[o].$gt=-1e28;break;case"string":"string"!=typeof n.selector[o]&&(n.selector[o].$gt="");break;default:n.selector[o].$gt=null}}})),n.selector[r]&&n.selector[r].$regex)throw Pt("QU4",{path:r,query:t});if(n.sort){var i=n.sort.map((function(e){var t,n=Object.keys(e)[0],i=Object.values(e)[0];return(t={})[n===r?"_id":n]=i,t}));n.sort=i}return Object.entries(n.selector).forEach((function(e){var t=e[0],r=e[1];"object"!=typeof r||null===r||Array.isArray(r)||0!==Object.keys(r).length||delete n.selector[t]})),n.selector=Er(n.selector,r),n}},Wr=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.name="pouchdb",this.statics=Fr,this.adapter=e,this.pouchSettings=t,$r(e)}var t=e.prototype;return t.createPouch=function(e,t){try{var r={location:e,adapter:(o=this.adapter,a={db:o},"string"==typeof o&&(a={adapter:o,db:void 0}),a),settings:t},n=Object.assign({},r.adapter,this.pouchSettings,r.settings),i=new Br(r.location,n);return Promise.resolve(i)}catch(e){return Promise.reject(e)}var o,a},t.createStorageInstance=function(e){try{var t=zr(e.databaseName,e.collectionName,e.schema.version);return Promise.resolve(this.createPouch(t,e.options)).then((function(t){return Promise.resolve(function(e,t){try{if(!t.indexes)return Promise.resolve();var r=Lr(t.primaryKey);return Promise.resolve(e.getIndexes()).then((function(n){var i=new Set(n.indexes.map((function(e){return e.name})));return Promise.resolve(Promise.all(t.indexes.map((function(t){try{var n=Array.isArray(t)?t:[t],o="idx-rxdb-index-"+(n=n.map((function(e){return e===r?"_id":e}))).join(",");return i.has(o)?Promise.resolve():Promise.resolve(e.createIndex({name:o,ddoc:o,index:{fields:n}}))}catch(e){return Promise.reject(e)}})))).then((function(){}))}))}catch(e){return Promise.reject(e)}}(t,e.schema)).then((function(){return new Nr(e.databaseName,e.collectionName,e.schema,{pouch:t},e.options)}))}))}catch(e){return Promise.reject(e)}},t.createKeyObjectStorageInstance=function(e){try{var t=Et(e.options);t.auto_compaction=!1,t.revs_limit=1;var r=zr(e.databaseName,e.collectionName,0);return Promise.resolve(this.createPouch(r,e.options)).then((function(t){return new qr(e.databaseName,e.collectionName,{pouch:t},e.options)}))}catch(e){return Promise.reject(e)}},e}();function $r(e){if("string"==typeof e){if(!Br.adapters||!Br.adapters[e])throw Pt("DB9",{adapter:e})}else if(function(e){if(!e||"function"!=typeof e.super_)throw Pt("UT4",{adapter:e})}(e),!Br.adapters||!Br.adapters.leveldb)throw Pt("DB10",{adapter:e})}function zr(e,t,r){var n=e+"-rxdb-"+r+"-";if(t.includes("/")){var i=t.split("/"),o=i.pop(),a=i.join("/");return a+="/"+n+o}return n+t}var Vr=r(1934);const Kr=Vr.expose;Vr.registerSerializer,Vr.Transfer;Rr(r(9253));var Hr,Gr,Yr,Jr=function(e,t){if(!e)throw new Error("adapter missing");return new Wr(e,t)}({adapter:"memory"});Hr={storage:Jr},Gr=0,Yr=new Map,Kr({createStorageInstance:function(e){try{var t=Gr++;return Promise.resolve(Hr.storage.createStorageInstance(e)).then((function(e){return Yr.set(t,e),t}))}catch(e){return Promise.reject(e)}},bulkWrite:function(e,t){return St(Yr,e).bulkWrite(t)},bulkAddRevisions:function(e,t){return St(Yr,e).bulkAddRevisions(t)},findDocumentsById:function(e,t,r){return St(Yr,e).findDocumentsById(t,r)},query:function(e,t){return St(Yr,e).query(t)},getAttachmentData:function(e,t,r){return St(Yr,e).getAttachmentData(t,r)},getChangedDocuments:function(e,t){return St(Yr,e).getChangedDocuments(t)},changeStream:function(e){return St(Yr,e).changeStream()},close:function(e){return St(Yr,e).close()},remove:function(e){return St(Yr,e).remove()},createKeyObjectStorageInstance:function(e){try{var t=Gr++;return Promise.resolve(Hr.storage.createKeyObjectStorageInstance(e)).then((function(e){return Yr.set(t,e),t}))}catch(e){return Promise.reject(e)}},bulkWriteLocal:function(e,t){return St(Yr,e).bulkWrite(t)},findLocalDocumentsById:function(e,t){return St(Yr,e).findLocalDocumentsById(t)}})})()})();
  //# sourceMappingURL=pouchdb-memory.worker.js.map