@mongosh/browser-repl 1.5.1 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ var r=n(4),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n)
39
39
  * http://adamwdraper.github.com/Numeral-js/
40
40
  */void 0===(i="function"==typeof(r=function(){var e,t,n,r,i,s={},o={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function u(e,t){this._input=e,this._value=t}return(e=function(n){var r,i,o,a;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(i in s)if((a="function"==typeof s[i].regexps.unformat?s[i].regexps.unformat():s[i].regexps.unformat)&&n.match(a)){o=s[i].unformat;break}r=(o=o||e._.stringToNumber)(n)}else r=Number(n)||null;return new u(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof u},e._=t={numberToFormat:function(t,n,r){var i,s,a,l,u,c,h,d,f=o[e.options.currentLocale],p=!1,m=!1,g="",y="",v=!1;if(t=t||0,a=Math.abs(t),e._.includes(n,"(")?(p=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(c=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(s=!!(s=n.match(/a(k|m|b|t)?/))&&s[1],e._.includes(n," a")&&(g=" "),n=n.replace(new RegExp(g+"a[kmbt]?"),""),a>=1e12&&!s||"t"===s?(g+=f.abbreviations.trillion,t/=1e12):a<1e12&&a>=1e9&&!s||"b"===s?(g+=f.abbreviations.billion,t/=1e9):a<1e9&&a>=1e6&&!s||"m"===s?(g+=f.abbreviations.million,t/=1e6):(a<1e6&&a>=1e3&&!s||"k"===s)&&(g+=f.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),l=t.toString().split(".")[0],u=n.split(".")[1],h=n.indexOf(","),i=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,u?(e._.includes(u,"[")?(u=(u=u.replace("]","")).split("["),y=e._.toFixed(t,u[0].length+u[1].length,r,u[1].length)):y=e._.toFixed(t,u.length,r),l=y.split(".")[0],y=e._.includes(y,".")?f.delimiters.decimal+y.split(".")[1]:"",m&&0===Number(y.slice(1))&&(y="")):l=e._.toFixed(t,0,r),g&&!s&&Number(l)>=1e3&&g!==f.abbreviations.trillion)switch(l=String(Number(l)/1e3),g){case f.abbreviations.thousand:g=f.abbreviations.million;break;case f.abbreviations.million:g=f.abbreviations.billion;break;case f.abbreviations.billion:g=f.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),v=!0),l.length<i)for(var b=i-l.length;b>0;b--)l="0"+l;return h>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),0===n.indexOf(".")&&(l=""),d=l+y+(g||""),p?d=(p&&v?"(":"")+d+(p&&v?")":""):c>=0?d=0===c?(v?"-":"+")+d:d+(v?"-":"+"):v&&(d="-"+d),d},stringToNumber:function(e){var t,n,r,i=o[l.currentLocale],s=e,a={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==i.delimiters.decimal&&(e=e.replace(/\./g,"").replace(i.delimiters.decimal,".")),a)if(r=new RegExp("[^a-zA-Z]"+i.abbreviations[t]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),s.match(r)){n*=Math.pow(10,a[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),i=r.length>>>0,s=0;if(3===arguments.length)n=arguments[2];else{for(;s<i&&!(s in r);)s++;if(s>=i)throw new TypeError("Reduce of empty array with no initial value");n=r[s++]}for(;s<i;s++)s in r&&(n=t(n,r[s],s,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){var e=Array.prototype.slice.call(arguments);return e.reduce((function(e,n){var r=t.multiplier(n);return e>r?e:r}),1)},toFixed:function(e,t,n,r){var i,s,o,a,l=e.toString().split("."),u=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,u),t):u,o=Math.pow(10,i),a=(n(e+"e+"+i)/o).toFixed(i),r>t-i&&(s=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),a=a.replace(s,"")),a}},e.options=l,e.formats=s,e.locales=o,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return o[l.currentLocale];if(e=e.toLowerCase(),!o[e])throw new Error("Unknown locale : "+e);return o[e]},e.reset=function(){for(var e in a)l[e]=a[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,i,s,o,a,l,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.localeData(n)}catch(t){u=e.localeData(e.locale())}return s=u.currency.symbol,a=u.abbreviations,r=u.delimiters.decimal,i="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==s)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==a.thousand&&c[0]!==a.million&&c[0]!==a.billion&&c[0]!==a.trillion)||(l=new RegExp(i+"{2}"),t.match(/[^\d.,]/g)||(o=t.split(r)).length>2||(o.length<2?!o[0].match(/^\d+.*\d$/)||o[0].match(l):1===o[0].length?!o[0].match(/^\d+$/)||o[0].match(l)||!o[1].match(/^\d+$/):!o[0].match(/^\d+.*\d$/)||o[0].match(l)||!o[1].match(/^\d+$/))))},e.fn=u.prototype={clone:function(){return e(this)},format:function(t,n){var r,i,o,a=this._value,u=t||l.defaultFormat;if(n=n||Math.round,0===a&&null!==l.zeroFormat)i=l.zeroFormat;else if(null===a&&null!==l.nullFormat)i=l.nullFormat;else{for(r in s)if(u.match(s[r].regexps.format)){o=s[r].format;break}i=(o=o||e._.numberToFormat)(a,u,n)}return i},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],(function(e,t,r,i){return e+Math.round(n*t)}),0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],(function(e,t,r,i){return e-Math.round(n*t)}),Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],(function(e,n,r,i){var s=t.correctionFactor(e,n);return Math.round(e*s)*Math.round(n*s)/Math.round(s*s)}),1),this},divide:function(e){return this._value=t.reduce([this._value,e],(function(e,n,r,i){var s=t.correctionFactor(e,n);return Math.round(e*s)/Math.round(n*s)})),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var i,s=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,s+"BPS"),i=i.join("")):i=i+s+"BPS",i},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i="("+(i=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(e){return n.suffixes.indexOf(e)<0}))).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(i)},format:function(t,i,s){var o,a,l,u=e._.includes(i,"ib")?r:n,c=e._.includes(i," b")||e._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),o=0;o<=u.suffixes.length;o++)if(a=Math.pow(u.base,o),l=Math.pow(u.base,o+1),null===t||0===t||t>=a&&t<l){c+=u.suffixes[o],a>0&&(t/=a);break}return e._.numberToFormat(t,i,s)+c},unformat:function(t){var i,s,o=e._.stringToNumber(t);if(o){for(i=n.suffixes.length-1;i>=0;i--){if(e._.includes(t,n.suffixes[i])){s=Math.pow(n.base,i);break}if(e._.includes(t,r.suffixes[i])){s=Math.pow(r.base,i);break}}o*=s||1}return o}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var i,s,o=e.locales[e.options.currentLocale],a={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=e._.numberToFormat(t,n,r),t>=0?(a.before=a.before.replace(/[\-\(]/,""),a.after=a.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(a.before,"-")&&!e._.includes(a.before,"(")&&(a.before="-"+a.before),s=0;s<a.before.length;s++)switch(a.before[s]){case"$":i=e._.insert(i,o.currency.symbol,s);break;case" ":i=e._.insert(i," ",s+o.currency.symbol.length-1)}for(s=a.after.length-1;s>=0;s--)switch(a.after[s]){case"$":i=s===a.after.length-1?i+o.currency.symbol:e._.insert(i,o.currency.symbol,-(a.after.length-(1+s)));break;case" ":i=s===a.after.length-1?i+" ":e._.insert(i," ",-(a.after.length-(1+s)+o.currency.symbol.length-1))}return i}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var i=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),i=Number(n[1]);return i=e._.includes(t,"e-")?i*=-1:i,e._.reduce([r,Math.pow(10,i)],(function(t,n,r,i){var s=e._.correctionFactor(t,n);return t*s*(n*s)/(s*s)}),1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var i=e.locales[e.options.currentLocale],s=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),s+=i.ordinal(t),e._.numberToFormat(t,n,r)+s}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var i,s=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,s+"%"),i=i.join("")):i=i+s+"%",i},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),i=Math.floor((e-60*r*60)/60),s=Math.round(e-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(s<10?"0"+s:s)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t){function n(e){var t=/\.[^.]*$/.exec(e);return t?t.index+1:e.length}function r(e,t,n){if(e.reduce)return e.reduce(t,n);for(var r=0,i=arguments.length>=3?n:e[r++];r<e.length;r++)t(i,e[r],r);return i}function i(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t.call(e,e[n],n)}function s(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t.call(e,e[r],r));return n}e.exports=function(e,t){t||(t={});var o=void 0===t.hsep?" ":t.hsep,a=t.align||[],l=t.stringLength||function(e){return String(e).length},u=r(e,(function(e,t){return i(t,(function(t,r){var i=n(t);(!e[r]||i>e[r])&&(e[r]=i)})),e}),[]),c=s(e,(function(e){return s(e,(function(e,t){var r=String(e);if("."===a[t]){var i=n(r),s=u[t]+(/\./.test(r)?1:2)-(l(r)-i);return r+Array(s).join(" ")}return r}))})),h=r(c,(function(e,t){return i(t,(function(t,n){var r=l(t);(!e[n]||r>e[n])&&(e[n]=r)})),e}),[]);return s(c,(function(e){return s(e,(function(e,t){var n=h[t]-l(e)||0,r=Array(Math.max(n+1,1)).join(" ");return"r"===a[t]||"."===a[t]?r+e:"c"===a[t]?Array(Math.ceil(n/2+1)).join(" ")+e+Array(Math.floor(n/2+1)).join(" "):e+r})).join(o).replace(/\s+$/,"")})).join("\n")}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShowCollectionsOutput=void 0;const a=o(n(27)),l=o(n(11)),u=s(n(6)),c=n(314);function h(e){return e.name.startsWith("system.")||e.name.startsWith("enxcol_.")}class d extends u.Component{constructor(){super(...arguments),this.renderTable=e=>{const t=[],n=[];let r=0;e.forEach(e=>{r=Math.max(r,e.name.length),h(e)?t.push(e):n.push(e)});const i=[];return[...n,...t].forEach((e,t)=>{const n=r-e.name.length+1,s=(0,a.default)(c["shell-collections-output-collection-name"],{[c["shell-collections-output-system-collection"]]:h(e)});i.push(u.default.createElement("span",{key:"row-"+t},u.default.createElement("span",{className:s},e.name),e.badge?e.badge.padStart(e.badge.length+n):"",u.default.createElement("br",null)))}),u.default.createElement(u.default.Fragment,null,...i)}}render(){return u.default.createElement("pre",null,this.renderTable(this.props.value))}}t.ShowCollectionsOutput=d,d.propTypes={value:l.default.array}},function(e,t,n){var r=n(21),i=n(315);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-show-collections-output-shell-collections-output-collection-name__16jec {\n font-weight: bold;\n}\n.mongosh-show-collections-output-shell-collections-output-system-collection__19HQZ {\n color: #89979b;\n}\n",""]),t.locals={"shell-collections-output-collection-name":"mongosh-show-collections-output-shell-collections-output-collection-name__16jec","shell-collections-output-system-collection":"mongosh-show-collections-output-shell-collections-output-system-collection__19HQZ"},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CursorOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(148);class c extends a.Component{render(){return this.props.value.documents.length?a.default.createElement(u.CursorIterationResultOutput,{value:this.props.value}):a.default.createElement("pre",null)}}t.CursorOutput=c,c.propTypes={value:l.default.arrayOf(l.default.object).isRequired}},function(e,t){e.exports=require("@leafygreen-ui/code")},function(e,t,n){var r=n(21),i=n(319);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-syntax-highlight-syntax-highlight__Ct9Yg * {\n background: transparent;\n border: 0px transparent;\n padding: 0px;\n margin: 0px;\n font-size: inherit;\n border-radius: 0px;\n color: inherit;\n}\n",""]),t.locals={"syntax-highlight":"mongosh-syntax-highlight-syntax-highlight__Ct9Yg"},e.exports=t},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";(function(e){function n(){return{TextDecoder:class{decode(t){const n=e.from(t).toString("utf8");return n.slice(+n.startsWith("\ufeff"))}},TextEncoder:class{encode(t){return e.from(t,"utf8")}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.textEncodingPolyfill=void 0,"function"==typeof TextDecoder&&"function"==typeof TextEncoder||Object.assign(Function("return this")(),n()),t.textEncodingPolyfill=n}).call(this,n(4).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),o=r[0],a=r[1],l=new s(function(e,t,n){return 3*(t+n)/4-n}(0,o,a)),c=0,h=a>0?o-4:o;for(n=0;n<h;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=0,a=n-i;o<a;o+=16383)s.push(c(e,o,o+16383>a?a:o+16383));1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=o.length;a<l;++a)r[a]=o[a],i[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 n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
41
41
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
42
- t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+e[t+h],h+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=u}return(f?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceProviderCore=void 0;const i=n(7),s=r(n(150));t.ServiceProviderCore=class{constructor(e){if(void 0===e)throw new i.MongoshInternalError("BSON Library is undefined.");(0,s.default)(e),this.bsonLibrary=e}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(328));t.default=function(t,n,r,s,o,a){var l;null!=r||(r={});const{isGenuine:u,serverName:c}=i.default.getGenuineMongoDB(r,s),{isDataLake:h,dlVersion:d}=i.default.getDataLake(r),f=a.s.credentials?a.s.credentials.mechanism:null,{serverOs:p,serverArch:m}=i.default.getBuildEnv(r);return{is_atlas:!!(null==o?void 0:o.atlasVersion)||i.default.isAtlas(t),is_localhost:i.default.isLocalhost(t),is_do:i.default.isDigitalOcean(t),server_version:r.version,node_version:e.version,mongosh_version:n,server_os:p,uri:t,server_arch:m,is_enterprise:i.default.isEnterprise(r),auth_type:f,is_data_lake:h,dl_version:d,atlas_version:null!==(l=null==o?void 0:o.atlasVersion)&&void 0!==l?l:null,is_genuine:u,non_genuine_server_name:c}}}).call(this,n(3))},function(e,t,n){const{default:r}=n(151),i=/\.mongodb(-dev)?\.net$/i,s=/^(localhost|127\.0\.0\.1|0\.0\.0\.0)$/i,o=/\.mongo\.ondigitalocean\.com$/i;function a(e){if("string"!=typeof e)return"";try{const t=new r(e);return t.hosts[0].split(":")[0]}catch(t){return e.split(":")[0]}}e.exports={getDataLake:function(e){const t={isDataLake:!1,dlVersion:null};return e.dataLake&&(t.isDataLake=!0,t.dlVersion=e.dataLake.version),t},isEnterprise:function(e){return!(!e.gitVersion||!e.gitVersion.match(/enterprise/))||!(!e.modules||-1===e.modules.indexOf("enterprise"))},isAtlas:function(e){return!!a(e).match(i)},isLocalhost:function(e){return!!a(e).match(s)},isDigitalOcean:function(e){return!!a(e).match(o)},getGenuineMongoDB:function(e,t){const n={isGenuine:!0,serverName:"mongodb"};return t&&(e.hasOwnProperty("_t")&&(n.isGenuine=!1,n.serverName="cosmosdb"),t.hasOwnProperty("errmsg")&&-1!==t.errmsg.indexOf("not supported")&&(n.isGenuine=!1,n.serverName="documentdb")),n},getBuildEnv:function(e){return{serverOs:e.buildEnvironment?e.buildEnvironment.target_os:null,serverArch:e.buildEnvironment?e.buildEnvironment.target_arch:null}}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.redactConnectionString=t.redactValidConnectionString=void 0;const o=s(n(151));t.redactValidConnectionString=function(e,t){var n,r;const i=e.clone(),s=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"_credentials_",a=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;if((i.username||i.password)&&a?(i.username=s,i.password=""):i.password&&(i.password=s),i.searchParams.has("authMechanismProperties")){const e=new o.CommaAndColonSeparatedRecord(i.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",s),i.searchParams.set("authMechanismProperties",e.toString()))}return i.searchParams.has("tlsCertificateKeyFilePassword")&&i.searchParams.set("tlsCertificateKeyFilePassword",s),i.searchParams.has("proxyUsername")&&a&&i.searchParams.set("proxyUsername",s),i.searchParams.has("proxyPassword")&&i.searchParams.set("proxyPassword",s),i},t.redactConnectionString=function(e,t){var n,r;const i=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"<credentials>",s=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;let a;try{a=new o.default(e)}catch(e){}if(a)return t={...t,replacementString:"___credentials___"},a.redact(t).toString().replace(/___credentials___/g,i);const l=[s?/(?<=\/\/)(.*)(?=@)/g:/(?<=\/\/[^@]+:)(.*)(?=@)/g,/(?<=AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,/(?<=tlsCertificateKeyFilePassword=)([^&]+)/gi,s?/(?<=proxyUsername=)([^&]+)/gi:null,/(?<=proxyPassword=)([^&]+)/gi];for(const t of l)null!==t&&(e=e.replace(t,i));return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplPlatform=void 0,function(e){e[e.Compass=0]="Compass",e[e.Browser=1]="Browser",e[e.CLI=2]="CLI",e[e.JavaShell=3]="JavaShell"}(t.ReplPlatform||(t.ReplPlatform={}))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"BSONError",(function(){return S})),n.d(t,"BSONRegExp",(function(){return ye})),n.d(t,"BSONSymbol",(function(){return ve})),n.d(t,"BSONTypeError",(function(){return x})),n.d(t,"BSON_BINARY_SUBTYPE_BYTE_ARRAY",(function(){return it})),n.d(t,"BSON_BINARY_SUBTYPE_COLUMN",(function(){return ut})),n.d(t,"BSON_BINARY_SUBTYPE_DEFAULT",(function(){return nt})),n.d(t,"BSON_BINARY_SUBTYPE_ENCRYPTED",(function(){return lt})),n.d(t,"BSON_BINARY_SUBTYPE_FUNCTION",(function(){return rt})),n.d(t,"BSON_BINARY_SUBTYPE_MD5",(function(){return at})),n.d(t,"BSON_BINARY_SUBTYPE_USER_DEFINED",(function(){return ct})),n.d(t,"BSON_BINARY_SUBTYPE_UUID",(function(){return st})),n.d(t,"BSON_BINARY_SUBTYPE_UUID_NEW",(function(){return ot})),n.d(t,"BSON_DATA_ARRAY",(function(){return Be})),n.d(t,"BSON_DATA_BINARY",(function(){return je})),n.d(t,"BSON_DATA_BOOLEAN",(function(){return Ve})),n.d(t,"BSON_DATA_CODE",(function(){return qe})),n.d(t,"BSON_DATA_CODE_W_SCOPE",(function(){return Ye})),n.d(t,"BSON_DATA_DATE",(function(){return We})),n.d(t,"BSON_DATA_DBPOINTER",(function(){return He})),n.d(t,"BSON_DATA_DECIMAL128",(function(){return Qe})),n.d(t,"BSON_DATA_INT",(function(){return Je})),n.d(t,"BSON_DATA_LONG",(function(){return Ze})),n.d(t,"BSON_DATA_MAX_KEY",(function(){return tt})),n.d(t,"BSON_DATA_MIN_KEY",(function(){return et})),n.d(t,"BSON_DATA_NULL",(function(){return ze})),n.d(t,"BSON_DATA_NUMBER",(function(){return De})),n.d(t,"BSON_DATA_OBJECT",(function(){return Le})),n.d(t,"BSON_DATA_OID",(function(){return Ue})),n.d(t,"BSON_DATA_REGEXP",(function(){return Ke})),n.d(t,"BSON_DATA_STRING",(function(){return Fe})),n.d(t,"BSON_DATA_SYMBOL",(function(){return Ge})),n.d(t,"BSON_DATA_TIMESTAMP",(function(){return Xe})),n.d(t,"BSON_DATA_UNDEFINED",(function(){return $e})),n.d(t,"BSON_INT32_MAX",(function(){return Pe})),n.d(t,"BSON_INT32_MIN",(function(){return ke})),n.d(t,"BSON_INT64_MAX",(function(){return Oe})),n.d(t,"BSON_INT64_MIN",(function(){return Ie})),n.d(t,"Binary",(function(){return z})),n.d(t,"Code",(function(){return K})),n.d(t,"DBRef",(function(){return q})),n.d(t,"Decimal128",(function(){return le})),n.d(t,"Double",(function(){return ue})),n.d(t,"EJSON",(function(){return Ae})),n.d(t,"Int32",(function(){return ce})),n.d(t,"Long",(function(){return X})),n.d(t,"LongWithoutOverridesClass",(function(){return be})),n.d(t,"Map",(function(){return Te})),n.d(t,"MaxKey",(function(){return he})),n.d(t,"MinKey",(function(){return de})),n.d(t,"ObjectID",(function(){return ge})),n.d(t,"ObjectId",(function(){return ge})),n.d(t,"Timestamp",(function(){return we})),n.d(t,"UUID",(function(){return W})),n.d(t,"calculateObjectSize",(function(){return Xt})),n.d(t,"deserialize",(function(){return Jt})),n.d(t,"deserializeStream",(function(){return Zt})),n.d(t,"serialize",(function(){return Gt})),n.d(t,"serializeWithBufferAndIndex",(function(){return Yt})),n.d(t,"setInternalBufferSize",(function(){return qt}));for(var r=function(e){var t=d(e),n=t[0],r=t[1];return 3*(n+r)/4-r},i=function(e){var t,n,r=d(e),i=r[0],s=r[1],o=new l(function(e,t,n){return 3*(t+n)/4-n}(0,i,s)),u=0,c=s>0?i-4:i;for(n=0;n<c;n+=4)t=a[e.charCodeAt(n)]<<18|a[e.charCodeAt(n+1)]<<12|a[e.charCodeAt(n+2)]<<6|a[e.charCodeAt(n+3)],o[u++]=t>>16&255,o[u++]=t>>8&255,o[u++]=255&t;2===s&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,o[u++]=255&t);1===s&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,o[u++]=t>>8&255,o[u++]=255&t);return o},s=function(e){for(var t,n=e.length,r=n%3,i=[],s=0,a=n-r;s<a;s+=16383)i.push(f(e,s,s+16383>a?a:s+16383));1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"="));return i.join("")},o=[],a=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,h=u.length;c<h;++c)o[c]=u[c],a[u.charCodeAt(c)]=c;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var r,i,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(o[(i=r)>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63;var p={byteLength:r,toByteArray:i,fromByteArray:s},m=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+e[t+h],h+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=u}return(f?-1:1)*o*Math.pow(2,s-r)},g=function(e,t,n,r,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*m},y=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=i,t.SlowBuffer=function(e){+e!=e&&(e=0);return i.alloc(+e)},t.INSPECT_MAX_BYTES=50;function r(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,i.prototype),t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return a(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|h(e,t),s=r(n),o=s.write(e,t);o!==n&&(s=s.slice(0,o));return s}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){var t=new Uint8Array(e);return u(t.buffer,t.byteOffset,t.byteLength)}return l(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 "+babelHelpers.typeof(e));if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return u(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return u(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return i.from(s,t,n);var o=function(e){if(i.isBuffer(e)){var t=0|c(e.length),n=r(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||$(e.length)?r(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function o(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 a(e){return o(e),r(e<0?0:0|c(e))}function l(e){for(var t=e.length<0?0:0|c(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function u(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,i.prototype),r}function c(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function h(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(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 '+babelHelpers.typeof(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(s)return r?-1:F(e).length;t=(""+t).toLowerCase(),s=!0}}function d(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),$(n=+n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=n;s<a;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else-1!==c&&(s-=s-c),c=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(u(e,s+d)!==u(t,d)){h=!1;break}if(h)return s}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if($(a))return o;e[n+o]=a}return o}function w(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return B(L(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?p.fromByteArray(e):p.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.kMaxLength=2147483647,i.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}}(),i.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(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(e,t,n){return function(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},i.allocUnsafe=function(e){return a(e)},i.allocUnsafeSlow=function(e){return a(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==i.prototype},i.compare=function(e,t){if(j(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s<o;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},i.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}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var o=e[n];if(j(o,Uint8Array))s+o.length>r.length?i.from(o).copy(r,s):Uint8Array.prototype.set.call(r,o,s);else{if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s)}s+=o.length}return r},i.byteLength=h,i.prototype._isBuffer=!0,i.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)f(this,t,t+1);return this},i.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)f(this,t,t+3),f(this,t+1,t+2);return this},i.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)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):d.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(e,t,n,r,s){if(j(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(s>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(o,a),u=this.slice(r,s),c=e.slice(t,n),h=0;h<l;++h)if(u[h]!==c[h]){o=u[h],a=c[h];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=U[e[s]];return i}function P(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length-1;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function k(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function I(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return t=+t,n>>>=0,i||I(e,0,n,4),g(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return t=+t,n>>>=0,i||I(e,0,n,8),g(e,t,n,r,52,8),n+8}i.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,i.prototype),r},i.prototype.readUintLE=i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},i.prototype.readUintBE=i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUint8=i.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),m(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),m(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),m(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),m(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var s=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),s},i.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var s=e.charCodeAt(0);("utf8"===r&&s<128||"latin1"===r)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:i.from(e,r),l=a.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%l]}return this};var D=/[^+/0-9A-Za-z-_]/g;function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function L(e){return p.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}var U=function(){for(var e=new Array(256),t=0;t<16;++t)for(var n=16*t,r=0;r<16;++r)e[n+r]="0123456789abcdef"[t]+"0123456789abcdef"[r];return e}()})),v=y.Buffer;
42
+ t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+e[t+h],h+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=u}return(f?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceProviderCore=void 0;const i=n(7),s=r(n(150));t.ServiceProviderCore=class{constructor(e){if(void 0===e)throw new i.MongoshInternalError("BSON Library is undefined.");(0,s.default)(e),this.bsonLibrary=e}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(328));t.default=function(t,n,r,s,o,a){var l;null!=r||(r={});const{isGenuine:u,serverName:c}=i.default.getGenuineMongoDB(r,s),{isDataLake:h,dlVersion:d}=i.default.getDataLake(r),f=a.s.credentials?a.s.credentials.mechanism:null,{serverOs:p,serverArch:m}=i.default.getBuildEnv(r);return{is_atlas:!!(null==o?void 0:o.atlasVersion)||i.default.isAtlas(t),is_localhost:i.default.isLocalhost(t),is_do:i.default.isDigitalOcean(t),server_version:r.version,node_version:e.version,mongosh_version:n,server_os:p,uri:t,server_arch:m,is_enterprise:i.default.isEnterprise(r),auth_type:f,is_data_federation:h,dl_version:d,atlas_version:null!==(l=null==o?void 0:o.atlasVersion)&&void 0!==l?l:null,is_genuine:u,non_genuine_server_name:c}}}).call(this,n(3))},function(e,t,n){const{default:r}=n(151),i=/\.mongodb(-dev)?\.net$/i,s=/^(localhost|127\.0\.0\.1|0\.0\.0\.0)$/i,o=/\.mongo\.ondigitalocean\.com$/i;function a(e){if("string"!=typeof e)return"";try{const t=new r(e);return t.hosts[0].split(":")[0]}catch(t){return e.split(":")[0]}}e.exports={getDataLake:function(e){const t={isDataLake:!1,dlVersion:null};return e.dataLake&&(t.isDataLake=!0,t.dlVersion=e.dataLake.version),t},isEnterprise:function(e){return!(!e.gitVersion||!e.gitVersion.match(/enterprise/))||!(!e.modules||-1===e.modules.indexOf("enterprise"))},isAtlas:function(e){return!!a(e).match(i)},isLocalhost:function(e){return!!a(e).match(s)},isDigitalOcean:function(e){return!!a(e).match(o)},getGenuineMongoDB:function(e,t){const n={isGenuine:!0,serverName:"mongodb"};return t&&(e.hasOwnProperty("_t")&&(n.isGenuine=!1,n.serverName="cosmosdb"),t.hasOwnProperty("errmsg")&&-1!==t.errmsg.indexOf("not supported")&&(n.isGenuine=!1,n.serverName="documentdb")),n},getBuildEnv:function(e){return{serverOs:e.buildEnvironment?e.buildEnvironment.target_os:null,serverArch:e.buildEnvironment?e.buildEnvironment.target_arch:null}}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.redactConnectionString=t.redactValidConnectionString=void 0;const o=s(n(151));t.redactValidConnectionString=function(e,t){var n,r;const i=e.clone(),s=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"_credentials_",a=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;if((i.username||i.password)&&a?(i.username=s,i.password=""):i.password&&(i.password=s),i.searchParams.has("authMechanismProperties")){const e=new o.CommaAndColonSeparatedRecord(i.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",s),i.searchParams.set("authMechanismProperties",e.toString()))}return i.searchParams.has("tlsCertificateKeyFilePassword")&&i.searchParams.set("tlsCertificateKeyFilePassword",s),i.searchParams.has("proxyUsername")&&a&&i.searchParams.set("proxyUsername",s),i.searchParams.has("proxyPassword")&&i.searchParams.set("proxyPassword",s),i},t.redactConnectionString=function(e,t){var n,r;const i=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"<credentials>",s=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;let a;try{a=new o.default(e)}catch(e){}if(a)return t={...t,replacementString:"___credentials___"},a.redact(t).toString().replace(/___credentials___/g,i);const l=[s?/(?<=\/\/)(.*)(?=@)/g:/(?<=\/\/[^@]+:)(.*)(?=@)/g,/(?<=AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,/(?<=tlsCertificateKeyFilePassword=)([^&]+)/gi,s?/(?<=proxyUsername=)([^&]+)/gi:null,/(?<=proxyPassword=)([^&]+)/gi];for(const t of l)null!==t&&(e=e.replace(t,i));return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplPlatform=void 0,function(e){e[e.Compass=0]="Compass",e[e.Browser=1]="Browser",e[e.CLI=2]="CLI",e[e.JavaShell=3]="JavaShell"}(t.ReplPlatform||(t.ReplPlatform={}))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"BSONError",(function(){return S})),n.d(t,"BSONRegExp",(function(){return ye})),n.d(t,"BSONSymbol",(function(){return ve})),n.d(t,"BSONTypeError",(function(){return x})),n.d(t,"BSON_BINARY_SUBTYPE_BYTE_ARRAY",(function(){return it})),n.d(t,"BSON_BINARY_SUBTYPE_COLUMN",(function(){return ut})),n.d(t,"BSON_BINARY_SUBTYPE_DEFAULT",(function(){return nt})),n.d(t,"BSON_BINARY_SUBTYPE_ENCRYPTED",(function(){return lt})),n.d(t,"BSON_BINARY_SUBTYPE_FUNCTION",(function(){return rt})),n.d(t,"BSON_BINARY_SUBTYPE_MD5",(function(){return at})),n.d(t,"BSON_BINARY_SUBTYPE_USER_DEFINED",(function(){return ct})),n.d(t,"BSON_BINARY_SUBTYPE_UUID",(function(){return st})),n.d(t,"BSON_BINARY_SUBTYPE_UUID_NEW",(function(){return ot})),n.d(t,"BSON_DATA_ARRAY",(function(){return Be})),n.d(t,"BSON_DATA_BINARY",(function(){return je})),n.d(t,"BSON_DATA_BOOLEAN",(function(){return Ve})),n.d(t,"BSON_DATA_CODE",(function(){return qe})),n.d(t,"BSON_DATA_CODE_W_SCOPE",(function(){return Ye})),n.d(t,"BSON_DATA_DATE",(function(){return We})),n.d(t,"BSON_DATA_DBPOINTER",(function(){return He})),n.d(t,"BSON_DATA_DECIMAL128",(function(){return Qe})),n.d(t,"BSON_DATA_INT",(function(){return Je})),n.d(t,"BSON_DATA_LONG",(function(){return Ze})),n.d(t,"BSON_DATA_MAX_KEY",(function(){return tt})),n.d(t,"BSON_DATA_MIN_KEY",(function(){return et})),n.d(t,"BSON_DATA_NULL",(function(){return ze})),n.d(t,"BSON_DATA_NUMBER",(function(){return De})),n.d(t,"BSON_DATA_OBJECT",(function(){return Le})),n.d(t,"BSON_DATA_OID",(function(){return Ue})),n.d(t,"BSON_DATA_REGEXP",(function(){return Ke})),n.d(t,"BSON_DATA_STRING",(function(){return Fe})),n.d(t,"BSON_DATA_SYMBOL",(function(){return Ge})),n.d(t,"BSON_DATA_TIMESTAMP",(function(){return Xe})),n.d(t,"BSON_DATA_UNDEFINED",(function(){return $e})),n.d(t,"BSON_INT32_MAX",(function(){return Pe})),n.d(t,"BSON_INT32_MIN",(function(){return ke})),n.d(t,"BSON_INT64_MAX",(function(){return Oe})),n.d(t,"BSON_INT64_MIN",(function(){return Ie})),n.d(t,"Binary",(function(){return z})),n.d(t,"Code",(function(){return K})),n.d(t,"DBRef",(function(){return q})),n.d(t,"Decimal128",(function(){return le})),n.d(t,"Double",(function(){return ue})),n.d(t,"EJSON",(function(){return Ae})),n.d(t,"Int32",(function(){return ce})),n.d(t,"Long",(function(){return X})),n.d(t,"LongWithoutOverridesClass",(function(){return be})),n.d(t,"Map",(function(){return Te})),n.d(t,"MaxKey",(function(){return he})),n.d(t,"MinKey",(function(){return de})),n.d(t,"ObjectID",(function(){return ge})),n.d(t,"ObjectId",(function(){return ge})),n.d(t,"Timestamp",(function(){return we})),n.d(t,"UUID",(function(){return W})),n.d(t,"calculateObjectSize",(function(){return Xt})),n.d(t,"deserialize",(function(){return Jt})),n.d(t,"deserializeStream",(function(){return Zt})),n.d(t,"serialize",(function(){return Gt})),n.d(t,"serializeWithBufferAndIndex",(function(){return Yt})),n.d(t,"setInternalBufferSize",(function(){return qt}));for(var r=function(e){var t=d(e),n=t[0],r=t[1];return 3*(n+r)/4-r},i=function(e){var t,n,r=d(e),i=r[0],s=r[1],o=new l(function(e,t,n){return 3*(t+n)/4-n}(0,i,s)),u=0,c=s>0?i-4:i;for(n=0;n<c;n+=4)t=a[e.charCodeAt(n)]<<18|a[e.charCodeAt(n+1)]<<12|a[e.charCodeAt(n+2)]<<6|a[e.charCodeAt(n+3)],o[u++]=t>>16&255,o[u++]=t>>8&255,o[u++]=255&t;2===s&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,o[u++]=255&t);1===s&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,o[u++]=t>>8&255,o[u++]=255&t);return o},s=function(e){for(var t,n=e.length,r=n%3,i=[],s=0,a=n-r;s<a;s+=16383)i.push(f(e,s,s+16383>a?a:s+16383));1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"="));return i.join("")},o=[],a=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,h=u.length;c<h;++c)o[c]=u[c],a[u.charCodeAt(c)]=c;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var r,i,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(o[(i=r)>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63;var p={byteLength:r,toByteArray:i,fromByteArray:s},m=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,s=f&(1<<-c)-1,f>>=-c,c+=a;c>0;s=256*s+e[t+h],h+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=u}return(f?-1:1)*o*Math.pow(2,s-r)},g=function(e,t,n,r,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=c?(a=0,o=c):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[n+f]=255&o,f+=p,o/=256,u-=8);e[n+f-p]|=128*m},y=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=i,t.SlowBuffer=function(e){+e!=e&&(e=0);return i.alloc(+e)},t.INSPECT_MAX_BYTES=50;function r(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,i.prototype),t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return a(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|h(e,t),s=r(n),o=s.write(e,t);o!==n&&(s=s.slice(0,o));return s}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){var t=new Uint8Array(e);return u(t.buffer,t.byteOffset,t.byteLength)}return l(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 "+babelHelpers.typeof(e));if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return u(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return u(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return i.from(s,t,n);var o=function(e){if(i.isBuffer(e)){var t=0|c(e.length),n=r(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||$(e.length)?r(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function o(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 a(e){return o(e),r(e<0?0:0|c(e))}function l(e){for(var t=e.length<0?0:0|c(e.length),n=r(t),i=0;i<t;i+=1)n[i]=255&e[i];return n}function u(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,i.prototype),r}function c(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function h(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(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 '+babelHelpers.typeof(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var s=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(s)return r?-1:F(e).length;t=(""+t).toLowerCase(),s=!0}}function d(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),$(n=+n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=n;s<a;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else-1!==c&&(s-=s-c),c=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(u(e,s+d)!==u(t,d)){h=!1;break}if(h)return s}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if($(a))return o;e[n+o]=a}return o}function w(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return B(L(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?p.fromByteArray(e):p.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.kMaxLength=2147483647,i.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}}(),i.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(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(e,t,n){return function(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},i.allocUnsafe=function(e){return a(e)},i.allocUnsafeSlow=function(e){return a(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==i.prototype},i.compare=function(e,t){if(j(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s<o;++s)if(e[s]!==t[s]){n=e[s],r=t[s];break}return n<r?-1:r<n?1:0},i.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}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),s=0;for(n=0;n<e.length;++n){var o=e[n];if(j(o,Uint8Array))s+o.length>r.length?i.from(o).copy(r,s):Uint8Array.prototype.set.call(r,o,s);else{if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,s)}s+=o.length}return r},i.byteLength=h,i.prototype._isBuffer=!0,i.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)f(this,t,t+1);return this},i.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)f(this,t,t+3),f(this,t+1,t+2);return this},i.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)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):d.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(e,t,n,r,s){if(j(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(s>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(o,a),u=this.slice(r,s),c=e.slice(t,n),h=0;h<l;++h)if(u[h]!==c[h]){o=u[h],a=c[h];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=U[e[s]];return i}function P(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length-1;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function k(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function I(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return t=+t,n>>>=0,i||I(e,0,n,4),g(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return t=+t,n>>>=0,i||I(e,0,n,8),g(e,t,n,r,52,8),n+8}i.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,i.prototype),r},i.prototype.readUintLE=i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},i.prototype.readUintBE=i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUint8=i.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),m(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),m(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),m(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),m(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},i.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var s=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),s},i.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var s=e.charCodeAt(0);("utf8"===r&&s<128||"latin1"===r)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=i.isBuffer(e)?e:i.from(e,r),l=a.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%l]}return this};var D=/[^+/0-9A-Za-z-_]/g;function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function L(e){return p.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}var U=function(){for(var e=new Array(256),t=0;t<16;++t)for(var n=16*t,r=0;r<16;++r)e[n+r]="0123456789abcdef"[t]+"0123456789abcdef"[r];return e}()})),v=y.Buffer;
43
43
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */y.SlowBuffer,y.INSPECT_MAX_BYTES,y.kMaxLength;
44
44
  /*! *****************************************************************************
45
45
  Copyright (c) Microsoft Corporation.
@@ -55,11 +55,11 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
55
55
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
56
56
  PERFORMANCE OF THIS SOFTWARE.
57
57
  ***************************************************************************** */
58
- var b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function w(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(){return(_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return w(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),x=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return w(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function E(e){return e&&e.Math==Math&&e}function A(){return E("object"==typeof globalThis&&globalThis)||E("object"==typeof window&&window)||E("object"==typeof self&&self)||E("object"==typeof e&&e)||Function("return this")()}function T(e){return e.toString().replace("function(","function (")}var M=function(e){var t,n="object"==typeof(t=A()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=v.alloc(e),i=0;i<e;++i)r[i]=Math.floor(256*Math.random());return r},C=function(){if("undefined"!=typeof window){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(v.alloc(e))}}return void 0!==e&&e.crypto&&e.crypto.getRandomValues?function(t){return e.crypto.getRandomValues(v.alloc(t))}:M}();function P(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function k(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function O(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function I(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function R(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function N(e){return D(e)&&"[object Date]"===Object.prototype.toString.call(e)}function D(e){return"object"==typeof e&&null!==e}function F(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n||(console.warn(t),n=!0),e.apply(this,r)}}function L(e){if(ArrayBuffer.isView(e))return v.from(e.buffer,e.byteOffset,e.byteLength);if(P(e))return v.from(e);throw new x("Must use either Buffer or TypedArray")}var B=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,j=function(e){return"string"==typeof e&&B.test(e)},$=function(e){if(!j(e))throw new x('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return v.from(t,"hex")},U=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},V=Symbol("id"),W=function(){function e(t){if(void 0===t)this.id=e.generate();else if(t instanceof e)this[V]=v.from(t.id),this.__id=t.__id;else if(ArrayBuffer.isView(t)&&16===t.byteLength)this.id=L(t);else{if("string"!=typeof t)throw new x("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");this.id=$(t)}}return Object.defineProperty(e.prototype,"id",{get:function(){return this[V]},set:function(t){this[V]=t,e.cacheHexString&&(this.__id=U(t))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(t){if(void 0===t&&(t=!0),e.cacheHexString&&this.__id)return this.__id;var n=U(this.id,t);return e.cacheHexString&&(this.__id=n),n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(!t)return!1;if(t instanceof e)return t.id.equals(this.id);try{return new e(t).id.equals(this.id)}catch(e){return!1}},e.prototype.toBinary=function(){return new z(this.id,z.SUBTYPE_UUID)},e.generate=function(){var e=C(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,v.from(e)},e.isValid=function(t){if(!t)return!1;if(t instanceof e)return!0;if("string"==typeof t)return j(t);if(k(t)){if(16!==t.length)return!1;try{return parseInt(t[6].toString(16)[0],10)===z.SUBTYPE_UUID}catch(e){return!1}}return!1},e.createFromHexString=function(t){return new e($(t))},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}();Object.defineProperty(W.prototype,"_bsontype",{value:"UUID"});var z=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new x("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=n?n:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=v.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=v.from(t,"binary"):Array.isArray(t)?this.buffer=v.from(t):this.buffer=L(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new x("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new x("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||n>255)throw new x("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=v.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var n=v.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(L(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===n.length?"0"+n:n}:{$binary:{base64:t,subType:1===n.length?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new W(this.buffer.slice(0,this.position));throw new S('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){var r,i;if(n=n||{},"$binary"in t?n.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=v.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=v.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=$(t.$uuid)),!r)throw new x("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(z.prototype,"_bsontype",{value:"Binary"});var K=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function H(e){return D(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(K.prototype,"_bsontype",{value:"Code"});var q=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var s=t.split(".");2===s.length&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(q.prototype,"_bsontype",{value:"DBRef"});var G=void 0;try{G=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var Y={},J={},X=function(){function e(t,n,r){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,n,r);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!n)):"string"==typeof t?Object.assign(this,e.fromString(t,!!n)):(this.low=0|t,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,s;return n?(s=0<=(t>>>=0)&&t<256)&&(i=J[t])?i:(r=e.fromBits(t,(0|t)<0?-1:0,!0),s&&(J[t]=r),r):(s=-128<=(t|=0)&&t<128)&&(i=Y[t])?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&(Y[t]=r),r)},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=0x10000000000000000)return e.MAX_UNSIGNED_VALUE}else{if(t<=-0x8000000000000000)return e.MIN_VALUE;if(t+1>=0x8000000000000000)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%4294967296|0,t/4294967296|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),n,r).neg();for(var s=e.fromNumber(Math.pow(r,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),u=parseInt(t.substring(a,a+l),r);if(l<8){var c=e.fromNumber(Math.pow(r,l));o=o.mul(c).add(e.fromNumber(u))}else o=(o=o.mul(s)).add(e.fromNumber(u))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(e){return D(e)&&!0===e.__isLong__},e.fromValue=function(t,n){return"number"==typeof t?e.fromNumber(t,n):"string"==typeof t?e.fromString(t,n):e.fromBits(t.low,t.high,"boolean"==typeof n?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,o=t.high>>>16,a=65535&t.high,l=t.low>>>16,u=0,c=0,h=0,d=0;return h+=(d+=s+(65535&t.low))>>>16,d&=65535,c+=(h+=i+l)>>>16,h&=65535,u+=(c+=r+a)>>>16,c&=65535,u+=n+o,u&=65535,e.fromBits(h<<16|d,u<<16|c,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(G){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var n=(this.unsigned?G.div_u:G.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,G.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(r=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),s=r.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),a=o<=48?1:Math.pow(2,o-48),l=e.fromNumber(r),u=l.mul(t);u.isNegative()||u.gt(i);)r-=a,u=(l=e.fromNumber(r,this.unsigned)).mul(t);l.isZero()&&(l=e.ONE),s=s.add(l),i=i.sub(u)}return s},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,n=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(n&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),G){var n=(this.unsigned?G.rem_u:G.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,G.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),G){var n=G.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,G.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,s=this.low>>>16,o=65535&this.low,a=t.high>>>16,l=65535&t.high,u=t.low>>>16,c=65535&t.low,h=0,d=0,f=0,p=0;return f+=(p+=o*c)>>>16,p&=65535,d+=(f+=s*c)>>>16,f&=65535,d+=(f+=o*u)>>>16,f&=65535,h+=(d+=i*c)>>>16,d&=65535,h+=(d+=s*u)>>>16,d&=65535,h+=(d+=o*l)>>>16,d&=65535,h+=r*c+i*u+s*l+o*a,h&=65535,e.fromBits(f<<16|p,h<<16|d,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0===(t&=63))return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}return 32===t?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?4294967296*(this.high>>>0)+(this.low>>>0):4294967296*this.high+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),u=(o.sub(l.mul(s)).toInt()>>>0).toString(t);if((o=l).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(1<<24),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(X.prototype,"__isLong__",{value:!0}),Object.defineProperty(X.prototype,"_bsontype",{value:"Long"});var Z=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Q=/^(\+|-)?(Infinity|inf)$/i,ee=/^(\+|-)?NaN$/i,te=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ne=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),re=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ie=/^([-+])?(\d+)?$/;function se(e){return!isNaN(parseInt(e,10))}function oe(e){var t=X.fromNumber(1e9),n=X.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new X(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function ae(e,t){throw new x('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var le=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!k(t))throw new x("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new x("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var n,r=!1,i=!1,s=!1,o=0,a=0,l=0,u=0,c=0,h=[0],d=0,f=0,p=0,m=0,g=0,y=0,b=new X(0,0),w=new X(0,0),_=0;if(t.length>=7e3)throw new x(t+" not a valid Decimal128 string");var S=t.match(Z),E=t.match(Q),A=t.match(ee);if(!S&&!E&&!A||0===t.length)throw new x(t+" not a valid Decimal128 string");if(S){var T=S[2],M=S[4],C=S[5],P=S[6];M&&void 0===P&&ae(t,"missing exponent power"),M&&void 0===T&&ae(t,"missing exponent base"),void 0===M&&(C||P)&&ae(t,"missing e before exponent")}if("+"!==t[_]&&"-"!==t[_]||(r="-"===t[_++]),!se(t[_])&&"."!==t[_]){if("i"===t[_]||"I"===t[_])return new e(v.from(r?ne:re));if("N"===t[_])return new e(v.from(te))}for(;se(t[_])||"."===t[_];)"."!==t[_]?(d<34&&("0"!==t[_]||s)&&(s||(c=a),s=!0,h[f++]=parseInt(t[_],10),d+=1),s&&(l+=1),i&&(u+=1),a+=1,_+=1):(i&&ae(t,"contains multiple periods"),i=!0,_+=1);if(i&&!a)throw new x(t+" not a valid Decimal128 string");if("e"===t[_]||"E"===t[_]){var k=t.substr(++_).match(ie);if(!k||!k[2])return new e(v.from(te));g=parseInt(k[0],10),_+=k[0].length}if(t[_])return new e(v.from(te));if(p=0,d){if(m=d-1,1!==(o=l))for(;0===h[c+o-1];)o-=1}else p=0,m=0,h[0]=0,l=1,d=1,o=0;for(g<=u&&u-g>16384?g=-6176:g-=u;g>6111;){if((m+=1)-p>34){if(h.join("").match(/^0+$/)){g=6111;break}ae(t,"overflow")}g-=1}for(;g<-6176||d<l;){if(0===m&&o<d){g=-6176,o=0;break}if(d<l?l-=1:m-=1,g<6111)g+=1;else{if(h.join("").match(/^0+$/)){g=6111;break}ae(t,"overflow")}}if(m-p+1<o){var O=a;i&&(c+=1,O+=1),r&&(c+=1,O+=1);var I=parseInt(t[c+m+1],10),R=0;if(I>=5&&(R=1,5===I))for(R=h[m]%2==1?1:0,y=c+m+2;y<O;y++)if(parseInt(t[y],10)){R=1;break}if(R)for(var N=m;N>=0;N--)if(++h[N]>9&&(h[N]=0,0===N)){if(!(g<6111))return new e(v.from(r?ne:re));g+=1,h[N]=1}}if(b=X.fromNumber(0),w=X.fromNumber(0),0===o)b=X.fromNumber(0),w=X.fromNumber(0);else if(m-p<17){N=p;for(w=X.fromNumber(h[N++]),b=new X(0,0);N<=m;N++)w=(w=w.multiply(X.fromNumber(10))).add(X.fromNumber(h[N]))}else{N=p;for(b=X.fromNumber(h[N++]);N<=m-17;N++)b=(b=b.multiply(X.fromNumber(10))).add(X.fromNumber(h[N]));for(w=X.fromNumber(h[N++]);N<=m;N++)w=(w=w.multiply(X.fromNumber(10))).add(X.fromNumber(h[N]))}var D,F,L,B,j=function(e,t){if(!e&&!t)return{high:X.fromNumber(0),low:X.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new X(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new X(t.getLowBits(),0),o=n.multiply(i),a=n.multiply(s),l=r.multiply(i),u=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new X(a.getLowBits(),0).add(l).add(u.shiftRightUnsigned(32)),{high:o=o.add(a.shiftRightUnsigned(32)),low:u=a.shiftLeft(32).add(new X(u.getLowBits(),0))}}(b,X.fromString("100000000000000000"));j.low=j.low.add(w),D=j.low,F=w,L=D.high>>>0,B=F.high>>>0,(L<B||L===B&&D.low>>>0<F.low>>>0)&&(j.high=j.high.add(X.fromNumber(1))),n=g+6176;var $={low:X.fromNumber(0),high:X.fromNumber(0)};j.high.shiftRightUnsigned(49).and(X.fromNumber(1)).equals(X.fromNumber(1))?($.high=$.high.or(X.fromNumber(3).shiftLeft(61)),$.high=$.high.or(X.fromNumber(n).and(X.fromNumber(16383).shiftLeft(47))),$.high=$.high.or(j.high.and(X.fromNumber(0x7fffffffffff)))):($.high=$.high.or(X.fromNumber(16383&n).shiftLeft(49)),$.high=$.high.or(j.high.and(X.fromNumber(562949953421311)))),$.low=j.low,r&&($.high=$.high.or(X.fromString("9223372036854775808")));var U=v.alloc(16);return _=0,U[_++]=255&$.low.low,U[_++]=$.low.low>>8&255,U[_++]=$.low.low>>16&255,U[_++]=$.low.low>>24&255,U[_++]=255&$.low.high,U[_++]=$.low.high>>8&255,U[_++]=$.low.high>>16&255,U[_++]=$.low.high>>24&255,U[_++]=255&$.high.low,U[_++]=$.high.low>>8&255,U[_++]=$.high.low>>16&255,U[_++]=$.high.low>>24&255,U[_++]=255&$.high.high,U[_++]=$.high.high>>8&255,U[_++]=$.high.high>>16&255,U[_++]=$.high.high>>24&255,new e(U)},e.prototype.toString=function(){for(var e,t=0,n=new Array(36),r=0;r<n.length;r++)n[r]=0;var i,s,o,a=0,l=!1,u={parts:[0,0,0,0]},c=[];a=0;var h=this.bytes,d=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24,f=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24,p=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24,m=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24;a=0,{low:new X(d,f),high:new X(p,m)}.high.lessThan(X.ZERO)&&c.push("-");var g=m>>26&31;if(g>>3==3){if(30===g)return c.join("")+"Infinity";if(31===g)return"NaN";e=m>>15&16383,i=8+(m>>14&1)}else i=m>>14&7,e=m>>17&16383;var y=e-6176;if(u.parts[0]=(16383&m)+((15&i)<<14),u.parts[1]=p,u.parts[2]=f,u.parts[3]=d,0===u.parts[0]&&0===u.parts[1]&&0===u.parts[2]&&0===u.parts[3])l=!0;else for(o=3;o>=0;o--){var v=0,b=oe(u);if(u=b.quotient,v=b.rem.low)for(s=8;s>=0;s--)n[9*o+s]=v%10,v=Math.floor(v/10)}if(l)t=1,n[a]=0;else for(t=36;!n[a];)t-=1,a+=1;var w=t-1+y;if(w>=34||w<=-7||y>0){if(t>34)return c.push("".concat(0)),y>0?c.push("E+".concat(y)):y<0&&c.push("E".concat(y)),c.join("");c.push("".concat(n[a++])),(t-=1)&&c.push(".");for(r=0;r<t;r++)c.push("".concat(n[a++]));c.push("E"),w>0?c.push("+".concat(w)):c.push("".concat(w))}else if(y>=0)for(r=0;r<t;r++)c.push("".concat(n[a++]));else{var _=t+y;if(_>0)for(r=0;r<_;r++)c.push("".concat(n[a++]));else c.push("0");for(c.push(".");_++<0;)c.push("0");for(r=0;r<t-Math.max(_-1,0);r++)c.push("".concat(n[a++]))}return c.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(le.prototype,"_bsontype",{value:"Decimal128"});var ue=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:(Number.isInteger(this.value)?(t=this.value.toFixed(1)).length>=13&&(t=this.value.toExponential(13).toUpperCase()):t=this.value.toString(),{$numberDouble:t});var t},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(ue.prototype,"_bsontype",{value:"Double"});var ce=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(ce.prototype,"_bsontype",{value:"Int32"});var he=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(he.prototype,"_bsontype",{value:"MaxKey"});var de=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(de.prototype,"_bsontype",{value:"MinKey"});var fe=new RegExp("^[0-9a-fA-F]{24}$"),pe=null,me=Symbol("id"),ge=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new x("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in t&&"function"==typeof t.toHexString?v.from(t.toHexString(),"hex"):t.id}else n=t;if(null==n||"number"==typeof n)this[me]=e.generate("number"==typeof n?n:void 0);else if(ArrayBuffer.isView(n)&&12===n.byteLength)this[me]=n instanceof v?n:L(n);else{if("string"!=typeof n)throw new x("Argument passed in does not match the accepted types");if(12===n.length){var r=v.from(n);if(12!==r.byteLength)throw new x("Argument passed in must be a string of 12 bytes");this[me]=r}else{if(24!==n.length||!fe.test(n))throw new x("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[me]=v.from(n,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[me]},set:function(t){this[me]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=v.alloc(12);return r.writeUInt32BE(t,0),null===pe&&(pe=C(5)),r[4]=pe[0],r[5]=pe[1],r[6]=pe[2],r[7]=pe[3],r[8]=pe[4],r[11]=255&n,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[me][11]===t[me][11]&&this[me].equals(t[me]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&k(this.id))return t===v.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return v.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var n=t.toHexString(),r=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var n=v.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new x("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(v.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(ge.prototype,"generate",{value:F((function(e){return ge.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(ge.prototype,"getInc",{value:F((function(){return ge.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(ge.prototype,"get_inc",{value:F((function(){return ge.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(ge,"get_inc",{value:F((function(){return ge.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(ge.prototype,"_bsontype",{value:"ObjectID"});var ye=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new S("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new S("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if("i"!==this.options[r]&&"m"!==this.options[r]&&"x"!==this.options[r]&&"l"!==this.options[r]&&"s"!==this.options[r]&&"u"!==this.options[r])throw new S("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new x("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(ye.prototype,"_bsontype",{value:"BSONRegExp"});var ve=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(ve.prototype,"_bsontype",{value:"Symbol"});var be=X,we=function(e){function t(n,r){var i=this;return i instanceof t?(i=X.isLong(n)?e.call(this,n.low,n.high,!0)||this:D(n)&&void 0!==n.t&&void 0!==n.i?e.call(this,n.i,n.t,!0)||this:e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return w(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(X.fromInt(e,!0))},t.fromNumber=function(e){return new t(X.fromNumber(e,!0))},t.fromBits=function(e,n){return new t(e,n)},t.fromString=function(e,n){return new t(X.fromString(e,!0,n))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=X.MAX_UNSIGNED_VALUE,t}(be);function _e(e){return D(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var Se={$oid:ge,$binary:z,$uuid:z,$symbol:ve,$numberInt:ce,$numberDecimal:le,$numberDouble:ue,$numberLong:X,$minKey:de,$maxKey:he,$regex:ye,$regularExpression:ye,$timestamp:we};function xe(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function Ee(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var n=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==n){var r=t.seenObjects.map((function(e){return e.propertyName})),i=r.slice(0,n).map((function(e){return"".concat(e," -> ")})).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=r[r.length-1],l=" ".repeat(i.length+s.length/2),u="-".repeat(o.length+(s.length+a.length)/2-1);throw new x("Converting circular structure to EJSON:\n"+" ".concat(i).concat(s).concat(o).concat(a,"\n")+" ".concat(l,"\\").concat(u,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Ee(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||N(e)){var c=e.getTime(),h=c>-1&&c<2534023188e5;return t.legacy?t.relaxed&&h?{$date:e.getTime()}:{$date:xe(e)}:t.relaxed&&h?{$date:xe(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var d=e>=-0x8000000000000000&&e<=0x8000000000000000;if(e>=-2147483648&&e<=2147483647)return{$numberInt:e.toString()};if(d)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||R(e)){var f=e.flags;if(void 0===f){var p=e.toString().match(/[gimuy]*$/);p&&(f=p[0])}return new ye(e.source,f).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new S("not an object instance");var n=e._bsontype;if(void 0===n){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=Ee(e[i],t);"__proto__"===i?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}if(_e(e)){var o=e;if("function"!=typeof o.toExtendedJSON){var a=Me[e._bsontype];if(!a)throw new x("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return"Code"===n&&o.scope?o=new K(o.code,Ee(o.scope,t)):"DBRef"===n&&o.oid&&(o=new q(Ee(o.collection,t),Ee(o.oid,t),Ee(o.db,t),Ee(o.fields,t))),o.toExtendedJSON(t)}throw new S("_bsontype must be a string, but was: "+typeof n)}(e,t):e}var Ae,Te,Me={Binary:function(e){return new z(e.value(),e.sub_type)},Code:function(e){return new K(e.code,e.scope)},DBRef:function(e){return new q(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new le(e.bytes)},Double:function(e){return new ue(e.value)},Int32:function(e){return new ce(e.value)},Long:function(e){return X.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new he},MinKey:function(){return new de},ObjectID:function(e){return new ge(e)},ObjectId:function(e){return new ge(e)},BSONRegExp:function(e){return new ye(e.pattern,e.options)},Symbol:function(e){return new ve(e.value)},Timestamp:function(e){return we.fromBits(e.low,e.high)}};!function(e){function t(e,t){var n=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new S("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return function e(t,n){if(void 0===n&&(n={}),"number"==typeof t){if(n.relaxed||n.legacy)return t;if(Math.floor(t)===t){if(t>=-2147483648&&t<=2147483647)return new ce(t);if(t>=-0x8000000000000000&&t<=0x8000000000000000)return X.fromNumber(t)}return new ue(t)}if(null==t||"object"!=typeof t)return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter((function(e){return e.startsWith("$")&&null!=t[e]})),i=0;i<r.length;i++){var s=Se[r[i]];if(s)return s.fromExtendedJSON(t,n)}if(null!=t.$date){var o=t.$date,a=new Date;return n.legacy?"number"==typeof o?a.setTime(o):"string"==typeof o&&a.setTime(Date.parse(o)):"string"==typeof o?a.setTime(Date.parse(o)):X.isLong(o)?a.setTime(o.toNumber()):"number"==typeof o&&n.relaxed&&a.setTime(o),a}if(null!=t.$code){var l=Object.assign({},t);return t.$scope&&(l.$scope=e(t.$scope)),K.fromExtendedJSON(t)}if(H(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof q)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),h=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(h=!1)})),h)return q.fromExtendedJSON(u)}return t}(t,n)}))}function n(e,t,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==t||"object"!=typeof t||Array.isArray(t)||(r=t,t=void 0,n=0);var i=Ee(e,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,n)}e.parse=t,e.stringify=n,e.serialize=function(e,t){return t=t||{},JSON.parse(n(e,t))},e.deserialize=function(e,n){return n=n||{},t(JSON.stringify(e),n)}}(Ae||(Ae={}));var Ce=A();Te=Ce.Map?Ce.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var n=e[t],r=n[0],i=n[1];this._keys.push(r),this._values[r]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?[n,e._values[n].v]:void 0,done:void 0===n}}}},e.prototype.forEach=function(e,t){t=t||this;for(var n=0;n<this._keys.length;n++){var r=this._keys[n];e.call(t,this._values[r].v,r,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?n:void 0,done:void 0===n}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?e._values[n].v:void 0,done:void 0===n}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var Pe=2147483647,ke=-2147483648,Oe=Math.pow(2,63)-1,Ie=-Math.pow(2,63),Re=Math.pow(2,53),Ne=-Math.pow(2,53),De=1,Fe=2,Le=3,Be=4,je=5,$e=6,Ue=7,Ve=8,We=9,ze=10,Ke=11,He=12,qe=13,Ge=14,Ye=15,Je=16,Xe=17,Ze=18,Qe=19,et=255,tt=127,nt=0,rt=1,it=2,st=3,ot=4,at=5,lt=6,ut=7,ct=128;function ht(e,t,n){var r=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)r+=dt(i.toString(),e[i],t,!0,n);else for(var s in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)r+=dt(s,e[s],t,!1,n);return r}function dt(e,t,n,r,i){switch(void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+v.byteLength(e,"utf8")+1+4+v.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Ne&&t<=Re&&t>=ke&&t<=Pe?(null!=e?v.byteLength(e,"utf8")+1:0)+5:(null!=e?v.byteLength(e,"utf8")+1:0)+9;case"undefined":return r||!i?(null!=e?v.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?v.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||N(t))return(null!=e?v.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||P(t))return(null!=e?v.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+4+v.byteLength(t.code.toString(),"utf8")+1+ht(t.scope,n,i):(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+v.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var s=t;return s.sub_type===z.SUBTYPE_BYTE_ARRAY?(null!=e?v.byteLength(e,"utf8")+1:0)+(s.position+1+4+1+4):(null!=e?v.byteLength(e,"utf8")+1:0)+(s.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+v.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var o=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(o.$db=t.db),(null!=e?v.byteLength(e,"utf8")+1:0)+1+ht(o,n,i)}return t instanceof RegExp||R(t)?(null!=e?v.byteLength(e,"utf8")+1:0)+1+v.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?v.byteLength(e,"utf8")+1:0)+1+v.byteLength(t.pattern,"utf8")+1+v.byteLength(t.options,"utf8")+1:(null!=e?v.byteLength(e,"utf8")+1:0)+ht(t,n,i)+1;case"function":if(t instanceof RegExp||R(t)||"[object RegExp]"===String.call(t))return(null!=e?v.byteLength(e,"utf8")+1:0)+1+v.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(n&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+4+v.byteLength(T(t),"utf8")+1+ht(t.scope,n,i);if(n)return(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+v.byteLength(T(t),"utf8")+1}return 0}function ft(e,t,n){for(var r=0,i=t;i<n;i+=1){var s=e[i];if(r){if(128!=(192&s))return!1;r-=1}else if(128&s)if(192==(224&s))r=1;else if(224==(240&s))r=2;else{if(240!=(248&s))return!1;r=3}}return!r}var pt=X.fromNumber(Re),mt=X.fromNumber(Ne),gt={};function yt(e,t,n){var r=(t=null==t?{}:t)&&t.index?t.index:0,i=e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24;if(i<5)throw new S("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new S("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new S("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+r>e.byteLength)throw new S("(bson size ".concat(i," + options.index ").concat(r," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[r+i-1])throw new S("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return function e(t,n,r,i){void 0===i&&(i=!1);var s,o=null!=r.evalFunctions&&r.evalFunctions,a=null!=r.cacheFunctions&&r.cacheFunctions,l=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,h=null!=r.promoteBuffers&&r.promoteBuffers,d=null==r.promoteLongs||r.promoteLongs,f=null==r.promoteValues||r.promoteValues,p=null==r.validation?{utf8:!0}:r.validation,m=!0,g=new Set,y=p.utf8;if("boolean"==typeof y)s=y;else{m=!1;var b=Object.keys(y).map((function(e){return y[e]}));if(0===b.length)throw new S("UTF-8 validation setting cannot be empty");if("boolean"!=typeof b[0])throw new S("Invalid UTF-8 validation option, must specify boolean values");if(s=b[0],!b.every((function(e){return e===s})))throw new S("Invalid UTF-8 validation option - keys must be all true or all false")}if(!m)for(var w=0,x=Object.keys(y);w<x.length;w++){var E=x[w];g.add(E)}var A=n;if(t.length<5)throw new S("corrupt bson message < 5 bytes long");var T=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;if(T<5||T>t.length)throw new S("corrupt bson message");var M=i?[]:{},C=0,P=!i&&null,k=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;;){var O=t[n++];if(0===O)break;for(var I=n;0!==t[I]&&I<t.length;)I++;if(I>=t.byteLength)throw new S("Bad BSON Document: illegal CString");var R=i?C++:t.toString("utf8",n,I),N=!0;N=m||g.has(R)?s:!s,!1!==P&&"$"===R[0]&&(P=vt.test(R));var D=void 0;if(n=I+1,O===Fe){if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");D=wt(t,n,n+me-1,N),n+=me}else if(O===Ue){var F=v.alloc(12);t.copy(F,0,n,n+12),D=new ge(F),n+=12}else if(O===Je&&!1===f)D=new ce(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24);else if(O===Je)D=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;else if(O===De&&!1===f)D=new ue(k.getFloat64(n,!0)),n+=8;else if(O===De)D=k.getFloat64(n,!0),n+=8;else if(O===We){var L=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,B=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;D=new Date(new X(L,B).toNumber())}else if(O===Ve){if(0!==t[n]&&1!==t[n])throw new S("illegal boolean type value");D=1===t[n++]}else if(O===Le){var j=n;if((U=t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)<=0||U>t.length-n)throw new S("bad embedded document length in bson");if(u)D=t.slice(n,n+U);else{var $=r;m||($=_(_({},r),{validation:{utf8:N}})),D=e(t,j,$,!1)}n+=U}else if(O===Be){j=n;var U=t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24,V=r,W=n+U;if(l&&l[R]){for(var G in V={},r)V[G]=r[G];V.raw=!0}if(m||(V=_(_({},V),{validation:{utf8:N}})),D=e(t,j,V,!0),0!==t[(n+=U)-1])throw new S("invalid array terminator byte");if(n!==W)throw new S("corrupted array bson")}else if(O===$e)D=void 0;else if(O===ze)D=null;else if(O===Ze){L=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,B=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;var Y=new X(L,B);D=d&&!0===f&&Y.lessThanOrEqual(pt)&&Y.greaterThanOrEqual(mt)?Y.toNumber():Y}else if(O===Qe){var J=v.alloc(16);t.copy(J,0,n,n+16),n+=16;var Z=new le(J);D="toObject"in Z&&"function"==typeof Z.toObject?Z.toObject():Z}else if(O===je){var Q=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,ee=Q,te=t[n++];if(Q<0)throw new S("Negative binary type element size found");if(Q>t.byteLength)throw new S("Binary type size larger than document size");if(null!=t.slice){if(te===z.SUBTYPE_BYTE_ARRAY){if((Q=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<0)throw new S("Negative binary type element size found for subtype 0x02");if(Q>ee-4)throw new S("Binary type with subtype 0x02 contains too long binary size");if(Q<ee-4)throw new S("Binary type with subtype 0x02 contains too short binary size")}D=h&&f?t.slice(n,n+Q):new z(t.slice(n,n+Q),te)}else{var ne=v.alloc(Q);if(te===z.SUBTYPE_BYTE_ARRAY){if((Q=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<0)throw new S("Negative binary type element size found for subtype 0x02");if(Q>ee-4)throw new S("Binary type with subtype 0x02 contains too long binary size");if(Q<ee-4)throw new S("Binary type with subtype 0x02 contains too short binary size")}for(I=0;I<Q;I++)ne[I]=t[n+I];D=h&&f?ne:new z(ne,te)}n+=Q}else if(O===Ke&&!1===c){for(I=n;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");var re=t.toString("utf8",n,I);for(I=n=I+1;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");var ie=t.toString("utf8",n,I);n=I+1;var se=new Array(ie.length);for(I=0;I<ie.length;I++)switch(ie[I]){case"m":se[I]="m";break;case"s":se[I]="g";break;case"i":se[I]="i"}D=new RegExp(re,se.join(""))}else if(O===Ke&&!0===c){for(I=n;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");re=t.toString("utf8",n,I);for(I=n=I+1;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");ie=t.toString("utf8",n,I);n=I+1,D=new ye(re,ie)}else if(O===Ge){if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");var oe=wt(t,n,n+me-1,N);D=f?oe:new ve(oe),n+=me}else if(O===Xe){L=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,B=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;D=new we(L,B)}else if(O===et)D=new de;else if(O===tt)D=new he;else if(O===qe){if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");var ae=wt(t,n,n+me-1,N);D=o?a?bt(ae,gt,M):bt(ae):new K(ae),n+=me}else if(O===Ye){var fe=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;if(fe<13)throw new S("code_w_scope total size shorter minimum expected length");if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");ae=wt(t,n,n+me-1,N),j=n+=me,U=t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24;var pe=e(t,j,r,!1);if(n+=U,fe<8+U+me)throw new S("code_w_scope total size is too short, truncating scope");if(fe>8+U+me)throw new S("code_w_scope total size is too long, clips outer document");o?(D=a?bt(ae,gt,M):bt(ae)).scope=pe:D=new K(ae,pe)}else{if(O!==He)throw new S("Detected unknown BSON type ".concat(O.toString(16),' for fieldname "').concat(R,'"'));var me;if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");if(null!=p&&p.utf8&&!ft(t,n,n+me-1))throw new S("Invalid UTF-8 string in BSON document");var be=t.toString("utf8",n,n+me-1);n+=me;var _e=v.alloc(12);t.copy(_e,0,n,n+12);F=new ge(_e);n+=12,D=new q(be,F)}"__proto__"===R?Object.defineProperty(M,R,{value:D,writable:!0,enumerable:!0,configurable:!0}):M[R]=D}if(T!==n-A){if(i)throw new S("corrupt array bson");throw new S("corrupt object bson")}if(!P)return M;if(H(M)){var Se=Object.assign({},M);return delete Se.$ref,delete Se.$id,delete Se.$db,new q(M.$ref,M.$id,M.$db,Se)}return M}(e,r,t,n)}var vt=/^\$ref$|^\$id$|^\$db$/;function bt(e,t,n){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(n)):new Function(e)}function wt(e,t,n,r){var i=e.toString("utf8",t,n);if(r)for(var s=0;s<i.length;s++)if(65533===i.charCodeAt(s)){if(!ft(e,t,n))throw new S("Invalid UTF-8 string in BSON document");break}return i}var _t=/\x00/,St=new Set(["$db","$ref","$id","$clusterTime"]);function xt(e,t,n,r,i){e[r++]=Fe;var s=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8");e[(r=r+s+1)-1]=0;var o=e.write(n,r+4,void 0,"utf8");return e[r+3]=o+1>>24&255,e[r+2]=o+1>>16&255,e[r+1]=o+1>>8&255,e[r]=o+1&255,r=r+4+o,e[r++]=0,r}var Et=new Uint8Array(8),At=new DataView(Et.buffer,Et.byteOffset,Et.byteLength);function Tt(e,t,n,r,i){Number.isInteger(n)&&n>=ke&&n<=Pe?(e[r++]=Je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255):(e[r++]=De,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,At.setFloat64(0,n,!0),e.set(Et,r),r+=8);return r}function Mt(e,t,n,r,i){return e[r++]=ze,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function Ct(e,t,n,r,i){return e[r++]=Ve,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=n?1:0,r}function Pt(e,t,n,r,i){e[r++]=We,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=X.fromNumber(n.getTime()),o=s.getLowBits(),a=s.getHighBits();return e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=255&a,e[r++]=a>>8&255,e[r++]=a>>16&255,e[r++]=a>>24&255,r}function kt(e,t,n,r,i){if(e[r++]=Ke,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,n.source&&null!=n.source.match(_t))throw Error("value "+n.source+" must not contain null bytes");return r+=e.write(n.source,r,void 0,"utf8"),e[r++]=0,n.ignoreCase&&(e[r++]=105),n.global&&(e[r++]=115),n.multiline&&(e[r++]=109),e[r++]=0,r}function Ot(e,t,n,r,i){if(e[r++]=Ke,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,null!=n.pattern.match(_t))throw Error("pattern "+n.pattern+" must not contain null bytes");return r+=e.write(n.pattern,r,void 0,"utf8"),e[r++]=0,r+=e.write(n.options.split("").sort().join(""),r,void 0,"utf8"),e[r++]=0,r}function It(e,t,n,r,i){return null===n?e[r++]=ze:"MinKey"===n._bsontype?e[r++]=et:e[r++]=tt,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function Rt(e,t,n,r,i){if(e[r++]=Ue,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,"string"==typeof n.id)e.write(n.id,r,void 0,"binary");else{if(!k(n.id))throw new x("object ["+JSON.stringify(n)+"] is not a valid ObjectId");e.set(n.id.subarray(0,12),r)}return r+12}function Nt(e,t,n,r,i){e[r++]=je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=n.length;return e[r++]=255&s,e[r++]=s>>8&255,e[r++]=s>>16&255,e[r++]=s>>24&255,e[r++]=nt,e.set(L(n),r),r+=s}function Dt(e,t,n,r,i,s,o,a,l,u){void 0===i&&(i=!1),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===l&&(l=!1),void 0===u&&(u=[]);for(var c=0;c<u.length;c++)if(u[c]===n)throw new S("cyclic dependency detected");u.push(n),e[r++]=Array.isArray(n)?Be:Le,r+=l?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var h=Kt(e,n,i,r,s+1,o,a,u);return u.pop(),h}function Ft(e,t,n,r,i){return e[r++]=Qe,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e.set(n.bytes.subarray(0,16),r),r+16}function Lt(e,t,n,r,i){e[r++]="Long"===n._bsontype?Ze:Xe,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=n.getLowBits(),o=n.getHighBits();return e[r++]=255&s,e[r++]=s>>8&255,e[r++]=s>>16&255,e[r++]=s>>24&255,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,r}function Bt(e,t,n,r,i){return n=n.valueOf(),e[r++]=Je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255,r}function jt(e,t,n,r,i){return e[r++]=De,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,At.setFloat64(0,n.value,!0),e.set(Et,r),r+=8}function $t(e,t,n,r,i,s,o){e[r++]=qe,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=T(n),l=e.write(a,r+4,void 0,"utf8")+1;return e[r]=255&l,e[r+1]=l>>8&255,e[r+2]=l>>16&255,e[r+3]=l>>24&255,r=r+4+l-1,e[r++]=0,r}function Ut(e,t,n,r,i,s,o,a,l){if(void 0===i&&(i=!1),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===l&&(l=!1),n.scope&&"object"==typeof n.scope){e[r++]=Ye,r+=l?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var u=r,c="string"==typeof n.code?n.code:n.code.toString();r+=4;var h=e.write(c,r+4,void 0,"utf8")+1;e[r]=255&h,e[r+1]=h>>8&255,e[r+2]=h>>16&255,e[r+3]=h>>24&255,e[r+4+h-1]=0,r=r+h+4;var d=Kt(e,n.scope,i,r,s+1,o,a);r=d-1;var f=d-u;e[u++]=255&f,e[u++]=f>>8&255,e[u++]=f>>16&255,e[u++]=f>>24&255,e[r++]=0}else{e[r++]=qe,r+=l?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;c=n.code.toString();var p=e.write(c,r+4,void 0,"utf8")+1;e[r]=255&p,e[r+1]=p>>8&255,e[r+2]=p>>16&255,e[r+3]=p>>24&255,r=r+4+p-1,e[r++]=0}return r}function Vt(e,t,n,r,i){e[r++]=je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=n.value(!0),o=n.position;return n.sub_type===z.SUBTYPE_BYTE_ARRAY&&(o+=4),e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=n.sub_type,n.sub_type===z.SUBTYPE_BYTE_ARRAY&&(o-=4,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255),e.set(s,r),r+=n.position}function Wt(e,t,n,r,i){e[r++]=Ge,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=e.write(n.value,r+4,void 0,"utf8")+1;return e[r]=255&s,e[r+1]=s>>8&255,e[r+2]=s>>16&255,e[r+3]=s>>24&255,r=r+4+s-1,e[r++]=0,r}function zt(e,t,n,r,i,s,o){e[r++]=Le,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=r,l={$ref:n.collection||n.namespace,$id:n.oid};null!=n.db&&(l.$db=n.db);var u=Kt(e,l=Object.assign(l,n.fields),!1,r,i+1,s),c=u-a;return e[a++]=255&c,e[a++]=c>>8&255,e[a++]=c>>16&255,e[a++]=c>>24&255,u}function Kt(e,t,n,r,i,s,o,a){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===s&&(s=!1),void 0===o&&(o=!0),void 0===a&&(a=[]),r=r||0,(a=a||[]).push(t);var l,u=r+4;if(Array.isArray(t))for(var c=0;c<t.length;c++){var h="".concat(c);if("function"==typeof(null==(g=t[c])?void 0:g.toBSON)&&(g=g.toBSON()),"string"==typeof g)u=xt(e,h,g,u,!0);else if("number"==typeof g)u=Tt(e,h,g,u,!0);else{if("bigint"==typeof g)throw new x("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof g)u=Ct(e,h,g,u,!0);else if(g instanceof Date||N(g))u=Pt(e,h,g,u,!0);else if(void 0===g)u=Mt(e,h,0,u,!0);else if(null===g)u=Mt(e,h,0,u,!0);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)u=Rt(e,h,g,u,!0);else if(k(g))u=Nt(e,h,g,u,!0);else if(g instanceof RegExp||R(g))u=kt(e,h,g,u,!0);else if("object"==typeof g&&null==g._bsontype)u=Dt(e,h,g,u,n,i,s,o,!0,a);else if("object"==typeof g&&_e(g)&&"Decimal128"===g._bsontype)u=Ft(e,h,g,u,!0);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)u=Lt(e,h,g,u,!0);else if("Double"===g._bsontype)u=jt(e,h,g,u,!0);else if("function"==typeof g&&s)u=$t(e,h,g,u,0,0,!0);else if("Code"===g._bsontype)u=Ut(e,h,g,u,n,i,s,o,!0);else if("Binary"===g._bsontype)u=Vt(e,h,g,u,!0);else if("Symbol"===g._bsontype)u=Wt(e,h,g,u,!0);else if("DBRef"===g._bsontype)u=zt(e,h,g,u,i,s,!0);else if("BSONRegExp"===g._bsontype)u=Ot(e,h,g,u,!0);else if("Int32"===g._bsontype)u=Bt(e,h,g,u,!0);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)u=It(e,h,g,u,!0);else if(void 0!==g._bsontype)throw new x("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}else if(t instanceof Te||(l=t,"[object Map]"===Object.prototype.toString.call(l)))for(var d=t.entries(),f=!1;!f;){var p=d.next();if(!(f=!!p.done)){h=p.value[0];var m=typeof(g=p.value[1]);if("string"==typeof h&&!St.has(h)){if(null!=h.match(_t))throw Error("key "+h+" must not contain null bytes");if(n){if("$"===h[0])throw Error("key "+h+" must not start with '$'");if(~h.indexOf("."))throw Error("key "+h+" must not contain '.'")}}if("string"===m)u=xt(e,h,g,u);else if("number"===m)u=Tt(e,h,g,u);else{if("bigint"===m||O(g)||I(g))throw new x("Unsupported type BigInt, please use Decimal128");if("boolean"===m)u=Ct(e,h,g,u);else if(g instanceof Date||N(g))u=Pt(e,h,g,u);else if(null===g||void 0===g&&!1===o)u=Mt(e,h,0,u);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)u=Rt(e,h,g,u);else if(k(g))u=Nt(e,h,g,u);else if(g instanceof RegExp||R(g))u=kt(e,h,g,u);else if("object"===m&&null==g._bsontype)u=Dt(e,h,g,u,n,i,s,o,!1,a);else if("object"===m&&"Decimal128"===g._bsontype)u=Ft(e,h,g,u);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)u=Lt(e,h,g,u);else if("Double"===g._bsontype)u=jt(e,h,g,u);else if("Code"===g._bsontype)u=Ut(e,h,g,u,n,i,s,o);else if("function"==typeof g&&s)u=$t(e,h,g,u,0,0,s);else if("Binary"===g._bsontype)u=Vt(e,h,g,u);else if("Symbol"===g._bsontype)u=Wt(e,h,g,u);else if("DBRef"===g._bsontype)u=zt(e,h,g,u,i,s);else if("BSONRegExp"===g._bsontype)u=Ot(e,h,g,u);else if("Int32"===g._bsontype)u=Bt(e,h,g,u);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)u=It(e,h,g,u);else if(void 0!==g._bsontype)throw new x("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new x("toBSON function did not return an object");for(var h in t){var g;"function"==typeof(null==(g=t[h])?void 0:g.toBSON)&&(g=g.toBSON());m=typeof g;if("string"==typeof h&&!St.has(h)){if(null!=h.match(_t))throw Error("key "+h+" must not contain null bytes");if(n){if("$"===h[0])throw Error("key "+h+" must not start with '$'");if(~h.indexOf("."))throw Error("key "+h+" must not contain '.'")}}if("string"===m)u=xt(e,h,g,u);else if("number"===m)u=Tt(e,h,g,u);else{if("bigint"===m)throw new x("Unsupported type BigInt, please use Decimal128");if("boolean"===m)u=Ct(e,h,g,u);else if(g instanceof Date||N(g))u=Pt(e,h,g,u);else if(void 0===g)!1===o&&(u=Mt(e,h,0,u));else if(null===g)u=Mt(e,h,0,u);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)u=Rt(e,h,g,u);else if(k(g))u=Nt(e,h,g,u);else if(g instanceof RegExp||R(g))u=kt(e,h,g,u);else if("object"===m&&null==g._bsontype)u=Dt(e,h,g,u,n,i,s,o,!1,a);else if("object"===m&&"Decimal128"===g._bsontype)u=Ft(e,h,g,u);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)u=Lt(e,h,g,u);else if("Double"===g._bsontype)u=jt(e,h,g,u);else if("Code"===g._bsontype)u=Ut(e,h,g,u,n,i,s,o);else if("function"==typeof g&&s)u=$t(e,h,g,u,0,0,s);else if("Binary"===g._bsontype)u=Vt(e,h,g,u);else if("Symbol"===g._bsontype)u=Wt(e,h,g,u);else if("DBRef"===g._bsontype)u=zt(e,h,g,u,i,s);else if("BSONRegExp"===g._bsontype)u=Ot(e,h,g,u);else if("Int32"===g._bsontype)u=Bt(e,h,g,u);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)u=It(e,h,g,u);else if(void 0!==g._bsontype)throw new x("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}}a.pop(),e[u++]=0;var y=u-r;return e[r++]=255&y,e[r++]=y>>8&255,e[r++]=y>>16&255,e[r++]=y>>24&255,u}var Ht=v.alloc(17825792);function qt(e){Ht.length<e&&(Ht=v.alloc(e))}function Gt(e,t){void 0===t&&(t={});var n="boolean"==typeof t.checkKeys&&t.checkKeys,r="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,s="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:17825792;Ht.length<s&&(Ht=v.alloc(s));var o=Kt(Ht,e,n,0,0,r,i,[]),a=v.alloc(o);return Ht.copy(a,0,0,a.length),a}function Yt(e,t,n){void 0===n&&(n={});var r="boolean"==typeof n.checkKeys&&n.checkKeys,i="boolean"==typeof n.serializeFunctions&&n.serializeFunctions,s="boolean"!=typeof n.ignoreUndefined||n.ignoreUndefined,o="number"==typeof n.index?n.index:0,a=Kt(Ht,e,r,0,0,i,s);return Ht.copy(t,o,0,a),o+a-1}function Jt(e,t){return void 0===t&&(t={}),yt(e instanceof v?e:L(e),t)}function Xt(e,t){return void 0===t&&(t={}),ht(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function Zt(e,t,n,r,i,s){for(var o=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},s),a=L(e),l=t,u=0;u<n;u++){var c=a[l]|a[l+1]<<8|a[l+2]<<16|a[l+3]<<24;o.index=l,r[i+u]=yt(a,o),l+=c}return l}var Qt={Binary:z,Code:K,DBRef:q,Decimal128:le,Double:ue,Int32:ce,Long:X,UUID:W,Map:Te,MaxKey:he,MinKey:de,ObjectId:ge,ObjectID:ge,BSONRegExp:ye,BSONSymbol:ve,Timestamp:we,EJSON:Ae,setInternalBufferSize:qt,serialize:Gt,serializeWithBufferAndIndex:Yt,deserialize:Jt,calculateObjectSize:Xt,deserializeStream:Zt,BSONError:S,BSONTypeError:x};t.default=Qt}.call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsResultOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(91);class c extends a.Component{render(){const e=[];for(const[t,n]of Object.entries(this.props.value))e.length>0&&e.push(a.default.createElement("hr",{key:t+"-separator"})),e.push(a.default.createElement("div",{key:t},a.default.createElement("h4",null,t),a.default.createElement(u.ObjectOutput,{value:n})));return a.default.createElement("div",null,e)}}t.StatsResultOutput=c,c.propTypes={value:l.default.any}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(7),c=n(93),h=n(336);class d extends a.Component{renderCollapsed(e){return a.default.createElement("div",null,a.default.createElement("pre",null,a.default.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e()}},this.props.value.name||"Error",":")," ",this.props.value.message))}formatStack(){return this.props.value.stack.split("\n").slice(1).join("\n")}formatErrorBugReportInfo(){if((0,u.isShouldReportAsBugError)(this.props.value))return a.default.createElement("div",null,"This is an error inside mongosh. Please ",a.default.createElement("a",{href:"https://jira.mongodb.org/projects/MONGOSH/issues",target:"_blank"},"file a bug report for the MONGOSH project"),".")}formatErrorInfo(){if(this.props.value.errInfo)return a.default.createElement("div",null,"Additional information:",a.default.createElement(c.SimpleTypeOutput,{value:this.props.value.errInfo}))}formatErrorResult(){if(this.props.value.result)return a.default.createElement("div",null,"Result:",a.default.createElement(c.SimpleTypeOutput,{value:this.props.value.result}))}renderExpanded(e){return a.default.createElement("div",null,this.renderCollapsed(e),a.default.createElement("div",null,this.formatErrorBugReportInfo(),this.formatErrorInfo(),this.formatErrorResult(),a.default.createElement("pre",null,this.formatStack())))}render(){return a.default.createElement(h.Expandable,null,(e,t)=>e?this.renderExpanded(t):this.renderCollapsed(t))}}t.ErrorOutput=d,d.propTypes={value:l.default.any}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Expandable=void 0;const a=s(n(6)),l=o(n(27)),u=o(n(89)),c=n(90),h=n(337);class d extends a.Component{constructor(){super(...arguments),this.state={expanded:!1},this.toggle=()=>{this.setState({expanded:!this.state.expanded})}}render(){const e=a.default.createElement(u.default,{size:12,glyph:this.state.expanded?"CaretDown":"CaretRight",className:(0,l.default)(h["expandable-caret"]),onClick:this.toggle});return a.default.createElement(c.LineWithIcon,{icon:e},"function"==typeof this.props.children?this.props.children(this.state.expanded,this.toggle):this.props.children)}}t.Expandable=d,d.propTypes={}},function(e,t,n){var r=n(21),i=n(338);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-expandable-expandable-caret__2GJYR {\n cursor: pointer;\n}\n",""]),t.locals={"expandable-caret":"mongosh-expandable-expandable-caret__2GJYR"},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShowProfileOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(93),c=n(92);class h extends a.Component{render(){if(0===this.props.value.count)return a.default.createElement(u.SimpleTypeOutput,{value:'db.system.profile is empty.\\nUse db.setProfilingLevel(2) will enable profiling.\\nUse db.getCollection("system.profile").find() to show raw profile entries.'});const e=this.props.value.result.map(e=>{const t=`${e.op} ${e.ns} ${e.millis}ms ${String(e.ts).substring(0,24)}\n`;let n="";for(const t in e){if("op"===t||"ns"===t||"millis"===t||"ts"===t)continue;const r=e[t],i=typeof r;n+="object"===i?t+":"+(0,c.inspect)(r)+" ":"boolean"===i?t+" ":t+":"+r+" "}return`${t}${n}`});return a.default.createElement(u.SimpleTypeOutput,{value:e})}}t.ShowProfileOutput=h,h.propTypes={value:l.default.object}},function(e,t,n){var r=n(21),i=n(341);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-shell-output-line-shell-output-line__DU1i6 {\n padding: 0 8px;\n}\n.mongosh-shell-output-line-shell-output-line-error__-WUQq {\n background-color: #f9d3c5;\n color: #570b08;\n}\n.mongosh-shell-output-line-shell-output-line-error__-WUQq .mongosh-shell-output-line-shell-output-line-icon__6VSHv {\n color: inherit;\n}\n.mongosh-shell-output-line-shell-output-line-icon__6VSHv {\n color: #5d6c74;\n}\n",""]),t.locals={"shell-output-line":"mongosh-shell-output-line-shell-output-line__DU1i6","shell-output-line-error":"mongosh-shell-output-line-shell-output-line-error__-WUQq","shell-output-line-icon":"mongosh-shell-output-line-shell-output-line-icon__6VSHv"},e.exports=t},function(e,t,n){var r=n(21),i=n(343);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-shell-shell__25CvM {\n font-family: Menlo, Monaco, 'Courier New', monospace;\n font-size: 13px;\n line-height: 24px;\n background-color: #21313c;\n color: #f9fbfa;\n padding: 4px 0;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n overflow-x: hidden;\n}\n.mongosh-shell-shell__25CvM a,\n.mongosh-shell-shell__25CvM a:link,\n.mongosh-shell-shell__25CvM a:visited,\n.mongosh-shell-shell__25CvM a:hover,\n.mongosh-shell-shell__25CvM a:active {\n font-weight: bold;\n color: inherit;\n background-color: transparent;\n text-decoration: underline;\n cursor: pointer;\n}\n.mongosh-shell-shell__25CvM pre,\n.mongosh-shell-shell__25CvM code {\n font-family: Menlo, Monaco, 'Courier New', monospace;\n font-size: 13px;\n line-height: 24px;\n background: transparent;\n border: 0px transparent;\n padding: 0px;\n margin: 0px;\n font-size: inherit;\n border-radius: 0px;\n color: inherit;\n}\n",""]),t.locals={shell:"mongosh-shell-shell__25CvM"},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(345),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IframeRuntime=void 0;const r=n(346),i=n(347);t.IframeRuntime=class{constructor(e){this.openContextRuntime=null,this.readyPromise=null,this.iframe=null,this.container=null,this.evaluationListener=null,this.serviceProvider=e}setEvaluationListener(e){const t=this.evaluationListener;return this.evaluationListener=e,this.openContextRuntime&&this.openContextRuntime.setEvaluationListener(e),t}async evaluate(e){const t=await this.initialize();return await t.evaluate(e)}async getCompletions(e){const t=await this.initialize();return await t.getCompletions(e)}async getShellPrompt(){const e=await this.initialize();return await e.getShellPrompt()}async initialize(){if(null!==this.readyPromise)return await this.readyPromise,this.openContextRuntime;this.container=document.createElement("div"),this.container.style.display="none",this.container.insertAdjacentHTML("beforeend",'<iframe src="about:blank" style="display: none" sandbox="allow-same-origin" />');const e=this.container.firstElementChild;this.iframe=e,this.readyPromise=new Promise(t=>{e.onload=()=>t()}),document.body.appendChild(this.container);const t=new r.IframeInterpreterEnvironment(e.contentWindow);return this.openContextRuntime=new i.OpenContextRuntime(this.serviceProvider,t),this.evaluationListener&&this.openContextRuntime.setEvaluationListener(this.evaluationListener),this.initialize()}async destroy(){if(!this.iframe)return;const e=this.iframe.parentNode;e&&e.removeChild(this.iframe)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IframeInterpreterEnvironment=void 0;t.IframeInterpreterEnvironment=class{constructor(e){this.window=e,this.sloppyEval("delete window.prompt")}sloppyEval(e){return this.window.eval(e)}getContextObject(){return this.window}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenContextRuntime=void 0;var r=n(348);Object.defineProperty(t,"OpenContextRuntime",{enumerable:!0,get:function(){return r.OpenContextRuntime}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenContextRuntime=void 0;const r=n(349),i=n(28),s=n(44),o=n(506);t.OpenContextRuntime=class{constructor(e,t,n){this.autocompleter=null,this.evaluationListener=null,this.updatedConnectionInfoPromise=null,this.interpreterEnvironment=t,this.instanceState=new s.ShellInstanceState(e,n||new i.EventEmitter),this.instanceState.isInteractive=!0,this.shellEvaluator=new o.ShellEvaluator(this.instanceState),this.instanceState.setCtx(this.interpreterEnvironment.getContextObject())}async getCompletions(e){var t;return this.autocompleter||(this.autocompleter=new r.ShellApiAutocompleter(this.instanceState.getAutocompleteParameters()),null!==(t=this.updatedConnectionInfoPromise)&&void 0!==t||(this.updatedConnectionInfoPromise=this.instanceState.fetchConnectionInfo()),await this.updatedConnectionInfoPromise),this.autocompleter.getCompletions(e)}async evaluate(e){const t=this.interpreterEnvironment.sloppyEval.bind(this.interpreterEnvironment),{type:n,printable:r,source:i}=await this.shellEvaluator.customEval(t,e,this.interpreterEnvironment.getContextObject(),"");return{type:n,printable:r,source:i}}setEvaluationListener(e){const t=this.evaluationListener;return this.evaluationListener=e,this.instanceState.setEvaluationListener(e),t}async getShellPrompt(){var e;return null!==(e=this.updatedConnectionInfoPromise)&&void 0!==e||(this.updatedConnectionInfoPromise=this.instanceState.fetchConnectionInfo()),await this.updatedConnectionInfoPromise,await this.instanceState.getDefaultPrompt()}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShellApiAutocompleter=void 0;const i=r(n(350));t.ShellApiAutocompleter=class{constructor(e){this.parameters=e}async getCompletions(e){if(!e)return[];const t=await(0,i.default)(this.parameters,e);if(!t||!t.length)return[];return t[0].map(e=>({completion:e}))}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MATCH_COMPLETIONS=t.BASE_COMPLETIONS=void 0;const i=n(44),s=r(n(121)),o=n(502);t.BASE_COMPLETIONS=o.EXPRESSION_OPERATORS.concat(o.CONVERSION_OPERATORS.concat(o.BSON_TYPES.concat(o.STAGE_OPERATORS))),t.MATCH_COMPLETIONS=o.QUERY_OPERATORS.concat(o.BSON_TYPES);function a(e,t,n){const r=e.connectionInfo(),i=e.apiVersionInfo();let a;a=(null==i?void 0:i.strict)&&t.apiVersions?t.apiVersions.includes(+i.version):!t[n]||!(null==r?void 0:r.server_version)||s.default.gte(r.server_version,t[n]);const l=!t.env||!r||(r.is_data_lake?t.env.includes(o.ADL):r.is_atlas?t.env.includes(o.ATLAS):t.env.includes(o.ON_PREM));return a&&l}function l(e,t,n,r){const i=Object.keys(t).filter(r=>{var i;if(!r.startsWith(n))return!1;if(t[r].deprecated)return!1;const o=e.apiVersionInfo();let a,l;if((null==o?void 0:o.strict)&&(l=t[r].apiVersions))a=+o.version>=l[0]&&+o.version<=l[1];else{const n=null===(i=e.connectionInfo())||void 0===i?void 0:i.server_version;if(!n)return!0;const o=t[r].serverVersions;a=!o||s.default.gte(n,o[0])&&s.default.lte(n,o[1])}const u=t[r].topologies,c=!u||u.includes(e.topology());return a&&c});return r?i.map(e=>`${r.slice(0,-1).join(".")}.${e}`):i}t.default=async function(e,n){var r,s;const u=i.signatures.ShellApi.attributes,c=i.signatures.Collection.attributes,h=i.signatures.Database.attributes,d=i.signatures.AggregationCursor.attributes,f=i.signatures.Cursor.attributes,p=i.signatures.ReplicaSet.attributes,m=i.signatures.ShellConfig.attributes,g=i.signatures.Shard.attributes,y=n.split(/(?<!\S)(?=\S)/),v=y[0].trim();if(null===(r=u[v])||void 0===r?void 0:r.isDirectShellCommand){const t=u[v].shellCommandCompleter;if(t){1===y.length&&(y[0].trimEnd()===y[0]&&(y[0]+=" "),y.push(""));return[(await t(e,y.map(e=>e.trim()))||[]).map(e=>[...y.slice(0,-1),e].join("")),n,"exclusive"]}return[[n],n,"exclusive"]}const b=n.split("."),w=b[0],_=b[b.length-1];if(b.length<=1){const t=l(e,u,_);return[t.length?t:[],n]}if(w.match(/\bdb\b/)&&2===b.length){const t=l(e,h,_,b),r=await e.getCollectionCompletionsForCurrentDb(_.trim());return t.push(...r.map(e=>`${b[0]}.${e}`)),[t.length?t:[],n]}if(w.match(/\bdb\b/)&&b.length>2){if(!b[1].match(/^\s*\w+\s*$/)&&!b[1].match(/\bgetCollection\b/))return[[],n];if(b.length>3){if(b[2].match(/\baggregate\b/)){const t=l(e,d,_,b);return[t.length?t:[],n]}if(b[2].match(/\bfind\b/)){const t=l(e,f,_,b);return[t.length?t:[],n]}return[[],n]}if(b[2].includes("([")||b[2].includes("({")){let r;r=b[2].match(/\baggregate\b/)?t.BASE_COMPLETIONS.concat(function(e,t){if(""!==t)return[];if(t.includes("$project"))return o.ACCUMULATORS.filter(t=>a(e,t,"projectVersion"));if(t.includes("$group"))return o.ACCUMULATORS}(e,_)):t.MATCH_COMPLETIONS;const i=null===(s=n.split("{").pop())||void 0===s?void 0:s.trim(),l=function(e,t,n,r){return t.filter(t=>t.name&&t.name.startsWith(n)&&a(e,t,"version")).map(e=>`${r}${e.name}`)}(e,r,i||"",i?n.split(i).shift():n);return[l.length?l:[],n]}const r=l(e,c,_,b);return[r.length?r:[],n]}if(w.match(/\bsh\b/)&&2===b.length){const t=l(e,g,_,b);return[t.length?t:[],n]}if(w.match(/\brs\b/)&&2===b.length){const t=l(e,p,_,b);return[t.length?t:[],n]}if(w.match(/\bconfig\b/)&&2===b.length){const t=l(e,m,_,b);return[t.length?t:[],n]}return[[],n]}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),s=n(206);let o=class extends s.AbstractCursor{constructor(e,t){super(e,t)}};o=r([i.shellApiClassDefault],o),t.default=o},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,s,o,a,l=1,u={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){s.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[l]=i,r(l),l++},d.clearImmediate=f}function f(e){delete u[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(3))},function(e,t,n){
58
+ var b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function w(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(){return(_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return w(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),x=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return w(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function E(e){return e&&e.Math==Math&&e}function A(){return E("object"==typeof globalThis&&globalThis)||E("object"==typeof window&&window)||E("object"==typeof self&&self)||E("object"==typeof e&&e)||Function("return this")()}function T(e){return e.toString().replace("function(","function (")}var M=function(e){var t,n="object"==typeof(t=A()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=v.alloc(e),i=0;i<e;++i)r[i]=Math.floor(256*Math.random());return r},C=function(){if("undefined"!=typeof window){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(v.alloc(e))}}return void 0!==e&&e.crypto&&e.crypto.getRandomValues?function(t){return e.crypto.getRandomValues(v.alloc(t))}:M}();function P(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function k(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function O(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function I(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function R(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function N(e){return D(e)&&"[object Date]"===Object.prototype.toString.call(e)}function D(e){return"object"==typeof e&&null!==e}function F(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n||(console.warn(t),n=!0),e.apply(this,r)}}function L(e){if(ArrayBuffer.isView(e))return v.from(e.buffer,e.byteOffset,e.byteLength);if(P(e))return v.from(e);throw new x("Must use either Buffer or TypedArray")}var B=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,j=function(e){return"string"==typeof e&&B.test(e)},$=function(e){if(!j(e))throw new x('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return v.from(t,"hex")},U=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},V=Symbol("id"),W=function(){function e(t){if(void 0===t)this.id=e.generate();else if(t instanceof e)this[V]=v.from(t.id),this.__id=t.__id;else if(ArrayBuffer.isView(t)&&16===t.byteLength)this.id=L(t);else{if("string"!=typeof t)throw new x("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");this.id=$(t)}}return Object.defineProperty(e.prototype,"id",{get:function(){return this[V]},set:function(t){this[V]=t,e.cacheHexString&&(this.__id=U(t))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(t){if(void 0===t&&(t=!0),e.cacheHexString&&this.__id)return this.__id;var n=U(this.id,t);return e.cacheHexString&&(this.__id=n),n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(!t)return!1;if(t instanceof e)return t.id.equals(this.id);try{return new e(t).id.equals(this.id)}catch(e){return!1}},e.prototype.toBinary=function(){return new z(this.id,z.SUBTYPE_UUID)},e.generate=function(){var e=C(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,v.from(e)},e.isValid=function(t){if(!t)return!1;if(t instanceof e)return!0;if("string"==typeof t)return j(t);if(k(t)){if(16!==t.length)return!1;try{return parseInt(t[6].toString(16)[0],10)===z.SUBTYPE_UUID}catch(e){return!1}}return!1},e.createFromHexString=function(t){return new e($(t))},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}();Object.defineProperty(W.prototype,"_bsontype",{value:"UUID"});var z=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new x("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=n?n:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=v.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=v.from(t,"binary"):Array.isArray(t)?this.buffer=v.from(t):this.buffer=L(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new x("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new x("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||n>255)throw new x("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=v.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var n=v.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(L(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===n.length?"0"+n:n}:{$binary:{base64:t,subType:1===n.length?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new W(this.buffer.slice(0,this.position));throw new S('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){var r,i;if(n=n||{},"$binary"in t?n.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=v.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=v.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=$(t.$uuid)),!r)throw new x("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(z.prototype,"_bsontype",{value:"Binary"});var K=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function H(e){return D(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(K.prototype,"_bsontype",{value:"Code"});var q=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var s=t.split(".");2===s.length&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(q.prototype,"_bsontype",{value:"DBRef"});var G=void 0;try{G=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var Y={},J={},X=function(){function e(t,n,r){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,n,r);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!n)):"string"==typeof t?Object.assign(this,e.fromString(t,!!n)):(this.low=0|t,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,s;return n?(s=0<=(t>>>=0)&&t<256)&&(i=J[t])?i:(r=e.fromBits(t,(0|t)<0?-1:0,!0),s&&(J[t]=r),r):(s=-128<=(t|=0)&&t<128)&&(i=Y[t])?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&(Y[t]=r),r)},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=0x10000000000000000)return e.MAX_UNSIGNED_VALUE}else{if(t<=-0x8000000000000000)return e.MIN_VALUE;if(t+1>=0x8000000000000000)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%4294967296|0,t/4294967296|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),n,r).neg();for(var s=e.fromNumber(Math.pow(r,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),u=parseInt(t.substring(a,a+l),r);if(l<8){var c=e.fromNumber(Math.pow(r,l));o=o.mul(c).add(e.fromNumber(u))}else o=(o=o.mul(s)).add(e.fromNumber(u))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(e){return D(e)&&!0===e.__isLong__},e.fromValue=function(t,n){return"number"==typeof t?e.fromNumber(t,n):"string"==typeof t?e.fromString(t,n):e.fromBits(t.low,t.high,"boolean"==typeof n?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,o=t.high>>>16,a=65535&t.high,l=t.low>>>16,u=0,c=0,h=0,d=0;return h+=(d+=s+(65535&t.low))>>>16,d&=65535,c+=(h+=i+l)>>>16,h&=65535,u+=(c+=r+a)>>>16,c&=65535,u+=n+o,u&=65535,e.fromBits(h<<16|d,u<<16|c,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(G){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var n=(this.unsigned?G.div_u:G.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,G.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(r=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),s=r.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),a=o<=48?1:Math.pow(2,o-48),l=e.fromNumber(r),u=l.mul(t);u.isNegative()||u.gt(i);)r-=a,u=(l=e.fromNumber(r,this.unsigned)).mul(t);l.isZero()&&(l=e.ONE),s=s.add(l),i=i.sub(u)}return s},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,n=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(n&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),G){var n=(this.unsigned?G.rem_u:G.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,G.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),G){var n=G.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,G.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,s=this.low>>>16,o=65535&this.low,a=t.high>>>16,l=65535&t.high,u=t.low>>>16,c=65535&t.low,h=0,d=0,f=0,p=0;return f+=(p+=o*c)>>>16,p&=65535,d+=(f+=s*c)>>>16,f&=65535,d+=(f+=o*u)>>>16,f&=65535,h+=(d+=i*c)>>>16,d&=65535,h+=(d+=s*u)>>>16,d&=65535,h+=(d+=o*l)>>>16,d&=65535,h+=r*c+i*u+s*l+o*a,h&=65535,e.fromBits(f<<16|p,h<<16|d,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0===(t&=63))return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}return 32===t?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?4294967296*(this.high>>>0)+(this.low>>>0):4294967296*this.high+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),u=(o.sub(l.mul(s)).toInt()>>>0).toString(t);if((o=l).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(1<<24),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(X.prototype,"__isLong__",{value:!0}),Object.defineProperty(X.prototype,"_bsontype",{value:"Long"});var Z=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Q=/^(\+|-)?(Infinity|inf)$/i,ee=/^(\+|-)?NaN$/i,te=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ne=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),re=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ie=/^([-+])?(\d+)?$/;function se(e){return!isNaN(parseInt(e,10))}function oe(e){var t=X.fromNumber(1e9),n=X.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new X(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function ae(e,t){throw new x('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var le=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!k(t))throw new x("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new x("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var n,r=!1,i=!1,s=!1,o=0,a=0,l=0,u=0,c=0,h=[0],d=0,f=0,p=0,m=0,g=0,y=0,b=new X(0,0),w=new X(0,0),_=0;if(t.length>=7e3)throw new x(t+" not a valid Decimal128 string");var S=t.match(Z),E=t.match(Q),A=t.match(ee);if(!S&&!E&&!A||0===t.length)throw new x(t+" not a valid Decimal128 string");if(S){var T=S[2],M=S[4],C=S[5],P=S[6];M&&void 0===P&&ae(t,"missing exponent power"),M&&void 0===T&&ae(t,"missing exponent base"),void 0===M&&(C||P)&&ae(t,"missing e before exponent")}if("+"!==t[_]&&"-"!==t[_]||(r="-"===t[_++]),!se(t[_])&&"."!==t[_]){if("i"===t[_]||"I"===t[_])return new e(v.from(r?ne:re));if("N"===t[_])return new e(v.from(te))}for(;se(t[_])||"."===t[_];)"."!==t[_]?(d<34&&("0"!==t[_]||s)&&(s||(c=a),s=!0,h[f++]=parseInt(t[_],10),d+=1),s&&(l+=1),i&&(u+=1),a+=1,_+=1):(i&&ae(t,"contains multiple periods"),i=!0,_+=1);if(i&&!a)throw new x(t+" not a valid Decimal128 string");if("e"===t[_]||"E"===t[_]){var k=t.substr(++_).match(ie);if(!k||!k[2])return new e(v.from(te));g=parseInt(k[0],10),_+=k[0].length}if(t[_])return new e(v.from(te));if(p=0,d){if(m=d-1,1!==(o=l))for(;0===h[c+o-1];)o-=1}else p=0,m=0,h[0]=0,l=1,d=1,o=0;for(g<=u&&u-g>16384?g=-6176:g-=u;g>6111;){if((m+=1)-p>34){if(h.join("").match(/^0+$/)){g=6111;break}ae(t,"overflow")}g-=1}for(;g<-6176||d<l;){if(0===m&&o<d){g=-6176,o=0;break}if(d<l?l-=1:m-=1,g<6111)g+=1;else{if(h.join("").match(/^0+$/)){g=6111;break}ae(t,"overflow")}}if(m-p+1<o){var O=a;i&&(c+=1,O+=1),r&&(c+=1,O+=1);var I=parseInt(t[c+m+1],10),R=0;if(I>=5&&(R=1,5===I))for(R=h[m]%2==1?1:0,y=c+m+2;y<O;y++)if(parseInt(t[y],10)){R=1;break}if(R)for(var N=m;N>=0;N--)if(++h[N]>9&&(h[N]=0,0===N)){if(!(g<6111))return new e(v.from(r?ne:re));g+=1,h[N]=1}}if(b=X.fromNumber(0),w=X.fromNumber(0),0===o)b=X.fromNumber(0),w=X.fromNumber(0);else if(m-p<17){N=p;for(w=X.fromNumber(h[N++]),b=new X(0,0);N<=m;N++)w=(w=w.multiply(X.fromNumber(10))).add(X.fromNumber(h[N]))}else{N=p;for(b=X.fromNumber(h[N++]);N<=m-17;N++)b=(b=b.multiply(X.fromNumber(10))).add(X.fromNumber(h[N]));for(w=X.fromNumber(h[N++]);N<=m;N++)w=(w=w.multiply(X.fromNumber(10))).add(X.fromNumber(h[N]))}var D,F,L,B,j=function(e,t){if(!e&&!t)return{high:X.fromNumber(0),low:X.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new X(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new X(t.getLowBits(),0),o=n.multiply(i),a=n.multiply(s),l=r.multiply(i),u=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new X(a.getLowBits(),0).add(l).add(u.shiftRightUnsigned(32)),{high:o=o.add(a.shiftRightUnsigned(32)),low:u=a.shiftLeft(32).add(new X(u.getLowBits(),0))}}(b,X.fromString("100000000000000000"));j.low=j.low.add(w),D=j.low,F=w,L=D.high>>>0,B=F.high>>>0,(L<B||L===B&&D.low>>>0<F.low>>>0)&&(j.high=j.high.add(X.fromNumber(1))),n=g+6176;var $={low:X.fromNumber(0),high:X.fromNumber(0)};j.high.shiftRightUnsigned(49).and(X.fromNumber(1)).equals(X.fromNumber(1))?($.high=$.high.or(X.fromNumber(3).shiftLeft(61)),$.high=$.high.or(X.fromNumber(n).and(X.fromNumber(16383).shiftLeft(47))),$.high=$.high.or(j.high.and(X.fromNumber(0x7fffffffffff)))):($.high=$.high.or(X.fromNumber(16383&n).shiftLeft(49)),$.high=$.high.or(j.high.and(X.fromNumber(562949953421311)))),$.low=j.low,r&&($.high=$.high.or(X.fromString("9223372036854775808")));var U=v.alloc(16);return _=0,U[_++]=255&$.low.low,U[_++]=$.low.low>>8&255,U[_++]=$.low.low>>16&255,U[_++]=$.low.low>>24&255,U[_++]=255&$.low.high,U[_++]=$.low.high>>8&255,U[_++]=$.low.high>>16&255,U[_++]=$.low.high>>24&255,U[_++]=255&$.high.low,U[_++]=$.high.low>>8&255,U[_++]=$.high.low>>16&255,U[_++]=$.high.low>>24&255,U[_++]=255&$.high.high,U[_++]=$.high.high>>8&255,U[_++]=$.high.high>>16&255,U[_++]=$.high.high>>24&255,new e(U)},e.prototype.toString=function(){for(var e,t=0,n=new Array(36),r=0;r<n.length;r++)n[r]=0;var i,s,o,a=0,l=!1,u={parts:[0,0,0,0]},c=[];a=0;var h=this.bytes,d=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24,f=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24,p=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24,m=h[a++]|h[a++]<<8|h[a++]<<16|h[a++]<<24;a=0,{low:new X(d,f),high:new X(p,m)}.high.lessThan(X.ZERO)&&c.push("-");var g=m>>26&31;if(g>>3==3){if(30===g)return c.join("")+"Infinity";if(31===g)return"NaN";e=m>>15&16383,i=8+(m>>14&1)}else i=m>>14&7,e=m>>17&16383;var y=e-6176;if(u.parts[0]=(16383&m)+((15&i)<<14),u.parts[1]=p,u.parts[2]=f,u.parts[3]=d,0===u.parts[0]&&0===u.parts[1]&&0===u.parts[2]&&0===u.parts[3])l=!0;else for(o=3;o>=0;o--){var v=0,b=oe(u);if(u=b.quotient,v=b.rem.low)for(s=8;s>=0;s--)n[9*o+s]=v%10,v=Math.floor(v/10)}if(l)t=1,n[a]=0;else for(t=36;!n[a];)t-=1,a+=1;var w=t-1+y;if(w>=34||w<=-7||y>0){if(t>34)return c.push("".concat(0)),y>0?c.push("E+".concat(y)):y<0&&c.push("E".concat(y)),c.join("");c.push("".concat(n[a++])),(t-=1)&&c.push(".");for(r=0;r<t;r++)c.push("".concat(n[a++]));c.push("E"),w>0?c.push("+".concat(w)):c.push("".concat(w))}else if(y>=0)for(r=0;r<t;r++)c.push("".concat(n[a++]));else{var _=t+y;if(_>0)for(r=0;r<_;r++)c.push("".concat(n[a++]));else c.push("0");for(c.push(".");_++<0;)c.push("0");for(r=0;r<t-Math.max(_-1,0);r++)c.push("".concat(n[a++]))}return c.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(le.prototype,"_bsontype",{value:"Decimal128"});var ue=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:(Number.isInteger(this.value)?(t=this.value.toFixed(1)).length>=13&&(t=this.value.toExponential(13).toUpperCase()):t=this.value.toString(),{$numberDouble:t});var t},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(ue.prototype,"_bsontype",{value:"Double"});var ce=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(ce.prototype,"_bsontype",{value:"Int32"});var he=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(he.prototype,"_bsontype",{value:"MaxKey"});var de=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(de.prototype,"_bsontype",{value:"MinKey"});var fe=new RegExp("^[0-9a-fA-F]{24}$"),pe=null,me=Symbol("id"),ge=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new x("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in t&&"function"==typeof t.toHexString?v.from(t.toHexString(),"hex"):t.id}else n=t;if(null==n||"number"==typeof n)this[me]=e.generate("number"==typeof n?n:void 0);else if(ArrayBuffer.isView(n)&&12===n.byteLength)this[me]=n instanceof v?n:L(n);else{if("string"!=typeof n)throw new x("Argument passed in does not match the accepted types");if(12===n.length){var r=v.from(n);if(12!==r.byteLength)throw new x("Argument passed in must be a string of 12 bytes");this[me]=r}else{if(24!==n.length||!fe.test(n))throw new x("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[me]=v.from(n,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[me]},set:function(t){this[me]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=v.alloc(12);return r.writeUInt32BE(t,0),null===pe&&(pe=C(5)),r[4]=pe[0],r[5]=pe[1],r[6]=pe[2],r[7]=pe[3],r[8]=pe[4],r[11]=255&n,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[me][11]===t[me][11]&&this[me].equals(t[me]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&k(this.id))return t===v.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return v.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var n=t.toHexString(),r=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var n=v.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new x("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(v.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(ge.prototype,"generate",{value:F((function(e){return ge.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(ge.prototype,"getInc",{value:F((function(){return ge.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(ge.prototype,"get_inc",{value:F((function(){return ge.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(ge,"get_inc",{value:F((function(){return ge.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(ge.prototype,"_bsontype",{value:"ObjectID"});var ye=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new S("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new S("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if("i"!==this.options[r]&&"m"!==this.options[r]&&"x"!==this.options[r]&&"l"!==this.options[r]&&"s"!==this.options[r]&&"u"!==this.options[r])throw new S("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new x("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(ye.prototype,"_bsontype",{value:"BSONRegExp"});var ve=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(ve.prototype,"_bsontype",{value:"Symbol"});var be=X,we=function(e){function t(n,r){var i=this;return i instanceof t?(i=X.isLong(n)?e.call(this,n.low,n.high,!0)||this:D(n)&&void 0!==n.t&&void 0!==n.i?e.call(this,n.i,n.t,!0)||this:e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return w(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(X.fromInt(e,!0))},t.fromNumber=function(e){return new t(X.fromNumber(e,!0))},t.fromBits=function(e,n){return new t(e,n)},t.fromString=function(e,n){return new t(X.fromString(e,!0,n))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=X.MAX_UNSIGNED_VALUE,t}(be);function _e(e){return D(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var Se={$oid:ge,$binary:z,$uuid:z,$symbol:ve,$numberInt:ce,$numberDecimal:le,$numberDouble:ue,$numberLong:X,$minKey:de,$maxKey:he,$regex:ye,$regularExpression:ye,$timestamp:we};function xe(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function Ee(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var n=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==n){var r=t.seenObjects.map((function(e){return e.propertyName})),i=r.slice(0,n).map((function(e){return"".concat(e," -> ")})).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=r[r.length-1],l=" ".repeat(i.length+s.length/2),u="-".repeat(o.length+(s.length+a.length)/2-1);throw new x("Converting circular structure to EJSON:\n"+" ".concat(i).concat(s).concat(o).concat(a,"\n")+" ".concat(l,"\\").concat(u,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Ee(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||N(e)){var c=e.getTime(),h=c>-1&&c<2534023188e5;return t.legacy?t.relaxed&&h?{$date:e.getTime()}:{$date:xe(e)}:t.relaxed&&h?{$date:xe(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var d=e>=-0x8000000000000000&&e<=0x8000000000000000;if(e>=-2147483648&&e<=2147483647)return{$numberInt:e.toString()};if(d)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||R(e)){var f=e.flags;if(void 0===f){var p=e.toString().match(/[gimuy]*$/);p&&(f=p[0])}return new ye(e.source,f).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new S("not an object instance");var n=e._bsontype;if(void 0===n){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=Ee(e[i],t);"__proto__"===i?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}if(_e(e)){var o=e;if("function"!=typeof o.toExtendedJSON){var a=Me[e._bsontype];if(!a)throw new x("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return"Code"===n&&o.scope?o=new K(o.code,Ee(o.scope,t)):"DBRef"===n&&o.oid&&(o=new q(Ee(o.collection,t),Ee(o.oid,t),Ee(o.db,t),Ee(o.fields,t))),o.toExtendedJSON(t)}throw new S("_bsontype must be a string, but was: "+typeof n)}(e,t):e}var Ae,Te,Me={Binary:function(e){return new z(e.value(),e.sub_type)},Code:function(e){return new K(e.code,e.scope)},DBRef:function(e){return new q(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new le(e.bytes)},Double:function(e){return new ue(e.value)},Int32:function(e){return new ce(e.value)},Long:function(e){return X.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new he},MinKey:function(){return new de},ObjectID:function(e){return new ge(e)},ObjectId:function(e){return new ge(e)},BSONRegExp:function(e){return new ye(e.pattern,e.options)},Symbol:function(e){return new ve(e.value)},Timestamp:function(e){return we.fromBits(e.low,e.high)}};!function(e){function t(e,t){var n=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new S("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return function e(t,n){if(void 0===n&&(n={}),"number"==typeof t){if(n.relaxed||n.legacy)return t;if(Math.floor(t)===t){if(t>=-2147483648&&t<=2147483647)return new ce(t);if(t>=-0x8000000000000000&&t<=0x8000000000000000)return X.fromNumber(t)}return new ue(t)}if(null==t||"object"!=typeof t)return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter((function(e){return e.startsWith("$")&&null!=t[e]})),i=0;i<r.length;i++){var s=Se[r[i]];if(s)return s.fromExtendedJSON(t,n)}if(null!=t.$date){var o=t.$date,a=new Date;return n.legacy?"number"==typeof o?a.setTime(o):"string"==typeof o&&a.setTime(Date.parse(o)):"string"==typeof o?a.setTime(Date.parse(o)):X.isLong(o)?a.setTime(o.toNumber()):"number"==typeof o&&n.relaxed&&a.setTime(o),a}if(null!=t.$code){var l=Object.assign({},t);return t.$scope&&(l.$scope=e(t.$scope)),K.fromExtendedJSON(t)}if(H(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof q)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),h=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(h=!1)})),h)return q.fromExtendedJSON(u)}return t}(t,n)}))}function n(e,t,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==t||"object"!=typeof t||Array.isArray(t)||(r=t,t=void 0,n=0);var i=Ee(e,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,n)}e.parse=t,e.stringify=n,e.serialize=function(e,t){return t=t||{},JSON.parse(n(e,t))},e.deserialize=function(e,n){return n=n||{},t(JSON.stringify(e),n)}}(Ae||(Ae={}));var Ce=A();Te=Ce.Map?Ce.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var n=e[t],r=n[0],i=n[1];this._keys.push(r),this._values[r]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?[n,e._values[n].v]:void 0,done:void 0===n}}}},e.prototype.forEach=function(e,t){t=t||this;for(var n=0;n<this._keys.length;n++){var r=this._keys[n];e.call(t,this._values[r].v,r,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?n:void 0,done:void 0===n}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?e._values[n].v:void 0,done:void 0===n}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var Pe=2147483647,ke=-2147483648,Oe=Math.pow(2,63)-1,Ie=-Math.pow(2,63),Re=Math.pow(2,53),Ne=-Math.pow(2,53),De=1,Fe=2,Le=3,Be=4,je=5,$e=6,Ue=7,Ve=8,We=9,ze=10,Ke=11,He=12,qe=13,Ge=14,Ye=15,Je=16,Xe=17,Ze=18,Qe=19,et=255,tt=127,nt=0,rt=1,it=2,st=3,ot=4,at=5,lt=6,ut=7,ct=128;function ht(e,t,n){var r=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)r+=dt(i.toString(),e[i],t,!0,n);else for(var s in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)r+=dt(s,e[s],t,!1,n);return r}function dt(e,t,n,r,i){switch(void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+v.byteLength(e,"utf8")+1+4+v.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Ne&&t<=Re&&t>=ke&&t<=Pe?(null!=e?v.byteLength(e,"utf8")+1:0)+5:(null!=e?v.byteLength(e,"utf8")+1:0)+9;case"undefined":return r||!i?(null!=e?v.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?v.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||N(t))return(null!=e?v.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||P(t))return(null!=e?v.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+4+v.byteLength(t.code.toString(),"utf8")+1+ht(t.scope,n,i):(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+v.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var s=t;return s.sub_type===z.SUBTYPE_BYTE_ARRAY?(null!=e?v.byteLength(e,"utf8")+1:0)+(s.position+1+4+1+4):(null!=e?v.byteLength(e,"utf8")+1:0)+(s.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?v.byteLength(e,"utf8")+1:0)+v.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var o=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(o.$db=t.db),(null!=e?v.byteLength(e,"utf8")+1:0)+1+ht(o,n,i)}return t instanceof RegExp||R(t)?(null!=e?v.byteLength(e,"utf8")+1:0)+1+v.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?v.byteLength(e,"utf8")+1:0)+1+v.byteLength(t.pattern,"utf8")+1+v.byteLength(t.options,"utf8")+1:(null!=e?v.byteLength(e,"utf8")+1:0)+ht(t,n,i)+1;case"function":if(t instanceof RegExp||R(t)||"[object RegExp]"===String.call(t))return(null!=e?v.byteLength(e,"utf8")+1:0)+1+v.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(n&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+4+v.byteLength(T(t),"utf8")+1+ht(t.scope,n,i);if(n)return(null!=e?v.byteLength(e,"utf8")+1:0)+1+4+v.byteLength(T(t),"utf8")+1}return 0}function ft(e,t,n){for(var r=0,i=t;i<n;i+=1){var s=e[i];if(r){if(128!=(192&s))return!1;r-=1}else if(128&s)if(192==(224&s))r=1;else if(224==(240&s))r=2;else{if(240!=(248&s))return!1;r=3}}return!r}var pt=X.fromNumber(Re),mt=X.fromNumber(Ne),gt={};function yt(e,t,n){var r=(t=null==t?{}:t)&&t.index?t.index:0,i=e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24;if(i<5)throw new S("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new S("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new S("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+r>e.byteLength)throw new S("(bson size ".concat(i," + options.index ").concat(r," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[r+i-1])throw new S("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return function e(t,n,r,i){void 0===i&&(i=!1);var s,o=null!=r.evalFunctions&&r.evalFunctions,a=null!=r.cacheFunctions&&r.cacheFunctions,l=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,h=null!=r.promoteBuffers&&r.promoteBuffers,d=null==r.promoteLongs||r.promoteLongs,f=null==r.promoteValues||r.promoteValues,p=null==r.validation?{utf8:!0}:r.validation,m=!0,g=new Set,y=p.utf8;if("boolean"==typeof y)s=y;else{m=!1;var b=Object.keys(y).map((function(e){return y[e]}));if(0===b.length)throw new S("UTF-8 validation setting cannot be empty");if("boolean"!=typeof b[0])throw new S("Invalid UTF-8 validation option, must specify boolean values");if(s=b[0],!b.every((function(e){return e===s})))throw new S("Invalid UTF-8 validation option - keys must be all true or all false")}if(!m)for(var w=0,x=Object.keys(y);w<x.length;w++){var E=x[w];g.add(E)}var A=n;if(t.length<5)throw new S("corrupt bson message < 5 bytes long");var T=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;if(T<5||T>t.length)throw new S("corrupt bson message");var M=i?[]:{},C=0,P=!i&&null,k=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;;){var O=t[n++];if(0===O)break;for(var I=n;0!==t[I]&&I<t.length;)I++;if(I>=t.byteLength)throw new S("Bad BSON Document: illegal CString");var R=i?C++:t.toString("utf8",n,I),N=!0;N=m||g.has(R)?s:!s,!1!==P&&"$"===R[0]&&(P=vt.test(R));var D=void 0;if(n=I+1,O===Fe){if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");D=wt(t,n,n+me-1,N),n+=me}else if(O===Ue){var F=v.alloc(12);t.copy(F,0,n,n+12),D=new ge(F),n+=12}else if(O===Je&&!1===f)D=new ce(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24);else if(O===Je)D=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;else if(O===De&&!1===f)D=new ue(k.getFloat64(n,!0)),n+=8;else if(O===De)D=k.getFloat64(n,!0),n+=8;else if(O===We){var L=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,B=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;D=new Date(new X(L,B).toNumber())}else if(O===Ve){if(0!==t[n]&&1!==t[n])throw new S("illegal boolean type value");D=1===t[n++]}else if(O===Le){var j=n;if((U=t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)<=0||U>t.length-n)throw new S("bad embedded document length in bson");if(u)D=t.slice(n,n+U);else{var $=r;m||($=_(_({},r),{validation:{utf8:N}})),D=e(t,j,$,!1)}n+=U}else if(O===Be){j=n;var U=t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24,V=r,W=n+U;if(l&&l[R]){for(var G in V={},r)V[G]=r[G];V.raw=!0}if(m||(V=_(_({},V),{validation:{utf8:N}})),D=e(t,j,V,!0),0!==t[(n+=U)-1])throw new S("invalid array terminator byte");if(n!==W)throw new S("corrupted array bson")}else if(O===$e)D=void 0;else if(O===ze)D=null;else if(O===Ze){L=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,B=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;var Y=new X(L,B);D=d&&!0===f&&Y.lessThanOrEqual(pt)&&Y.greaterThanOrEqual(mt)?Y.toNumber():Y}else if(O===Qe){var J=v.alloc(16);t.copy(J,0,n,n+16),n+=16;var Z=new le(J);D="toObject"in Z&&"function"==typeof Z.toObject?Z.toObject():Z}else if(O===je){var Q=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,ee=Q,te=t[n++];if(Q<0)throw new S("Negative binary type element size found");if(Q>t.byteLength)throw new S("Binary type size larger than document size");if(null!=t.slice){if(te===z.SUBTYPE_BYTE_ARRAY){if((Q=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<0)throw new S("Negative binary type element size found for subtype 0x02");if(Q>ee-4)throw new S("Binary type with subtype 0x02 contains too long binary size");if(Q<ee-4)throw new S("Binary type with subtype 0x02 contains too short binary size")}D=h&&f?t.slice(n,n+Q):new z(t.slice(n,n+Q),te)}else{var ne=v.alloc(Q);if(te===z.SUBTYPE_BYTE_ARRAY){if((Q=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<0)throw new S("Negative binary type element size found for subtype 0x02");if(Q>ee-4)throw new S("Binary type with subtype 0x02 contains too long binary size");if(Q<ee-4)throw new S("Binary type with subtype 0x02 contains too short binary size")}for(I=0;I<Q;I++)ne[I]=t[n+I];D=h&&f?ne:new z(ne,te)}n+=Q}else if(O===Ke&&!1===c){for(I=n;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");var re=t.toString("utf8",n,I);for(I=n=I+1;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");var ie=t.toString("utf8",n,I);n=I+1;var se=new Array(ie.length);for(I=0;I<ie.length;I++)switch(ie[I]){case"m":se[I]="m";break;case"s":se[I]="g";break;case"i":se[I]="i"}D=new RegExp(re,se.join(""))}else if(O===Ke&&!0===c){for(I=n;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");re=t.toString("utf8",n,I);for(I=n=I+1;0!==t[I]&&I<t.length;)I++;if(I>=t.length)throw new S("Bad BSON Document: illegal CString");ie=t.toString("utf8",n,I);n=I+1,D=new ye(re,ie)}else if(O===Ge){if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");var oe=wt(t,n,n+me-1,N);D=f?oe:new ve(oe),n+=me}else if(O===Xe){L=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,B=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;D=new we(L,B)}else if(O===et)D=new de;else if(O===tt)D=new he;else if(O===qe){if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");var ae=wt(t,n,n+me-1,N);D=o?a?bt(ae,gt,M):bt(ae):new K(ae),n+=me}else if(O===Ye){var fe=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;if(fe<13)throw new S("code_w_scope total size shorter minimum expected length");if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");ae=wt(t,n,n+me-1,N),j=n+=me,U=t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24;var pe=e(t,j,r,!1);if(n+=U,fe<8+U+me)throw new S("code_w_scope total size is too short, truncating scope");if(fe>8+U+me)throw new S("code_w_scope total size is too long, clips outer document");o?(D=a?bt(ae,gt,M):bt(ae)).scope=pe:D=new K(ae,pe)}else{if(O!==He)throw new S("Detected unknown BSON type ".concat(O.toString(16),' for fieldname "').concat(R,'"'));var me;if((me=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)<=0||me>t.length-n||0!==t[n+me-1])throw new S("bad string length in bson");if(null!=p&&p.utf8&&!ft(t,n,n+me-1))throw new S("Invalid UTF-8 string in BSON document");var be=t.toString("utf8",n,n+me-1);n+=me;var _e=v.alloc(12);t.copy(_e,0,n,n+12);F=new ge(_e);n+=12,D=new q(be,F)}"__proto__"===R?Object.defineProperty(M,R,{value:D,writable:!0,enumerable:!0,configurable:!0}):M[R]=D}if(T!==n-A){if(i)throw new S("corrupt array bson");throw new S("corrupt object bson")}if(!P)return M;if(H(M)){var Se=Object.assign({},M);return delete Se.$ref,delete Se.$id,delete Se.$db,new q(M.$ref,M.$id,M.$db,Se)}return M}(e,r,t,n)}var vt=/^\$ref$|^\$id$|^\$db$/;function bt(e,t,n){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(n)):new Function(e)}function wt(e,t,n,r){var i=e.toString("utf8",t,n);if(r)for(var s=0;s<i.length;s++)if(65533===i.charCodeAt(s)){if(!ft(e,t,n))throw new S("Invalid UTF-8 string in BSON document");break}return i}var _t=/\x00/,St=new Set(["$db","$ref","$id","$clusterTime"]);function xt(e,t,n,r,i){e[r++]=Fe;var s=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8");e[(r=r+s+1)-1]=0;var o=e.write(n,r+4,void 0,"utf8");return e[r+3]=o+1>>24&255,e[r+2]=o+1>>16&255,e[r+1]=o+1>>8&255,e[r]=o+1&255,r=r+4+o,e[r++]=0,r}var Et=new Uint8Array(8),At=new DataView(Et.buffer,Et.byteOffset,Et.byteLength);function Tt(e,t,n,r,i){Number.isInteger(n)&&n>=ke&&n<=Pe?(e[r++]=Je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255):(e[r++]=De,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,At.setFloat64(0,n,!0),e.set(Et,r),r+=8);return r}function Mt(e,t,n,r,i){return e[r++]=ze,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function Ct(e,t,n,r,i){return e[r++]=Ve,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=n?1:0,r}function Pt(e,t,n,r,i){e[r++]=We,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=X.fromNumber(n.getTime()),o=s.getLowBits(),a=s.getHighBits();return e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=255&a,e[r++]=a>>8&255,e[r++]=a>>16&255,e[r++]=a>>24&255,r}function kt(e,t,n,r,i){if(e[r++]=Ke,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,n.source&&null!=n.source.match(_t))throw Error("value "+n.source+" must not contain null bytes");return r+=e.write(n.source,r,void 0,"utf8"),e[r++]=0,n.ignoreCase&&(e[r++]=105),n.global&&(e[r++]=115),n.multiline&&(e[r++]=109),e[r++]=0,r}function Ot(e,t,n,r,i){if(e[r++]=Ke,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,null!=n.pattern.match(_t))throw Error("pattern "+n.pattern+" must not contain null bytes");return r+=e.write(n.pattern,r,void 0,"utf8"),e[r++]=0,r+=e.write(n.options.split("").sort().join(""),r,void 0,"utf8"),e[r++]=0,r}function It(e,t,n,r,i){return null===n?e[r++]=ze:"MinKey"===n._bsontype?e[r++]=et:e[r++]=tt,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function Rt(e,t,n,r,i){if(e[r++]=Ue,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,"string"==typeof n.id)e.write(n.id,r,void 0,"binary");else{if(!k(n.id))throw new x("object ["+JSON.stringify(n)+"] is not a valid ObjectId");e.set(n.id.subarray(0,12),r)}return r+12}function Nt(e,t,n,r,i){e[r++]=je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=n.length;return e[r++]=255&s,e[r++]=s>>8&255,e[r++]=s>>16&255,e[r++]=s>>24&255,e[r++]=nt,e.set(L(n),r),r+=s}function Dt(e,t,n,r,i,s,o,a,l,u){void 0===i&&(i=!1),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===l&&(l=!1),void 0===u&&(u=[]);for(var c=0;c<u.length;c++)if(u[c]===n)throw new S("cyclic dependency detected");u.push(n),e[r++]=Array.isArray(n)?Be:Le,r+=l?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var h=Kt(e,n,i,r,s+1,o,a,u);return u.pop(),h}function Ft(e,t,n,r,i){return e[r++]=Qe,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e.set(n.bytes.subarray(0,16),r),r+16}function Lt(e,t,n,r,i){e[r++]="Long"===n._bsontype?Ze:Xe,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=n.getLowBits(),o=n.getHighBits();return e[r++]=255&s,e[r++]=s>>8&255,e[r++]=s>>16&255,e[r++]=s>>24&255,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,r}function Bt(e,t,n,r,i){return n=n.valueOf(),e[r++]=Je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255,r}function jt(e,t,n,r,i){return e[r++]=De,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,At.setFloat64(0,n.value,!0),e.set(Et,r),r+=8}function $t(e,t,n,r,i,s,o){e[r++]=qe,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=T(n),l=e.write(a,r+4,void 0,"utf8")+1;return e[r]=255&l,e[r+1]=l>>8&255,e[r+2]=l>>16&255,e[r+3]=l>>24&255,r=r+4+l-1,e[r++]=0,r}function Ut(e,t,n,r,i,s,o,a,l){if(void 0===i&&(i=!1),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===l&&(l=!1),n.scope&&"object"==typeof n.scope){e[r++]=Ye,r+=l?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var u=r,c="string"==typeof n.code?n.code:n.code.toString();r+=4;var h=e.write(c,r+4,void 0,"utf8")+1;e[r]=255&h,e[r+1]=h>>8&255,e[r+2]=h>>16&255,e[r+3]=h>>24&255,e[r+4+h-1]=0,r=r+h+4;var d=Kt(e,n.scope,i,r,s+1,o,a);r=d-1;var f=d-u;e[u++]=255&f,e[u++]=f>>8&255,e[u++]=f>>16&255,e[u++]=f>>24&255,e[r++]=0}else{e[r++]=qe,r+=l?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;c=n.code.toString();var p=e.write(c,r+4,void 0,"utf8")+1;e[r]=255&p,e[r+1]=p>>8&255,e[r+2]=p>>16&255,e[r+3]=p>>24&255,r=r+4+p-1,e[r++]=0}return r}function Vt(e,t,n,r,i){e[r++]=je,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=n.value(!0),o=n.position;return n.sub_type===z.SUBTYPE_BYTE_ARRAY&&(o+=4),e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=n.sub_type,n.sub_type===z.SUBTYPE_BYTE_ARRAY&&(o-=4,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255),e.set(s,r),r+=n.position}function Wt(e,t,n,r,i){e[r++]=Ge,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=e.write(n.value,r+4,void 0,"utf8")+1;return e[r]=255&s,e[r+1]=s>>8&255,e[r+2]=s>>16&255,e[r+3]=s>>24&255,r=r+4+s-1,e[r++]=0,r}function zt(e,t,n,r,i,s,o){e[r++]=Le,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=r,l={$ref:n.collection||n.namespace,$id:n.oid};null!=n.db&&(l.$db=n.db);var u=Kt(e,l=Object.assign(l,n.fields),!1,r,i+1,s),c=u-a;return e[a++]=255&c,e[a++]=c>>8&255,e[a++]=c>>16&255,e[a++]=c>>24&255,u}function Kt(e,t,n,r,i,s,o,a){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===s&&(s=!1),void 0===o&&(o=!0),void 0===a&&(a=[]),r=r||0,(a=a||[]).push(t);var l,u=r+4;if(Array.isArray(t))for(var c=0;c<t.length;c++){var h="".concat(c);if("function"==typeof(null==(g=t[c])?void 0:g.toBSON)&&(g=g.toBSON()),"string"==typeof g)u=xt(e,h,g,u,!0);else if("number"==typeof g)u=Tt(e,h,g,u,!0);else{if("bigint"==typeof g)throw new x("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof g)u=Ct(e,h,g,u,!0);else if(g instanceof Date||N(g))u=Pt(e,h,g,u,!0);else if(void 0===g)u=Mt(e,h,0,u,!0);else if(null===g)u=Mt(e,h,0,u,!0);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)u=Rt(e,h,g,u,!0);else if(k(g))u=Nt(e,h,g,u,!0);else if(g instanceof RegExp||R(g))u=kt(e,h,g,u,!0);else if("object"==typeof g&&null==g._bsontype)u=Dt(e,h,g,u,n,i,s,o,!0,a);else if("object"==typeof g&&_e(g)&&"Decimal128"===g._bsontype)u=Ft(e,h,g,u,!0);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)u=Lt(e,h,g,u,!0);else if("Double"===g._bsontype)u=jt(e,h,g,u,!0);else if("function"==typeof g&&s)u=$t(e,h,g,u,0,0,!0);else if("Code"===g._bsontype)u=Ut(e,h,g,u,n,i,s,o,!0);else if("Binary"===g._bsontype)u=Vt(e,h,g,u,!0);else if("Symbol"===g._bsontype)u=Wt(e,h,g,u,!0);else if("DBRef"===g._bsontype)u=zt(e,h,g,u,i,s,!0);else if("BSONRegExp"===g._bsontype)u=Ot(e,h,g,u,!0);else if("Int32"===g._bsontype)u=Bt(e,h,g,u,!0);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)u=It(e,h,g,u,!0);else if(void 0!==g._bsontype)throw new x("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}else if(t instanceof Te||(l=t,"[object Map]"===Object.prototype.toString.call(l)))for(var d=t.entries(),f=!1;!f;){var p=d.next();if(!(f=!!p.done)){h=p.value[0];var m=typeof(g=p.value[1]);if("string"==typeof h&&!St.has(h)){if(null!=h.match(_t))throw Error("key "+h+" must not contain null bytes");if(n){if("$"===h[0])throw Error("key "+h+" must not start with '$'");if(~h.indexOf("."))throw Error("key "+h+" must not contain '.'")}}if("string"===m)u=xt(e,h,g,u);else if("number"===m)u=Tt(e,h,g,u);else{if("bigint"===m||O(g)||I(g))throw new x("Unsupported type BigInt, please use Decimal128");if("boolean"===m)u=Ct(e,h,g,u);else if(g instanceof Date||N(g))u=Pt(e,h,g,u);else if(null===g||void 0===g&&!1===o)u=Mt(e,h,0,u);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)u=Rt(e,h,g,u);else if(k(g))u=Nt(e,h,g,u);else if(g instanceof RegExp||R(g))u=kt(e,h,g,u);else if("object"===m&&null==g._bsontype)u=Dt(e,h,g,u,n,i,s,o,!1,a);else if("object"===m&&"Decimal128"===g._bsontype)u=Ft(e,h,g,u);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)u=Lt(e,h,g,u);else if("Double"===g._bsontype)u=jt(e,h,g,u);else if("Code"===g._bsontype)u=Ut(e,h,g,u,n,i,s,o);else if("function"==typeof g&&s)u=$t(e,h,g,u,0,0,s);else if("Binary"===g._bsontype)u=Vt(e,h,g,u);else if("Symbol"===g._bsontype)u=Wt(e,h,g,u);else if("DBRef"===g._bsontype)u=zt(e,h,g,u,i,s);else if("BSONRegExp"===g._bsontype)u=Ot(e,h,g,u);else if("Int32"===g._bsontype)u=Bt(e,h,g,u);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)u=It(e,h,g,u);else if(void 0!==g._bsontype)throw new x("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new x("toBSON function did not return an object");for(var h in t){var g;"function"==typeof(null==(g=t[h])?void 0:g.toBSON)&&(g=g.toBSON());m=typeof g;if("string"==typeof h&&!St.has(h)){if(null!=h.match(_t))throw Error("key "+h+" must not contain null bytes");if(n){if("$"===h[0])throw Error("key "+h+" must not start with '$'");if(~h.indexOf("."))throw Error("key "+h+" must not contain '.'")}}if("string"===m)u=xt(e,h,g,u);else if("number"===m)u=Tt(e,h,g,u);else{if("bigint"===m)throw new x("Unsupported type BigInt, please use Decimal128");if("boolean"===m)u=Ct(e,h,g,u);else if(g instanceof Date||N(g))u=Pt(e,h,g,u);else if(void 0===g)!1===o&&(u=Mt(e,h,0,u));else if(null===g)u=Mt(e,h,0,u);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)u=Rt(e,h,g,u);else if(k(g))u=Nt(e,h,g,u);else if(g instanceof RegExp||R(g))u=kt(e,h,g,u);else if("object"===m&&null==g._bsontype)u=Dt(e,h,g,u,n,i,s,o,!1,a);else if("object"===m&&"Decimal128"===g._bsontype)u=Ft(e,h,g,u);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)u=Lt(e,h,g,u);else if("Double"===g._bsontype)u=jt(e,h,g,u);else if("Code"===g._bsontype)u=Ut(e,h,g,u,n,i,s,o);else if("function"==typeof g&&s)u=$t(e,h,g,u,0,0,s);else if("Binary"===g._bsontype)u=Vt(e,h,g,u);else if("Symbol"===g._bsontype)u=Wt(e,h,g,u);else if("DBRef"===g._bsontype)u=zt(e,h,g,u,i,s);else if("BSONRegExp"===g._bsontype)u=Ot(e,h,g,u);else if("Int32"===g._bsontype)u=Bt(e,h,g,u);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)u=It(e,h,g,u);else if(void 0!==g._bsontype)throw new x("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}}a.pop(),e[u++]=0;var y=u-r;return e[r++]=255&y,e[r++]=y>>8&255,e[r++]=y>>16&255,e[r++]=y>>24&255,u}var Ht=v.alloc(17825792);function qt(e){Ht.length<e&&(Ht=v.alloc(e))}function Gt(e,t){void 0===t&&(t={});var n="boolean"==typeof t.checkKeys&&t.checkKeys,r="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,s="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:17825792;Ht.length<s&&(Ht=v.alloc(s));var o=Kt(Ht,e,n,0,0,r,i,[]),a=v.alloc(o);return Ht.copy(a,0,0,a.length),a}function Yt(e,t,n){void 0===n&&(n={});var r="boolean"==typeof n.checkKeys&&n.checkKeys,i="boolean"==typeof n.serializeFunctions&&n.serializeFunctions,s="boolean"!=typeof n.ignoreUndefined||n.ignoreUndefined,o="number"==typeof n.index?n.index:0,a=Kt(Ht,e,r,0,0,i,s);return Ht.copy(t,o,0,a),o+a-1}function Jt(e,t){return void 0===t&&(t={}),yt(e instanceof v?e:L(e),t)}function Xt(e,t){return void 0===t&&(t={}),ht(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function Zt(e,t,n,r,i,s){for(var o=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},s),a=L(e),l=t,u=0;u<n;u++){var c=a[l]|a[l+1]<<8|a[l+2]<<16|a[l+3]<<24;o.index=l,r[i+u]=yt(a,o),l+=c}return l}var Qt={Binary:z,Code:K,DBRef:q,Decimal128:le,Double:ue,Int32:ce,Long:X,UUID:W,Map:Te,MaxKey:he,MinKey:de,ObjectId:ge,ObjectID:ge,BSONRegExp:ye,BSONSymbol:ve,Timestamp:we,EJSON:Ae,setInternalBufferSize:qt,serialize:Gt,serializeWithBufferAndIndex:Yt,deserialize:Jt,calculateObjectSize:Xt,deserializeStream:Zt,BSONError:S,BSONTypeError:x};t.default=Qt}.call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsResultOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(91);class c extends a.Component{render(){const e=[];for(const[t,n]of Object.entries(this.props.value))e.length>0&&e.push(a.default.createElement("hr",{key:t+"-separator"})),e.push(a.default.createElement("div",{key:t},a.default.createElement("h4",null,t),a.default.createElement(u.ObjectOutput,{value:n})));return a.default.createElement("div",null,e)}}t.StatsResultOutput=c,c.propTypes={value:l.default.any}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(7),c=n(93),h=n(336);class d extends a.Component{renderCollapsed(e){return a.default.createElement("div",null,a.default.createElement("pre",null,a.default.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e()}},this.props.value.name||"Error",":")," ",this.props.value.message))}formatStack(){return this.props.value.stack.split("\n").slice(1).join("\n")}formatErrorBugReportInfo(){if((0,u.isShouldReportAsBugError)(this.props.value))return a.default.createElement("div",null,"This is an error inside mongosh. Please ",a.default.createElement("a",{href:"https://jira.mongodb.org/projects/MONGOSH/issues",target:"_blank"},"file a bug report for the MONGOSH project"),".")}formatErrorInfo(){if(this.props.value.errInfo)return a.default.createElement("div",null,"Additional information:",a.default.createElement(c.SimpleTypeOutput,{value:this.props.value.errInfo}))}formatErrorResult(){if(this.props.value.result)return a.default.createElement("div",null,"Result:",a.default.createElement(c.SimpleTypeOutput,{value:this.props.value.result}))}renderExpanded(e){return a.default.createElement("div",null,this.renderCollapsed(e),a.default.createElement("div",null,this.formatErrorBugReportInfo(),this.formatErrorInfo(),this.formatErrorResult(),a.default.createElement("pre",null,this.formatStack())))}render(){return a.default.createElement(h.Expandable,null,(e,t)=>e?this.renderExpanded(t):this.renderCollapsed(t))}}t.ErrorOutput=d,d.propTypes={value:l.default.any}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Expandable=void 0;const a=s(n(6)),l=o(n(27)),u=o(n(89)),c=n(90),h=n(337);class d extends a.Component{constructor(){super(...arguments),this.state={expanded:!1},this.toggle=()=>{this.setState({expanded:!this.state.expanded})}}render(){const e=a.default.createElement(u.default,{size:12,glyph:this.state.expanded?"CaretDown":"CaretRight",className:(0,l.default)(h["expandable-caret"]),onClick:this.toggle});return a.default.createElement(c.LineWithIcon,{icon:e},"function"==typeof this.props.children?this.props.children(this.state.expanded,this.toggle):this.props.children)}}t.Expandable=d,d.propTypes={}},function(e,t,n){var r=n(21),i=n(338);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-expandable-expandable-caret__2GJYR {\n cursor: pointer;\n}\n",""]),t.locals={"expandable-caret":"mongosh-expandable-expandable-caret__2GJYR"},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShowProfileOutput=void 0;const a=s(n(6)),l=o(n(11)),u=n(93),c=n(92);class h extends a.Component{render(){if(0===this.props.value.count)return a.default.createElement(u.SimpleTypeOutput,{value:'db.system.profile is empty.\\nUse db.setProfilingLevel(2) will enable profiling.\\nUse db.getCollection("system.profile").find() to show raw profile entries.'});const e=this.props.value.result.map(e=>{const t=`${e.op} ${e.ns} ${e.millis}ms ${String(e.ts).substring(0,24)}\n`;let n="";for(const t in e){if("op"===t||"ns"===t||"millis"===t||"ts"===t)continue;const r=e[t],i=typeof r;n+="object"===i?t+":"+(0,c.inspect)(r)+" ":"boolean"===i?t+" ":t+":"+r+" "}return`${t}${n}`});return a.default.createElement(u.SimpleTypeOutput,{value:e})}}t.ShowProfileOutput=h,h.propTypes={value:l.default.object}},function(e,t,n){var r=n(21),i=n(341);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-shell-output-line-shell-output-line__DU1i6 {\n padding: 0 8px;\n}\n.mongosh-shell-output-line-shell-output-line-error__-WUQq {\n background-color: #f9d3c5;\n color: #570b08;\n}\n.mongosh-shell-output-line-shell-output-line-error__-WUQq .mongosh-shell-output-line-shell-output-line-icon__6VSHv {\n color: inherit;\n}\n.mongosh-shell-output-line-shell-output-line-icon__6VSHv {\n color: #5d6c74;\n}\n",""]),t.locals={"shell-output-line":"mongosh-shell-output-line-shell-output-line__DU1i6","shell-output-line-error":"mongosh-shell-output-line-shell-output-line-error__-WUQq","shell-output-line-icon":"mongosh-shell-output-line-shell-output-line-icon__6VSHv"},e.exports=t},function(e,t,n){var r=n(21),i=n(343);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var s={insert:"head",singleton:!1};r(i,s);e.exports=i.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".mongosh-shell-shell__25CvM {\n font-family: Menlo, Monaco, 'Courier New', monospace;\n font-size: 13px;\n line-height: 24px;\n background-color: #21313c;\n color: #f9fbfa;\n padding: 4px 0;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n overflow-x: hidden;\n}\n.mongosh-shell-shell__25CvM a,\n.mongosh-shell-shell__25CvM a:link,\n.mongosh-shell-shell__25CvM a:visited,\n.mongosh-shell-shell__25CvM a:hover,\n.mongosh-shell-shell__25CvM a:active {\n font-weight: bold;\n color: inherit;\n background-color: transparent;\n text-decoration: underline;\n cursor: pointer;\n}\n.mongosh-shell-shell__25CvM pre,\n.mongosh-shell-shell__25CvM code {\n font-family: Menlo, Monaco, 'Courier New', monospace;\n font-size: 13px;\n line-height: 24px;\n background: transparent;\n border: 0px transparent;\n padding: 0px;\n margin: 0px;\n font-size: inherit;\n border-radius: 0px;\n color: inherit;\n}\n",""]),t.locals={shell:"mongosh-shell-shell__25CvM"},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(345),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IframeRuntime=void 0;const r=n(346),i=n(347);t.IframeRuntime=class{constructor(e){this.openContextRuntime=null,this.readyPromise=null,this.iframe=null,this.container=null,this.evaluationListener=null,this.serviceProvider=e}setEvaluationListener(e){const t=this.evaluationListener;return this.evaluationListener=e,this.openContextRuntime&&this.openContextRuntime.setEvaluationListener(e),t}async evaluate(e){const t=await this.initialize();return await t.evaluate(e)}async getCompletions(e){const t=await this.initialize();return await t.getCompletions(e)}async getShellPrompt(){const e=await this.initialize();return await e.getShellPrompt()}async initialize(){if(null!==this.readyPromise)return await this.readyPromise,this.openContextRuntime;this.container=document.createElement("div"),this.container.style.display="none",this.container.insertAdjacentHTML("beforeend",'<iframe src="about:blank" style="display: none" sandbox="allow-same-origin" />');const e=this.container.firstElementChild;this.iframe=e,this.readyPromise=new Promise(t=>{e.onload=()=>t()}),document.body.appendChild(this.container);const t=new r.IframeInterpreterEnvironment(e.contentWindow);return this.openContextRuntime=new i.OpenContextRuntime(this.serviceProvider,t),this.evaluationListener&&this.openContextRuntime.setEvaluationListener(this.evaluationListener),this.initialize()}async destroy(){if(!this.iframe)return;const e=this.iframe.parentNode;e&&e.removeChild(this.iframe)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IframeInterpreterEnvironment=void 0;t.IframeInterpreterEnvironment=class{constructor(e){this.window=e,this.sloppyEval("delete window.prompt")}sloppyEval(e){return this.window.eval(e)}getContextObject(){return this.window}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenContextRuntime=void 0;var r=n(348);Object.defineProperty(t,"OpenContextRuntime",{enumerable:!0,get:function(){return r.OpenContextRuntime}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenContextRuntime=void 0;const r=n(349),i=n(28),s=n(44),o=n(506);t.OpenContextRuntime=class{constructor(e,t,n){this.autocompleter=null,this.evaluationListener=null,this.updatedConnectionInfoPromise=null,this.interpreterEnvironment=t,this.instanceState=new s.ShellInstanceState(e,n||new i.EventEmitter),this.instanceState.isInteractive=!0,this.shellEvaluator=new o.ShellEvaluator(this.instanceState),this.instanceState.setCtx(this.interpreterEnvironment.getContextObject())}async getCompletions(e){var t;return this.autocompleter||(this.autocompleter=new r.ShellApiAutocompleter(this.instanceState.getAutocompleteParameters()),null!==(t=this.updatedConnectionInfoPromise)&&void 0!==t||(this.updatedConnectionInfoPromise=this.instanceState.fetchConnectionInfo()),await this.updatedConnectionInfoPromise),this.autocompleter.getCompletions(e)}async evaluate(e){const t=this.interpreterEnvironment.sloppyEval.bind(this.interpreterEnvironment),{type:n,printable:r,source:i}=await this.shellEvaluator.customEval(t,e,this.interpreterEnvironment.getContextObject(),"");return{type:n,printable:r,source:i}}setEvaluationListener(e){const t=this.evaluationListener;return this.evaluationListener=e,this.instanceState.setEvaluationListener(e),t}async getShellPrompt(){var e;return null!==(e=this.updatedConnectionInfoPromise)&&void 0!==e||(this.updatedConnectionInfoPromise=this.instanceState.fetchConnectionInfo()),await this.updatedConnectionInfoPromise,await this.instanceState.getDefaultPrompt()}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShellApiAutocompleter=void 0;const i=r(n(350));t.ShellApiAutocompleter=class{constructor(e){this.parameters=e}async getCompletions(e){if(!e)return[];const t=await(0,i.default)(this.parameters,e);if(!t||!t.length)return[];return t[0].map(e=>({completion:e}))}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MATCH_COMPLETIONS=t.BASE_COMPLETIONS=void 0;const i=n(44),s=r(n(121)),o=n(502);t.BASE_COMPLETIONS=o.EXPRESSION_OPERATORS.concat(o.CONVERSION_OPERATORS.concat(o.BSON_TYPES.concat(o.STAGE_OPERATORS))),t.MATCH_COMPLETIONS=o.QUERY_OPERATORS.concat(o.BSON_TYPES);function a(e,t,n){const r=e.connectionInfo(),i=e.apiVersionInfo();let a;a=(null==i?void 0:i.strict)&&t.apiVersions?t.apiVersions.includes(+i.version):!t[n]||!(null==r?void 0:r.server_version)||s.default.gte(r.server_version,t[n]);const l=!t.env||!r||(r.is_data_federation?t.env.includes(o.ADL):r.is_atlas?t.env.includes(o.ATLAS):t.env.includes(o.ON_PREM));return a&&l}function l(e,t,n,r){const i=Object.keys(t).filter(r=>{var i;if(!r.startsWith(n))return!1;if(t[r].deprecated)return!1;const o=e.apiVersionInfo();let a,l;if((null==o?void 0:o.strict)&&(l=t[r].apiVersions))a=+o.version>=l[0]&&+o.version<=l[1];else{const n=null===(i=e.connectionInfo())||void 0===i?void 0:i.server_version;if(!n)return!0;const o=t[r].serverVersions;a=!o||s.default.gte(n,o[0])&&s.default.lte(n,o[1])}const u=t[r].topologies,c=!u||u.includes(e.topology());return a&&c});return r?i.map(e=>`${r.slice(0,-1).join(".")}.${e}`):i}t.default=async function(e,n){var r,s;const u=i.signatures.ShellApi.attributes,c=i.signatures.Collection.attributes,h=i.signatures.Database.attributes,d=i.signatures.AggregationCursor.attributes,f=i.signatures.Cursor.attributes,p=i.signatures.ReplicaSet.attributes,m=i.signatures.ShellConfig.attributes,g=i.signatures.Shard.attributes,y=n.split(/(?<!\S)(?=\S)/),v=y[0].trim();if(null===(r=u[v])||void 0===r?void 0:r.isDirectShellCommand){const t=u[v].shellCommandCompleter;if(t){1===y.length&&(y[0].trimEnd()===y[0]&&(y[0]+=" "),y.push(""));return[(await t(e,y.map(e=>e.trim()))||[]).map(e=>[...y.slice(0,-1),e].join("")),n,"exclusive"]}return[[n],n,"exclusive"]}const b=n.split("."),w=b[0],_=b[b.length-1];if(b.length<=1){const t=l(e,u,_);return[t.length?t:[],n]}if(w.match(/\bdb\b/)&&2===b.length){const t=l(e,h,_,b),r=await e.getCollectionCompletionsForCurrentDb(_.trim());return t.push(...r.map(e=>`${b[0]}.${e}`)),[t.length?t:[],n]}if(w.match(/\bdb\b/)&&b.length>2){if(!b[1].match(/^\s*\w+\s*$/)&&!b[1].match(/\bgetCollection\b/))return[[],n];if(b.length>3){if(b[2].match(/\baggregate\b/)){const t=l(e,d,_,b);return[t.length?t:[],n]}if(b[2].match(/\bfind\b/)){const t=l(e,f,_,b);return[t.length?t:[],n]}return[[],n]}if(b[2].includes("([")||b[2].includes("({")){let r;r=b[2].match(/\baggregate\b/)?t.BASE_COMPLETIONS.concat(function(e,t){if(""!==t)return[];if(t.includes("$project"))return o.ACCUMULATORS.filter(t=>a(e,t,"projectVersion"));if(t.includes("$group"))return o.ACCUMULATORS}(e,_)):t.MATCH_COMPLETIONS;const i=null===(s=n.split("{").pop())||void 0===s?void 0:s.trim(),l=function(e,t,n,r){return t.filter(t=>t.name&&t.name.startsWith(n)&&a(e,t,"version")).map(e=>`${r}${e.name}`)}(e,r,i||"",i?n.split(i).shift():n);return[l.length?l:[],n]}const r=l(e,c,_,b);return[r.length?r:[],n]}if(w.match(/\bsh\b/)&&2===b.length){const t=l(e,g,_,b);return[t.length?t:[],n]}if(w.match(/\brs\b/)&&2===b.length){const t=l(e,p,_,b);return[t.length?t:[],n]}if(w.match(/\bconfig\b/)&&2===b.length){const t=l(e,m,_,b);return[t.length?t:[],n]}return[[],n]}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),s=n(206);let o=class extends s.AbstractCursor{constructor(e,t){super(e,t)}};o=r([i.shellApiClassDefault],o),t.default=o},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,s,o,a,l=1,u={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){s.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[l]=i,r(l),l++},d.clearImmediate=f}function f(e){delete u[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(3))},function(e,t,n){
59
59
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
60
60
  var r=n(4),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(t=e.exports=n(155)).Stream=t,t.Readable=t,t.Writable=n(159),t.Duplex=n(47),t.Transform=n(160),t.PassThrough=n(361),t.finished=n(97),t.pipeline=n(362)},function(e,t){},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(4).Buffer,a=n(357).inspect,l=a&&a.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,n,u;return t=e,(n=[{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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,r=a,o.prototype.copy.call(t,n,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&s(t.prototype,n),u&&s(t,u),e}()},function(e,t){},function(e,t,n){
61
61
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
62
- var r=n(4),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(97),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[o]=null,e[a]=null,t(f(n,!1)))}}function m(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[h](n,r)}),r)}}(i,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(f(s,!1));r=new Promise(this[h])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[o]=null,n[a]=null,e(f(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[c]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[c]=null,n[o]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[a]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this,n(3))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(160);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(0)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(46).codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(97)),r(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var l=!1;return function(t){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}function u(e){e()}function c(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1;return l(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(u),s||(o.forEach(u),i(r))}))}));return t.reduce(c)}},function(e,t,n){var r=n(0),i=n(48),s=n(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,l=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((t=r)<<5|t>>>27)+c(f,i,s,a)+l+n[d]+o[f];l=a,a=s,s=u(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,n){var r=n(0),i=n(48),s=n(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function h(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,l=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=u(r)+h(p,i,s,a)+l+n[f]+o[p]|0;l=a,a=s,s=c(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,n){var r=n(0),i=n(161),s=n(48),o=n(2).Buffer,a=new Array(64);function l(){this.init(),this._w=a,s.call(this,64,56)}r(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},function(e,t,n){var r=n(0),i=n(162),s=n(48),o=n(2).Buffer,a=new Array(160);function l(){this.init(),this._w=a,s.call(this,128,112)}r(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},function(e,t,n){e.exports=i;var r=n(28).EventEmitter;function i(){r.call(this)}n(0)(i,r),i.Readable=n(100),i.Writable=n(373),i.Duplex=n(374),i.Transform=n(375),i.PassThrough=n(376),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",l));var o=!1;function a(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",s),n.removeListener("end",a),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(2).Buffer,i=n(371);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,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,s=r.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=s,i=a,t.copy(n,i),a+=o.data.length,o=o.next;return s},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})},function(e,t){},function(e,t,n){"use strict";e.exports=s;var r=n(166),i=Object.create(n(58));function s(e){if(!(this instanceof s))return new s(e);r.call(this,e)}i.inherits=n(0),i.inherits(s,r),s.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(101)},function(e,t,n){e.exports=n(38)},function(e,t,n){e.exports=n(100).Transform},function(e,t,n){e.exports=n(100).PassThrough},function(e,t,n){"use strict";var r=n(0),i=n(2).Buffer,s=n(33),o=i.alloc(128);function a(e,t){s.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,o],64));for(var n=this._ipad=i.allocUnsafe(64),r=this._opad=i.allocUnsafe(64),a=0;a<64;a++)n[a]=54^t[a],r[a]=92^t[a];this._hash=[n]}r(a,s),a.prototype._update=function(e){this._hash.push(e)},a.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=a},function(e,t,n){e.exports=n(169)},function(e,t,n){(function(t){var r,i,s=n(2).Buffer,o=n(171),a=n(172),l=n(173),u=n(174),c=t.crypto&&t.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function f(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function p(e,t,n,r,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return s.from(e)}))}e.exports=function(e,n,i,m,g,y){"function"==typeof g&&(y=g,g=void 0);var v=h[(g=g||"sha1").toLowerCase()];if(v&&"function"==typeof t.Promise){if(o(i,m),e=u(e,a,"Password"),n=u(n,a,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){f()((function(){t(null,e)}))}),(function(e){f()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var n=p(r=r||s.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=n,n}(v).then((function(t){return t?p(e,n,i,m,v):l(e,n,i,m,g)})),y)}else f()((function(){var t;try{t=l(e,n,i,m,g)}catch(e){return y(e)}y(null,t)}))}}).call(this,n(8))},function(e,t,n){var r=n(381),i=n(103),s=n(104),o=n(394),a=n(68);function l(e,t,n){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function u(e,t,n){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},function(e,t,n){var r=n(33),i=n(382),s=n(0),o=n(2).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){r.call(this);var t,n=e.mode.toLowerCase(),i=a[n];t=e.decrypt?"decrypt":"encrypt";var s=e.key;o.isBuffer(s)||(s=o.from(s)),"des-ede"!==n&&"des-ede-cbc"!==n||(s=o.concat([s,s.slice(0,8)]));var l=e.iv;o.isBuffer(l)||(l=o.from(l)),this._des=i.create({key:s,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,s(l,r),l.prototype._update=function(e){return o.from(this._des.update(e))},l.prototype._final=function(){return o.from(this._des.final())}},function(e,t,n){"use strict";t.utils=n(175),t.Cipher=n(102),t.DES=n(176),t.CBC=n(383),t.EDE=n(384)},function(e,t,n){"use strict";var r=n(16),i=n(0),s={};function o(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var o=n[r];t.prototype[o]=s[o]}return t.create=function(e){return new t(e)},t},s._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},s._update=function(e,t,n,r){var i=this._cbcState,s=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)o[a]^=e[t+a];s._update.call(this,o,0,n,r);for(a=0;a<this.blockSize;a++)o[a]=n[r+a]}else{s._update.call(this,e,t,n,r);for(a=0;a<this.blockSize;a++)n[r+a]^=o[a];for(a=0;a<this.blockSize;a++)o[a]=e[t+a]}}},function(e,t,n){"use strict";var r=n(16),i=n(0),s=n(102),o=n(176);function a(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:n}),o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:s})]:[o.create({type:"decrypt",key:s}),o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:n})]}function l(e){s.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(l,s),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},l.prototype._pad=o.prototype._pad,l.prototype._unpad=o.prototype._unpad},function(e,t,n){var r=n(104),i=n(180),s=n(2).Buffer,o=n(181),a=n(33),l=n(67),u=n(68);function c(e,t,n){a.call(this),this._cache=new d,this._cipher=new l.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}n(0)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return s.concat(r)};var h=s.alloc(16,16);function d(){this.cache=s.allocUnsafe(0)}function f(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=s.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new o(a.module,t,n):"auth"===a.type?new i(a.module,t,n):new c(a.module,t,n)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=s.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return s.concat([this.cache,t])},t.createCipheriv=f,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=u(t,!1,n.key,n.iv);return f(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(59);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){var r=n(2).Buffer,i=n(59);function s(e,t,n){var s=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=r.concat([e._prev,n?t:o]),o}t.encrypt=function(e,t,n){for(var i,o=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){o=r.concat([o,s(e,t,n)]);break}i=e._cache.length,o=r.concat([o,s(e,t.slice(0,i),n)]),t=t.slice(i)}return o}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){for(var r,i,o=-1,a=0;++o<8;)r=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=s(e._prev,n?r:i);return a}function s(e,t){var n=e.length,i=-1,s=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)s[i]=e[i]<<1|e[i+1]>>7;return s}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},function(e,t,n){(function(e){var r=n(59);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,i(t)]);var s=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,s)}}).call(this,n(4).Buffer)},function(e,t,n){var r=n(2).Buffer,i=r.alloc(16,0);function s(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=s(i)},o.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=o},function(e,t,n){var r=n(180),i=n(2).Buffer,s=n(104),o=n(181),a=n(33),l=n(67),u=n(68);function c(e,t,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new o(a.module,t,n,!0):"auth"===a.type?new r(a.module,t,n,!0):new c(a.module,t,n)}n(0)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=u(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){var r=n(182),i=n(400),s=n(401);var o={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var n=new e(i[t].prime,"hex"),r=new e(i[t].gen,"hex");return new s(n,r)},t.createDiffieHellman=t.DiffieHellman=function t(n,i,a,l){return e.isBuffer(i)||void 0===o[i]?t(n,"binary",i,a):(i=i||"binary",l=l||"binary",a=a||new e([2]),e.isBuffer(a)||(a=new e(a,l)),"number"==typeof n?new s(r(n,a),a,!0):(e.isBuffer(n)||(n=new e(n,i)),new s(n,a,!0)))}}).call(this,n(4).Buffer)},function(e,t){},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(398).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,r){for(var i=0,s=Math.min(e.length,n),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var h=1;for(l=u(e,c,e.length,t),c=0;c<o;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(o=(i=0|e.words[p])*(s=0|t.words[f])+h)/67108864|0,h=67108863&o}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?m+n:c[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===t,u=new e(s),c=this.clone();if(l){for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[a]=o;for(;a<s;a++)u[a]=0}else{for(a=0;a<s-i;a++)u[a]=0;for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[s-a-1]=o}return u},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,s,o=e.words,a=t.words,l=n.words,u=0,c=0|o[0],h=8191&c,d=c>>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,b=0|o[3],w=8191&b,_=b>>>13,S=0|o[4],x=8191&S,E=S>>>13,A=0|o[5],T=8191&A,M=A>>>13,C=0|o[6],P=8191&C,k=C>>>13,O=0|o[7],I=8191&O,R=O>>>13,N=0|o[8],D=8191&N,F=N>>>13,L=0|o[9],B=8191&L,j=L>>>13,$=0|a[0],U=8191&$,V=$>>>13,W=0|a[1],z=8191&W,K=W>>>13,H=0|a[2],q=8191&H,G=H>>>13,Y=0|a[3],J=8191&Y,X=Y>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(d,U)|0))<<13)|0;u=((s=Math.imul(d,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(u+(r=r+Math.imul(h,z)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,z)|0))<<13)|0;u=((s=s+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,s=Math.imul(v,V),r=r+Math.imul(p,z)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,z)|0,s=s+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,q)|0))<<13)|0;u=((s=s+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,V))+Math.imul(_,U)|0,s=Math.imul(_,V),r=r+Math.imul(y,z)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,z)|0,s=s+Math.imul(v,K)|0,r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,G)|0;var be=(u+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,J)|0))<<13)|0;u=((s=s+Math.imul(d,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(E,U)|0,s=Math.imul(E,V),r=r+Math.imul(w,z)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,z)|0,s=s+Math.imul(_,K)|0,r=r+Math.imul(y,q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,q)|0,s=s+Math.imul(v,G)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,X)|0;var we=(u+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(x,z)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(E,z)|0,s=s+Math.imul(E,K)|0,r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,s=s+Math.imul(_,G)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(v,J)|0,s=s+Math.imul(v,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(k,U)|0,s=Math.imul(k,V),r=r+Math.imul(T,z)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(M,z)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(E,q)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,J)|0,s=s+Math.imul(_,X)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,s=s+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var Se=(u+(r=r+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(d,se)|0))<<13)|0;u=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,V))+Math.imul(R,U)|0,s=Math.imul(R,V),r=r+Math.imul(P,z)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(k,z)|0,s=s+Math.imul(k,K)|0,r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(v,ne)|0,s=s+Math.imul(v,re)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var xe=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((s=s+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(F,U)|0,s=Math.imul(F,V),r=r+Math.imul(I,z)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,z)|0,s=s+Math.imul(R,K)|0,r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(k,q)|0,s=s+Math.imul(k,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,s=s+Math.imul(_,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,se)|0,s=s+Math.imul(v,oe)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(j,U)|0,s=Math.imul(j,V),r=r+Math.imul(D,z)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(F,z)|0,s=s+Math.imul(F,K)|0,r=r+Math.imul(I,q)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(R,q)|0,s=s+Math.imul(R,G)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(k,J)|0,s=s+Math.imul(k,X)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(E,ne)|0,s=s+Math.imul(E,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,le)|0,s=s+Math.imul(v,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,de)|0;var Ae=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,z),i=(i=Math.imul(B,K))+Math.imul(j,z)|0,s=Math.imul(j,K),r=r+Math.imul(D,q)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(F,q)|0,s=s+Math.imul(F,G)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(R,J)|0,s=s+Math.imul(R,X)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(k,Q)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,oe)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ue)|0,r=r+Math.imul(y,he)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,he)|0,s=s+Math.imul(v,de)|0;var Te=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(j,q)|0,s=Math.imul(j,G),r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(F,J)|0,s=s+Math.imul(F,X)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(E,le)|0,s=s+Math.imul(E,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,de)|0;var Me=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,pe)|0))<<13)|0;u=((s=s+Math.imul(v,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,X))+Math.imul(j,J)|0,s=Math.imul(j,X),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(F,Q)|0,s=s+Math.imul(F,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(R,ne)|0,s=s+Math.imul(R,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,oe)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ue)|0,r=r+Math.imul(x,he)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(E,he)|0,s=s+Math.imul(E,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(j,Q)|0,s=Math.imul(j,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(F,ne)|0,s=s+Math.imul(F,re)|0,r=r+Math.imul(I,se)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,oe)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(k,le)|0,s=s+Math.imul(k,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(M,he)|0,s=s+Math.imul(M,de)|0;var Pe=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((s=s+Math.imul(E,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(j,ne)|0,s=Math.imul(j,re),r=r+Math.imul(D,se)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(F,se)|0,s=s+Math.imul(F,oe)|0,r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(k,he)|0,s=s+Math.imul(k,de)|0;var ke=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,oe))+Math.imul(j,se)|0,s=Math.imul(j,oe),r=r+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(F,le)|0,s=s+Math.imul(F,ue)|0,r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,de)|0;var Oe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(k,pe)|0))<<13)|0;u=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(j,le)|0,s=Math.imul(j,ue),r=r+Math.imul(D,he)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(F,he)|0,s=s+Math.imul(F,de)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,he),i=(i=Math.imul(B,de))+Math.imul(j,he)|0,s=Math.imul(j,de);var Re=(u+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(F,pe)|0))<<13)|0;u=((s=s+Math.imul(F,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return u=((s=Math.imul(j,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=Se,l[7]=xe,l[8]=Ee,l[9]=Ae,l[10]=Te,l[11]=Me,l[12]=Ce,l[13]=Pe,l[14]=ke,l[15]=Oe,l[16]=Ie,l[17]=Re,l[18]=Ne,0!==u&&(l[19]=u,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,l=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},g.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<o;f++){var p=n[c+f],m=r[c+f],g=n[c+f+o],y=r[c+f+o],v=h*g-d*y;y=h*y+d*g,g=v,n[c+f]=p+g,r[c+f]=m+y,n[c+f+o]=p-g,r[c+f+o]=m-y,f!==a&&(v=l*h-u*d,d=l*d+u*h,h=v)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,u,r),this.transform(o,s,a,l,r,i),this.transform(u,s,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,l=(0|this.words[t])-a<<n;this.words[t]=l|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,l=n;if(i-=o,i=Math.max(0,i),l){for(var u=0;u<o;u++)l.words[u]=this.words[u];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-s|h>>>s,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(l)):(n.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new x(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(b,v),b.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var s=0|e.words[r];e.words[r-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(_,v),i(S,v),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=o;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(h,new s(1).iushln(p-g-1));d=d.redMul(y),h=y.redSqr(),f=f.redMul(h),p=g}return d},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===r&&0===c)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}l=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new E(e)},i(E,x),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(14)(e))},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,n){(function(t){var r=n(183),i=new(n(184)),s=new r(24),o=new r(11),a=new r(10),l=new r(3),u=new r(7),c=n(182),h=n(45);function d(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new r(e),this}function f(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new r(e),this}e.exports=m;var p={};function m(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=d,this.setPrivateKey=f):this._primeCode=8}function g(e,n){var r=new t(e.toArray());return n?r.toString(n):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in p)return p[r];var h,d=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return d+=1,d+="02"===n||"05"===n?8:4,p[r]=d,d;switch(i.test(e.shrn(1))||(d+=2),n){case"02":e.mod(s).cmp(o)&&(d+=8);break;case"05":(h=e.mod(a)).cmp(l)&&h.cmp(u)&&(d+=8);break;default:d+=4}return p[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var n=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(n.toArray()),s=this.getPrime();if(i.length<s.length){var o=new t(s.length-i.length);o.fill(0),i=t.concat([o,i])}return i},m.prototype.getPublicKey=function(e){return g(this._pub,e)},m.prototype.getPrivateKey=function(e){return g(this._priv,e)},m.prototype.getPrime=function(e){return g(this.__prime,e)},m.prototype.getGenerator=function(e){return g(this._gen,e)},m.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new r(e),this}}).call(this,n(4).Buffer)},function(e,t,n){var r=n(106).Buffer,i=n(57),s=n(403),o=n(0),a=n(411),l=n(442),u=n(169);function c(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new c(e)}function f(e){return new h(e)}Object.keys(u).forEach((function(e){u[e].id=r.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),o(c,s.Writable),c.prototype._write=function(e,t,n){this._hash.update(e),n()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(h,s.Writable),h.prototype._write=function(e,t,n){this._hash.update(e),n()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,n){"string"==typeof t&&(t=r.from(t,n)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:f,createSign:d,createVerify:f}},function(e,t,n){(t=e.exports=n(185)).Stream=t,t.Readable=t,t.Writable=n(189),t.Duplex=n(50),t.Transform=n(190),t.PassThrough=n(409),t.finished=n(107),t.pipeline=n(410)},function(e,t){},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(4).Buffer,a=n(406).inspect,l=a&&a.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,n,u;return t=e,(n=[{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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,r=a,o.prototype.copy.call(t,n,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&s(t.prototype,n),u&&s(t,u),e}()},function(e,t){},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(107),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[o]=null,e[a]=null,t(f(n,!1)))}}function m(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[h](n,r)}),r)}}(i,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(f(s,!1));r=new Promise(this[h])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[o]=null,n[a]=null,e(f(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[c]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[c]=null,n[o]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[a]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this,n(3))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(190);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(0)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(49).codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(107)),r(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var l=!1;return function(t){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}function u(e){e()}function c(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1;return l(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(u),s||(o.forEach(u),i(r))}))}));return t.reduce(c)}},function(e,t,n){var r=n(106).Buffer,i=n(167),s=n(108),o=n(110).ec,a=n(109),l=n(70),u=n(202);function c(e,t,n,s){if((e=r.from(e.toArray())).length<t.byteLength()){var o=r.alloc(t.byteLength()-e.length);e=r.concat([o,e])}var a=n.length,l=function(e,t){e=(e=h(e,t)).mod(t);var n=r.from(e.toArray());if(n.length<t.byteLength()){var i=r.alloc(t.byteLength()-n.length);n=r.concat([i,n])}return n}(n,t),u=r.alloc(a);u.fill(1);var c=r.alloc(a);return c=i(s,c).update(u).update(r.from([0])).update(e).update(l).digest(),u=i(s,c).update(u).digest(),{k:c=i(s,c).update(u).update(r.from([1])).update(e).update(l).digest(),v:u=i(s,c).update(u).digest()}}function h(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function d(e,t,n){var s,o;do{for(s=r.alloc(0);8*s.length<e.bitLength();)t.v=i(n,t.k).update(t.v).digest(),s=r.concat([s,t.v]);o=h(s,e),t.k=i(n,t.k).update(t.v).update(r.from([0])).digest(),t.v=i(n,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function f(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,n,i,p){var m=l(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var n=u[t.curve.join(".")];if(!n)throw new Error("unknown curve "+t.curve.join("."));var i=new o(n).keyFromPrivate(t.privateKey).sign(e);return r.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,n){var i,s=t.params.priv_key,o=t.params.p,l=t.params.q,u=t.params.g,p=new a(0),m=h(e,l).mod(l),g=!1,y=c(s,l,e,n);for(;!1===g;)i=d(l,y,n),p=f(u,i,o,l),0===(g=i.invm(l).imul(m.add(s.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var n=[48,e.length+t.length+4,2,e.length];return n=n.concat(e,[2,t.length],t),r.from(n)}(p,g)}(e,m,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=r.concat([p,e]);for(var g=m.modulus.byteLength(),y=[0,1];e.length+y.length+1<g;)y.push(255);y.push(0);for(var v=-1;++v<e.length;)y.push(e[v]);return s(y,m)},e.exports.getKey=c,e.exports.makeKey=d},function(e,t){},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t){},function(e,t,n){"use strict";var r=n(17),i=n(29),s=n(0),o=n(69),a=r.assert;function l(e){o.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,n,r){o.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,n,r){o.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(l,o),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?n=s[0]:(n=s[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(n)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),s=new i(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(s).fromRed(),r.redSub(s).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,n,r,s,o,a,l,u,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),v=0;0!==d.cmpn(0);){var b=f.div(d);u=f.sub(b.mul(d)),c=g.sub(b.mul(p));var w=y.sub(b.mul(m));if(!r&&u.cmp(h)<0)t=l.neg(),n=p,r=u.neg(),s=c;else if(r&&2==++v)break;l=u,f=d,d=u,g=p,p=c,y=m,m=w}o=u.neg(),a=c;var _=r.sqr().add(s.sqr());return o.sqr().add(a.sqr()).cmp(_)>=0&&(o=t,a=n),r.negative&&(r=r.neg(),s=s.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:r,b:s},{a:o,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=i.mul(n.a),a=s.mul(r.a),l=i.mul(n.b),u=s.mul(r.b);return{k1:e.sub(o).sub(a),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var s=r.fromRed().isOdd();return(t&&!s||!t&&s)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var o=this._endoSplit(t[s]),a=e[s],l=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),l=l.neg(!0)),r[2*s]=a,r[2*s+1]=l,i[2*s]=o.k1,i[2*s+1]=o.k2}for(var u=this._wnafMulAdd(1,r,i,2*s,n),c=0;c<2*s;c++)r[c]=null,i[c]=null;return u},s(u,o.BasePoint),l.prototype.point=function(e,t,n){return new u(this,e,t,n)},l.prototype.pointFromJSON=function(e,t){return u.fromJSON(this,e,t)},u.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var s=t[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},u.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(c,o.BasePoint),l.prototype.jpoint=function(e,t,n){return new c(this,e,t,n)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),l=s.redSub(o);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),h=r.redMul(u),d=l.redSqr().redIAdd(c).redISub(h).redISub(h),f=l.redMul(h.redISub(d)).redISub(s.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),a=i.redSub(s);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=o.redSqr(),u=l.redMul(o),c=n.redMul(l),h=a.redSqr().redIAdd(u).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(i.redMul(u)),f=this.z.redMul(o);return this.curve.jpoint(h,d,f)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,l=a.redSqr().redSqr(),u=o.redAdd(o);for(t=0;t<e;t++){var c=s.redSqr(),h=u.redSqr(),d=h.redSqr(),f=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(l)),p=s.redMul(h),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(d);var v=u.redMul(a);t+1<e&&(l=l.redMul(d)),s=m,a=v,u=y}return this.curve.jpoint(s,u.redMul(i),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r),l=a.redSqr().redISub(o).redISub(o),u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),e=l,t=a.redMul(o.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),f=this.x.redAdd(h).redSqr().redISub(c).redISub(d);f=f.redIAdd(f);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},c.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),l=a.redSqr().redISub(o).redISub(o);e=l;var u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),t=a.redMul(o.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),f=this.x.redSub(c).redMul(this.x.redAdd(c));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},c.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=t.redSqr(),o=n.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),l=t.redAdd(t),u=(l=l.redIAdd(l)).redMul(o),c=a.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),d=o.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(h).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,f,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(s)).redSqr(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var u=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(l),c=t.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(a).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(u.redMul(l.redISub(u)).redISub(o.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(o).redSqr().redISub(n).redISub(a);return this.curve.jpoint(h,d,f)},c.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},c.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},c.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(29),i=n(0),s=n(69),o=n(17);function a(e){s.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,n){s.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,s),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},i(l,s.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(n),o=i.redMul(r),a=t.z.redMul(s.redAdd(o).redSqr()),l=t.x.redMul(s.redISub(o).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(17),i=n(29),s=n(0),o=n(69),a=r.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,n,r,s){o.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=s&&new i(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}s(l,o),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),s=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(s.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),s=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(s.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},s(u,o.BasePoint),l.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},l.prototype.point=function(e,t,n,r){return new u(this,e,t,n,r)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=r.redAdd(t),o=s.redSub(n),a=r.redSub(t),l=i.redMul(o),u=s.redMul(a),c=i.redMul(a),h=o.redMul(s);return this.curve.point(l,u,h,c)},u.prototype._projDbl=function(){var e,t,n,r,i,s,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(a)).redAdd(l);this.zOne?(e=o.redSub(a).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(l)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),s=u.redSub(i).redISub(i),e=o.redSub(a).redISub(l).redMul(s),t=u.redMul(r.redSub(l)),n=u.redMul(s))}else r=a.redAdd(l),i=this.curve._mulC(this.z).redSqr(),s=r.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(r)).redMul(s),t=this.curve._mulC(r).redMul(a.redISub(l)),n=r.redMul(s);return this.curve.point(e,t,n)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(t),o=i.redSub(r),a=i.redAdd(r),l=n.redAdd(t),u=s.redMul(o),c=a.redMul(l),h=s.redMul(l),d=o.redMul(a);return this.curve.point(u,c,d,h)},u.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(s).redMul(o),l=i.redSub(a),u=i.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(o),h=r.redMul(l).redMul(c);return this.curve.twisted?(t=r.redMul(u).redMul(o.redSub(this.curve._mulA(s))),n=l.redMul(u)):(t=r.redMul(u).redMul(o.redSub(s)),n=this.curve._mulC(l).redMul(u)),this.curve.point(h,t,n)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},u.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,n){"use strict";t.sha1=n(419),t.sha224=n(420),t.sha256=n(194),t.sha384=n(421),t.sha512=n(195)},function(e,t,n){"use strict";var r=n(24),i=n(60),s=n(193),o=r.rotl32,a=r.sum32,l=r.sum32_5,u=s.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],s=this.h[1],c=this.h[2],d=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=l(o(i,5),u(p,s,c,d),f,n[r],h[p]);f=d,d=c,c=o(s,30),s=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],s),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],f)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(24),i=n(194);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(e,t,n){"use strict";var r=n(24),i=n(195);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(e,t,n){"use strict";var r=n(24),i=n(60),s=r.rotl32,o=r.sum32,a=r.sum32_3,l=r.sum32_4,u=i.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(c,u),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],u=this.h[3],c=this.h[4],v=n,b=r,w=i,_=u,S=c,x=0;x<80;x++){var E=o(s(l(n,h(x,r,i,u),e[p[x]+t],d(x)),g[x]),c);n=c,c=u,u=s(i,10),i=r,r=E,E=o(s(l(v,h(79-x,b,w,_),e[m[x]+t],f(x)),y[x]),S),v=S,S=_,_=s(w,10),w=b,b=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],u,S),this.h[2]=a(this.h[3],c,v),this.h[3]=a(this.h[4],n,b),this.h[4]=a(this.h[0],r,w),this.h[0]=E},c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,n){"use strict";var r=n(24),i=n(16);function s(e,t,n){if(!(this instanceof s))return new s(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=s,s.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},s.prototype.update=function(e,t){return this.inner.update(e,t),this},s.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";var r=n(29),i=n(426),s=n(17),o=n(111),a=n(105),l=s.assert,u=n(427),c=n(428);function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(o,e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new u(this,e)},h.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new r(2));;){var o=new r(t.generate(n));if(!(o.cmp(s)>0))return o.iaddn(1),this.keyFromPrivate(o)}},h.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,n,s){"object"==typeof n&&(s=n,n=null),s||(s={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),l=e.toArray("be",o),u=new i({hash:this.hash,entropy:a,nonce:l,pers:s.pers,persEnc:s.persEnc||"utf8"}),h=this.n.sub(new r(1)),d=0;;d++){var f=s.k?s.k(d):new r(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(h)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=f.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new c({r:g,s:y,recoveryParam:v})}}}}}},h.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var s=(t=new c(t,"hex")).r,o=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,l=o.invm(this.n),u=l.mul(e).umod(this.n),h=l.mul(s).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,n.getPublic(),h)).isInfinity()&&a.eqXToP(s):!(a=this.g.mulAdd(u,n.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(s)},h.prototype.recoverPubKey=function(e,t,n,i){l((3&n)===n,"The recovery param is more than two bits"),t=new c(t,i);var s=this.n,o=new r(e),a=t.r,u=t.s,h=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var f=t.r.invm(s),p=s.sub(o).mul(f).umod(s),m=u.mul(f).umod(s);return this.g.mulAdd(p,a,m)},h.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new c(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";var r=n(112),i=n(191),s=n(16);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=o,o.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),s(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},o.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var o=s.slice(0,e);return this._update(n),this._reseed++,i.encode(o,t)}},function(e,t,n){"use strict";var r=n(29),i=n(17).assert;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=s,s.fromPublic=function(e,t,n){return t instanceof s?t:new s(e,{pub:t,pubEnc:n})},s.fromPrivate=function(e,t,n){return t instanceof s?t:new s(e,{priv:t,privEnc:n})},s.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},s.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},s.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},s.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},s.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},s.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},s.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(29),i=n(17),s=i.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,s=0,o=t.place;s<r;s++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function u(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;var s=l(e,n);if(!1===s)return!1;if(s+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=l(e,n);if(!1===o)return!1;var u=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var c=l(e,n);if(!1===c)return!1;if(e.length!==c+n.place)return!1;var h=e.slice(n.place,c+n.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new r(u),this.s=new r(h),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=u(t),n=u(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];c(r,t.length),(r=r.concat(t)).push(2),c(r,n.length);var s=r.concat(n),o=[48];return c(o,s.length),o=o.concat(s),i.encode(o,e)}},function(e,t,n){"use strict";var r=n(112),i=n(111),s=n(17),o=s.assert,a=s.parseBytes,l=n(430),u=n(431);function c(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),s=this.encodePoint(i),o=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),l=r.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:s})},c.prototype.verify=function(e,t,n){e=a(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(s)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=s.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=s.intFromLE(n);return this.curve.pointFromY(i,r)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return s.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";var r=n(17),i=r.assert,s=r.parseBytes,o=r.cachedProperty;function a(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},o(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),o(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},a.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=a},function(e,t,n){"use strict";var r=n(29),i=n(17),s=i.assert,o=i.cachedProperty,a=i.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(l,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l},function(e,t,n){"use strict";var r=n(196);t.certificate=n(439);var i=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var s=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=s;var o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=l;var u=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=u;var c=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=c,t.DSAparam=r.define("DSAparam",(function(){this.int()}));var h=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h;var d=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t){},function(e,t,n){"use strict";const r=n(198),i=n(200),s=n(0);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return s(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},o.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(e,t,n){"use strict";const r=n(0),i=n(199);function s(e){i.call(this,e),this.enc="pem"}r(s,i),e.exports=s,s.prototype.encode=function(e,t){const n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},function(e,t,n){"use strict";const r=n(0),i=n(113).Buffer,s=n(201);function o(e){s.call(this,e),this.enc="pem"}r(o,s),e.exports=o,o.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,l=-1;for(let e=0;e<n.length;e++){const t=n[e].match(o);if(null!==t&&t[2]===r){if(-1!==a){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+r);const u=n.slice(a+1,l).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const c=i.from(u,"base64");return s.prototype.decode.call(this,c,t)}},function(e,t,n){"use strict";const r=t;r.Reporter=n(115).Reporter,r.DecoderBuffer=n(61).DecoderBuffer,r.EncoderBuffer=n(61).EncoderBuffer,r.Node=n(114)},function(e,t,n){"use strict";const r=t;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},r.der=n(116)},function(e,t,n){"use strict";var r=n(196),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),s=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(s)})),u=r.define("RDNSequence",(function(){this.seqof(l)})),c=r.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(c),this.key("validity").use(h),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=n(68),a=n(103),l=n(2).Buffer;e.exports=function(e,t){var n,u=e.toString(),c=u.match(r);if(c){var h="aes"+c[1],d=l.from(c[2],"hex"),f=l.from(c[3].replace(/[\r\n]/g,""),"base64"),p=o(t,d.slice(0,8),parseInt(c[1],10)).key,m=[],g=a.createDecipheriv(h,p,d);m.push(g.update(f)),m.push(g.final()),n=l.concat(m)}else{var y=u.match(s);n=l.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:n}}},function(e,t,n){var r=n(106).Buffer,i=n(109),s=n(110).ec,o=n(70),a=n(202);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,n,u,c){var h=o(n);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new s(r),o=n.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var r=n.data.p,s=n.data.q,a=n.data.g,u=n.data.pub_key,c=o.signature.decode(e,"der"),h=c.s,d=c.r;l(h,s),l(d,s);var f=i.mont(r),p=h.invm(s);return 0===a.toRed(f).redPow(new i(t).mul(p).mod(s)).fromRed().mul(u.toRed(f).redPow(d.mul(p).mod(s)).fromRed()).mod(r).mod(s).cmp(d)}(e,t,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=r.concat([c,t]);for(var d=h.modulus.byteLength(),f=[1],p=0;t.length+f.length+2<d;)f.push(255),p++;f.push(0);for(var m=-1;++m<t.length;)f.push(t[m]);f=r.from(f);var g=i.mont(h.modulus);e=(e=new i(e).toRed(g)).redPow(new i(h.publicExponent)),e=r.from(e.fromRed().toArray());var y=p<8?1:0;for(d=Math.min(e.length,f.length),e.length!==f.length&&(y=1),m=-1;++m<d;)y|=e[m]^f[m];return 0===y}},function(e,t,n){(function(t){var r=n(110),i=n(444);e.exports=function(e){return new o(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function a(e,n,r){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(r&&i.length<r){var s=new t(r-i.length);s.fill(0),i=t.concat([s,i])}return n?i.toString(n):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,o.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},o.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},o.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),a(n,e)},o.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},o.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},o.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new i(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(4).Buffer)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(445).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,r){for(var i=0,s=Math.min(e.length,n),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var h=1;for(l=u(e,c,e.length,t),c=0;c<o;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(o=(i=0|e.words[p])*(s=0|t.words[f])+h)/67108864|0,h=67108863&o}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?m+n:c[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===t,u=new e(s),c=this.clone();if(l){for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[a]=o;for(;a<s;a++)u[a]=0}else{for(a=0;a<s-i;a++)u[a]=0;for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[s-a-1]=o}return u},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,s,o=e.words,a=t.words,l=n.words,u=0,c=0|o[0],h=8191&c,d=c>>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,b=0|o[3],w=8191&b,_=b>>>13,S=0|o[4],x=8191&S,E=S>>>13,A=0|o[5],T=8191&A,M=A>>>13,C=0|o[6],P=8191&C,k=C>>>13,O=0|o[7],I=8191&O,R=O>>>13,N=0|o[8],D=8191&N,F=N>>>13,L=0|o[9],B=8191&L,j=L>>>13,$=0|a[0],U=8191&$,V=$>>>13,W=0|a[1],z=8191&W,K=W>>>13,H=0|a[2],q=8191&H,G=H>>>13,Y=0|a[3],J=8191&Y,X=Y>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(d,U)|0))<<13)|0;u=((s=Math.imul(d,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(u+(r=r+Math.imul(h,z)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,z)|0))<<13)|0;u=((s=s+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,s=Math.imul(v,V),r=r+Math.imul(p,z)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,z)|0,s=s+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,q)|0))<<13)|0;u=((s=s+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,V))+Math.imul(_,U)|0,s=Math.imul(_,V),r=r+Math.imul(y,z)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,z)|0,s=s+Math.imul(v,K)|0,r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,G)|0;var be=(u+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,J)|0))<<13)|0;u=((s=s+Math.imul(d,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(E,U)|0,s=Math.imul(E,V),r=r+Math.imul(w,z)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,z)|0,s=s+Math.imul(_,K)|0,r=r+Math.imul(y,q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,q)|0,s=s+Math.imul(v,G)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,X)|0;var we=(u+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(x,z)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(E,z)|0,s=s+Math.imul(E,K)|0,r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,s=s+Math.imul(_,G)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(v,J)|0,s=s+Math.imul(v,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(k,U)|0,s=Math.imul(k,V),r=r+Math.imul(T,z)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(M,z)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(E,q)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,J)|0,s=s+Math.imul(_,X)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,s=s+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var Se=(u+(r=r+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(d,se)|0))<<13)|0;u=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,V))+Math.imul(R,U)|0,s=Math.imul(R,V),r=r+Math.imul(P,z)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(k,z)|0,s=s+Math.imul(k,K)|0,r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(v,ne)|0,s=s+Math.imul(v,re)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var xe=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((s=s+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(F,U)|0,s=Math.imul(F,V),r=r+Math.imul(I,z)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,z)|0,s=s+Math.imul(R,K)|0,r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(k,q)|0,s=s+Math.imul(k,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,s=s+Math.imul(_,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,se)|0,s=s+Math.imul(v,oe)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(j,U)|0,s=Math.imul(j,V),r=r+Math.imul(D,z)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(F,z)|0,s=s+Math.imul(F,K)|0,r=r+Math.imul(I,q)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(R,q)|0,s=s+Math.imul(R,G)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(k,J)|0,s=s+Math.imul(k,X)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(E,ne)|0,s=s+Math.imul(E,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,le)|0,s=s+Math.imul(v,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,de)|0;var Ae=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,z),i=(i=Math.imul(B,K))+Math.imul(j,z)|0,s=Math.imul(j,K),r=r+Math.imul(D,q)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(F,q)|0,s=s+Math.imul(F,G)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(R,J)|0,s=s+Math.imul(R,X)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(k,Q)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,oe)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ue)|0,r=r+Math.imul(y,he)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,he)|0,s=s+Math.imul(v,de)|0;var Te=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(j,q)|0,s=Math.imul(j,G),r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(F,J)|0,s=s+Math.imul(F,X)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(E,le)|0,s=s+Math.imul(E,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,de)|0;var Me=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,pe)|0))<<13)|0;u=((s=s+Math.imul(v,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,X))+Math.imul(j,J)|0,s=Math.imul(j,X),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(F,Q)|0,s=s+Math.imul(F,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(R,ne)|0,s=s+Math.imul(R,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,oe)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ue)|0,r=r+Math.imul(x,he)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(E,he)|0,s=s+Math.imul(E,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(j,Q)|0,s=Math.imul(j,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(F,ne)|0,s=s+Math.imul(F,re)|0,r=r+Math.imul(I,se)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,oe)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(k,le)|0,s=s+Math.imul(k,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(M,he)|0,s=s+Math.imul(M,de)|0;var Pe=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((s=s+Math.imul(E,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(j,ne)|0,s=Math.imul(j,re),r=r+Math.imul(D,se)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(F,se)|0,s=s+Math.imul(F,oe)|0,r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(k,he)|0,s=s+Math.imul(k,de)|0;var ke=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,oe))+Math.imul(j,se)|0,s=Math.imul(j,oe),r=r+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(F,le)|0,s=s+Math.imul(F,ue)|0,r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,de)|0;var Oe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(k,pe)|0))<<13)|0;u=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(j,le)|0,s=Math.imul(j,ue),r=r+Math.imul(D,he)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(F,he)|0,s=s+Math.imul(F,de)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,he),i=(i=Math.imul(B,de))+Math.imul(j,he)|0,s=Math.imul(j,de);var Re=(u+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(F,pe)|0))<<13)|0;u=((s=s+Math.imul(F,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return u=((s=Math.imul(j,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=Se,l[7]=xe,l[8]=Ee,l[9]=Ae,l[10]=Te,l[11]=Me,l[12]=Ce,l[13]=Pe,l[14]=ke,l[15]=Oe,l[16]=Ie,l[17]=Re,l[18]=Ne,0!==u&&(l[19]=u,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,l=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},g.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<o;f++){var p=n[c+f],m=r[c+f],g=n[c+f+o],y=r[c+f+o],v=h*g-d*y;y=h*y+d*g,g=v,n[c+f]=p+g,r[c+f]=m+y,n[c+f+o]=p-g,r[c+f+o]=m-y,f!==a&&(v=l*h-u*d,d=l*d+u*h,h=v)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,u,r),this.transform(o,s,a,l,r,i),this.transform(u,s,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,l=(0|this.words[t])-a<<n;this.words[t]=l|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,l=n;if(i-=o,i=Math.max(0,i),l){for(var u=0;u<o;u++)l.words[u]=this.words[u];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-s|h>>>s,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(l)):(n.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new x(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(b,v),b.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var s=0|e.words[r];e.words[r-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(_,v),i(S,v),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=o;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(h,new s(1).iushln(p-g-1));d=d.redMul(y),h=y.redSqr(),f=f.redMul(h),p=g}return d},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===r&&0===c)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}l=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new E(e)},i(E,x),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(14)(e))},function(e,t){},function(e,t,n){t.publicEncrypt=n(447),t.privateDecrypt=n(449),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){var r=n(70),i=n(45),s=n(57),o=n(203),a=n(204),l=n(117),u=n(205),c=n(108),h=n(2).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var f,p=r(e);if(4===d)f=function(e,t){var n=e.modulus.byteLength(),r=t.length,u=s("sha1").update(h.alloc(0)).digest(),c=u.length,d=2*c;if(r>n-d-2)throw new Error("message too long");var f=h.alloc(n-r-d-2),p=n-c-1,m=i(c),g=a(h.concat([u,f,h.alloc(1,1),t],p),o(m,p)),y=a(m,o(g,c));return new l(h.concat([h.alloc(1),y,g],n))}(p,t);else if(1===d)f=function(e,t,n){var r,s=t.length,o=e.modulus.byteLength();if(s>o-11)throw new Error("message too long");r=n?h.alloc(o-s-3,255):function(e){var t,n=h.allocUnsafe(e),r=0,s=i(2*e),o=0;for(;r<e;)o===s.length&&(s=i(2*e),o=0),(t=s[o++])&&(n[r++]=t);return n}(o-s-3);return new l(h.concat([h.from([0,n?1:2]),r,h.alloc(1),t],o))}(p,t,n);else{if(3!==d)throw new Error("unknown padding");if((f=new l(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?c(f,p):u(f,p)}},function(e,t){},function(e,t,n){var r=n(70),i=n(203),s=n(204),o=n(117),a=n(108),l=n(57),u=n(205),c=n(2).Buffer;e.exports=function(e,t,n){var h;h=e.padding?e.padding:n?1:4;var d,f=r(e),p=f.modulus.byteLength();if(t.length>p||new o(t).cmp(f.modulus)>=0)throw new Error("decryption error");d=n?u(new o(t),f):a(t,f);var m=c.alloc(p-d.length);if(d=c.concat([m,d],p),4===h)return function(e,t){var n=e.modulus.byteLength(),r=l("sha1").update(c.alloc(0)).digest(),o=r.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,o+1),u=t.slice(o+1),h=s(a,i(u,o)),d=s(u,i(h,n-o-1));if(function(e,t){e=c.from(e),t=c.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i<r;)n+=e[i]^t[i];return n}(r,d.slice(0,o)))throw new Error("decryption error");var f=o;for(;0===d[f];)f++;if(1!==d[f++])throw new Error("decryption error");return d.slice(f)}(f,d);if(1===h)return function(e,t,n){var r=t.slice(0,2),i=2,s=0;for(;0!==t[i++];)if(i>=t.length){s++;break}var o=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&s++;o.length<8&&s++;if(s)throw new Error("decryption error");return t.slice(i)}(0,d,n);if(3===h)return d;throw new Error("unknown padding")}},function(e,t,n){"use strict";(function(e,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var s=n(2),o=n(45),a=s.Buffer,l=s.kMaxLength,u=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>l)throw new RangeError("buffer too small")}function f(e,t,n,i){if(r.browser){var s=e.buffer,a=new Uint8Array(s,t,n);return u.getRandomValues(a),i?void r.nextTick((function(){i(null,e)})):e}if(!i)return o(n).copy(e,t),e;o(n,(function(n,r){if(n)return i(n);r.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!r.browser?(t.randomFill=function(t,n,r,i){if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(n,t.length),d(r,n,t.length),f(t,n,r,i)},t.randomFillSync=function(t,n,r){void 0===n&&(n=0);if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(n,t.length),void 0===r&&(r=t.length-n);return d(r,n,t.length),f(t,n,r)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,n(8),n(3))},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkFindOp=void 0;const i=n(9),s=n(7),o=n(5),a=n(13),l=n(40);let u=class extends i.ShellApiWithMongoClass{constructor(e,t){super(),this._serviceProviderBulkFindOp=e,this._parentBulk=t}get _mongo(){return this._parentBulk._mongo}[o.asPrintable](){return"BulkFindOp"}collation(e){return this._serviceProviderBulkFindOp.collation(e),this}arrayFilters(e){return this._serviceProviderBulkFindOp.arrayFilters(e),this}hint(e){return(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.hint"),this._hint=e,this}delete(){return this._parentBulk._batchCounts.nRemoveOps++,this._serviceProviderBulkFindOp.delete(),this._parentBulk}deleteOne(){return this._parentBulk._batchCounts.nRemoveOps++,this._serviceProviderBulkFindOp.deleteOne(),this._parentBulk}remove(){return this.delete()}removeOne(){return this.deleteOne()}replaceOne(e){this._parentBulk._batchCounts.nUpdateOps++,(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.replacement");const t={...e};return this._hint&&(t.hint=this._hint),this._serviceProviderBulkFindOp.replaceOne(t),this._parentBulk}updateOne(e){this._parentBulk._batchCounts.nUpdateOps++,(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.update");const t={...e};return this._hint&&(t.hint=this._hint),this._arrayFilters&&(t.arrayFilters=this._arrayFilters),this._serviceProviderBulkFindOp.updateOne(t),this._parentBulk}update(e){this._parentBulk._batchCounts.nUpdateOps++,(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.update");const t={...e};return this._hint&&(t.hint=this._hint),this._arrayFilters&&(t.arrayFilters=this._arrayFilters),this._serviceProviderBulkFindOp.update(t),this._parentBulk}upsert(){return this._serviceProviderBulkFindOp.upsert(),this}};r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],u.prototype,"collation",null),r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],u.prototype,"arrayFilters",null),r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],u.prototype,"hint",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"delete",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"deleteOne",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1]),i.deprecated],u.prototype,"remove",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1]),i.deprecated],u.prototype,"removeOne",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"replaceOne",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"updateOne",null),r([(0,i.returnType)("Bulk")],u.prototype,"update",null),r([(0,i.returnType)("Bulk")],u.prototype,"upsert",null),u=r([i.shellApiClassDefault],u),t.BulkFindOp=u;let c=class extends i.ShellApiWithMongoClass{constructor(e,t,n=!1){super(),this._collection=e,this._mongo=e._mongo,this._serviceProviderBulkOp=t,this._batchCounts={nInsertOps:0,nUpdateOps:0,nRemoveOps:0},this._executed=!1,this._ordered=n}[o.asPrintable](){return this.toJSON()}_emitBulkApiCall(e,t={}){this._mongo._instanceState.emitApiCallWithArgs({method:e,class:"Bulk",db:this._collection._database._name,coll:this._collection._name,arguments:t})}async execute(e){const{result:t}=await this._serviceProviderBulkOp.execute();return this._executed=!0,this._emitBulkApiCall("execute",{writeConcern:e}),new l.BulkWriteResult(!!t.ok,t.nInserted,t.insertedIds,t.nMatched,t.nModified,t.nRemoved,t.nUpserted,t.upserted)}find(e){return(0,a.assertArgsDefinedType)([e],[!0],"Bulk.find"),new u(this._serviceProviderBulkOp.find(e),this)}insert(e){return this._batchCounts.nInsertOps++,(0,a.assertArgsDefinedType)([e],[!0],"Bulk.insert"),this._serviceProviderBulkOp.insert(e),this}toJSON(){const e=this._serviceProviderBulkOp.batches.length;return{...this._batchCounts,nBatches:e}}toString(){return JSON.stringify(this.toJSON())}getOperations(){if(!this._executed)throw new s.MongoshInvalidInputError("Cannot call getOperations on an unexecuted Bulk operation",s.CommonErrors.InvalidOperation);return this._serviceProviderBulkOp.batches.map(e=>({originalZeroIndex:e.originalZeroIndex,batchType:e.batchType,operations:e.operations}))}};r([i.returnsPromise,(0,i.apiVersions)([1])],c.prototype,"execute",null),r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],c.prototype,"find",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],c.prototype,"insert",null),c=r([i.shellApiClassDefault],c),t.default=c},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),s=n(5),o=n(7);let a=class extends i.ShellApiWithMongoClass{constructor(e){super(),this._collection=e}get _mongo(){return this._collection._mongo}[s.asPrintable](){return`PlanCache for collection ${this._collection._name}.`}async clear(){return await this._collection.runCommand("planCacheClear")}async clearPlansByQuery(e,t,n){const r={query:e};return t&&(r.projection=t),n&&(r.sort=n),await this._collection.runCommand("planCacheClear",r)}async list(e){const t=e||[],n=await this._collection.aggregate([{$planCacheStats:{}},...t]);return await n.toArray()}listQueryShapes(){throw new o.MongoshDeprecatedError("PlanCache.listQueryShapes was deprecated, please use PlanCache.list instead")}getPlansByQuery(){throw new o.MongoshDeprecatedError("PlanCache.getPlansByQuery was deprecated, please use PlanCache.list instead")}};r([i.returnsPromise,(0,i.apiVersions)([])],a.prototype,"clear",null),r([i.returnsPromise,(0,i.apiVersions)([])],a.prototype,"clearPlansByQuery",null),r([(0,i.serverVersions)(["4.4.0",s.ServerVersions.latest]),i.returnsPromise,(0,i.apiVersions)([])],a.prototype,"list",null),r([i.deprecated],a.prototype,"listQueryShapes",null),r([i.deprecated],a.prototype,"getPlansByQuery",null),a=r([i.shellApiClassDefault],a),t.default=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i(n(209)),o=n(9),a=n(5),l=n(13);let u=class extends o.ShellApiWithMongoClass{constructor(e,t,n){super(),this._mongo=e,this._collection=t,this._verbosity=n}[a.asPrintable](){return`Explainable(${this._collection.getFullName()})`}_emitExplainableApiCall(e,t={}){this._mongo._instanceState.emitApiCallWithArgs({method:e,class:"Explainable",db:this._collection._database._name,coll:this._collection._name,arguments:t})}getCollection(){return this._emitExplainableApiCall("getCollection"),this._collection}getVerbosity(){return this._emitExplainableApiCall("getVerbosity"),this._verbosity}setVerbosity(e){e=(0,l.validateExplainableVerbosity)(e),this._emitExplainableApiCall("setVerbosity",{verbosity:e}),this._verbosity=e}async find(e,t){this._emitExplainableApiCall("find",{query:e,projection:t});const n=await this._collection.find(e,t);return new s.default(this._mongo,n,this._verbosity)}async aggregate(...e){var t;let n,r;return this._emitExplainableApiCall("aggregate",{args:e}),Array.isArray(e[0])?(r=e[0],n=null!==(t=e[1])&&void 0!==t?t:{}):(r=e,n={}),await this._collection.aggregate(r,{...n,explain:this._verbosity})}async count(e={},t={}){return this._emitExplainableApiCall("count",{query:e,options:t}),(0,l.markAsExplainOutput)(await this._collection._database._runCommand({explain:{count:""+this._collection._name,query:e,...t},verbosity:this._verbosity}))}async distinct(e,t,n={}){return this._emitExplainableApiCall("distinct",{field:e,query:t,options:n}),this._collection.distinct(e,null!=t?t:{},{...n,explain:this._verbosity})}async findAndModify(e){return this._emitExplainableApiCall("findAndModify",{options:e}),this._collection.findAndModify({...e,explain:this._verbosity})}async findOneAndDelete(e,t={}){return this._emitExplainableApiCall("findOneAndDelete",{filter:e,options:t}),this._collection.findOneAndDelete(e,{...t,explain:this._verbosity})}async findOneAndReplace(e,t,n={}){return this._emitExplainableApiCall("findOneAndReplace",{filter:e,options:n}),this._collection.findOneAndReplace(e,t,{...n,explain:this._verbosity})}async findOneAndUpdate(e,t,n={}){return this._emitExplainableApiCall("findOneAndUpdate",{filter:e,options:n}),this._collection.findOneAndUpdate(e,t,{...n,explain:this._verbosity})}async remove(e,t={}){return this._emitExplainableApiCall("remove",{query:e,options:t}),t={...(0,l.processRemoveOptions)(t),explain:this._verbosity},this._collection.remove(e,t)}async update(e,t,n={}){return this._emitExplainableApiCall("update",{filter:e,update:t,options:n}),this._collection.update(e,t,{...n,explain:this._verbosity})}async mapReduce(e,t,n){this._emitExplainableApiCall("mapReduce",{map:e,reduce:t,optionsOrOutString:n});const r={...(0,l.processMapReduceOptions)(n),explain:this._verbosity};return this._collection.mapReduce(e,t,r)}};r([(0,o.returnType)("ExplainableCursor"),(0,o.apiVersions)([1]),o.returnsPromise],u.prototype,"find",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"aggregate",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"count",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"distinct",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findAndModify",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findOneAndDelete",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findOneAndReplace",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findOneAndUpdate",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"remove",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"update",null),r([o.returnsPromise,(0,o.serverVersions)(["4.4.0",a.ServerVersions.latest]),(0,o.apiVersions)([])],u.prototype,"mapReduce",null),u=r([o.shellApiClassDefault],u),t.default=u},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7),s=n(23),o=n(28),a=r(n(455)),l=n(9),u=n(5),c=n(39),h=n(44),d=n(459),f=n(460),p=r(n(461)),m=r(n(462));t.default=class{constructor(e,t=new o.EventEmitter,n={}){if(this.displayBatchSizeFromDBQuery=void 0,this.isInteractive=!1,this.apiCallDepth=0,this.warningsShown=new Set,this.interrupted=new d.InterruptFlag,this.plugins=[new f.TransformMongoErrorPlugin],this.alreadyTransformedErrors=new WeakMap,this.initialServiceProvider=e,this.messageBus=t,this.shellApi=new h.ShellApi(this),this.shellBson=(0,m.default)(e.bsonLibrary,e=>{this.shellApi.print("Warning: "+e)}),this.mongos=[],this.connectionInfo={buildInfo:{}},n.nodb)this.currentDb=new p.default;else{const t=new h.Mongo(this,void 0,void 0,void 0,e);this.mongos.push(t),this.currentDb=t.getDB(e.initialDb||s.DEFAULT_DB)}this.currentCursor=null,this.context={},this.cliOptions=n,this.evaluationListener={}}async fetchConnectionInfo(){if(!this.cliOptions.nodb){this.connectionInfo=await this.currentServiceProvider.getConnectionInfo();const e=this.apiVersionInfo();this.messageBus.emit("mongosh:connect",{...this.connectionInfo.extraInfo,api_version:null==e?void 0:e.version,api_strict:null==e?void 0:e.strict,api_deprecation_errors:null==e?void 0:e.deprecationErrors,uri:(0,a.default)(this.connectionInfo.extraInfo.uri)})}}async close(e){for(const t of[...this.mongos])await t.close(e)}setDbFunc(e){return this.currentDb=e,this.context.rs=new h.ReplicaSet(this.currentDb),this.context.sh=new h.Shard(this.currentDb),this.fetchConnectionInfo().catch(e=>this.messageBus.emit("mongosh:error",e,"shell-api")),this.currentDb._getCollectionNamesForCompletion().catch(e=>this.messageBus.emit("mongosh:error",e,"shell-api")),this.currentDb._mongo._getDatabaseNamesForCompletion().catch(e=>this.messageBus.emit("mongosh:error",e,"shell-api")),this.currentCursor=null,e}setCtx(e){this.context=e,Object.assign(e,this.shellApi);for(const t of Object.getOwnPropertyNames(h.ShellApi.prototype)){const{shellApi:n}=this;l.toIgnore.concat(["help"]).includes(t)||"function"!=typeof n[t]||(e[t]=function(...e){return n[t](...e)},e[t].help=n[t].help)}e.help=this.shellApi.help,Object.assign(e,this.shellBson),void 0===e.console&&(e.console={});for(const t of["log","warn","info","error"])e.console[t]=(...t)=>e.print(...t);e.console.clear=e.cls,e.rs=new h.ReplicaSet(this.currentDb),e.sh=new h.Shard(this.currentDb);const t=e=>{if("Database"!==(0,h.getShellApiType)(e))throw new i.MongoshInvalidInputError("Cannot reassign 'db' to non-Database type",i.CommonErrors.InvalidOperation);return this.setDbFunc(e)};this.initialServiceProvider.platform===s.ReplPlatform.JavaShell?e.db=this.setDbFunc(this.currentDb):Object.defineProperty(e,"db",{configurable:!0,set:t,get:()=>this.currentDb}),this.messageBus.emit("mongosh:setCtx",{method:"setCtx",arguments:{}})}get currentServiceProvider(){try{return this.currentDb._mongo._serviceProvider}catch(e){if((null==e?void 0:e.code)===c.ShellApiErrors.NotConnected)return this.initialServiceProvider;throw e}}emitApiCallWithArgs(e){this.messageBus.emit("mongosh:api-call-with-arguments",e)}emitApiCall(e){this.messageBus.emit("mongosh:api-call",{...e,callDepth:this.apiCallDepth})}setEvaluationListener(e){this.evaluationListener=e}getAutocompleteParameters(){return{topology:()=>{var e;let t;const n=null===(e=this.currentServiceProvider.getTopology())||void 0===e?void 0:e.description;switch(null==n?void 0:n.type){case"ReplicaSetNoPrimary":case"ReplicaSetWithPrimary":t=u.Topologies.ReplSet;break;case"Sharded":t=u.Topologies.Sharded;break;case"LoadBalanced":t=u.Topologies.LoadBalanced;break;default:if(t=u.Topologies.Standalone,1===n.servers.size){const[e]=n.servers.values();switch(e.type){case"Mongos":t=u.Topologies.Sharded;break;case"PossiblePrimary":case"RSPrimary":case"RSSecondary":case"RSArbiter":case"RSOther":case"RSGhost":t=u.Topologies.ReplSet}}}return t},apiVersionInfo:()=>this.apiVersionInfo(),connectionInfo:()=>this.connectionInfo.extraInfo,getCollectionCompletionsForCurrentDb:async e=>{try{return(await this.currentDb._getCollectionNamesForCompletion()).filter(t=>t.toLowerCase().startsWith(e.toLowerCase()))}catch(e){if((null==e?void 0:e.code)===c.ShellApiErrors.NotConnected||"Unauthorized"===(null==e?void 0:e.codeName))return[];throw e}},getDatabaseCompletions:async e=>{try{return(await this.currentDb._mongo._getDatabaseNamesForCompletion()).filter(t=>t.toLowerCase().startsWith(e.toLowerCase()))}catch(e){if((null==e?void 0:e.code)===c.ShellApiErrors.NotConnected||"Unauthorized"===(null==e?void 0:e.codeName))return[];throw e}}}}apiVersionInfo(){var e,t;const{serverApi:n}=null!==(t=null===(e=this.currentServiceProvider.getRawClient())||void 0===e?void 0:e.options)&&void 0!==t?t:{};return(null==n?void 0:n.version)?{strict:!1,deprecationErrors:!1,...n}:void 0}async onInterruptExecution(){return this.interrupted.set(),this.currentCursor=null,this.resumeMongosAfterInterrupt=await Promise.all(this.mongos.map(async e=>{try{return{mongo:e,resume:await e._suspend()}}catch(t){return{mongo:e,resume:null}}})),!this.resumeMongosAfterInterrupt.find(e=>null===e.resume)}async onResumeExecution(){var e,t;const n=null!==(t=null===(e=this.resumeMongosAfterInterrupt)||void 0===e?void 0:e.map(async e=>{if(!this.mongos.find(t=>t===e.mongo))return!0;if(null===e.resume)return!1;try{return await e.resume(),!0}catch(e){return!1}}))&&void 0!==t?t:[];this.resumeMongosAfterInterrupt=void 0;const r=await Promise.all(n);return this.interrupted.reset(),!r.find(e=>!1===e)}async getDefaultPrompt(){const e=this.getDefaultPromptPrefix(),t=this.getTopologySpecificPrompt();let n="";try{n=this.currentDb.getName()}catch(e){}return[e,t,n].filter(Boolean).join(" ")+"> "}getDefaultPromptPrefix(){var e,t,n,r;const i=null===(e=this.connectionInfo)||void 0===e?void 0:e.extraInfo;return(null==i?void 0:i.is_data_lake)?"AtlasDataLake":(null==i?void 0:i.is_atlas)?"Atlas":(null==i?void 0:i.is_enterprise)||(null===(r=null===(n=null===(t=this.connectionInfo)||void 0===t?void 0:t.buildInfo)||void 0===n?void 0:n.modules)||void 0===r?void 0:r.indexOf("enterprise"))>=0?"Enterprise":""}getTopologySpecificPrompt(){var e,t,n,r;const i=null===(e=this.currentServiceProvider.getTopology())||void 0===e?void 0:e.description;if(!i)return"";let s=i.setName,o="";switch(i.type){case"Single":const e=this.getTopologySinglePrompt(i);s=null!==(t=null==e?void 0:e.replicaSet)&&void 0!==t?t:s,o=(null==e?void 0:e.serverType)?`[direct: ${e.serverType}]`:"";break;case"ReplicaSetNoPrimary":o="[secondary]";break;case"ReplicaSetWithPrimary":o="[primary]";break;case"Sharded":o=(null===(r=null===(n=this.connectionInfo)||void 0===n?void 0:n.extraInfo)||void 0===r?void 0:r.atlas_version)?"":"[mongos]";break;case"LoadBalanced":default:return""}return`${s?s+" ":""}${o}`}getTopologySinglePrompt(e){var t;if(1!==(null===(t=e.servers)||void 0===t?void 0:t.size))return;const[n]=e.servers.values();let r;switch(n.type){case"Mongos":r="mongos";break;case"RSPrimary":r="primary";break;case"RSSecondary":r="secondary";break;case"RSArbiter":r="arbiter";break;case"RSOther":r="other";break;default:r=""}return{replicaSet:n.setName,serverType:r}}registerPlugin(e){this.plugins.push(e)}transformError(e){if("[object Error]"===Object.prototype.toString.call(e)){if(this.alreadyTransformedErrors.has(e))return this.alreadyTransformedErrors.get(e);const t=e;for(const t of this.plugins)t.transformError&&(e=t.transformError(e));this.alreadyTransformedErrors.set(t,e)}return e}async printDeprecationWarning(e){this.warningsShown.has(e)||(this.warningsShown.add(e),this.context.print?await this.context.print.call(this.shellApi,"DeprecationWarning: "+e):await this.shellApi.print("DeprecationWarning: "+e))}async printWarning(e){this.warningsShown.has(e)||(this.warningsShown.add(e),this.context.print?await this.context.print.call(this.shellApi,"Warning: "+e):await this.shellApi.print("Warning: "+e))}}},function(e,t,n){e.exports=n(456)},function(e,t,n){var r=n(457),i=n(458);e.exports=function e(t){return r.isPlainObject(t)?r.mapValues(t,e):r.isArray(t)?r.map(t,e):r.isString(t)?(r.each(i,(function(e){var n=e[0],r=e[1];t=t.replace(n,r)})),t):t}},function(e,t,n){(function(e,r){var i;
62
+ var r=n(4),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(97),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[o]=null,e[a]=null,t(f(n,!1)))}}function m(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[h](n,r)}),r)}}(i,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(f(s,!1));r=new Promise(this[h])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[o]=null,n[a]=null,e(f(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[c]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[c]=null,n[o]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[a]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this,n(3))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(160);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(0)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(46).codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(97)),r(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var l=!1;return function(t){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}function u(e){e()}function c(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1;return l(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(u),s||(o.forEach(u),i(r))}))}));return t.reduce(c)}},function(e,t,n){var r=n(0),i=n(48),s=n(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,l=0|this._e,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((t=r)<<5|t>>>27)+c(f,i,s,a)+l+n[d]+o[f];l=a,a=s,s=u(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,n){var r=n(0),i=n(48),s=n(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function h(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,s=0|this._c,a=0|this._d,l=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=(t=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|t>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=u(r)+h(p,i,s,a)+l+n[f]+o[p]|0;l=a,a=s,s=c(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,n){var r=n(0),i=n(161),s=n(48),o=n(2).Buffer,a=new Array(64);function l(){this.init(),this._w=a,s.call(this,64,56)}r(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},function(e,t,n){var r=n(0),i=n(162),s=n(48),o=n(2).Buffer,a=new Array(160);function l(){this.init(),this._w=a,s.call(this,128,112)}r(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},function(e,t,n){e.exports=i;var r=n(28).EventEmitter;function i(){r.call(this)}n(0)(i,r),i.Readable=n(100),i.Writable=n(373),i.Duplex=n(374),i.Transform=n(375),i.PassThrough=n(376),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",l));var o=!1;function a(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",s),n.removeListener("end",a),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(2).Buffer,i=n(371);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,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,s=r.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=s,i=a,t.copy(n,i),a+=o.data.length,o=o.next;return s},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})},function(e,t){},function(e,t,n){"use strict";e.exports=s;var r=n(166),i=Object.create(n(58));function s(e){if(!(this instanceof s))return new s(e);r.call(this,e)}i.inherits=n(0),i.inherits(s,r),s.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(101)},function(e,t,n){e.exports=n(38)},function(e,t,n){e.exports=n(100).Transform},function(e,t,n){e.exports=n(100).PassThrough},function(e,t,n){"use strict";var r=n(0),i=n(2).Buffer,s=n(33),o=i.alloc(128);function a(e,t){s.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,o],64));for(var n=this._ipad=i.allocUnsafe(64),r=this._opad=i.allocUnsafe(64),a=0;a<64;a++)n[a]=54^t[a],r[a]=92^t[a];this._hash=[n]}r(a,s),a.prototype._update=function(e){this._hash.push(e)},a.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=a},function(e,t,n){e.exports=n(169)},function(e,t,n){(function(t){var r,i,s=n(2).Buffer,o=n(171),a=n(172),l=n(173),u=n(174),c=t.crypto&&t.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function f(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function p(e,t,n,r,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return s.from(e)}))}e.exports=function(e,n,i,m,g,y){"function"==typeof g&&(y=g,g=void 0);var v=h[(g=g||"sha1").toLowerCase()];if(v&&"function"==typeof t.Promise){if(o(i,m),e=u(e,a,"Password"),n=u(n,a,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){f()((function(){t(null,e)}))}),(function(e){f()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var n=p(r=r||s.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=n,n}(v).then((function(t){return t?p(e,n,i,m,v):l(e,n,i,m,g)})),y)}else f()((function(){var t;try{t=l(e,n,i,m,g)}catch(e){return y(e)}y(null,t)}))}}).call(this,n(8))},function(e,t,n){var r=n(381),i=n(103),s=n(104),o=n(394),a=n(68);function l(e,t,n){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function u(e,t,n){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,n);if(o[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),s[e])n=s[e].key,r=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=8*o[e].key,r=o[e].iv}var i=a(t,!1,n,r);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},function(e,t,n){var r=n(33),i=n(382),s=n(0),o=n(2).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){r.call(this);var t,n=e.mode.toLowerCase(),i=a[n];t=e.decrypt?"decrypt":"encrypt";var s=e.key;o.isBuffer(s)||(s=o.from(s)),"des-ede"!==n&&"des-ede-cbc"!==n||(s=o.concat([s,s.slice(0,8)]));var l=e.iv;o.isBuffer(l)||(l=o.from(l)),this._des=i.create({key:s,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,s(l,r),l.prototype._update=function(e){return o.from(this._des.update(e))},l.prototype._final=function(){return o.from(this._des.final())}},function(e,t,n){"use strict";t.utils=n(175),t.Cipher=n(102),t.DES=n(176),t.CBC=n(383),t.EDE=n(384)},function(e,t,n){"use strict";var r=n(16),i=n(0),s={};function o(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var o=n[r];t.prototype[o]=s[o]}return t.create=function(e){return new t(e)},t},s._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},s._update=function(e,t,n,r){var i=this._cbcState,s=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)o[a]^=e[t+a];s._update.call(this,o,0,n,r);for(a=0;a<this.blockSize;a++)o[a]=n[r+a]}else{s._update.call(this,e,t,n,r);for(a=0;a<this.blockSize;a++)n[r+a]^=o[a];for(a=0;a<this.blockSize;a++)o[a]=e[t+a]}}},function(e,t,n){"use strict";var r=n(16),i=n(0),s=n(102),o=n(176);function a(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:n}),o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:s})]:[o.create({type:"decrypt",key:s}),o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:n})]}function l(e){s.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(l,s),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},l.prototype._pad=o.prototype._pad,l.prototype._unpad=o.prototype._unpad},function(e,t,n){var r=n(104),i=n(180),s=n(2).Buffer,o=n(181),a=n(33),l=n(67),u=n(68);function c(e,t,n){a.call(this),this._cache=new d,this._cipher=new l.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}n(0)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return s.concat(r)};var h=s.alloc(16,16);function d(){this.cache=s.allocUnsafe(0)}function f(e,t,n){var a=r[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=s.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new o(a.module,t,n):"auth"===a.type?new i(a.module,t,n):new c(a.module,t,n)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=s.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return s.concat([this.cache,t])},t.createCipheriv=f,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=u(t,!1,n.key,n.iv);return f(e,i.key,i.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(59);t.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},function(e,t,n){var r=n(2).Buffer,i=n(59);function s(e,t,n){var s=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=r.concat([e._prev,n?t:o]),o}t.encrypt=function(e,t,n){for(var i,o=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){o=r.concat([o,s(e,t,n)]);break}i=e._cache.length,o=r.concat([o,s(e,t.slice(0,i),n)]),t=t.slice(i)}return o}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:i])]),i}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},function(e,t,n){var r=n(2).Buffer;function i(e,t,n){for(var r,i,o=-1,a=0;++o<8;)r=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=s(e._prev,n?r:i);return a}function s(e,t){var n=e.length,i=-1,s=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)s[i]=e[i]<<1|e[i+1]>>7;return s}t.encrypt=function(e,t,n){for(var s=t.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],n);return o}},function(e,t,n){(function(e){var r=n(59);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,i(t)]);var s=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,s)}}).call(this,n(4).Buffer)},function(e,t,n){var r=n(2).Buffer,i=r.alloc(16,0);function s(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=s(i)},o.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=o},function(e,t,n){var r=n(180),i=n(2).Buffer,s=n(104),o=n(181),a=n(33),l=n(67),u=n(68);function c(e,t,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function d(e,t,n){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new o(a.module,t,n,!0):"auth"===a.type?new r(a.module,t,n,!0):new c(a.module,t,n)}n(0)(c,a),c.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return i.concat(r)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=u(t,!1,n.key,n.iv);return d(e,r.key,r.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){var r=n(182),i=n(400),s=n(401);var o={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var n=new e(i[t].prime,"hex"),r=new e(i[t].gen,"hex");return new s(n,r)},t.createDiffieHellman=t.DiffieHellman=function t(n,i,a,l){return e.isBuffer(i)||void 0===o[i]?t(n,"binary",i,a):(i=i||"binary",l=l||"binary",a=a||new e([2]),e.isBuffer(a)||(a=new e(a,l)),"number"==typeof n?new s(r(n,a),a,!0):(e.isBuffer(n)||(n=new e(n,i)),new s(n,a,!0)))}}).call(this,n(4).Buffer)},function(e,t){},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(398).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,r){for(var i=0,s=Math.min(e.length,n),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var h=1;for(l=u(e,c,e.length,t),c=0;c<o;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(o=(i=0|e.words[p])*(s=0|t.words[f])+h)/67108864|0,h=67108863&o}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?m+n:c[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===t,u=new e(s),c=this.clone();if(l){for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[a]=o;for(;a<s;a++)u[a]=0}else{for(a=0;a<s-i;a++)u[a]=0;for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[s-a-1]=o}return u},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,s,o=e.words,a=t.words,l=n.words,u=0,c=0|o[0],h=8191&c,d=c>>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,b=0|o[3],w=8191&b,_=b>>>13,S=0|o[4],x=8191&S,E=S>>>13,A=0|o[5],T=8191&A,M=A>>>13,C=0|o[6],P=8191&C,k=C>>>13,O=0|o[7],I=8191&O,R=O>>>13,N=0|o[8],D=8191&N,F=N>>>13,L=0|o[9],B=8191&L,j=L>>>13,$=0|a[0],U=8191&$,V=$>>>13,W=0|a[1],z=8191&W,K=W>>>13,H=0|a[2],q=8191&H,G=H>>>13,Y=0|a[3],J=8191&Y,X=Y>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(d,U)|0))<<13)|0;u=((s=Math.imul(d,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(u+(r=r+Math.imul(h,z)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,z)|0))<<13)|0;u=((s=s+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,s=Math.imul(v,V),r=r+Math.imul(p,z)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,z)|0,s=s+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,q)|0))<<13)|0;u=((s=s+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,V))+Math.imul(_,U)|0,s=Math.imul(_,V),r=r+Math.imul(y,z)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,z)|0,s=s+Math.imul(v,K)|0,r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,G)|0;var be=(u+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,J)|0))<<13)|0;u=((s=s+Math.imul(d,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(E,U)|0,s=Math.imul(E,V),r=r+Math.imul(w,z)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,z)|0,s=s+Math.imul(_,K)|0,r=r+Math.imul(y,q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,q)|0,s=s+Math.imul(v,G)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,X)|0;var we=(u+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(x,z)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(E,z)|0,s=s+Math.imul(E,K)|0,r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,s=s+Math.imul(_,G)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(v,J)|0,s=s+Math.imul(v,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(k,U)|0,s=Math.imul(k,V),r=r+Math.imul(T,z)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(M,z)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(E,q)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,J)|0,s=s+Math.imul(_,X)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,s=s+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var Se=(u+(r=r+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(d,se)|0))<<13)|0;u=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,V))+Math.imul(R,U)|0,s=Math.imul(R,V),r=r+Math.imul(P,z)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(k,z)|0,s=s+Math.imul(k,K)|0,r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(v,ne)|0,s=s+Math.imul(v,re)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var xe=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((s=s+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(F,U)|0,s=Math.imul(F,V),r=r+Math.imul(I,z)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,z)|0,s=s+Math.imul(R,K)|0,r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(k,q)|0,s=s+Math.imul(k,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,s=s+Math.imul(_,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,se)|0,s=s+Math.imul(v,oe)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(j,U)|0,s=Math.imul(j,V),r=r+Math.imul(D,z)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(F,z)|0,s=s+Math.imul(F,K)|0,r=r+Math.imul(I,q)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(R,q)|0,s=s+Math.imul(R,G)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(k,J)|0,s=s+Math.imul(k,X)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(E,ne)|0,s=s+Math.imul(E,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,le)|0,s=s+Math.imul(v,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,de)|0;var Ae=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,z),i=(i=Math.imul(B,K))+Math.imul(j,z)|0,s=Math.imul(j,K),r=r+Math.imul(D,q)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(F,q)|0,s=s+Math.imul(F,G)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(R,J)|0,s=s+Math.imul(R,X)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(k,Q)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,oe)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ue)|0,r=r+Math.imul(y,he)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,he)|0,s=s+Math.imul(v,de)|0;var Te=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(j,q)|0,s=Math.imul(j,G),r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(F,J)|0,s=s+Math.imul(F,X)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(E,le)|0,s=s+Math.imul(E,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,de)|0;var Me=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,pe)|0))<<13)|0;u=((s=s+Math.imul(v,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,X))+Math.imul(j,J)|0,s=Math.imul(j,X),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(F,Q)|0,s=s+Math.imul(F,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(R,ne)|0,s=s+Math.imul(R,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,oe)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ue)|0,r=r+Math.imul(x,he)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(E,he)|0,s=s+Math.imul(E,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(j,Q)|0,s=Math.imul(j,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(F,ne)|0,s=s+Math.imul(F,re)|0,r=r+Math.imul(I,se)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,oe)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(k,le)|0,s=s+Math.imul(k,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(M,he)|0,s=s+Math.imul(M,de)|0;var Pe=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((s=s+Math.imul(E,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(j,ne)|0,s=Math.imul(j,re),r=r+Math.imul(D,se)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(F,se)|0,s=s+Math.imul(F,oe)|0,r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(k,he)|0,s=s+Math.imul(k,de)|0;var ke=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,oe))+Math.imul(j,se)|0,s=Math.imul(j,oe),r=r+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(F,le)|0,s=s+Math.imul(F,ue)|0,r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,de)|0;var Oe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(k,pe)|0))<<13)|0;u=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(j,le)|0,s=Math.imul(j,ue),r=r+Math.imul(D,he)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(F,he)|0,s=s+Math.imul(F,de)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,he),i=(i=Math.imul(B,de))+Math.imul(j,he)|0,s=Math.imul(j,de);var Re=(u+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(F,pe)|0))<<13)|0;u=((s=s+Math.imul(F,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return u=((s=Math.imul(j,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=Se,l[7]=xe,l[8]=Ee,l[9]=Ae,l[10]=Te,l[11]=Me,l[12]=Ce,l[13]=Pe,l[14]=ke,l[15]=Oe,l[16]=Ie,l[17]=Re,l[18]=Ne,0!==u&&(l[19]=u,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,l=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},g.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<o;f++){var p=n[c+f],m=r[c+f],g=n[c+f+o],y=r[c+f+o],v=h*g-d*y;y=h*y+d*g,g=v,n[c+f]=p+g,r[c+f]=m+y,n[c+f+o]=p-g,r[c+f+o]=m-y,f!==a&&(v=l*h-u*d,d=l*d+u*h,h=v)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,u,r),this.transform(o,s,a,l,r,i),this.transform(u,s,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,l=(0|this.words[t])-a<<n;this.words[t]=l|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,l=n;if(i-=o,i=Math.max(0,i),l){for(var u=0;u<o;u++)l.words[u]=this.words[u];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-s|h>>>s,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(l)):(n.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new x(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(b,v),b.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var s=0|e.words[r];e.words[r-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(_,v),i(S,v),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=o;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(h,new s(1).iushln(p-g-1));d=d.redMul(y),h=y.redSqr(),f=f.redMul(h),p=g}return d},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===r&&0===c)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}l=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new E(e)},i(E,x),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(14)(e))},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,n){(function(t){var r=n(183),i=new(n(184)),s=new r(24),o=new r(11),a=new r(10),l=new r(3),u=new r(7),c=n(182),h=n(45);function d(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new r(e),this}function f(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new r(e),this}e.exports=m;var p={};function m(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=d,this.setPrivateKey=f):this._primeCode=8}function g(e,n){var r=new t(e.toArray());return n?r.toString(n):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in p)return p[r];var h,d=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return d+=1,d+="02"===n||"05"===n?8:4,p[r]=d,d;switch(i.test(e.shrn(1))||(d+=2),n){case"02":e.mod(s).cmp(o)&&(d+=8);break;case"05":(h=e.mod(a)).cmp(l)&&h.cmp(u)&&(d+=8);break;default:d+=4}return p[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var n=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(n.toArray()),s=this.getPrime();if(i.length<s.length){var o=new t(s.length-i.length);o.fill(0),i=t.concat([o,i])}return i},m.prototype.getPublicKey=function(e){return g(this._pub,e)},m.prototype.getPrivateKey=function(e){return g(this._priv,e)},m.prototype.getPrime=function(e){return g(this.__prime,e)},m.prototype.getGenerator=function(e){return g(this._gen,e)},m.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new r(e),this}}).call(this,n(4).Buffer)},function(e,t,n){var r=n(106).Buffer,i=n(57),s=n(403),o=n(0),a=n(411),l=n(442),u=n(169);function c(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){return new c(e)}function f(e){return new h(e)}Object.keys(u).forEach((function(e){u[e].id=r.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]})),o(c,s.Writable),c.prototype._write=function(e,t,n){this._hash.update(e),n()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=a(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},o(h,s.Writable),h.prototype._write=function(e,t,n){this._hash.update(e),n()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,n){"string"==typeof t&&(t=r.from(t,n)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},e.exports={Sign:d,Verify:f,createSign:d,createVerify:f}},function(e,t,n){(t=e.exports=n(185)).Stream=t,t.Readable=t,t.Writable=n(189),t.Duplex=n(50),t.Transform=n(190),t.PassThrough=n(409),t.finished=n(107),t.pipeline=n(410)},function(e,t){},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(4).Buffer,a=n(406).inspect,l=a&&a.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,n,u;return t=e,(n=[{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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,r=a,o.prototype.copy.call(t,n,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&s(t.prototype,n),u&&s(t,u),e}()},function(e,t){},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(107),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[o]=null,e[a]=null,t(f(n,!1)))}}function m(e){t.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[l]?r(e[l]):n(f(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[h](n,r)}),r)}}(i,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(f(s,!1));r=new Promise(this[h])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[o]=null,n[a]=null,e(f(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),t));return n[c]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[c]=null,n[o]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[a]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",m.bind(null,n)),n}}).call(this,n(3))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(190);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(0)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(49).codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===r&&(r=n(107)),r(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var l=!1;return function(t){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}function u(e){e()}function c(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var o=t.map((function(e,n){var s=n<t.length-1;return l(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(u),s||(o.forEach(u),i(r))}))}));return t.reduce(c)}},function(e,t,n){var r=n(106).Buffer,i=n(167),s=n(108),o=n(110).ec,a=n(109),l=n(70),u=n(202);function c(e,t,n,s){if((e=r.from(e.toArray())).length<t.byteLength()){var o=r.alloc(t.byteLength()-e.length);e=r.concat([o,e])}var a=n.length,l=function(e,t){e=(e=h(e,t)).mod(t);var n=r.from(e.toArray());if(n.length<t.byteLength()){var i=r.alloc(t.byteLength()-n.length);n=r.concat([i,n])}return n}(n,t),u=r.alloc(a);u.fill(1);var c=r.alloc(a);return c=i(s,c).update(u).update(r.from([0])).update(e).update(l).digest(),u=i(s,c).update(u).digest(),{k:c=i(s,c).update(u).update(r.from([1])).update(e).update(l).digest(),v:u=i(s,c).update(u).digest()}}function h(e,t){var n=new a(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function d(e,t,n){var s,o;do{for(s=r.alloc(0);8*s.length<e.bitLength();)t.v=i(n,t.k).update(t.v).digest(),s=r.concat([s,t.v]);o=h(s,e),t.k=i(n,t.k).update(t.v).update(r.from([0])).digest(),t.v=i(n,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function f(e,t,n,r){return e.toRed(a.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,n,i,p){var m=l(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var n=u[t.curve.join(".")];if(!n)throw new Error("unknown curve "+t.curve.join("."));var i=new o(n).keyFromPrivate(t.privateKey).sign(e);return r.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,n){var i,s=t.params.priv_key,o=t.params.p,l=t.params.q,u=t.params.g,p=new a(0),m=h(e,l).mod(l),g=!1,y=c(s,l,e,n);for(;!1===g;)i=d(l,y,n),p=f(u,i,o,l),0===(g=i.invm(l).imul(m.add(s.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var n=[48,e.length+t.length+4,2,e.length];return n=n.concat(e,[2,t.length],t),r.from(n)}(p,g)}(e,m,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=r.concat([p,e]);for(var g=m.modulus.byteLength(),y=[0,1];e.length+y.length+1<g;)y.push(255);y.push(0);for(var v=-1;++v<e.length;)y.push(e[v]);return s(y,m)},e.exports.getKey=c,e.exports.makeKey=d},function(e,t){},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t){},function(e,t,n){"use strict";var r=n(17),i=n(29),s=n(0),o=n(69),a=r.assert;function l(e){o.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,n,r){o.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,n,r){o.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}s(l,o),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new i(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?n=s[0]:(n=s[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(n)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),n=new i(2).toRed(t).redInvm(),r=n.redNeg(),s=new i(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(s).fromRed(),r.redSub(s).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,n,r,s,o,a,l,u,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),v=0;0!==d.cmpn(0);){var b=f.div(d);u=f.sub(b.mul(d)),c=g.sub(b.mul(p));var w=y.sub(b.mul(m));if(!r&&u.cmp(h)<0)t=l.neg(),n=p,r=u.neg(),s=c;else if(r&&2==++v)break;l=u,f=d,d=u,g=p,p=c,y=m,m=w}o=u.neg(),a=c;var _=r.sqr().add(s.sqr());return o.sqr().add(a.sqr()).cmp(_)>=0&&(o=t,a=n),r.negative&&(r=r.neg(),s=s.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:r,b:s},{a:o,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),s=n.b.neg().mul(e).divRound(this.n),o=i.mul(n.a),a=s.mul(r.a),l=i.mul(n.b),u=s.mul(r.b);return{k1:e.sub(o).sub(a),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var s=r.fromRed().isOdd();return(t&&!s||!t&&s)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var o=this._endoSplit(t[s]),a=e[s],l=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),l=l.neg(!0)),r[2*s]=a,r[2*s+1]=l,i[2*s]=o.k1,i[2*s+1]=o.k2}for(var u=this._wnafMulAdd(1,r,i,2*s,n),c=0;c<2*s;c++)r[c]=null,i[c]=null;return u},s(u,o.BasePoint),l.prototype.point=function(e,t,n){return new u(this,e,t,n)},l.prototype.pointFromJSON=function(e,t){return u.fromJSON(this,e,t)},u.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var s=t[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},u.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(c,o.BasePoint),l.prototype.jpoint=function(e,t,n){return new c(this,e,t,n)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),s=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),l=s.redSub(o);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),h=r.redMul(u),d=l.redSqr().redIAdd(c).redISub(h).redISub(h),f=l.redMul(h.redISub(d)).redISub(s.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),o=n.redSub(r),a=i.redSub(s);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=o.redSqr(),u=l.redMul(o),c=n.redMul(l),h=a.redSqr().redIAdd(u).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(i.redMul(u)),f=this.z.redMul(o);return this.curve.jpoint(h,d,f)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,l=a.redSqr().redSqr(),u=o.redAdd(o);for(t=0;t<e;t++){var c=s.redSqr(),h=u.redSqr(),d=h.redSqr(),f=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(l)),p=s.redMul(h),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=f.redMul(g);y=y.redIAdd(y).redISub(d);var v=u.redMul(a);t+1<e&&(l=l.redMul(d)),s=m,a=v,u=y}return this.curve.jpoint(s,u.redMul(i),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r),l=a.redSqr().redISub(o).redISub(o),u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),e=l,t=a.redMul(o.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),f=this.x.redAdd(h).redSqr().redISub(c).redISub(d);f=f.redIAdd(f);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},c.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),l=a.redSqr().redISub(o).redISub(o);e=l;var u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),t=a.redMul(o.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),f=this.x.redSub(c).redMul(this.x.redAdd(c));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},c.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=t.redSqr(),o=n.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),l=t.redAdd(t),u=(l=l.redIAdd(l)).redMul(o),c=a.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),d=o.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(h).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,f,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(s)).redSqr(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var u=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(l),c=t.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(a).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(u.redMul(l.redISub(u)).redISub(o.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(o).redSqr().redISub(n).redISub(a);return this.curve.jpoint(h,d,f)},c.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},c.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},c.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(29),i=n(0),s=n(69),o=n(17);function a(e){s.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,n){s.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,s),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},i(l,s.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(n),o=i.redMul(r),a=t.z.redMul(s.redAdd(o).redSqr()),l=t.x.redMul(s.redISub(o).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(17),i=n(29),s=n(0),o=n(69),a=r.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,n,r,s){o.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=s&&new i(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}s(l,o),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),s=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(s.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),s=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(s.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},s(u,o.BasePoint),l.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},l.prototype.point=function(e,t,n,r){return new u(this,e,t,n,r)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=r.redAdd(t),o=s.redSub(n),a=r.redSub(t),l=i.redMul(o),u=s.redMul(a),c=i.redMul(a),h=o.redMul(s);return this.curve.point(l,u,h,c)},u.prototype._projDbl=function(){var e,t,n,r,i,s,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(a)).redAdd(l);this.zOne?(e=o.redSub(a).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(l)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),s=u.redSub(i).redISub(i),e=o.redSub(a).redISub(l).redMul(s),t=u.redMul(r.redSub(l)),n=u.redMul(s))}else r=a.redAdd(l),i=this.curve._mulC(this.z).redSqr(),s=r.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(r)).redMul(s),t=this.curve._mulC(r).redMul(a.redISub(l)),n=r.redMul(s);return this.curve.point(e,t,n)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=n.redSub(t),o=i.redSub(r),a=i.redAdd(r),l=n.redAdd(t),u=s.redMul(o),c=a.redMul(l),h=s.redMul(l),d=o.redMul(a);return this.curve.point(u,c,d,h)},u.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(s).redMul(o),l=i.redSub(a),u=i.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(o),h=r.redMul(l).redMul(c);return this.curve.twisted?(t=r.redMul(u).redMul(o.redSub(this.curve._mulA(s))),n=l.redMul(u)):(t=r.redMul(u).redMul(o.redSub(s)),n=this.curve._mulC(l).redMul(u)),this.curve.point(h,t,n)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},u.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,n){"use strict";t.sha1=n(419),t.sha224=n(420),t.sha256=n(194),t.sha384=n(421),t.sha512=n(195)},function(e,t,n){"use strict";var r=n(24),i=n(60),s=n(193),o=r.rotl32,a=r.sum32,l=r.sum32_5,u=s.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],s=this.h[1],c=this.h[2],d=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=l(o(i,5),u(p,s,c,d),f,n[r],h[p]);f=d,d=c,c=o(s,30),s=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],s),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],f)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(24),i=n(194);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(e,t,n){"use strict";var r=n(24),i=n(195);function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(s,i),e.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(e,t,n){"use strict";var r=n(24),i=n(60),s=r.rotl32,o=r.sum32,a=r.sum32_3,l=r.sum32_4,u=i.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(c,u),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],u=this.h[3],c=this.h[4],v=n,b=r,w=i,_=u,S=c,x=0;x<80;x++){var E=o(s(l(n,h(x,r,i,u),e[p[x]+t],d(x)),g[x]),c);n=c,c=u,u=s(i,10),i=r,r=E,E=o(s(l(v,h(79-x,b,w,_),e[m[x]+t],f(x)),y[x]),S),v=S,S=_,_=s(w,10),w=b,b=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],u,S),this.h[2]=a(this.h[3],c,v),this.h[3]=a(this.h[4],n,b),this.h[4]=a(this.h[0],r,w),this.h[0]=E},c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,n){"use strict";var r=n(24),i=n(16);function s(e,t,n){if(!(this instanceof s))return new s(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=s,s.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},s.prototype.update=function(e,t){return this.inner.update(e,t),this},s.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";var r=n(29),i=n(426),s=n(17),o=n(111),a=n(105),l=s.assert,u=n(427),c=n(428);function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(o,e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new u(this,e)},h.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new r(2));;){var o=new r(t.generate(n));if(!(o.cmp(s)>0))return o.iaddn(1),this.keyFromPrivate(o)}},h.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,n,s){"object"==typeof n&&(s=n,n=null),s||(s={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),l=e.toArray("be",o),u=new i({hash:this.hash,entropy:a,nonce:l,pers:s.pers,persEnc:s.persEnc||"utf8"}),h=this.n.sub(new r(1)),d=0;;d++){var f=s.k?s.k(d):new r(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(h)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=f.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new c({r:g,s:y,recoveryParam:v})}}}}}},h.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var s=(t=new c(t,"hex")).r,o=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,l=o.invm(this.n),u=l.mul(e).umod(this.n),h=l.mul(s).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,n.getPublic(),h)).isInfinity()&&a.eqXToP(s):!(a=this.g.mulAdd(u,n.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(s)},h.prototype.recoverPubKey=function(e,t,n,i){l((3&n)===n,"The recovery param is more than two bits"),t=new c(t,i);var s=this.n,o=new r(e),a=t.r,u=t.s,h=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var f=t.r.invm(s),p=s.sub(o).mul(f).umod(s),m=u.mul(f).umod(s);return this.g.mulAdd(p,a,m)},h.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new c(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";var r=n(112),i=n(191),s=n(16);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),r=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=o,o.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),s(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},o.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var o=s.slice(0,e);return this._update(n),this._reseed++,i.encode(o,t)}},function(e,t,n){"use strict";var r=n(29),i=n(17).assert;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=s,s.fromPublic=function(e,t,n){return t instanceof s?t:new s(e,{pub:t,pubEnc:n})},s.fromPrivate=function(e,t,n){return t instanceof s?t:new s(e,{priv:t,privEnc:n})},s.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},s.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},s.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},s.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},s.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},s.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},s.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(29),i=n(17),s=i.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,s=0,o=t.place;s<r;s++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function u(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var n=new a;if(48!==e[n.place++])return!1;var s=l(e,n);if(!1===s)return!1;if(s+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=l(e,n);if(!1===o)return!1;var u=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var c=l(e,n);if(!1===c)return!1;if(e.length!==c+n.place)return!1;var h=e.slice(n.place,c+n.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new r(u),this.s=new r(h),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=u(t),n=u(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];c(r,t.length),(r=r.concat(t)).push(2),c(r,n.length);var s=r.concat(n),o=[48];return c(o,s.length),o=o.concat(s),i.encode(o,e)}},function(e,t,n){"use strict";var r=n(112),i=n(111),s=n(17),o=s.assert,a=s.parseBytes,l=n(430),u=n(431);function c(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),s=this.encodePoint(i),o=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),l=r.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:s})},c.prototype.verify=function(e,t,n){e=a(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(s)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=s.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=s.intFromLE(n);return this.curve.pointFromY(i,r)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return s.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";var r=n(17),i=r.assert,s=r.parseBytes,o=r.cachedProperty;function a(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},o(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),o(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},a.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=a},function(e,t,n){"use strict";var r=n(29),i=n(17),s=i.assert,o=i.cachedProperty,a=i.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(l,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l},function(e,t,n){"use strict";var r=n(196);t.certificate=n(439);var i=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var s=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=s;var o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=l;var u=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=u;var c=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=c,t.DSAparam=r.define("DSAparam",(function(){this.int()}));var h=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h;var d=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t){},function(e,t,n){"use strict";const r=n(198),i=n(200),s=n(0);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return s(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},o.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},o.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},function(e,t,n){"use strict";const r=n(0),i=n(199);function s(e){i.call(this,e),this.enc="pem"}r(s,i),e.exports=s,s.prototype.encode=function(e,t){const n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},function(e,t,n){"use strict";const r=n(0),i=n(113).Buffer,s=n(201);function o(e){s.call(this,e),this.enc="pem"}r(o,s),e.exports=o,o.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,l=-1;for(let e=0;e<n.length;e++){const t=n[e].match(o);if(null!==t&&t[2]===r){if(-1!==a){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+r);const u=n.slice(a+1,l).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const c=i.from(u,"base64");return s.prototype.decode.call(this,c,t)}},function(e,t,n){"use strict";const r=t;r.Reporter=n(115).Reporter,r.DecoderBuffer=n(61).DecoderBuffer,r.EncoderBuffer=n(61).EncoderBuffer,r.Node=n(114)},function(e,t,n){"use strict";const r=t;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},r.der=n(116)},function(e,t,n){"use strict";var r=n(196),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),s=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(s)})),u=r.define("RDNSequence",(function(){this.seqof(l)})),c=r.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(c),this.key("validity").use(h),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=p},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=n(68),a=n(103),l=n(2).Buffer;e.exports=function(e,t){var n,u=e.toString(),c=u.match(r);if(c){var h="aes"+c[1],d=l.from(c[2],"hex"),f=l.from(c[3].replace(/[\r\n]/g,""),"base64"),p=o(t,d.slice(0,8),parseInt(c[1],10)).key,m=[],g=a.createDecipheriv(h,p,d);m.push(g.update(f)),m.push(g.final()),n=l.concat(m)}else{var y=u.match(s);n=l.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:n}}},function(e,t,n){var r=n(106).Buffer,i=n(109),s=n(110).ec,o=n(70),a=n(202);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,n,u,c){var h=o(n);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new s(r),o=n.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,n){var r=n.data.p,s=n.data.q,a=n.data.g,u=n.data.pub_key,c=o.signature.decode(e,"der"),h=c.s,d=c.r;l(h,s),l(d,s);var f=i.mont(r),p=h.invm(s);return 0===a.toRed(f).redPow(new i(t).mul(p).mod(s)).fromRed().mul(u.toRed(f).redPow(d.mul(p).mod(s)).fromRed()).mod(r).mod(s).cmp(d)}(e,t,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=r.concat([c,t]);for(var d=h.modulus.byteLength(),f=[1],p=0;t.length+f.length+2<d;)f.push(255),p++;f.push(0);for(var m=-1;++m<t.length;)f.push(t[m]);f=r.from(f);var g=i.mont(h.modulus);e=(e=new i(e).toRed(g)).redPow(new i(h.publicExponent)),e=r.from(e.fromRed().toArray());var y=p<8?1:0;for(d=Math.min(e.length,f.length),e.length!==f.length&&(y=1),m=-1;++m<d;)y|=e[m]^f[m];return 0===y}},function(e,t,n){(function(t){var r=n(110),i=n(444);e.exports=function(e){return new o(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function a(e,n,r){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(r&&i.length<r){var s=new t(r-i.length);s.fill(0),i=t.concat([s,i])}return n?i.toString(n):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,o.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},o.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),a(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},o.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),a(n,e)},o.prototype.getPrivateKey=function(e){return a(this.keys.getPrivate(),e)},o.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},o.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new i(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(4).Buffer)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(445).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,r){for(var i=0,s=Math.min(e.length,n),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var h=1;for(l=u(e,c,e.length,t),c=0;c<o;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(o=(i=0|e.words[p])*(s=0|t.words[f])+h)/67108864|0,h=67108863&o}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?m+n:c[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===t,u=new e(s),c=this.clone();if(l){for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[a]=o;for(;a<s;a++)u[a]=0}else{for(a=0;a<s-i;a++)u[a]=0;for(a=0;!c.isZero();a++)o=c.andln(255),c.iushrn(8),u[s-a-1]=o}return u},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,s,o=e.words,a=t.words,l=n.words,u=0,c=0|o[0],h=8191&c,d=c>>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,b=0|o[3],w=8191&b,_=b>>>13,S=0|o[4],x=8191&S,E=S>>>13,A=0|o[5],T=8191&A,M=A>>>13,C=0|o[6],P=8191&C,k=C>>>13,O=0|o[7],I=8191&O,R=O>>>13,N=0|o[8],D=8191&N,F=N>>>13,L=0|o[9],B=8191&L,j=L>>>13,$=0|a[0],U=8191&$,V=$>>>13,W=0|a[1],z=8191&W,K=W>>>13,H=0|a[2],q=8191&H,G=H>>>13,Y=0|a[3],J=8191&Y,X=Y>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(d,U)|0))<<13)|0;u=((s=Math.imul(d,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,s=Math.imul(m,V);var ye=(u+(r=r+Math.imul(h,z)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,z)|0))<<13)|0;u=((s=s+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,s=Math.imul(v,V),r=r+Math.imul(p,z)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,z)|0,s=s+Math.imul(m,K)|0;var ve=(u+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,q)|0))<<13)|0;u=((s=s+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,V))+Math.imul(_,U)|0,s=Math.imul(_,V),r=r+Math.imul(y,z)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,z)|0,s=s+Math.imul(v,K)|0,r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,s=s+Math.imul(m,G)|0;var be=(u+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,J)|0))<<13)|0;u=((s=s+Math.imul(d,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,V))+Math.imul(E,U)|0,s=Math.imul(E,V),r=r+Math.imul(w,z)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,z)|0,s=s+Math.imul(_,K)|0,r=r+Math.imul(y,q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,q)|0,s=s+Math.imul(v,G)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,X)|0;var we=(u+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(M,U)|0,s=Math.imul(M,V),r=r+Math.imul(x,z)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(E,z)|0,s=s+Math.imul(E,K)|0,r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,s=s+Math.imul(_,G)|0,r=r+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(v,J)|0,s=s+Math.imul(v,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(k,U)|0,s=Math.imul(k,V),r=r+Math.imul(T,z)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(M,z)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(x,q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(E,q)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,J)|0,s=s+Math.imul(_,X)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,s=s+Math.imul(v,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,s=s+Math.imul(m,re)|0;var Se=(u+(r=r+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(d,se)|0))<<13)|0;u=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,V))+Math.imul(R,U)|0,s=Math.imul(R,V),r=r+Math.imul(P,z)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(k,z)|0,s=s+Math.imul(k,K)|0,r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,r=r+Math.imul(y,ne)|0,i=(i=i+Math.imul(y,re)|0)+Math.imul(v,ne)|0,s=s+Math.imul(v,re)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var xe=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((s=s+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(F,U)|0,s=Math.imul(F,V),r=r+Math.imul(I,z)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(R,z)|0,s=s+Math.imul(R,K)|0,r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(k,q)|0,s=s+Math.imul(k,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,s=s+Math.imul(_,re)|0,r=r+Math.imul(y,se)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,se)|0,s=s+Math.imul(v,oe)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(j,U)|0,s=Math.imul(j,V),r=r+Math.imul(D,z)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(F,z)|0,s=s+Math.imul(F,K)|0,r=r+Math.imul(I,q)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(R,q)|0,s=s+Math.imul(R,G)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(k,J)|0,s=s+Math.imul(k,X)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(E,ne)|0,s=s+Math.imul(E,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,r=r+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ue)|0)+Math.imul(v,le)|0,s=s+Math.imul(v,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,de)|0;var Ae=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((s=s+Math.imul(d,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,z),i=(i=Math.imul(B,K))+Math.imul(j,z)|0,s=Math.imul(j,K),r=r+Math.imul(D,q)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(F,q)|0,s=s+Math.imul(F,G)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(R,J)|0,s=s+Math.imul(R,X)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(k,Q)|0,s=s+Math.imul(k,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,oe)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,oe)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ue)|0,r=r+Math.imul(y,he)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,he)|0,s=s+Math.imul(v,de)|0;var Te=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(j,q)|0,s=Math.imul(j,G),r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(F,J)|0,s=s+Math.imul(F,X)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(k,ne)|0,s=s+Math.imul(k,re)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(E,le)|0,s=s+Math.imul(E,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,de)|0;var Me=(u+(r=r+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,pe)|0))<<13)|0;u=((s=s+Math.imul(v,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,X))+Math.imul(j,J)|0,s=Math.imul(j,X),r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(F,Q)|0,s=s+Math.imul(F,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(R,ne)|0,s=s+Math.imul(R,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(k,se)|0,s=s+Math.imul(k,oe)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,ue)|0,r=r+Math.imul(x,he)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(E,he)|0,s=s+Math.imul(E,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(j,Q)|0,s=Math.imul(j,ee),r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(F,ne)|0,s=s+Math.imul(F,re)|0,r=r+Math.imul(I,se)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,oe)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(k,le)|0,s=s+Math.imul(k,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(M,he)|0,s=s+Math.imul(M,de)|0;var Pe=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((s=s+Math.imul(E,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(j,ne)|0,s=Math.imul(j,re),r=r+Math.imul(D,se)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(F,se)|0,s=s+Math.imul(F,oe)|0,r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(k,he)|0,s=s+Math.imul(k,de)|0;var ke=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,oe))+Math.imul(j,se)|0,s=Math.imul(j,oe),r=r+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(F,le)|0,s=s+Math.imul(F,ue)|0,r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,de)|0;var Oe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(k,pe)|0))<<13)|0;u=((s=s+Math.imul(k,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(j,le)|0,s=Math.imul(j,ue),r=r+Math.imul(D,he)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(F,he)|0,s=s+Math.imul(F,de)|0;var Ie=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,he),i=(i=Math.imul(B,de))+Math.imul(j,he)|0,s=Math.imul(j,de);var Re=(u+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(F,pe)|0))<<13)|0;u=((s=s+Math.imul(F,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(u+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return u=((s=Math.imul(j,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=be,l[4]=we,l[5]=_e,l[6]=Se,l[7]=xe,l[8]=Ee,l[9]=Ae,l[10]=Te,l[11]=Me,l[12]=Ce,l[13]=Pe,l[14]=ke,l[15]=Oe,l[16]=Ie,l[17]=Re,l[18]=Ne,0!==u&&(l[19]=u,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,l=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},g.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<o;f++){var p=n[c+f],m=r[c+f],g=n[c+f+o],y=r[c+f+o],v=h*g-d*y;y=h*y+d*g,g=v,n[c+f]=p+g,r[c+f]=m+y,n[c+f+o]=p-g,r[c+f+o]=m-y,f!==a&&(v=l*h-u*d,d=l*d+u*h,h=v)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0==(-8192&s))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,u,r),this.transform(o,s,a,l,r,i),this.transform(u,s,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,l=(0|this.words[t])-a<<n;this.words[t]=l|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,l=n;if(i-=o,i=Math.max(0,i),l){for(var u=0;u<o;u++)l.words[u]=this.words[u];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-s|h>>>s,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},s.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(l)):(n.isub(t),a.isub(i),l.isub(o))}return{a:a,b:l,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new x(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(b,v),b.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var s=0|e.words[r];e.words[r-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,v),i(_,v),i(S,v),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=o;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(h,new s(1).iushln(p-g-1));d=d.redMul(y),h=y.redSqr(),f=f.redMul(h),p=g}return d},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===r&&0===c)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}l=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new E(e)},i(E,x),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(14)(e))},function(e,t){},function(e,t,n){t.publicEncrypt=n(447),t.privateDecrypt=n(449),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){var r=n(70),i=n(45),s=n(57),o=n(203),a=n(204),l=n(117),u=n(205),c=n(108),h=n(2).Buffer;e.exports=function(e,t,n){var d;d=e.padding?e.padding:n?1:4;var f,p=r(e);if(4===d)f=function(e,t){var n=e.modulus.byteLength(),r=t.length,u=s("sha1").update(h.alloc(0)).digest(),c=u.length,d=2*c;if(r>n-d-2)throw new Error("message too long");var f=h.alloc(n-r-d-2),p=n-c-1,m=i(c),g=a(h.concat([u,f,h.alloc(1,1),t],p),o(m,p)),y=a(m,o(g,c));return new l(h.concat([h.alloc(1),y,g],n))}(p,t);else if(1===d)f=function(e,t,n){var r,s=t.length,o=e.modulus.byteLength();if(s>o-11)throw new Error("message too long");r=n?h.alloc(o-s-3,255):function(e){var t,n=h.allocUnsafe(e),r=0,s=i(2*e),o=0;for(;r<e;)o===s.length&&(s=i(2*e),o=0),(t=s[o++])&&(n[r++]=t);return n}(o-s-3);return new l(h.concat([h.from([0,n?1:2]),r,h.alloc(1),t],o))}(p,t,n);else{if(3!==d)throw new Error("unknown padding");if((f=new l(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?c(f,p):u(f,p)}},function(e,t){},function(e,t,n){var r=n(70),i=n(203),s=n(204),o=n(117),a=n(108),l=n(57),u=n(205),c=n(2).Buffer;e.exports=function(e,t,n){var h;h=e.padding?e.padding:n?1:4;var d,f=r(e),p=f.modulus.byteLength();if(t.length>p||new o(t).cmp(f.modulus)>=0)throw new Error("decryption error");d=n?u(new o(t),f):a(t,f);var m=c.alloc(p-d.length);if(d=c.concat([m,d],p),4===h)return function(e,t){var n=e.modulus.byteLength(),r=l("sha1").update(c.alloc(0)).digest(),o=r.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,o+1),u=t.slice(o+1),h=s(a,i(u,o)),d=s(u,i(h,n-o-1));if(function(e,t){e=c.from(e),t=c.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var i=-1;for(;++i<r;)n+=e[i]^t[i];return n}(r,d.slice(0,o)))throw new Error("decryption error");var f=o;for(;0===d[f];)f++;if(1!==d[f++])throw new Error("decryption error");return d.slice(f)}(f,d);if(1===h)return function(e,t,n){var r=t.slice(0,2),i=2,s=0;for(;0!==t[i++];)if(i>=t.length){s++;break}var o=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&s++;o.length<8&&s++;if(s)throw new Error("decryption error");return t.slice(i)}(0,d,n);if(3===h)return d;throw new Error("unknown padding")}},function(e,t,n){"use strict";(function(e,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var s=n(2),o=n(45),a=s.Buffer,l=s.kMaxLength,u=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function d(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>l)throw new RangeError("buffer too small")}function f(e,t,n,i){if(r.browser){var s=e.buffer,a=new Uint8Array(s,t,n);return u.getRandomValues(a),i?void r.nextTick((function(){i(null,e)})):e}if(!i)return o(n).copy(e,t),e;o(n,(function(n,r){if(n)return i(n);r.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!r.browser?(t.randomFill=function(t,n,r,i){if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(n,t.length),d(r,n,t.length),f(t,n,r,i)},t.randomFillSync=function(t,n,r){void 0===n&&(n=0);if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(n,t.length),void 0===r&&(r=t.length-n);return d(r,n,t.length),f(t,n,r)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,n(8),n(3))},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkFindOp=void 0;const i=n(9),s=n(7),o=n(5),a=n(13),l=n(40);let u=class extends i.ShellApiWithMongoClass{constructor(e,t){super(),this._serviceProviderBulkFindOp=e,this._parentBulk=t}get _mongo(){return this._parentBulk._mongo}[o.asPrintable](){return"BulkFindOp"}collation(e){return this._serviceProviderBulkFindOp.collation(e),this}arrayFilters(e){return this._serviceProviderBulkFindOp.arrayFilters(e),this}hint(e){return(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.hint"),this._hint=e,this}delete(){return this._parentBulk._batchCounts.nRemoveOps++,this._serviceProviderBulkFindOp.delete(),this._parentBulk}deleteOne(){return this._parentBulk._batchCounts.nRemoveOps++,this._serviceProviderBulkFindOp.deleteOne(),this._parentBulk}remove(){return this.delete()}removeOne(){return this.deleteOne()}replaceOne(e){this._parentBulk._batchCounts.nUpdateOps++,(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.replacement");const t={...e};return this._hint&&(t.hint=this._hint),this._serviceProviderBulkFindOp.replaceOne(t),this._parentBulk}updateOne(e){this._parentBulk._batchCounts.nUpdateOps++,(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.update");const t={...e};return this._hint&&(t.hint=this._hint),this._arrayFilters&&(t.arrayFilters=this._arrayFilters),this._serviceProviderBulkFindOp.updateOne(t),this._parentBulk}update(e){this._parentBulk._batchCounts.nUpdateOps++,(0,a.assertArgsDefinedType)([e],[!0],"BulkFindOp.update");const t={...e};return this._hint&&(t.hint=this._hint),this._arrayFilters&&(t.arrayFilters=this._arrayFilters),this._serviceProviderBulkFindOp.update(t),this._parentBulk}upsert(){return this._serviceProviderBulkFindOp.upsert(),this}};r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],u.prototype,"collation",null),r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],u.prototype,"arrayFilters",null),r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],u.prototype,"hint",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"delete",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"deleteOne",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1]),i.deprecated],u.prototype,"remove",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1]),i.deprecated],u.prototype,"removeOne",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"replaceOne",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],u.prototype,"updateOne",null),r([(0,i.returnType)("Bulk")],u.prototype,"update",null),r([(0,i.returnType)("Bulk")],u.prototype,"upsert",null),u=r([i.shellApiClassDefault],u),t.BulkFindOp=u;let c=class extends i.ShellApiWithMongoClass{constructor(e,t,n=!1){super(),this._collection=e,this._mongo=e._mongo,this._serviceProviderBulkOp=t,this._batchCounts={nInsertOps:0,nUpdateOps:0,nRemoveOps:0},this._executed=!1,this._ordered=n}[o.asPrintable](){return this.toJSON()}_emitBulkApiCall(e,t={}){this._mongo._instanceState.emitApiCallWithArgs({method:e,class:"Bulk",db:this._collection._database._name,coll:this._collection._name,arguments:t})}async execute(e){const{result:t}=await this._serviceProviderBulkOp.execute();return this._executed=!0,this._emitBulkApiCall("execute",{writeConcern:e}),new l.BulkWriteResult(!!t.ok,t.nInserted,t.insertedIds,t.nMatched,t.nModified,t.nRemoved,t.nUpserted,t.upserted)}find(e){return(0,a.assertArgsDefinedType)([e],[!0],"Bulk.find"),new u(this._serviceProviderBulkOp.find(e),this)}insert(e){return this._batchCounts.nInsertOps++,(0,a.assertArgsDefinedType)([e],[!0],"Bulk.insert"),this._serviceProviderBulkOp.insert(e),this}toJSON(){const e=this._serviceProviderBulkOp.batches.length;return{...this._batchCounts,nBatches:e}}toString(){return JSON.stringify(this.toJSON())}getOperations(){if(!this._executed)throw new s.MongoshInvalidInputError("Cannot call getOperations on an unexecuted Bulk operation",s.CommonErrors.InvalidOperation);return this._serviceProviderBulkOp.batches.map(e=>({originalZeroIndex:e.originalZeroIndex,batchType:e.batchType,operations:e.operations}))}};r([i.returnsPromise,(0,i.apiVersions)([1])],c.prototype,"execute",null),r([(0,i.returnType)("BulkFindOp"),(0,i.apiVersions)([1])],c.prototype,"find",null),r([(0,i.returnType)("Bulk"),(0,i.apiVersions)([1])],c.prototype,"insert",null),c=r([i.shellApiClassDefault],c),t.default=c},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),s=n(5),o=n(7);let a=class extends i.ShellApiWithMongoClass{constructor(e){super(),this._collection=e}get _mongo(){return this._collection._mongo}[s.asPrintable](){return`PlanCache for collection ${this._collection._name}.`}async clear(){return await this._collection.runCommand("planCacheClear")}async clearPlansByQuery(e,t,n){const r={query:e};return t&&(r.projection=t),n&&(r.sort=n),await this._collection.runCommand("planCacheClear",r)}async list(e){const t=e||[],n=await this._collection.aggregate([{$planCacheStats:{}},...t]);return await n.toArray()}listQueryShapes(){throw new o.MongoshDeprecatedError("PlanCache.listQueryShapes was deprecated, please use PlanCache.list instead")}getPlansByQuery(){throw new o.MongoshDeprecatedError("PlanCache.getPlansByQuery was deprecated, please use PlanCache.list instead")}};r([i.returnsPromise,(0,i.apiVersions)([])],a.prototype,"clear",null),r([i.returnsPromise,(0,i.apiVersions)([])],a.prototype,"clearPlansByQuery",null),r([(0,i.serverVersions)(["4.4.0",s.ServerVersions.latest]),i.returnsPromise,(0,i.apiVersions)([])],a.prototype,"list",null),r([i.deprecated],a.prototype,"listQueryShapes",null),r([i.deprecated],a.prototype,"getPlansByQuery",null),a=r([i.shellApiClassDefault],a),t.default=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=i(n(209)),o=n(9),a=n(5),l=n(13);let u=class extends o.ShellApiWithMongoClass{constructor(e,t,n){super(),this._mongo=e,this._collection=t,this._verbosity=n}[a.asPrintable](){return`Explainable(${this._collection.getFullName()})`}_emitExplainableApiCall(e,t={}){this._mongo._instanceState.emitApiCallWithArgs({method:e,class:"Explainable",db:this._collection._database._name,coll:this._collection._name,arguments:t})}getCollection(){return this._emitExplainableApiCall("getCollection"),this._collection}getVerbosity(){return this._emitExplainableApiCall("getVerbosity"),this._verbosity}setVerbosity(e){e=(0,l.validateExplainableVerbosity)(e),this._emitExplainableApiCall("setVerbosity",{verbosity:e}),this._verbosity=e}async find(e,t){this._emitExplainableApiCall("find",{query:e,projection:t});const n=await this._collection.find(e,t);return new s.default(this._mongo,n,this._verbosity)}async aggregate(...e){var t;let n,r;return this._emitExplainableApiCall("aggregate",{args:e}),Array.isArray(e[0])?(r=e[0],n=null!==(t=e[1])&&void 0!==t?t:{}):(r=e,n={}),await this._collection.aggregate(r,{...n,explain:this._verbosity})}async count(e={},t={}){return this._emitExplainableApiCall("count",{query:e,options:t}),(0,l.markAsExplainOutput)(await this._collection._database._runCommand({explain:{count:""+this._collection._name,query:e,...t},verbosity:this._verbosity}))}async distinct(e,t,n={}){return this._emitExplainableApiCall("distinct",{field:e,query:t,options:n}),this._collection.distinct(e,null!=t?t:{},{...n,explain:this._verbosity})}async findAndModify(e){return this._emitExplainableApiCall("findAndModify",{options:e}),this._collection.findAndModify({...e,explain:this._verbosity})}async findOneAndDelete(e,t={}){return this._emitExplainableApiCall("findOneAndDelete",{filter:e,options:t}),this._collection.findOneAndDelete(e,{...t,explain:this._verbosity})}async findOneAndReplace(e,t,n={}){return this._emitExplainableApiCall("findOneAndReplace",{filter:e,options:n}),this._collection.findOneAndReplace(e,t,{...n,explain:this._verbosity})}async findOneAndUpdate(e,t,n={}){return this._emitExplainableApiCall("findOneAndUpdate",{filter:e,options:n}),this._collection.findOneAndUpdate(e,t,{...n,explain:this._verbosity})}async remove(e,t={}){return this._emitExplainableApiCall("remove",{query:e,options:t}),t={...(0,l.processRemoveOptions)(t),explain:this._verbosity},this._collection.remove(e,t)}async update(e,t,n={}){return this._emitExplainableApiCall("update",{filter:e,update:t,options:n}),this._collection.update(e,t,{...n,explain:this._verbosity})}async mapReduce(e,t,n){this._emitExplainableApiCall("mapReduce",{map:e,reduce:t,optionsOrOutString:n});const r={...(0,l.processMapReduceOptions)(n),explain:this._verbosity};return this._collection.mapReduce(e,t,r)}};r([(0,o.returnType)("ExplainableCursor"),(0,o.apiVersions)([1]),o.returnsPromise],u.prototype,"find",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"aggregate",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"count",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"distinct",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findAndModify",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findOneAndDelete",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findOneAndReplace",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"findOneAndUpdate",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"remove",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"update",null),r([o.returnsPromise,(0,o.serverVersions)(["4.4.0",a.ServerVersions.latest]),(0,o.apiVersions)([])],u.prototype,"mapReduce",null),u=r([o.shellApiClassDefault],u),t.default=u},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7),s=n(23),o=n(28),a=r(n(455)),l=n(9),u=n(5),c=n(39),h=n(44),d=n(459),f=n(460),p=r(n(461)),m=r(n(462));t.default=class{constructor(e,t=new o.EventEmitter,n={}){if(this.displayBatchSizeFromDBQuery=void 0,this.isInteractive=!1,this.apiCallDepth=0,this.warningsShown=new Set,this.interrupted=new d.InterruptFlag,this.plugins=[new f.TransformMongoErrorPlugin],this.alreadyTransformedErrors=new WeakMap,this.initialServiceProvider=e,this.messageBus=t,this.shellApi=new h.ShellApi(this),this.shellBson=(0,m.default)(e.bsonLibrary,e=>{this.shellApi.print("Warning: "+e)}),this.mongos=[],this.connectionInfo={buildInfo:{}},n.nodb)this.currentDb=new p.default;else{const t=new h.Mongo(this,void 0,void 0,void 0,e);this.mongos.push(t),this.currentDb=t.getDB(e.initialDb||s.DEFAULT_DB)}this.currentCursor=null,this.context={},this.cliOptions=n,this.evaluationListener={}}async fetchConnectionInfo(){if(!this.cliOptions.nodb){this.connectionInfo=await this.currentServiceProvider.getConnectionInfo();const e=this.apiVersionInfo();this.messageBus.emit("mongosh:connect",{...this.connectionInfo.extraInfo,api_version:null==e?void 0:e.version,api_strict:null==e?void 0:e.strict,api_deprecation_errors:null==e?void 0:e.deprecationErrors,uri:(0,a.default)(this.connectionInfo.extraInfo.uri)})}}async close(e){for(const t of[...this.mongos])await t.close(e)}setDbFunc(e){return this.currentDb=e,this.context.rs=new h.ReplicaSet(this.currentDb),this.context.sh=new h.Shard(this.currentDb),this.fetchConnectionInfo().catch(e=>this.messageBus.emit("mongosh:error",e,"shell-api")),this.currentDb._getCollectionNamesForCompletion().catch(e=>this.messageBus.emit("mongosh:error",e,"shell-api")),this.currentDb._mongo._getDatabaseNamesForCompletion().catch(e=>this.messageBus.emit("mongosh:error",e,"shell-api")),this.currentCursor=null,e}setCtx(e){this.context=e,Object.assign(e,this.shellApi);for(const t of Object.getOwnPropertyNames(h.ShellApi.prototype)){const{shellApi:n}=this;l.toIgnore.concat(["help"]).includes(t)||"function"!=typeof n[t]||(e[t]=function(...e){return n[t](...e)},e[t].help=n[t].help)}e.help=this.shellApi.help,Object.assign(e,this.shellBson),void 0===e.console&&(e.console={});for(const t of["log","warn","info","error"])e.console[t]=(...t)=>e.print(...t);e.console.clear=e.cls,e.rs=new h.ReplicaSet(this.currentDb),e.sh=new h.Shard(this.currentDb);const t=e=>{if("Database"!==(0,h.getShellApiType)(e))throw new i.MongoshInvalidInputError("Cannot reassign 'db' to non-Database type",i.CommonErrors.InvalidOperation);return this.setDbFunc(e)};this.initialServiceProvider.platform===s.ReplPlatform.JavaShell?e.db=this.setDbFunc(this.currentDb):Object.defineProperty(e,"db",{configurable:!0,set:t,get:()=>this.currentDb}),this.messageBus.emit("mongosh:setCtx",{method:"setCtx",arguments:{}})}get currentServiceProvider(){try{return this.currentDb._mongo._serviceProvider}catch(e){if((null==e?void 0:e.code)===c.ShellApiErrors.NotConnected)return this.initialServiceProvider;throw e}}emitApiCallWithArgs(e){this.messageBus.emit("mongosh:api-call-with-arguments",e)}emitApiCall(e){this.messageBus.emit("mongosh:api-call",{...e,callDepth:this.apiCallDepth})}setEvaluationListener(e){this.evaluationListener=e}getAutocompleteParameters(){return{topology:()=>{var e;let t;const n=null===(e=this.currentServiceProvider.getTopology())||void 0===e?void 0:e.description;switch(null==n?void 0:n.type){case"ReplicaSetNoPrimary":case"ReplicaSetWithPrimary":t=u.Topologies.ReplSet;break;case"Sharded":t=u.Topologies.Sharded;break;case"LoadBalanced":t=u.Topologies.LoadBalanced;break;default:if(t=u.Topologies.Standalone,1===n.servers.size){const[e]=n.servers.values();switch(e.type){case"Mongos":t=u.Topologies.Sharded;break;case"PossiblePrimary":case"RSPrimary":case"RSSecondary":case"RSArbiter":case"RSOther":case"RSGhost":t=u.Topologies.ReplSet}}}return t},apiVersionInfo:()=>this.apiVersionInfo(),connectionInfo:()=>this.connectionInfo.extraInfo,getCollectionCompletionsForCurrentDb:async e=>{try{return(await this.currentDb._getCollectionNamesForCompletion()).filter(t=>t.toLowerCase().startsWith(e.toLowerCase()))}catch(e){if((null==e?void 0:e.code)===c.ShellApiErrors.NotConnected||"Unauthorized"===(null==e?void 0:e.codeName))return[];throw e}},getDatabaseCompletions:async e=>{try{return(await this.currentDb._mongo._getDatabaseNamesForCompletion()).filter(t=>t.toLowerCase().startsWith(e.toLowerCase()))}catch(e){if((null==e?void 0:e.code)===c.ShellApiErrors.NotConnected||"Unauthorized"===(null==e?void 0:e.codeName))return[];throw e}}}}apiVersionInfo(){var e,t;const{serverApi:n}=null!==(t=null===(e=this.currentServiceProvider.getRawClient())||void 0===e?void 0:e.options)&&void 0!==t?t:{};return(null==n?void 0:n.version)?{strict:!1,deprecationErrors:!1,...n}:void 0}async onInterruptExecution(){return this.interrupted.set(),this.currentCursor=null,this.resumeMongosAfterInterrupt=await Promise.all(this.mongos.map(async e=>{try{return{mongo:e,resume:await e._suspend()}}catch(t){return{mongo:e,resume:null}}})),!this.resumeMongosAfterInterrupt.find(e=>null===e.resume)}async onResumeExecution(){var e,t;const n=null!==(t=null===(e=this.resumeMongosAfterInterrupt)||void 0===e?void 0:e.map(async e=>{if(!this.mongos.find(t=>t===e.mongo))return!0;if(null===e.resume)return!1;try{return await e.resume(),!0}catch(e){return!1}}))&&void 0!==t?t:[];this.resumeMongosAfterInterrupt=void 0;const r=await Promise.all(n);return this.interrupted.reset(),!r.find(e=>!1===e)}async getDefaultPrompt(){const e=this.getDefaultPromptPrefix(),t=this.getTopologySpecificPrompt();let n="";try{n=this.currentDb.getName()}catch(e){}return[e,t,n].filter(Boolean).join(" ")+"> "}getDefaultPromptPrefix(){var e,t,n,r;const i=null===(e=this.connectionInfo)||void 0===e?void 0:e.extraInfo;return(null==i?void 0:i.is_data_federation)?"AtlasDataFederation":(null==i?void 0:i.is_atlas)?"Atlas":(null==i?void 0:i.is_enterprise)||(null===(r=null===(n=null===(t=this.connectionInfo)||void 0===t?void 0:t.buildInfo)||void 0===n?void 0:n.modules)||void 0===r?void 0:r.indexOf("enterprise"))>=0?"Enterprise":""}getTopologySpecificPrompt(){var e,t,n,r;const i=null===(e=this.currentServiceProvider.getTopology())||void 0===e?void 0:e.description;if(!i)return"";let s=i.setName,o="";switch(i.type){case"Single":const e=this.getTopologySinglePrompt(i);s=null!==(t=null==e?void 0:e.replicaSet)&&void 0!==t?t:s,o=(null==e?void 0:e.serverType)?`[direct: ${e.serverType}]`:"";break;case"ReplicaSetNoPrimary":o="[secondary]";break;case"ReplicaSetWithPrimary":o="[primary]";break;case"Sharded":o=(null===(r=null===(n=this.connectionInfo)||void 0===n?void 0:n.extraInfo)||void 0===r?void 0:r.atlas_version)?"":"[mongos]";break;case"LoadBalanced":default:return""}return`${s?s+" ":""}${o}`}getTopologySinglePrompt(e){var t;if(1!==(null===(t=e.servers)||void 0===t?void 0:t.size))return;const[n]=e.servers.values();let r;switch(n.type){case"Mongos":r="mongos";break;case"RSPrimary":r="primary";break;case"RSSecondary":r="secondary";break;case"RSArbiter":r="arbiter";break;case"RSOther":r="other";break;default:r=""}return{replicaSet:n.setName,serverType:r}}registerPlugin(e){this.plugins.push(e)}transformError(e){if("[object Error]"===Object.prototype.toString.call(e)){if(this.alreadyTransformedErrors.has(e))return this.alreadyTransformedErrors.get(e);const t=e;for(const t of this.plugins)t.transformError&&(e=t.transformError(e));this.alreadyTransformedErrors.set(t,e)}return e}async printDeprecationWarning(e){this.warningsShown.has(e)||(this.warningsShown.add(e),this.context.print?await this.context.print.call(this.shellApi,"DeprecationWarning: "+e):await this.shellApi.print("DeprecationWarning: "+e))}async printWarning(e){this.warningsShown.has(e)||(this.warningsShown.add(e),this.context.print?await this.context.print.call(this.shellApi,"Warning: "+e):await this.shellApi.print("Warning: "+e))}}},function(e,t,n){e.exports=n(456)},function(e,t,n){var r=n(457),i=n(458);e.exports=function e(t){return r.isPlainObject(t)?r.mapValues(t,e):r.isArray(t)?r.map(t,e):r.isString(t)?(r.each(i,(function(e){var n=e[0],r=e[1];t=t.replace(n,r)})),t):t}},function(e,t,n){(function(e,r){var i;
63
63
  /**
64
64
  * @license
65
65
  * Lodash <https://lodash.com/>
@@ -67,7 +67,7 @@ var r=n(4),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n)
67
67
  * Released under MIT license <https://lodash.com/license>
68
68
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
69
69
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
70
- */(function(){var s="Expected a function",o="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",h="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Object]",v="[object RegExp]",b="[object Set]",w="[object String]",_="[object Symbol]",S="[object WeakMap]",x="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",T="[object Float64Array]",M="[object Int8Array]",C="[object Int16Array]",P="[object Int32Array]",k="[object Uint8Array]",O="[object Uint16Array]",I="[object Uint32Array]",R=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,L=/[&<>"']/g,B=RegExp(F.source),j=RegExp(L.source),$=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,V=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,q=RegExp(H.source),G=/^\s+/,Y=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,se=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,he=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",me="["+fe+"]",ge="["+de+"]",ye="\\d+",ve="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+fe+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",Se="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Te="(?:"+be+"|"+we+")",Me="(?:"+Ae+"|"+we+")",Ce="(?:"+ge+"|"+_e+")"+"?",Pe="[\\ufe0e\\ufe0f]?"+Ce+("(?:\\u200d(?:"+[Se,xe,Ee].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*"),ke="(?:"+[ve,xe,Ee].join("|")+")"+Pe,Oe="(?:"+[Se+ge+"?",ge,xe,Ee,pe].join("|")+")",Ie=RegExp("['’]","g"),Re=RegExp(ge,"g"),Ne=RegExp(_e+"(?="+_e+")|"+Oe+Pe,"g"),De=RegExp([Ae+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[me,Ae,"$"].join("|")+")",Me+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[me,Ae+Te,"$"].join("|")+")",Ae+"?"+Te+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,ke].join("|"),"g"),Fe=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Be=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],je=-1,$e={};$e[A]=$e[T]=$e[M]=$e[C]=$e[P]=$e[k]=$e["[object Uint8ClampedArray]"]=$e[O]=$e[I]=!0,$e[l]=$e[u]=$e[x]=$e[c]=$e[E]=$e[h]=$e[d]=$e[f]=$e[m]=$e[g]=$e[y]=$e[v]=$e[b]=$e[w]=$e[S]=!1;var Ue={};Ue[l]=Ue[u]=Ue[x]=Ue[E]=Ue[c]=Ue[h]=Ue[A]=Ue[T]=Ue[M]=Ue[C]=Ue[P]=Ue[m]=Ue[g]=Ue[y]=Ue[v]=Ue[b]=Ue[w]=Ue[_]=Ue[k]=Ue["[object Uint8ClampedArray]"]=Ue[O]=Ue[I]=!0,Ue[d]=Ue[f]=Ue[S]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,ze=parseInt,Ke="object"==typeof e&&e&&e.Object===Object&&e,He="object"==typeof self&&self&&self.Object===Object&&self,qe=Ke||He||Function("return this")(),Ge=t&&!t.nodeType&&t,Ye=Ge&&"object"==typeof r&&r&&!r.nodeType&&r,Je=Ye&&Ye.exports===Ge,Xe=Je&&Ke.process,Ze=function(){try{var e=Ye&&Ye.require&&Ye.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Qe=Ze&&Ze.isArrayBuffer,et=Ze&&Ze.isDate,tt=Ze&&Ze.isMap,nt=Ze&&Ze.isRegExp,rt=Ze&&Ze.isSet,it=Ze&&Ze.isTypedArray;function st(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(r,o,n(o),e)}return r}function at(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function ht(e,t){return!!(null==e?0:e.length)&&_t(e,t,0)>-1}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function mt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function gt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function yt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var vt=At("length");function bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function wt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function _t(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):wt(e,xt,n)}function St(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function xt(e){return e!=e}function Et(e,t){var n=null==e?0:e.length;return n?Ct(e,t)/n:NaN}function At(e){return function(t){return null==t?void 0:t[e]}}function Tt(e){return function(t){return null==e?void 0:e[t]}}function Mt(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Ct(e,t){for(var n,r=-1,i=e.length;++r<i;){var s=t(e[r]);void 0!==s&&(n=void 0===n?s:n+s)}return n}function Pt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function kt(e){return e?e.slice(0,Gt(e)+1).replace(G,""):e}function Ot(e){return function(t){return e(t)}}function It(e,t){return ft(t,(function(t){return e[t]}))}function Rt(e,t){return e.has(t)}function Nt(e,t){for(var n=-1,r=e.length;++n<r&&_t(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Ft(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Lt=Tt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Bt=Tt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function jt(e){return"\\"+Ve[e]}function $t(e){return Fe.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Vt(e,t){return function(n){return e(t(n))}}function Wt(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var a=e[n];a!==t&&a!==o||(e[n]=o,s[i++]=n)}return s}function zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Kt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Ht(e){return $t(e)?function(e){var t=Ne.lastIndex=0;for(;Ne.test(e);)++t;return t}(e):vt(e)}function qt(e){return $t(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.split("")}(e)}function Gt(e){for(var t=e.length;t--&&Y.test(e.charAt(t)););return t}var Yt=Tt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Jt=function e(t){var n,r=(t=null==t?qe:Jt.defaults(qe.Object(),t,Jt.pick(qe,Be))).Array,i=t.Date,Y=t.Error,de=t.Function,fe=t.Math,pe=t.Object,me=t.RegExp,ge=t.String,ye=t.TypeError,ve=r.prototype,be=de.prototype,we=pe.prototype,_e=t["__core-js_shared__"],Se=be.toString,xe=we.hasOwnProperty,Ee=0,Ae=(n=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Te=we.toString,Me=Se.call(pe),Ce=qe._,Pe=me("^"+Se.call(xe).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ke=Je?t.Buffer:void 0,Oe=t.Symbol,Ne=t.Uint8Array,Fe=ke?ke.allocUnsafe:void 0,Ve=Vt(pe.getPrototypeOf,pe),Ke=pe.create,He=we.propertyIsEnumerable,Ge=ve.splice,Ye=Oe?Oe.isConcatSpreadable:void 0,Xe=Oe?Oe.iterator:void 0,Ze=Oe?Oe.toStringTag:void 0,vt=function(){try{var e=es(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Tt=t.clearTimeout!==qe.clearTimeout&&t.clearTimeout,Xt=i&&i.now!==qe.Date.now&&i.now,Zt=t.setTimeout!==qe.setTimeout&&t.setTimeout,Qt=fe.ceil,en=fe.floor,tn=pe.getOwnPropertySymbols,nn=ke?ke.isBuffer:void 0,rn=t.isFinite,sn=ve.join,on=Vt(pe.keys,pe),an=fe.max,ln=fe.min,un=i.now,cn=t.parseInt,hn=fe.random,dn=ve.reverse,fn=es(t,"DataView"),pn=es(t,"Map"),mn=es(t,"Promise"),gn=es(t,"Set"),yn=es(t,"WeakMap"),vn=es(pe,"create"),bn=yn&&new yn,wn={},_n=Ms(fn),Sn=Ms(pn),xn=Ms(mn),En=Ms(gn),An=Ms(yn),Tn=Oe?Oe.prototype:void 0,Mn=Tn?Tn.valueOf:void 0,Cn=Tn?Tn.toString:void 0;function Pn(e){if(Ko(e)&&!No(e)&&!(e instanceof Rn)){if(e instanceof In)return e;if(xe.call(e,"__wrapped__"))return Cs(e)}return new In(e)}var kn=function(){function e(){}return function(t){if(!zo(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function On(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fn;++t<n;)this.add(e[t])}function Bn(e){var t=this.__data__=new Dn(e);this.size=t.size}function jn(e,t){var n=No(e),r=!n&&Ro(e),i=!n&&!r&&Bo(e),s=!n&&!r&&!i&&Qo(e),o=n||r||i||s,a=o?Pt(e.length,ge):[],l=a.length;for(var u in e)!t&&!xe.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||as(u,l))||a.push(u);return a}function $n(e){var t=e.length;return t?e[Lr(0,t-1)]:void 0}function Un(e,t){return Es(vi(e),Jn(t,0,e.length))}function Vn(e){return Es(vi(e))}function Wn(e,t,n){(void 0!==n&&!ko(e[t],n)||void 0===n&&!(t in e))&&Gn(e,t,n)}function zn(e,t,n){var r=e[t];xe.call(e,t)&&ko(r,n)&&(void 0!==n||t in e)||Gn(e,t,n)}function Kn(e,t){for(var n=e.length;n--;)if(ko(e[n][0],t))return n;return-1}function Hn(e,t,n,r){return tr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function qn(e,t){return e&&bi(t,_a(t),e)}function Gn(e,t,n){"__proto__"==t&&vt?vt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Yn(e,t){for(var n=-1,i=t.length,s=r(i),o=null==e;++n<i;)s[n]=o?void 0:ga(e,t[n]);return s}function Jn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,r,i,s){var o,a=1&t,u=2&t,d=4&t;if(n&&(o=i?n(e,r,i,s):n(e)),void 0!==o)return o;if(!zo(e))return e;var S=No(e);if(S){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&xe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!a)return vi(e,o)}else{var R=rs(e),N=R==f||R==p;if(Bo(e))return di(e,a);if(R==y||R==l||N&&!i){if(o=u||N?{}:ss(e),!a)return u?function(e,t){return bi(e,ns(e),t)}(e,function(e,t){return e&&bi(t,Sa(t),e)}(o,e)):function(e,t){return bi(e,ts(e),t)}(e,qn(o,e))}else{if(!Ue[R])return i?e:{};o=function(e,t,n){var r=e.constructor;switch(t){case x:return fi(e);case c:case h:return new r(+e);case E:return function(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case T:case M:case C:case P:case k:case"[object Uint8ClampedArray]":case O:case I:return pi(e,n);case m:return new r;case g:case w:return new r(e);case v:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case _:return i=e,Mn?pe(Mn.call(i)):{}}var i}(e,R,a)}}s||(s=new Bn);var D=s.get(e);if(D)return D;s.set(e,o),Jo(e)?e.forEach((function(r){o.add(Xn(r,t,n,r,e,s))})):Ho(e)&&e.forEach((function(r,i){o.set(i,Xn(r,t,n,i,e,s))}));var F=S?void 0:(d?u?qi:Hi:u?Sa:_a)(e);return at(F||e,(function(r,i){F&&(r=e[i=r]),zn(o,i,Xn(r,t,n,i,e,s))})),o}function Zn(e,t,n){var r=n.length;if(null==e)return!r;for(e=pe(e);r--;){var i=n[r],s=t[i],o=e[i];if(void 0===o&&!(i in e)||!s(o))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new ye(s);return ws((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var i=-1,s=ht,o=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=ft(t,Ot(n))),r?(s=dt,o=!1):t.length>=200&&(s=Rt,o=!1,t=new Ln(t));e:for(;++i<a;){var c=e[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,o&&h==h){for(var d=u;d--;)if(t[d]===h)continue e;l.push(c)}else s(t,h,r)||l.push(c)}return l}Pn.templateSettings={escape:$,evaluate:U,interpolate:V,variable:"",imports:{_:Pn}},Pn.prototype=On.prototype,Pn.prototype.constructor=Pn,In.prototype=kn(On.prototype),In.prototype.constructor=In,Rn.prototype=kn(On.prototype),Rn.prototype.constructor=Rn,Nn.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},Nn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nn.prototype.get=function(e){var t=this.__data__;if(vn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return xe.call(t,e)?t[e]:void 0},Nn.prototype.has=function(e){var t=this.__data__;return vn?void 0!==t[e]:xe.call(t,e)},Nn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=vn&&void 0===t?"__lodash_hash_undefined__":t,this},Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(e){var t=this.__data__,n=Kn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,!0)},Dn.prototype.get=function(e){var t=this.__data__,n=Kn(t,e);return n<0?void 0:t[n][1]},Dn.prototype.has=function(e){return Kn(this.__data__,e)>-1},Dn.prototype.set=function(e,t){var n=this.__data__,r=Kn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(pn||Dn),string:new Nn}},Fn.prototype.delete=function(e){var t=Zi(this,e).delete(e);return this.size-=t?1:0,t},Fn.prototype.get=function(e){return Zi(this,e).get(e)},Fn.prototype.has=function(e){return Zi(this,e).has(e)},Fn.prototype.set=function(e,t){var n=Zi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},Bn.prototype.clear=function(){this.__data__=new Dn,this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Bn.prototype.get=function(e){return this.__data__.get(e)},Bn.prototype.has=function(e){return this.__data__.has(e)},Bn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Dn){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(e,t),this.size=n.size,this};var tr=Si(ur),nr=Si(cr,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function ir(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],o=t(s);if(null!=o&&(void 0===a?o==o&&!Zo(o):n(o,a)))var a=o,l=s}return l}function sr(e,t){var n=[];return tr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function or(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=os),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?or(a,t-1,n,r,i):pt(i,a):r||(i[i.length]=a)}return i}var ar=xi(),lr=xi(!0);function ur(e,t){return e&&ar(e,t,_a)}function cr(e,t){return e&&lr(e,t,_a)}function hr(e,t){return ct(t,(function(t){return Uo(e[t])}))}function dr(e,t){for(var n=0,r=(t=li(t,e)).length;null!=e&&n<r;)e=e[Ts(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return No(e)?r:pt(r,n(e))}function pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ze&&Ze in pe(e)?function(e){var t=xe.call(e,Ze),n=e[Ze];try{e[Ze]=void 0;var r=!0}catch(e){}var i=Te.call(e);r&&(t?e[Ze]=n:delete e[Ze]);return i}(e):function(e){return Te.call(e)}(e)}function mr(e,t){return e>t}function gr(e,t){return null!=e&&xe.call(e,t)}function yr(e,t){return null!=e&&t in pe(e)}function vr(e,t,n){for(var i=n?dt:ht,s=e[0].length,o=e.length,a=o,l=r(o),u=1/0,c=[];a--;){var h=e[a];a&&t&&(h=ft(h,Ot(t))),u=ln(h.length,u),l[a]=!n&&(t||s>=120&&h.length>=120)?new Ln(a&&h):void 0}h=e[0];var d=-1,f=l[0];e:for(;++d<s&&c.length<u;){var p=h[d],m=t?t(p):p;if(p=n||0!==p?p:0,!(f?Rt(f,m):i(c,m,n))){for(a=o;--a;){var g=l[a];if(!(g?Rt(g,m):i(e[a],m,n)))continue e}f&&f.push(m),c.push(p)}}return c}function br(e,t,n){var r=null==(e=gs(e,t=li(t,e)))?e:e[Ts(js(t))];return null==r?void 0:st(r,e,n)}function wr(e){return Ko(e)&&pr(e)==l}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Ko(e)&&!Ko(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var o=No(e),a=No(t),f=o?u:rs(e),p=a?u:rs(t),S=(f=f==l?y:f)==y,A=(p=p==l?y:p)==y,T=f==p;if(T&&Bo(e)){if(!Bo(t))return!1;o=!0,S=!1}if(T&&!S)return s||(s=new Bn),o||Qo(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,s,o){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!s(new Ne(e),new Ne(t)));case c:case h:case g:return ko(+e,+t);case d:return e.name==t.name&&e.message==t.message;case v:case w:return e==t+"";case m:var a=Ut;case b:var l=1&r;if(a||(a=zt),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=2,o.set(e,t);var f=zi(a(e),a(t),r,i,s,o);return o.delete(e),f;case _:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,f,n,r,i,s);if(!(1&n)){var M=S&&xe.call(e,"__wrapped__"),C=A&&xe.call(t,"__wrapped__");if(M||C){var P=M?e.value():e,k=C?t.value():t;return s||(s=new Bn),i(P,k,n,r,s)}}if(!T)return!1;return s||(s=new Bn),function(e,t,n,r,i,s){var o=1&n,a=Hi(e),l=a.length,u=Hi(t).length;if(l!=u&&!o)return!1;var c=l;for(;c--;){var h=a[c];if(!(o?h in t:xe.call(t,h)))return!1}var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==e;var p=!0;s.set(e,t),s.set(t,e);var m=o;for(;++c<l;){h=a[c];var g=e[h],y=t[h];if(r)var v=o?r(y,g,h,t,e,s):r(g,y,h,e,t,s);if(!(void 0===v?g===y||i(g,y,n,r,s):v)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,i,s)}(e,t,n,r,_r,i))}function Sr(e,t,n,r){var i=n.length,s=i,o=!r;if(null==e)return!s;for(e=pe(e);i--;){var a=n[i];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){var l=(a=n[i])[0],u=e[l],c=a[1];if(o&&a[2]){if(void 0===u&&!(l in e))return!1}else{var h=new Bn;if(r)var d=r(u,c,l,e,t,h);if(!(void 0===d?_r(c,u,3,r,h):d))return!1}}return!0}function xr(e){return!(!zo(e)||(t=e,Ae&&Ae in t))&&(Uo(e)?Pe:oe).test(Ms(e));var t}function Er(e){return"function"==typeof e?e:null==e?qa:"object"==typeof e?No(e)?kr(e[0],e[1]):Pr(e):nl(e)}function Ar(e){if(!ds(e))return on(e);var t=[];for(var n in pe(e))xe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Tr(e){if(!zo(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=ds(e),n=[];for(var r in e)("constructor"!=r||!t&&xe.call(e,r))&&n.push(r);return n}function Mr(e,t){return e<t}function Cr(e,t){var n=-1,i=Fo(e)?r(e.length):[];return tr(e,(function(e,r,s){i[++n]=t(e,r,s)})),i}function Pr(e){var t=Qi(e);return 1==t.length&&t[0][2]?ps(t[0][0],t[0][1]):function(n){return n===e||Sr(n,e,t)}}function kr(e,t){return us(e)&&fs(t)?ps(Ts(e),t):function(n){var r=ga(n,e);return void 0===r&&r===t?ya(n,e):_r(t,r,3)}}function Or(e,t,n,r,i){e!==t&&ar(t,(function(s,o){if(i||(i=new Bn),zo(s))!function(e,t,n,r,i,s,o){var a=vs(e,n),l=vs(t,n),u=o.get(l);if(u)return void Wn(e,n,u);var c=s?s(a,l,n+"",e,t,o):void 0,h=void 0===c;if(h){var d=No(l),f=!d&&Bo(l),p=!d&&!f&&Qo(l);c=l,d||f||p?No(a)?c=a:Lo(a)?c=vi(a):f?(h=!1,c=di(l,!0)):p?(h=!1,c=pi(l,!0)):c=[]:Go(l)||Ro(l)?(c=a,Ro(a)?c=aa(a):zo(a)&&!Uo(a)||(c=ss(l))):h=!1}h&&(o.set(l,c),i(c,l,r,s,o),o.delete(l));Wn(e,n,c)}(e,t,o,n,Or,r,i);else{var a=r?r(vs(e,o),s,o+"",e,t,i):void 0;void 0===a&&(a=s),Wn(e,o,a)}}),Sa)}function Ir(e,t){var n=e.length;if(n)return as(t+=t<0?n:0,n)?e[t]:void 0}function Rr(e,t,n){t=t.length?ft(t,(function(e){return No(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e})):[qa];var r=-1;return t=ft(t,Ot(Xi())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Cr(e,(function(e,n,i){return{criteria:ft(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;for(;++r<o;){var l=mi(i[r],s[r]);if(l){if(r>=a)return l;var u=n[r];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=dr(e,o);n(a,o)&&Vr(s,li(o,e),a)}return s}function Dr(e,t,n,r){var i=r?St:_t,s=-1,o=t.length,a=e;for(e===t&&(t=vi(t)),n&&(a=ft(e,Ot(n)));++s<o;)for(var l=0,u=t[s],c=n?n(u):u;(l=i(a,c,l,r))>-1;)a!==e&&Ge.call(a,l,1),Ge.call(e,l,1);return e}function Fr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;as(i)?Ge.call(e,i,1):ei(e,i)}}return e}function Lr(e,t){return e+en(hn()*(t-e+1))}function Br(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function jr(e,t){return _s(ms(e,t,qa),e+"")}function $r(e){return $n(ka(e))}function Ur(e,t){var n=ka(e);return Es(n,Jn(t,0,n.length))}function Vr(e,t,n,r){if(!zo(e))return e;for(var i=-1,s=(t=li(t,e)).length,o=s-1,a=e;null!=a&&++i<s;){var l=Ts(t[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=o){var c=a[l];void 0===(u=r?r(c,l,a):void 0)&&(u=zo(c)?c:as(t[i+1])?[]:{})}zn(a,l,u),a=a[l]}return e}var Wr=bn?function(e,t){return bn.set(e,t),e}:qa,zr=vt?function(e,t){return vt(e,"toString",{configurable:!0,enumerable:!1,value:za(t),writable:!0})}:qa;function Kr(e){return Es(ka(e))}function Hr(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=r(s);++i<s;)o[i]=e[i+t];return o}function qr(e,t){var n;return tr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Gr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=e[s];null!==o&&!Zo(o)&&(n?o<=t:o<t)?r=s+1:i=s}return i}return Yr(e,t,qa,n)}function Yr(e,t,n,r){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=n(t))!=t,a=null===t,l=Zo(t),u=void 0===t;i<s;){var c=en((i+s)/2),h=n(e[c]),d=void 0!==h,f=null===h,p=h==h,m=Zo(h);if(o)var g=r||p;else g=u?p&&(r||d):a?p&&d&&(r||!f):l?p&&d&&!f&&(r||!m):!f&&!m&&(r?h<=t:h<t);g?i=c+1:s=c}return ln(s,4294967294)}function Jr(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!ko(a,l)){var l=a;s[i++]=0===o?0:o}}return s}function Xr(e){return"number"==typeof e?e:Zo(e)?NaN:+e}function Zr(e){if("string"==typeof e)return e;if(No(e))return ft(e,Zr)+"";if(Zo(e))return Cn?Cn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Qr(e,t,n){var r=-1,i=ht,s=e.length,o=!0,a=[],l=a;if(n)o=!1,i=dt;else if(s>=200){var u=t?null:Bi(e);if(u)return zt(u);o=!1,i=Rt,l=new Ln}else l=t?[]:a;e:for(;++r<s;){var c=e[r],h=t?t(c):c;if(c=n||0!==c?c:0,o&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),a.push(c)}else i(l,h,n)||(l!==a&&l.push(h),a.push(c))}return a}function ei(e,t){return null==(e=gs(e,t=li(t,e)))||delete e[Ts(js(t))]}function ti(e,t,n,r){return Vr(e,t,n(dr(e,t)),r)}function ni(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?Hr(e,r?0:s,r?s+1:i):Hr(e,r?s+1:0,r?i:s)}function ri(e,t){var n=e;return n instanceof Rn&&(n=n.value()),mt(t,(function(e,t){return t.func.apply(t.thisArg,pt([e],t.args))}),n)}function ii(e,t,n){var i=e.length;if(i<2)return i?Qr(e[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=e[s],l=-1;++l<i;)l!=s&&(o[s]=er(o[s]||a,e[l],t,n));return Qr(or(o,1),t,n)}function si(e,t,n){for(var r=-1,i=e.length,s=t.length,o={};++r<i;){var a=r<s?t[r]:void 0;n(o,e[r],a)}return o}function oi(e){return Lo(e)?e:[]}function ai(e){return"function"==typeof e?e:qa}function li(e,t){return No(e)?e:us(e,t)?[e]:As(la(e))}var ui=jr;function ci(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var hi=Tt||function(e){return qe.clearTimeout(e)};function di(e,t){if(t)return e.slice();var n=e.length,r=Fe?Fe(n):new e.constructor(n);return e.copy(r),r}function fi(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function pi(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,s=Zo(e),o=void 0!==t,a=null===t,l=t==t,u=Zo(t);if(!a&&!u&&!s&&e>t||s&&o&&l&&!a&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!s&&!u&&e<t||u&&n&&i&&!r&&!s||a&&n&&i||!o&&i||!l)return-1}return 0}function gi(e,t,n,i){for(var s=-1,o=e.length,a=n.length,l=-1,u=t.length,c=an(o-a,0),h=r(u+c),d=!i;++l<u;)h[l]=t[l];for(;++s<a;)(d||s<o)&&(h[n[s]]=e[s]);for(;c--;)h[l++]=e[s++];return h}function yi(e,t,n,i){for(var s=-1,o=e.length,a=-1,l=n.length,u=-1,c=t.length,h=an(o-l,0),d=r(h+c),f=!i;++s<h;)d[s]=e[s];for(var p=s;++u<c;)d[p+u]=t[u];for(;++a<l;)(f||s<o)&&(d[p+n[a]]=e[s++]);return d}function vi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function bi(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Gn(n,a,l):zn(n,a,l)}return n}function wi(e,t){return function(n,r){var i=No(n)?ot:Hn,s=t?t():{};return i(n,e,Xi(r,2),s)}}function _i(e){return jr((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,o&&ls(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=pe(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t}))}function Si(e,t){return function(n,r){if(null==n)return n;if(!Fo(n))return e(n,r);for(var i=n.length,s=t?i:-1,o=pe(n);(t?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function xi(e){return function(t,n,r){for(var i=-1,s=pe(t),o=r(t),a=o.length;a--;){var l=o[e?a:++i];if(!1===n(s[l],l,s))break}return t}}function Ei(e){return function(t){var n=$t(t=la(t))?qt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ci(n,1).join(""):t.slice(1);return r[e]()+i}}function Ai(e){return function(t){return mt(Ua(Ra(t).replace(Ie,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=kn(e.prototype),r=e.apply(n,t);return zo(r)?r:n}}function Mi(e){return function(t,n,r){var i=pe(t);if(!Fo(t)){var s=Xi(n,3);t=_a(t),n=function(e){return s(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[s?t[o]:o]:void 0}}function Ci(e){return Ki((function(t){var n=t.length,r=n,i=In.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ye(s);if(i&&!a&&"wrapper"==Yi(o))var a=new In([],!0)}for(r=a?r:n;++r<n;){var l=Yi(o=t[r]),u="wrapper"==l?Gi(o):void 0;a=u&&cs(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?a[Yi(u[0])].apply(a,u[3]):1==o.length&&cs(o)?a[l]():a.thru(o)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&No(r))return a.plant(r).value();for(var i=0,s=n?t[i].apply(this,e):r;++i<n;)s=t[i].call(this,s);return s}}))}function Pi(e,t,n,i,s,o,a,l,u,c){var h=128&t,d=1&t,f=2&t,p=24&t,m=512&t,g=f?void 0:Ti(e);return function y(){for(var v=arguments.length,b=r(v),w=v;w--;)b[w]=arguments[w];if(p)var _=Ji(y),S=Ft(b,_);if(i&&(b=gi(b,i,s,p)),o&&(b=yi(b,o,a,p)),v-=S,p&&v<c){var x=Wt(b,_);return Fi(e,t,Pi,y.placeholder,n,b,x,l,u,c-v)}var E=d?n:this,A=f?E[e]:e;return v=b.length,l?b=ys(b,l):m&&v>1&&b.reverse(),h&&u<v&&(b.length=u),this&&this!==qe&&this instanceof y&&(A=g||Ti(A)),A.apply(E,b)}}function ki(e,t){return function(n,r){return function(e,t,n,r){return ur(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Oi(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Zr(n),r=Zr(r)):(n=Xr(n),r=Xr(r)),i=e(n,r)}return i}}function Ii(e){return Ki((function(t){return t=ft(t,Ot(Xi())),jr((function(n){var r=this;return e(t,(function(e){return st(e,r,n)}))}))}))}function Ri(e,t){var n=(t=void 0===t?" ":Zr(t)).length;if(n<2)return n?Br(t,e):t;var r=Br(t,Qt(e/Ht(t)));return $t(t)?ci(qt(r),0,e).join(""):r.slice(0,e)}function Ni(e){return function(t,n,i){return i&&"number"!=typeof i&&ls(t,n,i)&&(n=i=void 0),t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n,i){for(var s=-1,o=an(Qt((t-e)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=e,e+=n;return a}(t,n,i=void 0===i?t<n?1:-1:ra(i),e)}}function Di(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=oa(t),n=oa(n)),e(t,n)}}function Fi(e,t,n,r,i,s,o,a,l,u){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var h=[e,t,i,c?s:void 0,c?o:void 0,c?void 0:s,c?void 0:o,a,l,u],d=n.apply(void 0,h);return cs(e)&&bs(d,h),d.placeholder=r,Ss(d,e,t)}function Li(e){var t=fe[e];return function(e,n){if(e=oa(e),(n=null==n?0:ln(ia(n),292))&&rn(e)){var r=(la(e)+"e").split("e");return+((r=(la(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Bi=gn&&1/zt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Za;function ji(e){return function(t){var n=rs(t);return n==m?Ut(t):n==b?Kt(t):function(e,t){return ft(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function $i(e,t,n,i,a,l,u,c){var h=2&t;if(!h&&"function"!=typeof e)throw new ye(s);var d=i?i.length:0;if(d||(t&=-97,i=a=void 0),u=void 0===u?u:an(ia(u),0),c=void 0===c?c:ia(c),d-=a?a.length:0,64&t){var f=i,p=a;i=a=void 0}var m=h?void 0:Gi(e),g=[e,t,n,i,a,f,p,l,u,c];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,s=i<131,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?gi(u,l,t[4]):l,e[4]=u?Wt(e[3],o):t[4]}(l=t[5])&&(u=e[5],e[5]=u?yi(u,l,t[6]):l,e[6]=u?Wt(e[5],o):t[6]);(l=t[7])&&(e[7]=l);128&r&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(g,m),e=g[0],t=g[1],n=g[2],i=g[3],a=g[4],!(c=g[9]=void 0===g[9]?h?0:e.length:an(g[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||16==t?function(e,t,n){var i=Ti(e);return function s(){for(var o=arguments.length,a=r(o),l=o,u=Ji(s);l--;)a[l]=arguments[l];var c=o<3&&a[0]!==u&&a[o-1]!==u?[]:Wt(a,u);if((o-=c.length)<n)return Fi(e,t,Pi,s.placeholder,void 0,a,c,void 0,void 0,n-o);var h=this&&this!==qe&&this instanceof s?i:e;return st(h,this,a)}}(e,t,c):32!=t&&33!=t||a.length?Pi.apply(void 0,g):function(e,t,n,i){var s=1&t,o=Ti(e);return function t(){for(var a=-1,l=arguments.length,u=-1,c=i.length,h=r(c+l),d=this&&this!==qe&&this instanceof t?o:e;++u<c;)h[u]=i[u];for(;l--;)h[u++]=arguments[++a];return st(d,s?n:this,h)}}(e,t,n,i);else var y=function(e,t,n){var r=1&t,i=Ti(e);return function t(){var s=this&&this!==qe&&this instanceof t?i:e;return s.apply(r?n:this,arguments)}}(e,t,n);return Ss((m?Wr:bs)(y,g),e,t)}function Ui(e,t,n,r){return void 0===e||ko(e,we[n])&&!xe.call(r,n)?t:e}function Vi(e,t,n,r,i,s){return zo(e)&&zo(t)&&(s.set(t,e),Or(e,t,void 0,Vi,s),s.delete(t)),e}function Wi(e){return Go(e)?void 0:e}function zi(e,t,n,r,i,s){var o=1&n,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=2&n?new Ln:void 0;for(s.set(e,t),s.set(t,e);++h<a;){var p=e[h],m=t[h];if(r)var g=o?r(m,p,h,t,e,s):r(p,m,h,e,t,s);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!yt(t,(function(e,t){if(!Rt(f,t)&&(p===e||i(p,e,n,r,s)))return f.push(t)}))){d=!1;break}}else if(p!==m&&!i(p,m,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Ki(e){return _s(ms(e,void 0,Ns),e+"")}function Hi(e){return fr(e,_a,ts)}function qi(e){return fr(e,Sa,ns)}var Gi=bn?function(e){return bn.get(e)}:Za;function Yi(e){for(var t=e.name+"",n=wn[t],r=xe.call(wn,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function Ji(e){return(xe.call(Pn,"placeholder")?Pn:e).placeholder}function Xi(){var e=Pn.iteratee||Ga;return e=e===Ga?Er:e,arguments.length?e(arguments[0],arguments[1]):e}function Zi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Qi(e){for(var t=_a(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fs(i)]}return t}function es(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return xr(n)?n:void 0}var ts=tn?function(e){return null==e?[]:(e=pe(e),ct(tn(e),(function(t){return He.call(e,t)})))}:sl,ns=tn?function(e){for(var t=[];e;)pt(t,ts(e)),e=Ve(e);return t}:sl,rs=pr;function is(e,t,n){for(var r=-1,i=(t=li(t,e)).length,s=!1;++r<i;){var o=Ts(t[r]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&Wo(i)&&as(o,i)&&(No(e)||Ro(e))}function ss(e){return"function"!=typeof e.constructor||ds(e)?{}:kn(Ve(e))}function os(e){return No(e)||Ro(e)||!!(Ye&&e&&e[Ye])}function as(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function ls(e,t,n){if(!zo(n))return!1;var r=typeof t;return!!("number"==r?Fo(n)&&as(t,n.length):"string"==r&&t in n)&&ko(n[t],e)}function us(e,t){if(No(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Zo(e))||(z.test(e)||!W.test(e)||null!=t&&e in pe(t))}function cs(e){var t=Yi(e),n=Pn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=Gi(n);return!!r&&e===r[0]}(fn&&rs(new fn(new ArrayBuffer(1)))!=E||pn&&rs(new pn)!=m||mn&&"[object Promise]"!=rs(mn.resolve())||gn&&rs(new gn)!=b||yn&&rs(new yn)!=S)&&(rs=function(e){var t=pr(e),n=t==y?e.constructor:void 0,r=n?Ms(n):"";if(r)switch(r){case _n:return E;case Sn:return m;case xn:return"[object Promise]";case En:return b;case An:return S}return t});var hs=_e?Uo:ol;function ds(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||we)}function fs(e){return e==e&&!zo(e)}function ps(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in pe(n)))}}function ms(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=an(i.length-t,0),a=r(o);++s<o;)a[s]=i[t+s];s=-1;for(var l=r(t+1);++s<t;)l[s]=i[s];return l[t]=n(a),st(e,this,l)}}function gs(e,t){return t.length<2?e:dr(e,Hr(t,0,-1))}function ys(e,t){for(var n=e.length,r=ln(t.length,n),i=vi(e);r--;){var s=t[r];e[r]=as(s,n)?i[s]:void 0}return e}function vs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bs=xs(Wr),ws=Zt||function(e,t){return qe.setTimeout(e,t)},_s=xs(zr);function Ss(e,t,n){var r=t+"";return _s(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return at(a,(function(n){var r="_."+n[0];t&n[1]&&!ht(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(r),n)))}function xs(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Es(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var s=Lr(n,i),o=e[s];e[s]=e[n],e[n]=o}return e.length=t,e}var As=function(e){var t=Eo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(K,(function(e,n,r,i){t.push(r?i.replace(te,"$1"):n||e)})),t}));function Ts(e){if("string"==typeof e||Zo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ms(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Cs(e){if(e instanceof Rn)return e.clone();var t=new In(e.__wrapped__,e.__chain__);return t.__actions__=vi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ps=jr((function(e,t){return Lo(e)?er(e,or(t,1,Lo,!0)):[]})),ks=jr((function(e,t){var n=js(t);return Lo(n)&&(n=void 0),Lo(e)?er(e,or(t,1,Lo,!0),Xi(n,2)):[]})),Os=jr((function(e,t){var n=js(t);return Lo(n)&&(n=void 0),Lo(e)?er(e,or(t,1,Lo,!0),void 0,n):[]}));function Is(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),wt(e,Xi(t,3),i)}function Rs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ia(n),i=n<0?an(r+i,0):ln(i,r-1)),wt(e,Xi(t,3),i,!0)}function Ns(e){return(null==e?0:e.length)?or(e,1):[]}function Ds(e){return e&&e.length?e[0]:void 0}var Fs=jr((function(e){var t=ft(e,oi);return t.length&&t[0]===e[0]?vr(t):[]})),Ls=jr((function(e){var t=js(e),n=ft(e,oi);return t===js(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?vr(n,Xi(t,2)):[]})),Bs=jr((function(e){var t=js(e),n=ft(e,oi);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?vr(n,void 0,t):[]}));function js(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var $s=jr(Us);function Us(e,t){return e&&e.length&&t&&t.length?Dr(e,t):e}var Vs=Ki((function(e,t){var n=null==e?0:e.length,r=Yn(e,t);return Fr(e,ft(t,(function(e){return as(e,n)?+e:e})).sort(mi)),r}));function Ws(e){return null==e?e:dn.call(e)}var zs=jr((function(e){return Qr(or(e,1,Lo,!0))})),Ks=jr((function(e){var t=js(e);return Lo(t)&&(t=void 0),Qr(or(e,1,Lo,!0),Xi(t,2))})),Hs=jr((function(e){var t=js(e);return t="function"==typeof t?t:void 0,Qr(or(e,1,Lo,!0),void 0,t)}));function qs(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Lo(e))return t=an(e.length,t),!0})),Pt(t,(function(t){return ft(e,At(t))}))}function Gs(e,t){if(!e||!e.length)return[];var n=qs(e);return null==t?n:ft(n,(function(e){return st(t,void 0,e)}))}var Ys=jr((function(e,t){return Lo(e)?er(e,t):[]})),Js=jr((function(e){return ii(ct(e,Lo))})),Xs=jr((function(e){var t=js(e);return Lo(t)&&(t=void 0),ii(ct(e,Lo),Xi(t,2))})),Zs=jr((function(e){var t=js(e);return t="function"==typeof t?t:void 0,ii(ct(e,Lo),void 0,t)})),Qs=jr(qs);var eo=jr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Gs(e,n)}));function to(e){var t=Pn(e);return t.__chain__=!0,t}function no(e,t){return t(e)}var ro=Ki((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Yn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&as(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:no,args:[i],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var io=wi((function(e,t,n){xe.call(e,n)?++e[n]:Gn(e,n,1)}));var so=Mi(Is),oo=Mi(Rs);function ao(e,t){return(No(e)?at:tr)(e,Xi(t,3))}function lo(e,t){return(No(e)?lt:nr)(e,Xi(t,3))}var uo=wi((function(e,t,n){xe.call(e,n)?e[n].push(t):Gn(e,n,[t])}));var co=jr((function(e,t,n){var i=-1,s="function"==typeof t,o=Fo(e)?r(e.length):[];return tr(e,(function(e){o[++i]=s?st(t,e,n):br(e,t,n)})),o})),ho=wi((function(e,t,n){Gn(e,n,t)}));function fo(e,t){return(No(e)?ft:Cr)(e,Xi(t,3))}var po=wi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var mo=jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ls(e,t[0],t[1])?t=[]:n>2&&ls(t[0],t[1],t[2])&&(t=[t[0]]),Rr(e,or(t,1),[])})),go=Xt||function(){return qe.Date.now()};function yo(e,t,n){return t=n?void 0:t,$i(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function vo(e,t){var n;if("function"!=typeof t)throw new ye(s);return e=ia(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var bo=jr((function(e,t,n){var r=1;if(n.length){var i=Wt(n,Ji(bo));r|=32}return $i(e,r,t,n,i)})),wo=jr((function(e,t,n){var r=3;if(n.length){var i=Wt(n,Ji(wo));r|=32}return $i(t,r,e,n,i)}));function _o(e,t,n){var r,i,o,a,l,u,c=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new ye(s);function p(t){var n=r,s=i;return r=i=void 0,c=t,a=e.apply(s,n)}function m(e){return c=e,l=ws(y,t),h?p(e):a}function g(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-c>=o}function y(){var e=go();if(g(e))return v(e);l=ws(y,function(e){var n=t-(e-u);return d?ln(n,o-(e-c)):n}(e))}function v(e){return l=void 0,f&&r?p(e):(r=i=void 0,a)}function b(){var e=go(),n=g(e);if(r=arguments,i=this,u=e,n){if(void 0===l)return m(u);if(d)return hi(l),l=ws(y,t),p(u)}return void 0===l&&(l=ws(y,t)),a}return t=oa(t)||0,zo(n)&&(h=!!n.leading,o=(d="maxWait"in n)?an(oa(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==l&&hi(l),c=0,r=u=i=l=void 0},b.flush=function(){return void 0===l?a:v(go())},b}var So=jr((function(e,t){return Qn(e,1,t)})),xo=jr((function(e,t,n){return Qn(e,oa(t)||0,n)}));function Eo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ye(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Eo.Cache||Fn),n}function Ao(e){if("function"!=typeof e)throw new ye(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Eo.Cache=Fn;var To=ui((function(e,t){var n=(t=1==t.length&&No(t[0])?ft(t[0],Ot(Xi())):ft(or(t,1),Ot(Xi()))).length;return jr((function(r){for(var i=-1,s=ln(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return st(e,this,r)}))})),Mo=jr((function(e,t){return $i(e,32,void 0,t,Wt(t,Ji(Mo)))})),Co=jr((function(e,t){return $i(e,64,void 0,t,Wt(t,Ji(Co)))})),Po=Ki((function(e,t){return $i(e,256,void 0,void 0,void 0,t)}));function ko(e,t){return e===t||e!=e&&t!=t}var Oo=Di(mr),Io=Di((function(e,t){return e>=t})),Ro=wr(function(){return arguments}())?wr:function(e){return Ko(e)&&xe.call(e,"callee")&&!He.call(e,"callee")},No=r.isArray,Do=Qe?Ot(Qe):function(e){return Ko(e)&&pr(e)==x};function Fo(e){return null!=e&&Wo(e.length)&&!Uo(e)}function Lo(e){return Ko(e)&&Fo(e)}var Bo=nn||ol,jo=et?Ot(et):function(e){return Ko(e)&&pr(e)==h};function $o(e){if(!Ko(e))return!1;var t=pr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Go(e)}function Uo(e){if(!zo(e))return!1;var t=pr(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Vo(e){return"number"==typeof e&&e==ia(e)}function Wo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function zo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ko(e){return null!=e&&"object"==typeof e}var Ho=tt?Ot(tt):function(e){return Ko(e)&&rs(e)==m};function qo(e){return"number"==typeof e||Ko(e)&&pr(e)==g}function Go(e){if(!Ko(e)||pr(e)!=y)return!1;var t=Ve(e);if(null===t)return!0;var n=xe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==Me}var Yo=nt?Ot(nt):function(e){return Ko(e)&&pr(e)==v};var Jo=rt?Ot(rt):function(e){return Ko(e)&&rs(e)==b};function Xo(e){return"string"==typeof e||!No(e)&&Ko(e)&&pr(e)==w}function Zo(e){return"symbol"==typeof e||Ko(e)&&pr(e)==_}var Qo=it?Ot(it):function(e){return Ko(e)&&Wo(e.length)&&!!$e[pr(e)]};var ea=Di(Mr),ta=Di((function(e,t){return e<=t}));function na(e){if(!e)return[];if(Fo(e))return Xo(e)?qt(e):vi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=rs(e);return(t==m?Ut:t==b?zt:ka)(e)}function ra(e){return e?(e=oa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ia(e){var t=ra(e),n=t%1;return t==t?n?t-n:t:0}function sa(e){return e?Jn(ia(e),0,4294967295):0}function oa(e){if("number"==typeof e)return e;if(Zo(e))return NaN;if(zo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=kt(e);var n=se.test(e);return n||ae.test(e)?ze(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function aa(e){return bi(e,Sa(e))}function la(e){return null==e?"":Zr(e)}var ua=_i((function(e,t){if(ds(t)||Fo(t))bi(t,_a(t),e);else for(var n in t)xe.call(t,n)&&zn(e,n,t[n])})),ca=_i((function(e,t){bi(t,Sa(t),e)})),ha=_i((function(e,t,n,r){bi(t,Sa(t),e,r)})),da=_i((function(e,t,n,r){bi(t,_a(t),e,r)})),fa=Ki(Yn);var pa=jr((function(e,t){e=pe(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ls(t[0],t[1],i)&&(r=1);++n<r;)for(var s=t[n],o=Sa(s),a=-1,l=o.length;++a<l;){var u=o[a],c=e[u];(void 0===c||ko(c,we[u])&&!xe.call(e,u))&&(e[u]=s[u])}return e})),ma=jr((function(e){return e.push(void 0,Vi),st(Ea,void 0,e)}));function ga(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function ya(e,t){return null!=e&&is(e,t,yr)}var va=ki((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),e[t]=n}),za(qa)),ba=ki((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),xe.call(e,t)?e[t].push(n):e[t]=[n]}),Xi),wa=jr(br);function _a(e){return Fo(e)?jn(e):Ar(e)}function Sa(e){return Fo(e)?jn(e,!0):Tr(e)}var xa=_i((function(e,t,n){Or(e,t,n)})),Ea=_i((function(e,t,n,r){Or(e,t,n,r)})),Aa=Ki((function(e,t){var n={};if(null==e)return n;var r=!1;t=ft(t,(function(t){return t=li(t,e),r||(r=t.length>1),t})),bi(e,qi(e),n),r&&(n=Xn(n,7,Wi));for(var i=t.length;i--;)ei(n,t[i]);return n}));var Ta=Ki((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return ya(e,n)}))}(e,t)}));function Ma(e,t){if(null==e)return{};var n=ft(qi(e),(function(e){return[e]}));return t=Xi(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var Ca=ji(_a),Pa=ji(Sa);function ka(e){return null==e?[]:It(e,_a(e))}var Oa=Ai((function(e,t,n){return t=t.toLowerCase(),e+(n?Ia(t):t)}));function Ia(e){return $a(la(e).toLowerCase())}function Ra(e){return(e=la(e))&&e.replace(ue,Lt).replace(Re,"")}var Na=Ai((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Da=Ai((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Fa=Ei("toLowerCase");var La=Ai((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ba=Ai((function(e,t,n){return e+(n?" ":"")+$a(t)}));var ja=Ai((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),$a=Ei("toUpperCase");function Ua(e,t,n){return e=la(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var Va=jr((function(e,t){try{return st(e,void 0,t)}catch(e){return $o(e)?e:new Y(e)}})),Wa=Ki((function(e,t){return at(t,(function(t){t=Ts(t),Gn(e,t,bo(e[t],e))})),e}));function za(e){return function(){return e}}var Ka=Ci(),Ha=Ci(!0);function qa(e){return e}function Ga(e){return Er("function"==typeof e?e:Xn(e,1))}var Ya=jr((function(e,t){return function(n){return br(n,e,t)}})),Ja=jr((function(e,t){return function(n){return br(e,n,t)}}));function Xa(e,t,n){var r=_a(t),i=hr(t,r);null!=n||zo(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=hr(t,_a(t)));var s=!(zo(n)&&"chain"in n&&!n.chain),o=Uo(e);return at(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),i=n.__actions__=vi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Za(){}var Qa=Ii(ft),el=Ii(ut),tl=Ii(yt);function nl(e){return us(e)?At(Ts(e)):function(e){return function(t){return dr(t,e)}}(e)}var rl=Ni(),il=Ni(!0);function sl(){return[]}function ol(){return!1}var al=Oi((function(e,t){return e+t}),0),ll=Li("ceil"),ul=Oi((function(e,t){return e/t}),1),cl=Li("floor");var hl,dl=Oi((function(e,t){return e*t}),1),fl=Li("round"),pl=Oi((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new ye(s);return e=ia(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=yo,Pn.assign=ua,Pn.assignIn=ca,Pn.assignInWith=ha,Pn.assignWith=da,Pn.at=fa,Pn.before=vo,Pn.bind=bo,Pn.bindAll=Wa,Pn.bindKey=wo,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return No(e)?e:[e]},Pn.chain=to,Pn.chunk=function(e,t,n){t=(n?ls(e,t,n):void 0===t)?1:an(ia(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,a=r(Qt(i/t));s<i;)a[o++]=Hr(e,s,s+=t);return a},Pn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},Pn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pt(No(n)?vi(n):[n],or(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=Xi();return e=t?ft(e,(function(e){if("function"!=typeof e[1])throw new ye(s);return[n(e[0]),e[1]]})):[],jr((function(n){for(var r=-1;++r<t;){var i=e[r];if(st(i[0],this,n))return st(i[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=_a(e);return function(n){return Zn(n,e,t)}}(Xn(e,1))},Pn.constant=za,Pn.countBy=io,Pn.create=function(e,t){var n=kn(e);return null==t?n:qn(n,t)},Pn.curry=function e(t,n,r){var i=$i(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Pn.curryRight=function e(t,n,r){var i=$i(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Pn.debounce=_o,Pn.defaults=pa,Pn.defaultsDeep=ma,Pn.defer=So,Pn.delay=xo,Pn.difference=Ps,Pn.differenceBy=ks,Pn.differenceWith=Os,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:ia(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!0):[]},Pn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ls(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ia(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=n>r?0:sa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Pn.filter=function(e,t){return(No(e)?ct:sr)(e,Xi(t,3))},Pn.flatMap=function(e,t){return or(fo(e,t),1)},Pn.flatMapDeep=function(e,t){return or(fo(e,t),1/0)},Pn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ia(n),or(fo(e,t),n)},Pn.flatten=Ns,Pn.flattenDeep=function(e){return(null==e?0:e.length)?or(e,1/0):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?or(e,t=void 0===t?1:ia(t)):[]},Pn.flip=function(e){return $i(e,512)},Pn.flow=Ka,Pn.flowRight=Ha,Pn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Pn.functions=function(e){return null==e?[]:hr(e,_a(e))},Pn.functionsIn=function(e){return null==e?[]:hr(e,Sa(e))},Pn.groupBy=uo,Pn.initial=function(e){return(null==e?0:e.length)?Hr(e,0,-1):[]},Pn.intersection=Fs,Pn.intersectionBy=Ls,Pn.intersectionWith=Bs,Pn.invert=va,Pn.invertBy=ba,Pn.invokeMap=co,Pn.iteratee=Ga,Pn.keyBy=ho,Pn.keys=_a,Pn.keysIn=Sa,Pn.map=fo,Pn.mapKeys=function(e,t){var n={};return t=Xi(t,3),ur(e,(function(e,r,i){Gn(n,t(e,r,i),e)})),n},Pn.mapValues=function(e,t){var n={};return t=Xi(t,3),ur(e,(function(e,r,i){Gn(n,r,t(e,r,i))})),n},Pn.matches=function(e){return Pr(Xn(e,1))},Pn.matchesProperty=function(e,t){return kr(e,Xn(t,1))},Pn.memoize=Eo,Pn.merge=xa,Pn.mergeWith=Ea,Pn.method=Ya,Pn.methodOf=Ja,Pn.mixin=Xa,Pn.negate=Ao,Pn.nthArg=function(e){return e=ia(e),jr((function(t){return Ir(t,e)}))},Pn.omit=Aa,Pn.omitBy=function(e,t){return Ma(e,Ao(Xi(t)))},Pn.once=function(e){return vo(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(No(t)||(t=null==t?[]:[t]),No(n=r?void 0:n)||(n=null==n?[]:[n]),Rr(e,t,n))},Pn.over=Qa,Pn.overArgs=To,Pn.overEvery=el,Pn.overSome=tl,Pn.partial=Mo,Pn.partialRight=Co,Pn.partition=po,Pn.pick=Ta,Pn.pickBy=Ma,Pn.property=nl,Pn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Pn.pull=$s,Pn.pullAll=Us,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Dr(e,t,Xi(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Dr(e,t,void 0,n):e},Pn.pullAt=Vs,Pn.range=rl,Pn.rangeRight=il,Pn.rearg=Po,Pn.reject=function(e,t){return(No(e)?ct:sr)(e,Ao(Xi(t,3)))},Pn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=Xi(t,3);++r<s;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Fr(e,i),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new ye(s);return jr(e,t=void 0===t?t:ia(t))},Pn.reverse=Ws,Pn.sampleSize=function(e,t,n){return t=(n?ls(e,t,n):void 0===t)?1:ia(t),(No(e)?Un:Ur)(e,t)},Pn.set=function(e,t,n){return null==e?e:Vr(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Vr(e,t,n,r)},Pn.shuffle=function(e){return(No(e)?Vn:Kr)(e)},Pn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ls(e,t,n)?(t=0,n=r):(t=null==t?0:ia(t),n=void 0===n?r:ia(n)),Hr(e,t,n)):[]},Pn.sortBy=mo,Pn.sortedUniq=function(e){return e&&e.length?Jr(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?Jr(e,Xi(t,2)):[]},Pn.split=function(e,t,n){return n&&"number"!=typeof n&&ls(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=la(e))&&("string"==typeof t||null!=t&&!Yo(t))&&!(t=Zr(t))&&$t(e)?ci(qt(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new ye(s);return t=null==t?0:an(ia(t),0),jr((function(n){var r=n[t],i=ci(n,0,t);return r&&pt(i,r),st(e,this,i)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:ia(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ye(s);return zo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_o(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=no,Pn.toArray=na,Pn.toPairs=Ca,Pn.toPairsIn=Pa,Pn.toPath=function(e){return No(e)?ft(e,Ts):Zo(e)?[e]:vi(As(la(e)))},Pn.toPlainObject=aa,Pn.transform=function(e,t,n){var r=No(e),i=r||Bo(e)||Qo(e);if(t=Xi(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:zo(e)&&Uo(s)?kn(Ve(e)):{}}return(i?at:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},Pn.unary=function(e){return yo(e,1)},Pn.union=zs,Pn.unionBy=Ks,Pn.unionWith=Hs,Pn.uniq=function(e){return e&&e.length?Qr(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?Qr(e,Xi(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qr(e,void 0,t):[]},Pn.unset=function(e,t){return null==e||ei(e,t)},Pn.unzip=qs,Pn.unzipWith=Gs,Pn.update=function(e,t,n){return null==e?e:ti(e,t,ai(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ti(e,t,ai(n),r)},Pn.values=ka,Pn.valuesIn=function(e){return null==e?[]:It(e,Sa(e))},Pn.without=Ys,Pn.words=Ua,Pn.wrap=function(e,t){return Mo(ai(t),e)},Pn.xor=Js,Pn.xorBy=Xs,Pn.xorWith=Zs,Pn.zip=Qs,Pn.zipObject=function(e,t){return si(e||[],t||[],zn)},Pn.zipObjectDeep=function(e,t){return si(e||[],t||[],Vr)},Pn.zipWith=eo,Pn.entries=Ca,Pn.entriesIn=Pa,Pn.extend=ca,Pn.extendWith=ha,Xa(Pn,Pn),Pn.add=al,Pn.attempt=Va,Pn.camelCase=Oa,Pn.capitalize=Ia,Pn.ceil=ll,Pn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==t&&(t=(t=oa(t))==t?t:0),Jn(oa(e),t,n)},Pn.clone=function(e){return Xn(e,4)},Pn.cloneDeep=function(e){return Xn(e,5)},Pn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Pn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Pn.conformsTo=function(e,t){return null==t||Zn(e,t,_a(t))},Pn.deburr=Ra,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=ul,Pn.endsWith=function(e,t,n){e=la(e),t=Zr(t);var r=e.length,i=n=void 0===n?r:Jn(ia(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Pn.eq=ko,Pn.escape=function(e){return(e=la(e))&&j.test(e)?e.replace(L,Bt):e},Pn.escapeRegExp=function(e){return(e=la(e))&&q.test(e)?e.replace(H,"\\$&"):e},Pn.every=function(e,t,n){var r=No(e)?ut:rr;return n&&ls(e,t,n)&&(t=void 0),r(e,Xi(t,3))},Pn.find=so,Pn.findIndex=Is,Pn.findKey=function(e,t){return bt(e,Xi(t,3),ur)},Pn.findLast=oo,Pn.findLastIndex=Rs,Pn.findLastKey=function(e,t){return bt(e,Xi(t,3),cr)},Pn.floor=cl,Pn.forEach=ao,Pn.forEachRight=lo,Pn.forIn=function(e,t){return null==e?e:ar(e,Xi(t,3),Sa)},Pn.forInRight=function(e,t){return null==e?e:lr(e,Xi(t,3),Sa)},Pn.forOwn=function(e,t){return e&&ur(e,Xi(t,3))},Pn.forOwnRight=function(e,t){return e&&cr(e,Xi(t,3))},Pn.get=ga,Pn.gt=Oo,Pn.gte=Io,Pn.has=function(e,t){return null!=e&&is(e,t,gr)},Pn.hasIn=ya,Pn.head=Ds,Pn.identity=qa,Pn.includes=function(e,t,n,r){e=Fo(e)?e:ka(e),n=n&&!r?ia(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Xo(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),_t(e,t,i)},Pn.inRange=function(e,t,n){return t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n){return e>=ln(t,n)&&e<an(t,n)}(e=oa(e),t,n)},Pn.invoke=wa,Pn.isArguments=Ro,Pn.isArray=No,Pn.isArrayBuffer=Do,Pn.isArrayLike=Fo,Pn.isArrayLikeObject=Lo,Pn.isBoolean=function(e){return!0===e||!1===e||Ko(e)&&pr(e)==c},Pn.isBuffer=Bo,Pn.isDate=jo,Pn.isElement=function(e){return Ko(e)&&1===e.nodeType&&!Go(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(Fo(e)&&(No(e)||"string"==typeof e||"function"==typeof e.splice||Bo(e)||Qo(e)||Ro(e)))return!e.length;var t=rs(e);if(t==m||t==b)return!e.size;if(ds(e))return!Ar(e).length;for(var n in e)if(xe.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return _r(e,t)},Pn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},Pn.isError=$o,Pn.isFinite=function(e){return"number"==typeof e&&rn(e)},Pn.isFunction=Uo,Pn.isInteger=Vo,Pn.isLength=Wo,Pn.isMap=Ho,Pn.isMatch=function(e,t){return e===t||Sr(e,t,Qi(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sr(e,t,Qi(t),n)},Pn.isNaN=function(e){return qo(e)&&e!=+e},Pn.isNative=function(e){if(hs(e))throw new Y("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=qo,Pn.isObject=zo,Pn.isObjectLike=Ko,Pn.isPlainObject=Go,Pn.isRegExp=Yo,Pn.isSafeInteger=function(e){return Vo(e)&&e>=-9007199254740991&&e<=9007199254740991},Pn.isSet=Jo,Pn.isString=Xo,Pn.isSymbol=Zo,Pn.isTypedArray=Qo,Pn.isUndefined=function(e){return void 0===e},Pn.isWeakMap=function(e){return Ko(e)&&rs(e)==S},Pn.isWeakSet=function(e){return Ko(e)&&"[object WeakSet]"==pr(e)},Pn.join=function(e,t){return null==e?"":sn.call(e,t)},Pn.kebabCase=Na,Pn.last=js,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ia(n))<0?an(r+i,0):ln(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):wt(e,xt,i,!0)},Pn.lowerCase=Da,Pn.lowerFirst=Fa,Pn.lt=ea,Pn.lte=ta,Pn.max=function(e){return e&&e.length?ir(e,qa,mr):void 0},Pn.maxBy=function(e,t){return e&&e.length?ir(e,Xi(t,2),mr):void 0},Pn.mean=function(e){return Et(e,qa)},Pn.meanBy=function(e,t){return Et(e,Xi(t,2))},Pn.min=function(e){return e&&e.length?ir(e,qa,Mr):void 0},Pn.minBy=function(e,t){return e&&e.length?ir(e,Xi(t,2),Mr):void 0},Pn.stubArray=sl,Pn.stubFalse=ol,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=dl,Pn.nth=function(e,t){return e&&e.length?Ir(e,ia(t)):void 0},Pn.noConflict=function(){return qe._===this&&(qe._=Ce),this},Pn.noop=Za,Pn.now=go,Pn.pad=function(e,t,n){e=la(e);var r=(t=ia(t))?Ht(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ri(en(i),n)+e+Ri(Qt(i),n)},Pn.padEnd=function(e,t,n){e=la(e);var r=(t=ia(t))?Ht(e):0;return t&&r<t?e+Ri(t-r,n):e},Pn.padStart=function(e,t,n){e=la(e);var r=(t=ia(t))?Ht(e):0;return t&&r<t?Ri(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(la(e).replace(G,""),t||0)},Pn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ls(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ra(e),void 0===t?(t=e,e=0):t=ra(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=hn();return ln(e+i*(t-e+We("1e-"+((i+"").length-1))),t)}return Lr(e,t)},Pn.reduce=function(e,t,n){var r=No(e)?mt:Mt,i=arguments.length<3;return r(e,Xi(t,4),n,i,tr)},Pn.reduceRight=function(e,t,n){var r=No(e)?gt:Mt,i=arguments.length<3;return r(e,Xi(t,4),n,i,nr)},Pn.repeat=function(e,t,n){return t=(n?ls(e,t,n):void 0===t)?1:ia(t),Br(la(e),t)},Pn.replace=function(){var e=arguments,t=la(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var s=null==e?void 0:e[Ts(t[r])];void 0===s&&(r=i,s=n),e=Uo(s)?s.call(e):s}return e},Pn.round=fl,Pn.runInContext=e,Pn.sample=function(e){return(No(e)?$n:$r)(e)},Pn.size=function(e){if(null==e)return 0;if(Fo(e))return Xo(e)?Ht(e):e.length;var t=rs(e);return t==m||t==b?e.size:Ar(e).length},Pn.snakeCase=La,Pn.some=function(e,t,n){var r=No(e)?yt:qr;return n&&ls(e,t,n)&&(t=void 0),r(e,Xi(t,3))},Pn.sortedIndex=function(e,t){return Gr(e,t)},Pn.sortedIndexBy=function(e,t,n){return Yr(e,t,Xi(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Gr(e,t);if(r<n&&ko(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return Gr(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return Yr(e,t,Xi(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Gr(e,t,!0)-1;if(ko(e[n],t))return n}return-1},Pn.startCase=Ba,Pn.startsWith=function(e,t,n){return e=la(e),n=null==n?0:Jn(ia(n),0,e.length),t=Zr(t),e.slice(n,n+t.length)==t},Pn.subtract=pl,Pn.sum=function(e){return e&&e.length?Ct(e,qa):0},Pn.sumBy=function(e,t){return e&&e.length?Ct(e,Xi(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&ls(e,t,n)&&(t=void 0),e=la(e),t=ha({},t,r,Ui);var i,s,o=ha({},t.imports,r.imports,Ui),a=_a(o),l=It(o,a),u=0,c=t.interpolate||ce,h="__p += '",d=me((t.escape||ce).source+"|"+c.source+"|"+(c===V?ne:ce).source+"|"+(t.evaluate||ce).source+"|$","g"),f="//# sourceURL="+(xe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++je+"]")+"\n";e.replace(d,(function(t,n,r,o,a,l){return r||(r=o),h+=e.slice(u,l).replace(he,jt),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),h+="';\n";var p=xe.call(t,"variable")&&t.variable;if(p){if(ee.test(p))throw new Y("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(R,""):h).replace(N,"$1").replace(D,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Va((function(){return de(a,f+"return "+h).apply(void 0,l)}));if(m.source=h,$o(m))throw m;return m},Pn.times=function(e,t){if((e=ia(e))<1||e>9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=Pt(r,t=Xi(t));++n<e;)t(n);return i},Pn.toFinite=ra,Pn.toInteger=ia,Pn.toLength=sa,Pn.toLower=function(e){return la(e).toLowerCase()},Pn.toNumber=oa,Pn.toSafeInteger=function(e){return e?Jn(ia(e),-9007199254740991,9007199254740991):0===e?e:0},Pn.toString=la,Pn.toUpper=function(e){return la(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=la(e))&&(n||void 0===t))return kt(e);if(!e||!(t=Zr(t)))return e;var r=qt(e),i=qt(t);return ci(r,Nt(r,i),Dt(r,i)+1).join("")},Pn.trimEnd=function(e,t,n){if((e=la(e))&&(n||void 0===t))return e.slice(0,Gt(e)+1);if(!e||!(t=Zr(t)))return e;var r=qt(e);return ci(r,0,Dt(r,qt(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=la(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Zr(t)))return e;var r=qt(e);return ci(r,Nt(r,qt(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(zo(t)){var i="separator"in t?t.separator:i;n="length"in t?ia(t.length):n,r="omission"in t?Zr(t.omission):r}var s=(e=la(e)).length;if($t(e)){var o=qt(e);s=o.length}if(n>=s)return e;var a=n-Ht(r);if(a<1)return r;var l=o?ci(o,0,a).join(""):e.slice(0,a);if(void 0===i)return l+r;if(o&&(a+=l.length-a),Yo(i)){if(e.slice(a).search(i)){var u,c=l;for(i.global||(i=me(i.source,la(re.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var h=u.index;l=l.slice(0,void 0===h?a:h)}}else if(e.indexOf(Zr(i),a)!=a){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Pn.unescape=function(e){return(e=la(e))&&B.test(e)?e.replace(F,Yt):e},Pn.uniqueId=function(e){var t=++Ee;return la(e)+t},Pn.upperCase=ja,Pn.upperFirst=$a,Pn.each=ao,Pn.eachRight=lo,Pn.first=Ds,Xa(Pn,(hl={},ur(Pn,(function(e,t){xe.call(Pn.prototype,t)||(hl[t]=e)})),hl),{chain:!1}),Pn.VERSION="4.17.21",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),at(["drop","take"],(function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:an(ia(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Rn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Rn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(qa)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=jr((function(e,t){return"function"==typeof e?new Rn(this):this.map((function(n){return br(n,e,t)}))})),Rn.prototype.reject=function(e){return this.filter(Ao(Xi(e)))},Rn.prototype.slice=function(e,t){e=ia(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ia(t))<0?n.dropRight(-t):n.take(t-e)),n)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Pn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);i&&(Pn.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,a=t instanceof Rn,l=o[0],u=a||No(t),c=function(e){var t=i.apply(Pn,pt([e],o));return r&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(a=u=!1);var h=this.__chain__,d=!!this.__actions__.length,f=s&&!h,p=a&&!d;if(!s&&u){t=p?t:new Rn(this);var m=e.apply(t,o);return m.__actions__.push({func:no,args:[c],thisArg:void 0}),new In(m,h)}return f&&p?e.apply(this,o):(m=this.thru(c),f?r?m.value()[0]:m.value():m)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ve[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(No(i)?i:[],e)}return this[n]((function(n){return t.apply(No(n)?n:[],e)}))}})),ur(Rn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";xe.call(wn,r)||(wn[r]=[]),wn[r].push({name:t,func:n})}})),wn[Pi(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vi(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=No(e),r=t<0,i=n?e.length:0,s=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=ln(t,e+o);break;case"takeRight":e=an(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,l=a-o,u=r?a:o-1,c=this.__iteratees__,h=c.length,d=0,f=ln(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return ri(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var m=-1,g=e[u+=t];++m<h;){var y=c[m],v=y.iteratee,b=y.type,w=v(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}p[d++]=g}return p},Pn.prototype.at=ro,Pn.prototype.chain=function(){return to(this)},Pn.prototype.commit=function(){return new In(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof On;){var r=Cs(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:no,args:[Ws],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Ws)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Xe&&(Pn.prototype[Xe]=function(){return this}),Pn}();qe._=Jt,void 0===(i=function(){return Jt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(8),n(14)(e))},function(e,t){e.exports=[[/-----BEGIN CERTIFICATE-----.*-----END CERTIFICATE-----/gm,"<certificate>"],[/-----BEGIN RSA PRIVATE KEY-----.*-----END RSA PRIVATE KEY-----/gm,"<private key>"],[/(file:\/\/)?\S+\/Contents\/Resources\/app\//gm,"$1/<path>/"],[/(file:\/\/)?([a-zA-Z]:)?\\\S+\\resources\\app\\/gm,"$1\\<path>\\"],[/(file:\/\/)?([a-zA-Z]:)?\/\S+\/resources\/app\//gm,"$1/<path>/"],[/\/(Users?)\/[^/]*\//gm,"/$1/<user>/"],[/\/(usr|home|user|users|u01|var\/users|export\/home)\/[^/]*\//gm,"/$1/<user>/"],[/\\(Users|Documents and Settings|Profiles)\\[^/\\]*\\/gm,"\\$1\\<user>\\"],[/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gim,"<email>"],[/((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/gm,"<ip address>"],[/(http(s)?:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}(\.[a-z]{2,6})?\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/gim,"<url>"],[/(mongodb:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=,]{2,256}(\.[a-z]{2,6})?\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/gim,"<mongodb uri>"],[/#schema\/\w+\.\w+/,"#schema/<namespace>"]]},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InterruptFlag=t.MongoshInterruptedError=void 0;const i=n(7),s=Symbol.for("@@mongosh.uncatchable");class o extends i.MongoshBaseError{constructor(){super("MongoshInterruptedError","execution was interrupted"),this[r]=!0}}t.MongoshInterruptedError=o,r=s;t.InterruptFlag=class{constructor(){this.interrupted=!1,this.onInterruptListeners=[]}isSet(){return this.interrupted}checkpoint(){if(this.interrupted)throw new o}asPromise(){if(this.interrupted)return{destroy:()=>{},promise:Promise.reject(new o)};let e;const t=new Promise((t,n)=>{e=()=>{const e=this.onInterruptListeners.indexOf(n);-1!==e&&this.onInterruptListeners.splice(e,1),n(null)},this.onInterruptListeners.push(n)});return{destroy:e,promise:t}}set(){this.interrupted=!0;const e=new o;for(const t of[...this.onInterruptListeners])t(e)}reset(){this.interrupted=!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformMongoErrorPlugin=t.rephraseMongoError=void 0;const r=[{code:13435,replacement:"not primary and secondaryOk=false - consider using db.getMongo().setReadPref() or readPreference in the connection string"}];function i(e){if(!function(e){var t,n,r;return/^Mongo([A-Z].*)?Error$/.test(null!==(r=null===(n=null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.name)&&void 0!==r?r:"")}(e))return e;const t=e,n=t.message,i=r.find(e=>e.matchMessage?"string"==typeof e.matchMessage?n.includes(e.matchMessage):e.matchMessage.test(n):void 0!==e.code&&t.code===e.code);return i&&(t.message="function"==typeof i.replacement?i.replacement(n):i.replacement),t}t.rephraseMongoError=i;t.TransformMongoErrorPlugin=class{transformError(e){return i(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(39);t.default=class{constructor(){this._mongo=new s;return new Proxy(this,{get:(e,t)=>{if("_mongo"===t)return this._mongo;throw new r.MongoshInvalidInputError("No connected database",i.ShellApiErrors.NotConnected)}})}};class s{constructor(){return new Proxy(this,{get:()=>{throw new r.MongoshInvalidInputError("No connected database",i.ShellApiErrors.NotConnected)}})}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),s=r(n(94)),o=n(23),a=n(7),l=n(13),u=n(153);function c(e){const t=`shell-api.classes.${e}.help`,n={help:t+".description",example:t+".example",docs:t+".link",attr:[]};return new s.default(n)}t.default=function(t,n){void 0===t&&(t=o.bson);const r={};["Binary","Code","DBRef","Decimal128","Double","Int32","Long","MaxKey","MinKey","ObjectId","Timestamp","Map","BSONSymbol","BSONRegExp"].forEach(e=>{if(!(e in t))throw new a.MongoshInternalError(e+" does not exist in provided BSON package.");const n=t[e].prototype;n.serverVersions=i.ALL_SERVER_VERSIONS,n.platforms=i.ALL_PLATFORMS,n.topologies=i.ALL_TOPOLOGIES;const s=c(e);r[e]=s,n.help=()=>s,Object.setPrototypeOf(n.help,s)}),t.BSONSymbol.prototype.serverVersions=[i.ServerVersions.earliest,"1.6.0"],t.BSONSymbol.prototype.deprecated=!0;const s={DBRef:Object.assign((function(e,n,r,i){return(0,l.assertArgsDefinedType)([e,n,r],["string",!0,[void 0,"string"],[void 0,"object"]],"DBRef"),new t.DBRef(e,n,r,i)}),{...t.DBRef,prototype:t.DBRef.prototype}),Map:t.Map,bsonsize:function(e){return(0,l.assertArgsDefinedType)([e],["object"],"bsonsize"),t.calculateObjectSize(e)},MaxKey:Object.assign((function(){return new t.MaxKey}),{...t.MaxKey,toBSON:()=>new t.MaxKey,prototype:t.MaxKey.prototype}),MinKey:Object.assign((function(){return new t.MinKey}),{...t.MinKey,toBSON:()=>new t.MinKey,prototype:t.MinKey.prototype}),ObjectId:Object.assign((function(e){return(0,l.assertArgsDefinedType)([e],[[void 0,"string","number","object"]],"ObjectId"),new t.ObjectId(e)}),{...t.ObjectId,prototype:t.ObjectId.prototype}),Timestamp:Object.assign((function(e,n){return(0,l.assertArgsDefinedType)([e,n],[["number","object",void 0],[void 0,"number"]],"Timestamp"),"object"==typeof e&&null!==e&&"t"in e&&"i"in e?new t.Timestamp(new t.Long(e.i,e.t)):void 0!==n||"number"==typeof e?new t.Timestamp(new t.Long(null!=n?n:0,e)):new t.Timestamp(e)}),{...t.Timestamp,prototype:t.Timestamp.prototype}),Code:Object.assign((function(e="",n){return(0,l.assertArgsDefinedType)([e,n],[[void 0,"string","function"],[void 0,"object"]],"Code"),new t.Code(e,n)}),{...t.Code,prototype:t.Code.prototype}),NumberDecimal:Object.assign((function(e="0"){return(0,l.assertArgsDefinedType)([e],[["string","number","bson:Long","bson:Int32","bson:Decimal128"]],"NumberDecimal"),"number"==typeof e&&n("NumberDecimal: specifying a number as argument is deprecated and may lead to loss of precision, pass a string instead"),t.Decimal128.fromString(""+e)}),{prototype:t.Decimal128.prototype}),NumberInt:Object.assign((function(e="0"){return null!=e||(e="0"),(0,l.assertArgsDefinedType)([e],[["string","number","bson:Long","bson:Int32"]],"NumberInt"),new t.Int32(parseInt(""+e,10))}),{prototype:t.Int32.prototype}),NumberLong:Object.assign((function(e="0"){return null!=e||(e="0"),(0,l.assertArgsDefinedType)([e],[["string","number","bson:Long","bson:Int32"]],"NumberLong"),"number"==typeof e?(n("NumberLong: specifying a number as argument is deprecated and may lead to loss of precision, pass a string instead"),t.Long.fromNumber(e)):t.Long.fromString(""+e)}),{prototype:t.Long.prototype}),ISODate:function(e){e||(e=(new Date).toISOString());const t=e.match(/^(?<Y>\d{4})-?(?<M>\d{2})-?(?<D>\d{2})([T ](?<h>\d{2})(:?(?<m>\d{2})(:?((?<s>\d{2})(\.(?<ms>\d+))?))?)?(?<tz>Z|([+-])(\d{2}):?(\d{2})?)?)?$/);if(null!==t&&void 0!==t.groups){const{Y:e,M:n,D:r,h:i,m:s,s:o,ms:a,tz:l}=t.groups,u=new Date(`${e}-${n}-${r}T${i||"00"}:${s||"00"}:${o||"00"}.${a||"000"}${l||"Z"}`);if(u.getTime()>=-621672192e5&&u.getTime()<=0xe677d21fdbff)return u}throw new a.MongoshInvalidInputError(JSON.stringify(e)+" is not a valid ISODate",a.CommonErrors.InvalidArgument)},BinData:Object.assign((function(n,r){(0,l.assertArgsDefinedType)([n,r],["number","string"],"BinData");const i=e.from(r,"base64");return new t.Binary(i,n)}),{prototype:t.Binary.prototype}),HexData:Object.assign((function(n,r){(0,l.assertArgsDefinedType)([n,r],["number","string"],"HexData");const i=e.from(r,"hex");return new t.Binary(i,n)}),{prototype:t.Binary.prototype}),UUID:Object.assign((function(n){if(void 0===n){const e=(0,u.randomBytes)(16);e[6]=15&e[6]|64,e[8]=63&e[8]|128,n=e.toString("hex")}(0,l.assertArgsDefinedType)([n],["string"],"UUID");const r=e.from(n.replace(/-/g,""),"hex");return new t.Binary(r,t.Binary.SUBTYPE_UUID)}),{prototype:t.Binary.prototype}),MD5:Object.assign((function(n){(0,l.assertArgsDefinedType)([n],["string"],"MD5");const r=e.from(n,"hex");return new t.Binary(r,t.Binary.SUBTYPE_MD5)}),{prototype:t.Binary.prototype}),Decimal128:t.Decimal128,BSONSymbol:t.BSONSymbol,Int32:t.Int32,Long:t.Long,Binary:t.Binary,Double:t.Double,EJSON:t.EJSON,BSONRegExp:t.BSONRegExp};for(const e of Object.keys(s)){const t=r[e]||c(e);s[e].help=()=>t,Object.setPrototypeOf(s[e].help,t)}return s}}).call(this,n(4).Buffer)},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),s=n(13),o=n(5),a=n(40),l=n(32);let u=class extends i.ShellApiWithMongoClass{constructor(e){super(),this._database=e}get _mongo(){return this._database._mongo}[o.asPrintable](){return`Shard class connected to ${(0,l.redactURICredentials)(this._database._mongo._uri)} via db ${this._database._name}`}_emitShardApiCall(e,t={}){this._database._mongo._instanceState.emitApiCallWithArgs({method:e,class:"Shard",arguments:t})}async enableSharding(e,t){(0,s.assertArgsDefinedType)([e,t],["string",[void 0,"string"]],"Shard.enableSharding"),this._emitShardApiCall("enableSharding",{database:e,primaryShard:t});const n={enableSharding:e};void 0!==t&&(n.primaryShard=t);try{return await this._database._runAdminCommand(n)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". Are you connected to mongos?"),e}}async commitReshardCollection(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.commitReshardCollection"),this._emitShardApiCall("commitReshardCollection",{namespace:e}),await this._database._runAdminCommand({commitReshardCollection:e})}async abortReshardCollection(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.abortReshardCollection"),this._emitShardApiCall("abortReshardCollection",{namespace:e}),await this._database._runAdminCommand({abortReshardCollection:e})}async shardCollection(e,t,n,r){return await this._runShardCollection("shardCollection",e,t,n,r)}async reshardCollection(e,t,n,r){return await this._runShardCollection("reshardCollection",e,t,n,r)}async _runShardCollection(e,t,n,r,i){(0,s.assertArgsDefinedType)([t,n,r,i],["string","object",[void 0,"boolean","object"],[void 0,"object"]],"Shard."+e),this._emitShardApiCall(e,{namespace:t,key:n,unique:r,options:i}),"object"==typeof r&&null!==r&&(i=r,r=void 0);const o={[e]:t,key:n};void 0!==r&&(o.unique=r);try{return await this._database._runAdminCommand({...o,...i})}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". Are you connected to mongos?"),e}}async status(e=!1,t){const n=await(0,s.getPrintableShardStatus)(null!=t?t:await(0,s.getConfigDB)(this._database),e);return new a.CommandResult("StatsResult",n)}async addShard(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.addShard"),await(0,s.getConfigDB)(this._database),this._emitShardApiCall("addShard",{url:e}),this._database._runAdminCommand({addShard:e})}async addShardToZone(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.addShardToZone"),this._emitShardApiCall("addShardToZone",{shard:e,zone:t}),await(0,s.getConfigDB)(this._database),this._database._runAdminCommand({addShardToZone:e,zone:t})}async addShardTag(e,t){(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.addShardTag"),this._emitShardApiCall("addShardTag",{shard:e,tag:t});try{return await this.addShardToZone(e,t)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to addShardToZone which exists only for server versions > 3.4."),e}}async updateZoneKeyRange(e,t,n,r){return(0,s.assertArgsDefinedType)([e,t,n,r],["string","object","object",!0],"Shard.updateZoneKeyRange"),this._emitShardApiCall("updateZoneKeyRange",{namespace:e,min:t,max:n,zone:r}),await(0,s.getConfigDB)(this._database),await this._database._runAdminCommand({updateZoneKeyRange:e,min:t,max:n,zone:r})}async addTagRange(e,t,n,r){(0,s.assertArgsDefinedType)([e,t,n,r],["string","object","object",!0],"Shard.addTagRange"),this._emitShardApiCall("addTagRange",{namespace:e,min:t,max:n,zone:r});try{return await this.updateZoneKeyRange(e,t,n,r)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to updateZoneKeyRange which exists only for server versions > 3.4."),e}}async removeRangeFromZone(e,t,n){return(0,s.assertArgsDefinedType)([e,t,n],["string","object","object"],"Shard.removeRangeFromZone"),this._emitShardApiCall("removeRangeFromZone",{ns:e,min:t,max:n}),this.updateZoneKeyRange(e,t,n,null)}async removeTagRange(e,t,n){(0,s.assertArgsDefinedType)([e,t,n],["string","object","object"],"Shard.removeTagRange"),this._emitShardApiCall("removeTagRange",{ns:e,min:t,max:n});try{return await this.updateZoneKeyRange(e,t,n,null)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to updateZoneKeyRange which exists only for server versions > 3.4."),e}}async removeShardFromZone(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.removeShardFromZone"),this._emitShardApiCall("removeShardFromZone",{shard:e,zone:t}),await(0,s.getConfigDB)(this._database),await this._database._runAdminCommand({removeShardFromZone:e,zone:t})}async removeShardTag(e,t){(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.removeShardTag"),this._emitShardApiCall("removeTagRange",{shard:e,tag:t});try{return await this.removeShardFromZone(e,t)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to removeShardFromZone which exists only for server versions > 3.4."),e}}async enableAutoSplit(){this._emitShardApiCall("enableAutoSplit",{});const e=await(0,s.getConfigDB)(this._database);return await e.getCollection("settings").updateOne({_id:"autosplit"},{$set:{enabled:!0}},{upsert:!0,writeConcern:{w:"majority",wtimeout:3e4}})}async disableAutoSplit(){this._emitShardApiCall("disableAutoSplit",{});const e=await(0,s.getConfigDB)(this._database);return await e.getCollection("settings").updateOne({_id:"autosplit"},{$set:{enabled:!1}},{upsert:!0,writeConcern:{w:"majority",wtimeout:3e4}})}async splitAt(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","object"],"Shard.splitAt"),this._emitShardApiCall("splitAt",{ns:e,query:t}),this._database._runAdminCommand({split:e,middle:t})}async splitFind(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","object"],"Shard.splitFind"),this._emitShardApiCall("splitFind",{ns:e,query:t}),this._database._runAdminCommand({split:e,find:t})}async moveChunk(e,t,n){return(0,s.assertArgsDefinedType)([e,t,n],["string","object","string"],"Shard.moveChunk"),this._emitShardApiCall("moveChunk",{ns:e,query:t,destination:n}),this._database._runAdminCommand({moveChunk:e,find:t,to:n})}async balancerCollectionStatus(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.balancerCollectionStatus"),this._emitShardApiCall("balancerCollectionStatus",{ns:e}),this._database._runAdminCommand({balancerCollectionStatus:e})}async enableBalancing(e){(0,s.assertArgsDefinedType)([e],["string"],"Shard.enableBalancing"),this._emitShardApiCall("enableBalancing",{ns:e});const t=await(0,s.getConfigDB)(this._database);return await t.getCollection("collections").updateOne({_id:e},{$set:{noBalance:!1}},{writeConcern:{w:"majority",wtimeout:6e4}})}async disableBalancing(e){(0,s.assertArgsDefinedType)([e],["string"],"Shard.disableBalancing"),this._emitShardApiCall("disableBalancing",{ns:e});const t=await(0,s.getConfigDB)(this._database);return await t.getCollection("collections").updateOne({_id:e},{$set:{noBalance:!0}},{writeConcern:{w:"majority",wtimeout:6e4}})}async getBalancerState(){this._emitShardApiCall("getBalancerState",{});const e=await(0,s.getConfigDB)(this._database),t=await e.getCollection("settings").findOne({_id:"balancer"});return null==t||!t.stopped}async isBalancerRunning(){return this._emitShardApiCall("isBalancerRunning",{}),await(0,s.getConfigDB)(this._database),this._database._runAdminCommand({balancerStatus:1})}async startBalancer(e=6e4){return(0,s.assertArgsDefinedType)([e],["number"],"Shard.startBalancer"),this._emitShardApiCall("startBalancer",{timeout:e}),this._database._runAdminCommand({balancerStart:1,maxTimeMS:e})}async stopBalancer(e=6e4){return(0,s.assertArgsDefinedType)([e],["number"],"Shard.stopBalancer"),this._emitShardApiCall("stopBalancer",{timeout:e}),this._database._runAdminCommand({balancerStop:1,maxTimeMS:e})}async setBalancerState(e){return(0,s.assertArgsDefinedType)([e],["boolean"],"Shard.setBalancerState"),this._emitShardApiCall("setBalancerState",{state:e}),e?this.startBalancer():this.stopBalancer()}};r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"enableSharding",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["5.0.0",o.ServerVersions.latest])],u.prototype,"commitReshardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["5.0.0",o.ServerVersions.latest])],u.prototype,"abortReshardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"shardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["5.0.0",o.ServerVersions.latest])],u.prototype,"reshardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([1])],u.prototype,"status",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"addShard",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"addShardToZone",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"addShardTag",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"updateZoneKeyRange",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"addTagRange",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeRangeFromZone",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeTagRange",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeShardFromZone",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeShardTag",null),r([i.returnsPromise,(0,i.apiVersions)([1]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"enableAutoSplit",null),r([i.returnsPromise,(0,i.apiVersions)([1]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"disableAutoSplit",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"splitAt",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"splitFind",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"moveChunk",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["4.4.0",o.ServerVersions.latest])],u.prototype,"balancerCollectionStatus",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"enableBalancing",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"disableBalancing",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"getBalancerState",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"isBalancerRunning",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"startBalancer",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"stopBalancer",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"setBalancerState",null),u=r([i.shellApiClassDefault],u),t.default=u},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7),s=n(32),o=n(9),a=n(5),l=n(13);let u=class extends o.ShellApiWithMongoClass{constructor(e){super(),this._database=e}get _mongo(){return this._database._mongo}async initiate(e={}){return this._emitReplicaSetApiCall("initiate",{config:e}),this._database._runAdminCommand({replSetInitiate:e})}async _getConfig(){try{const e=await this._database._runAdminCommand({replSetGetConfig:1});if(void 0===e.config)throw new i.MongoshRuntimeError("Documented returned from command replSetGetConfig does not contain 'config'",i.CommonErrors.CommandFailed);return e.config}catch(e){if("CommandNotFound"===(null==e?void 0:e.codeName)||"APIStrictError"===(null==e?void 0:e.codeName)){const e=await this._database.getSiblingDB("local").getCollection("system.replset").findOne();if(null===e)throw new i.MongoshRuntimeError("No documents in local.system.replset",i.CommonErrors.CommandFailed);return e}throw e}}async config(){return this._emitReplicaSetApiCall("config",{}),this._getConfig()}async conf(){return this._emitReplicaSetApiCall("conf",{}),this._getConfig()}async reconfig(e,t={}){(0,l.assertArgsDefinedType)([e,t],["object",[void 0,"object"]],"ReplicaSet.reconfig"),this._emitReplicaSetApiCall("reconfig",{config:e,options:t});const n=async()=>{var n;const r=await this._getConfig();e.version=r.version?r.version+1:1,null!==(n=e.protocolVersion)&&void 0!==n||(e.protocolVersion=r.protocolVersion);const i={replSetReconfig:e,...t};return await this._database._runAdminCommand(i)};let r=["success",{}],i=1e3;for(let e=0;e<12;e++)try{"error"===r[0]&&(await this._instanceState.shellApi.sleep(i),i*=1.3,i>2500&&await this._instanceState.shellApi.print("Reconfig did not succeed yet, starting new attempt...")),r=["success",await n()];break}catch(e){r=["error",e]}if("error"===r[0])throw r[1];return r[1]}async reconfigForPSASet(e,t,n={}){var r;(0,l.assertArgsDefinedType)([e,t,n],["number","object",[void 0,"object"]],"ReplicaSet.reconfigForPSASet"),this._emitReplicaSetApiCall("reconfigForPSASet",{newMemberIndex:e,config:t,options:n});const s=e=>this._instanceState.shellApi.print(e),o=null===(r=t.members)||void 0===r?void 0:r[e];if(!o)throw new i.MongoshInvalidInputError(`Node at index ${e} does not exist in the new config`,i.CommonErrors.InvalidArgument);if(1!==o.votes)throw new i.MongoshInvalidInputError(`Node at index ${e} must have { votes: 1 } in the new config (actual: { votes: ${o.votes} })`,i.CommonErrors.InvalidArgument);const a=await this._getConfig(),u=a.members.find(e=>e._id===o._id);if(u){if(u.votes)throw new i.MongoshInvalidInputError(`Node at index ${e} must have { votes: 0 } in the old config (actual: { votes: ${u.votes} })`,i.CommonErrors.InvalidArgument)}else a.members.find(e=>e.host===o.host)&&await s(`Warning: Node at index ${e} has { host: "${o.host}" }, which is also present in the old config, but with a different _id field.`);const c=o.priority;await s(`Running first reconfig to give member at index ${e} { votes: 1, priority: 0 }`),o.votes=1,o.priority=0;const h=await this.reconfig(t,n);if(0===c)return await s("No second reconfig necessary because .priority = 0"),h;await s(`Running second reconfig to give member at index ${e} { priority: ${c} }`),o.priority=c;try{return await this.reconfig(t,n)}catch(e){throw await s("Second reconfig did not succeed, giving up"),await s(`Attempted command: rs.reconfig(${JSON.stringify(t,null," ")}, ${JSON.stringify(n)})`),e}}async status(){return this._emitReplicaSetApiCall("status",{}),this._database._runAdminCommand({replSetGetStatus:1})}async isMaster(){return this._emitReplicaSetApiCall("isMaster",{}),this._database.getSiblingDB("admin").isMaster()}async hello(){return this._emitReplicaSetApiCall("hello",{}),this._database.getSiblingDB("admin").hello()}async printSecondaryReplicationInfo(){return this._emitReplicaSetApiCall("printSecondaryReplicationInfo",{}),this._database.printSecondaryReplicationInfo()}printSlaveReplicationInfo(){throw new i.MongoshDeprecatedError("printSlaveReplicationInfo has been deprecated. Use printSecondaryReplicationInfo instead")}async printReplicationInfo(){return this._emitReplicaSetApiCall("printReplicationInfo",{}),this._database.printReplicationInfo()}async add(e,t){(0,l.assertArgsDefinedType)([e,t],[["string","object"],[void 0,"boolean"]],"ReplicaSet.add"),this._emitReplicaSetApiCall("add",{hostport:e,arb:t});const n=await this._getConfig();n.version++;const r=Math.max(...n.members.map(e=>e._id));let s;if("string"==typeof e)s={_id:r+1,host:e},t&&(s.arbiterOnly=!0);else{if(!0===t)throw new i.MongoshInvalidInputError("Expected first parameter to be a host-and-port string of arbiter, but got "+JSON.stringify(e),i.CommonErrors.InvalidArgument);s=e,null!==s._id&&void 0!==s._id||(s._id=r+1)}return n.members.push(s),this._database._runAdminCommand({replSetReconfig:n})}async addArb(e){return this._emitReplicaSetApiCall("addArb",{hostname:e}),this.add(e,!0)}async remove(e){(0,l.assertArgsDefinedType)([e],["string"],"ReplicaSet.remove"),this._emitReplicaSetApiCall("remove",{hostname:e});const t=await this._getConfig();t.version++;for(let n=0;n<t.members.length;n++)if(t.members[n].host===e)return t.members.splice(n,1),this._database._runAdminCommand({replSetReconfig:t});throw new i.MongoshInvalidInputError(`Couldn't find ${e} in ${JSON.stringify(t.members)}. Is ${e} a member of this replset?`,i.CommonErrors.InvalidArgument)}async freeze(e){return(0,l.assertArgsDefinedType)([e],["number"],"ReplicaSet.freeze"),this._emitReplicaSetApiCall("freeze",{secs:e}),this._database._runAdminCommand({replSetFreeze:e})}async stepDown(e,t){(0,l.assertArgsDefinedType)([e,t],[[void 0,"number"],[void 0,"number"]],"ReplicaSet.stepDown"),this._emitReplicaSetApiCall("stepDown",{stepdownSecs:e,catchUpSecs:t});const n={replSetStepDown:void 0===e?60:e};return void 0!==t&&(n.secondaryCatchUpPeriodSecs=t),this._database._runAdminCommand(n)}async syncFrom(e){return(0,l.assertArgsDefinedType)([e],["string"],"ReplicaSet.syncFrom"),this._emitReplicaSetApiCall("syncFrom",{host:e}),this._database._runAdminCommand({replSetSyncFrom:e})}async secondaryOk(){await this._mongo.setSecondaryOk()}[a.asPrintable](){return`ReplicaSet class connected to ${(0,s.redactURICredentials)(this._database._mongo._uri)} via db ${this._database._name}`}_emitReplicaSetApiCall(e,t={}){this._database._mongo._instanceState.emitApiCallWithArgs({method:e,class:"ReplicaSet",arguments:t})}};r([o.returnsPromise],u.prototype,"initiate",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"config",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"conf",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"reconfig",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"reconfigForPSASet",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"status",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"isMaster",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"hello",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"printSecondaryReplicationInfo",null),r([o.deprecated,(0,o.apiVersions)([])],u.prototype,"printSlaveReplicationInfo",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"printReplicationInfo",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"add",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"addArb",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"remove",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"freeze",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"stepDown",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"syncFrom",null),r([o.deprecated,o.returnsPromise],u.prototype,"secondaryOk",null),u=r([o.shellApiClassDefault],u),t.default=u},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(9),o=n(5),a=i(n(210)),l=n(40),u=n(13),c=n(23),h=n(7),d=n(473),f=n(56),p=n(30),m=n(474),g=i(n(55)),y=Symbol.for("@@mongosh.instanceState"),v=Symbol.for("@@mongosh.loadCallNestingLevel");let b=class extends s.ShellApiClass{constructor(e){super(),this._instanceState=e,this.defaults=Object.freeze(new m.ShellUserConfig)}async set(e,t){var n,r;(0,u.assertArgsDefinedType)([e],["string"],"config.set");const{evaluationListener:i}=this._instanceState,s=(await this._allKeys()).includes(e);if(s){const r=await(null===(n=i.validateConfig)||void 0===n?void 0:n.call(i,e,t));if(r)return`Cannot set option "${e}": ${r}`}return"success"!==(s&&await(null===(r=i.setConfig)||void 0===r?void 0:r.call(i,e,t)))?`Option "${e}" is not available in this environment`:`Setting "${e}" has been changed`}async get(e){var t,n;(0,u.assertArgsDefinedType)([e],["string"],"config.get");const{evaluationListener:r}=this._instanceState;return null!==(n=await(null===(t=r.getConfig)||void 0===t?void 0:t.call(r,e)))&&void 0!==n?n:this.defaults[e]}async reset(e){var t;(0,u.assertArgsDefinedType)([e],["string"],"config.reset");const{evaluationListener:n}=this._instanceState;return"success"!==await(null===(t=n.resetConfig)||void 0===t?void 0:t.call(n,e))?`Option "${e}" cannot be changed in this environment`:`Setting "${e}" has been reset to its default value`}async _allKeys(){var e,t;const{evaluationListener:n}=this._instanceState;return null!==(t=await(null===(e=n.listConfigOptions)||void 0===e?void 0:e.call(n)))&&void 0!==t?t:Object.keys(this.defaults)}async[o.asPrintable](){return new Map(await Promise.all((await this._allKeys()).map(async e=>[e,await this.get(e)])))}};r([s.returnsPromise],b.prototype,"set",null),r([s.returnsPromise],b.prototype,"get",null),r([s.returnsPromise],b.prototype,"reset",null),b=r([s.shellApiClassDefault],b);let w=class extends s.ShellApiClass{constructor(e){super(),this[y]=e,this[v]=0,this.DBQuery=new d.DBQuery(e),this.config=new b(e)}get _instanceState(){return this[y]}get loadCallNestingLevel(){return this[v]}set loadCallNestingLevel(e){this[v]=e}use(e){return this._instanceState.currentDb._mongo.use(e)}async show(e,t){return await this._instanceState.currentDb._mongo.show(e,t)}async exit(e){var t,n;throw(0,u.assertArgsDefinedType)([e],[[void 0,"number"]],"exit"),(0,u.assertCLI)(this._instanceState.initialServiceProvider.platform,"the exit/quit commands"),await this._instanceState.close(!0),await(null===(n=(t=this._instanceState.evaluationListener).onExit)||void 0===n?void 0:n.call(t,e)),new h.MongoshInternalError(".onExit listener returned")}async quit(e){return await this.exit(e)}async Mongo(e,t,n){(0,u.assertCLI)(this._instanceState.initialServiceProvider.platform,"new Mongo connections");const r=new a.default(this._instanceState,e,t,n);return await r.connect(),this._instanceState.mongos.push(r),r}async connect(e,t,n){(0,u.assertArgsDefinedType)([e,t,n],["string",[void 0,"string"],[void 0,"string"]],"connect"),(0,u.assertCLI)(this._instanceState.initialServiceProvider.platform,"new Mongo connections");const r=new a.default(this._instanceState,e);await r.connect(t,n),this._instanceState.mongos.push(r);const i=r._serviceProvider.initialDb||c.DEFAULT_DB;return r.getDB(i)}async it(){return this._instanceState.currentCursor?await this._instanceState.currentCursor._it():new l.CursorIterationResult}version(){return n(475).version}async load(e){if((0,u.assertArgsDefinedType)([e],["string"],"load"),!this._instanceState.evaluationListener.onLoad)throw new h.MongoshUnimplementedError("load is not currently implemented for this platform",h.CommonErrors.NotImplemented);this._instanceState.messageBus.emit("mongosh:api-load-file",{nested:this.loadCallNestingLevel>0,filename:e});const{resolvedFilename:t,evaluate:n}=await this._instanceState.evaluationListener.onLoad(e),r=this._instanceState.context,i=r.__filename;r.__filename=t,r.__dirname=(0,p.dirname)(t),this.loadCallNestingLevel++;try{await n()}finally{this.loadCallNestingLevel--,i?(r.__filename=i,r.__dirname=(0,p.dirname)(i)):(delete r.__filename,delete r.__dirname)}return!0}async enableTelemetry(){var e,t;if("success"===await(null===(t=(e=this._instanceState.evaluationListener).setConfig)||void 0===t?void 0:t.call(e,"enableTelemetry",!0)))return g.default.__("cli-repl.cli-repl.enabledTelemetry")}async disableTelemetry(){var e,t;if("success"===await(null===(t=(e=this._instanceState.evaluationListener).setConfig)||void 0===t?void 0:t.call(e,"enableTelemetry",!1)))return g.default.__("cli-repl.cli-repl.disabledTelemetry")}async passwordPrompt(){const{evaluationListener:e}=this._instanceState;if(!e.onPrompt)throw new h.MongoshUnimplementedError("passwordPrompt() is not available in this shell",h.CommonErrors.NotImplemented);return await e.onPrompt("Enter password","password")}async sleep(e){return await(0,f.promisify)(setTimeout)(e)}async print(...e){var t;const{evaluationListener:n}=this._instanceState,r=await Promise.all(e.map(e=>(0,s.toShellResult)(e)));await(null===(t=n.onPrint)||void 0===t?void 0:t.call(n,r))}async printjson(...e){return this.print(...e)}async cls(){var e;const{evaluationListener:t}=this._instanceState;await(null===(e=t.onClearCommand)||void 0===e?void 0:e.call(t))}isInteractive(){return this._instanceState.isInteractive}};r([s.directShellCommand,(0,s.shellCommandCompleter)((async function(e,t){var n;if(!(t.length>2))return await e.getDatabaseCompletions(null!==(n=t[1])&&void 0!==n?n:"")}))],w.prototype,"use",null),r([s.directShellCommand,s.returnsPromise,(0,s.shellCommandCompleter)((async function(e,t){if(t.length>2)return;return"d"===t[1]?["databases"]:["databases","dbs","collections","tables","profile","users","roles","log","logs","startupWarnings","freeMonitoring","automationNotices"].filter(e=>{var n;return e.startsWith(null!==(n=t[1])&&void 0!==n?n:"")})}))],w.prototype,"show",null),r([s.directShellCommand,s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"exit",null),r([s.directShellCommand,s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"quit",null),r([s.returnsPromise,(0,s.returnType)("Mongo"),(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"Mongo",null),r([s.returnsPromise,(0,s.returnType)("Database"),(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"connect",null),r([s.directShellCommand,s.returnsPromise],w.prototype,"it",null),r([s.returnsPromise],w.prototype,"load",null),r([s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"enableTelemetry",null),r([s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"disableTelemetry",null),r([s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"passwordPrompt",null),r([s.returnsPromise],w.prototype,"sleep",null),r([s.returnsPromise],w.prototype,"print",null),r([s.returnsPromise],w.prototype,"printjson",null),r([s.directShellCommand,s.returnsPromise],w.prototype,"cls",null),w=r([s.shellApiClassDefault],w),t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateConnectionInfoFromCliArgs=t.mapCliToDriver=void 0;const r=n(467),i=n(469);Object.defineProperty(t,"mapCliToDriver",{enumerable:!0,get:function(){return i.mapCliToDriver}}),t.generateConnectionInfoFromCliArgs=function(e){const t=(0,r.generateUri)(e);return(0,i.mapCliToDriver)(e,{connectionString:t,driverOptions:{}})}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateUri=void 0;const i=n(7),s=r(n(55)),o=n(120),a="cli-repl.uri-generator.no-host-port";function l(e,t){if(e.host||e.port)throw new i.MongoshInvalidInputError(s.default.__(a),i.CommonErrors.InvalidArgument);if(e.gssapiServiceName&&(null==t?void 0:t.searchParams.has("authMechanismProperties"))){const n=new o.CommaAndColonSeparatedRecord(t.searchParams.get("authMechanismProperties")).get("SERVICE_NAME");if(void 0!==n&&e.gssapiServiceName!==n)throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.diverging-service-name"),i.CommonErrors.InvalidArgument)}if(null==t?void 0:t.searchParams.has("gssapiServiceName"))throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.gssapi-service-name-unsupported"),i.CommonErrors.InvalidArgument)}function u(e){const t=e.match(/[^a-zA-Z0-9.:\[\]_-]/);if(t)throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.invalid-host")+": "+t[0],i.CommonErrors.InvalidArgument)}function c(e,t){const n=e.split(",").map(e=>e.trim()).filter(e=>!!e),r=[];return n.forEach(e=>{const[n,o]=e.split(":");if(t&&void 0!==o&&o!==t)throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.host-list-port-mismatch"),i.CommonErrors.InvalidArgument);r.push(`${n}${o||t?":"+(o||t):""}`)}),r}function h(e){return e.host?(u(e.host),e.host.includes(":")?e.host.split(":")[0]:e.host):"127.0.0.1"}function d(e){if(e.host&&e.host.includes(":")){u(e.host);const t=e.host.split(":")[1];if(!e.port||e.port===t)return t;throw new i.MongoshInvalidInputError(s.default.__(a),i.CommonErrors.InvalidArgument)}return e.port?e.port:"27017"}function f(e){const t=(e=e.clone()).searchParams;return t.has("replicaSet")||t.has("directConnection")||t.has("loadBalanced")||1!==e.hosts.length||t.set("directConnection","true"),e}t.generateUri=function(e){if(e.nodb)return"";const t=function(e){var t,n,r;const s=e.connectionSpecifier,a=(null!==(t=e.host)&&void 0!==t?t:"").match(/^(?<replSetName>[^/]+)\/(?<hosts>([A-Za-z0-9._-]+(:\d+)?,?)+)$/);if(a){const{replSetName:t,hosts:n}=a.groups,r=new o.ConnectionString("mongodb://replacemeHost/"+encodeURIComponent(s||""));return r.hosts=c(n,e.port),r.searchParams.set("replicaSet",t),f(r)}const u=(null!==(n=e.host)&&void 0!==n?n:"").match(/^(?<hosts>([A-Za-z0-9._-]+(:\d+)?,?)+)$/);if(u&&(null===(r=e.host)||void 0===r?void 0:r.includes(","))){const{hosts:t}=u.groups,n=new o.ConnectionString("mongodb://replacemeHost/"+encodeURIComponent(s||""));return n.hosts=c(t,e.port),f(n)}if(!s)return new o.ConnectionString(`mongodb://${h(e)}:${d(e)}/?directConnection=true`);if(s.startsWith("mongodb+srv://")){const t=new o.ConnectionString(s);return l(e,t),t}if(s.startsWith("mongodb://")){const t=new o.ConnectionString(s);return l(e,t),f(t)}let p=/^([A-Za-z0-9][A-Za-z0-9._-]+):?(\d+)?(?:\/(\S*))?$/gi.exec(s);if(null===p){if(/[/\\. "$]/.test(s))throw new i.MongoshInvalidInputError("Invalid URI: "+s,i.CommonErrors.InvalidArgument);p=[s,s]}let m=null==p?void 0:p[1];const g=null==p?void 0:p[2];let y=null==p?void 0:p[3];!g&&!y&&m.indexOf(".")<0&&(y=m,m=void 0);(m||g)&&l(e);return f(new o.ConnectionString(`mongodb://${m||h(e)}:${g||d(e)}/${encodeURIComponent(y||"")}`))}(e);if(t.hosts.every(e=>["localhost","127.0.0.1"].includes(e.split(":")[0]))){const e=t.searchParams;e.has("serverSelectionTimeoutMS")||e.set("serverSelectionTimeoutMS","2000")}return t.toString()}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.redactConnectionString=t.redactValidConnectionString=void 0;const o=s(n(120));t.redactValidConnectionString=function(e,t){var n,r;const i=e.clone(),s=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"_credentials_",a=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;if((i.username||i.password)&&a?(i.username=s,i.password=""):i.password&&(i.password=s),i.searchParams.has("authMechanismProperties")){const e=new o.CommaAndColonSeparatedRecord(i.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",s),i.searchParams.set("authMechanismProperties",e.toString()))}return i.searchParams.has("tlsCertificateKeyFilePassword")&&i.searchParams.set("tlsCertificateKeyFilePassword",s),i.searchParams.has("proxyUsername")&&a&&i.searchParams.set("proxyUsername",s),i.searchParams.has("proxyPassword")&&i.searchParams.set("proxyPassword",s),i},t.redactConnectionString=function(e,t){var n,r;const i=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"<credentials>",s=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;let a;try{a=new o.default(e)}catch(e){}if(a)return t={...t,replacementString:"___credentials___"},a.redact(t).toString().replace(/___credentials___/g,i);const l=[s?/(?<=\/\/)(.*)(?=@)/g:/(?<=\/\/[^@]+:)(.*)(?=@)/g,/(?<=AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,/(?<=tlsCertificateKeyFilePassword=)([^&]+)/gi,s?/(?<=proxyUsername=)([^&]+)/gi:null,/(?<=proxyPassword=)([^&]+)/gi];for(const t of l)null!==t&&(e=e.replace(t,i));return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapCliToDriver=void 0;const r=n(120);function i(e,t,n){return{...e,driverOptions:{...e.driverOptions,[t]:n}}}function s(e,t,n){var r;const s=e.driverOptions.serverApi,o="string"==typeof s?{version:s}:null!==(r={...s})&&void 0!==r?r:{};return o[t]=n,i(e,"serverApi",o)}function o(e,t,n){var r;const s=null!==(r=e.driverOptions.autoEncryption)&&void 0!==r?r:{};return s[t]=n,i(e,"autoEncryption",s)}function a(e,t,n){var r,i;const s=null!==(i=null===(r=e.driverOptions.autoEncryption)||void 0===r?void 0:r.extraOptions)&&void 0!==i?i:{};return s[t]=n,o(e,"extraOptions",s)}function l(e,t,n){var r,i;const{kmsProviders:s}=null!==(r=e.driverOptions.autoEncryption)&&void 0!==r?r:{},a=null!==(i=null==s?void 0:s.aws)&&void 0!==i?i:{};return a[t]=n,o(e,"kmsProviders",{...s,aws:a})}function u(e,t,n){const i=new r.ConnectionString(e.connectionString,{looseValidation:!0}),s=i.typedSearchParams();return""===n||void 0===n?s.delete(t):s.set(t,n),{...e,connectionString:i.toString()}}function c(e,t,n){const i=new r.ConnectionString(e.connectionString,{looseValidation:!0});return i[t]=n,{...e,connectionString:i.toString()}}function h(e,t,n){const i=new r.ConnectionString(e.connectionString,{looseValidation:!0}),s=new r.CommaAndColonSeparatedRecord(i.typedSearchParams().get("authMechanismProperties"));return""===n||void 0===n?s.delete(t):s.set(t,n),u(e,"authMechanismProperties",s)}const d={apiDeprecationErrors:(e,t)=>s(e,"deprecationErrors",t),apiStrict:(e,t)=>s(e,"strict",t),apiVersion:(e,t)=>s(e,"version",t),awsAccessKeyId:(e,t)=>l(e,"accessKeyId",t),awsSecretAccessKey:(e,t)=>l(e,"secretAccessKey",t),awsSessionToken:(e,t)=>l(e,"sessionToken",t),awsIamSessionToken:(e,t)=>h(e,"AWS_SESSION_TOKEN",t),csfleLibraryPath:(e,t)=>a(e,"cryptSharedLibPath",t),cryptSharedLibPath:(e,t)=>a(e,"cryptSharedLibPath",t),gssapiServiceName:(e,t)=>h(e,"SERVICE_NAME",t),sspiRealmOverride:(e,t)=>h(e,"SERVICE_REALM",t),sspiHostnameCanonicalization:(e,t)=>h(e,"CANONICALIZE_HOST_NAME",function(e){if(""===e)return;if("true"===e||"false"===e)return"true"===e;return e}(t)),authenticationDatabase:(e,t)=>u(e,"authSource",t),authenticationMechanism:(e,t)=>u(e,"authMechanism",t),keyVaultNamespace:(e,t)=>o(e,"keyVaultNamespace",t),password:(e,t)=>c(e,"password",encodeURIComponent(t)),quiet:(e,t)=>t?i(e,"loggerLevel","error"):e,retryWrites:(e,t)=>u(e,"retryWrites",t),tls:(e,t)=>u(e,"tls",t),tlsAllowInvalidCertificates:(e,t)=>u(e,"tlsAllowInvalidCertificates",t),tlsAllowInvalidHostnames:(e,t)=>u(e,"tlsAllowInvalidHostnames",t),tlsCAFile:(e,t)=>u(e,"tlsCAFile",t),tlsCRLFile:(e,t)=>u(e,"sslCRL",t),tlsCertificateKeyFile:(e,t)=>u(e,"tlsCertificateKeyFile",t),tlsCertificateKeyFilePassword:(e,t)=>u(e,"tlsCertificateKeyFilePassword",t),tlsUseSystemCA:(e,t)=>i(e,"useSystemCA",t),username:(e,t)=>c(e,"username",encodeURIComponent(t)),verbose:(e,t)=>t?i(e,"loggerLevel","debug"):e};function f(e,t,n){var r,i;return null!==(i=null===(r=d[t])||void 0===r?void 0:r.call(d,e,n))&&void 0!==i?i:e}function p(e,t){for(const n of Object.keys(e)){const r=e[n];r&&(t=f(t,n,r))}return t}t.mapCliToDriver=p,t.default=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(9),o=n(23),a=n(5),l=i(n(119)),u=n(7),c=n(13);let h=class extends s.ShellApiWithMongoClass{constructor(e,t,n){super(),this._session=n,this._options=t,this._mongo=e,this._databases={},this.id=n.id}[a.asPrintable](){return this._session.id}getDatabase(e){if((0,c.assertArgsDefinedType)([e],["string"],"Session.getDatabase"),!(0,c.isValidDatabaseName)(e))throw new u.MongoshInvalidInputError("Invalid database name: "+e,u.CommonErrors.InvalidArgument);return e in this._databases||(this._databases[e]=new l.default(this._mongo,e,this)),this._databases[e]}advanceOperationTime(e){this._session.advanceOperationTime(e)}advanceClusterTime(e){this._session.advanceClusterTime(e)}async endSession(){return await this._session.endSession()}hasEnded(){return this._session.hasEnded}getClusterTime(){return this._session.clusterTime}getOperationTime(){return this._session.operationTime}getOptions(){return this._options}startTransaction(e={}){return this._session.startTransaction(e)}async commitTransaction(){return await this._session.commitTransaction()}async abortTransaction(){return await this._session.abortTransaction()}async withTransaction(e,t={}){return(0,c.assertArgsDefinedType)([e,t],["function",[void 0,"object"]]),await this._session.withTransaction(async()=>await e(),t)}};r([s.returnsPromise],h.prototype,"endSession",null),r([s.returnsPromise],h.prototype,"commitTransaction",null),r([s.returnsPromise],h.prototype,"abortTransaction",null),r([s.returnsPromise],h.prototype,"withTransaction",null),h=r([s.shellApiClassDefault,(0,s.classPlatforms)([o.ReplPlatform.CLI])],h),t.default=h},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyVault=t.ClientEncryption=void 0;const i=n(9),s=n(23),o=n(13),a=n(5),l=n(32),u=n(7),c=e=>!Array.isArray(e)&&"object"==typeof e&&("masterKey"in e||"keyAltNames"in e||"keyMaterial"in e);let h=class extends i.ShellApiWithMongoClass{constructor(e){super(),this._mongo=e;const t=e._serviceProvider.fle;if(!t)throw new u.MongoshRuntimeError("FLE API is not available");const n={...this._mongo._fleOptions};delete n.schemaMap,delete n.encryptedFieldsMap,this._libmongocrypt=new t.ClientEncryption(e._serviceProvider.getRawClient(),n)}[a.asPrintable](){return"ClientEncryption class for "+(0,l.redactURICredentials)(this._mongo._uri)}async encrypt(e,t,n){let r;return r="object"==typeof n?{keyId:e,...n}:{keyId:e,algorithm:n},(0,o.assertArgsDefinedType)([e,t,r],[!0,!0,!0],"ClientEncryption.encrypt"),await this._libmongocrypt.encrypt(t,r)}async decrypt(e){return(0,o.assertArgsDefinedType)([e],[!0],"ClientEncryption.decrypt"),await this._libmongocrypt.decrypt(e)}};r([i.returnsPromise],h.prototype,"encrypt",null),r([i.returnsPromise],h.prototype,"decrypt",null),h=r([i.shellApiClassDefault,(0,i.classPlatforms)([s.ReplPlatform.CLI])],h),t.ClientEncryption=h;let d=class extends i.ShellApiWithMongoClass{constructor(e){var t,n,r;super(),this._mongo=e._mongo,this._clientEncryption=e;const i=null===(n=null===(t=this._mongo)||void 0===t?void 0:t._fleOptions)||void 0===n?void 0:n.keyVaultNamespace;if(!i)throw new u.MongoshInvalidInputError("FLE options must be passed to the Mongo object");const s=null===(r=i.match(/^(?<db>[^.]+)\.(?<coll>.+)$/))||void 0===r?void 0:r.groups;if(!s)throw new u.MongoshInvalidInputError(`Invalid keyVaultNamespace '${i}'`);const{db:o,coll:a}=s;this._keyColl=this._mongo.getDB(o).getCollection(a)}async _init(){var e;if(!(null===(e=this._mongo._fleOptions)||void 0===e?void 0:e.bypassQueryAnalysis)){try{if((await this._keyColl.getIndexKeys()).some(e=>e.keyAltNames))return}catch(e){}try{await this._keyColl.updateMany({keyAltNames:{$size:0}},{$unset:{keyAltNames:""},$currentDate:{updateDate:!0}}),await this._keyColl.createIndex({keyAltNames:1},{unique:!0,partialFilterExpression:{keyAltNames:{$exists:!0}}})}catch(e){await this._instanceState.printWarning(`Creating 'keyAltNames' index on '${this._keyColl.getFullName()}' failed: ${e.message}`)}}}[a.asPrintable](){return"KeyVault class for "+(0,l.redactURICredentials)(this._mongo._uri)}async createKey(e,t,n){let r,i,s,a;if(c(t)?(r=null==t?void 0:t.masterKey,i=null==t?void 0:t.keyAltNames,s=null==t?void 0:t.keyMaterial):(e=>!Array.isArray(e)&&"object"==typeof e&&!c(e))(t)&&(r=t),n&&(i=n),(0,o.assertArgsDefinedType)([e],[!0],"KeyVault.createKey"),"string"==typeof t){if("local"!==e||""!==t)throw new u.MongoshInvalidInputError('KeyVault.createKey does not support providing masterKey as string anymore. For AWS please use createKey("aws", { region: ..., key: ... })',u.CommonErrors.Deprecated);r=void 0}else if(Array.isArray(t)){if("local"!==e)throw new u.MongoshInvalidInputError("KeyVault.createKey requires masterKey to be given as second argument if KMS is not local",u.CommonErrors.InvalidArgument);if(i)throw new u.MongoshInvalidInputError("KeyVault.createKey was supplied with an array for the masterKey and keyAltNames - either specify keyAltNames as second argument or set undefined for masterKey",u.CommonErrors.InvalidArgument);i=t,r=void 0}return r&&(a={...null!=a?a:{},masterKey:r}),i&&(a={...null!=a?a:{},keyAltNames:i}),s&&(a={...null!=a?a:{},keyMaterial:s}),await this._clientEncryption._libmongocrypt.createDataKey(e,a)}async getKey(e){return(0,o.assertArgsDefinedType)([e],[!0],"KeyVault.getKey"),this._keyColl.find({_id:e})}async getKeyByAltName(e){return(0,o.assertArgsDefinedType)([e],["string"],"KeyVault.getKeyByAltName"),this._keyColl.find({keyAltNames:e})}async getKeys(){return this._keyColl.find({})}async deleteKey(e){return(0,o.assertArgsDefinedType)([e],[!0],"KeyVault.deleteKey"),this._keyColl.deleteOne({_id:e})}async addKeyAlternateName(e,t){return(0,o.assertArgsDefinedType)([e,t],[!0,"string"],"KeyVault.addKeyAlternateName"),this._keyColl.findAndModify({query:{_id:e},update:{$addToSet:{keyAltNames:t},$currentDate:{updateDate:!0}}})}async removeKeyAlternateName(e,t){(0,o.assertArgsDefinedType)([e,t],[!0,"string"],"KeyVault.removeKeyAlternateName");const n=await this._keyColl.findAndModify({query:{_id:e},update:{$pull:{keyAltNames:t},$currentDate:{updateDate:!0}}});return null!==n&&void 0!==n.keyAltNames&&1===n.keyAltNames.length&&n.keyAltNames[0]===t?this._keyColl.findAndModify({query:{_id:e,keyAltNames:{$size:0}},update:{$unset:{keyAltNames:""},$currentDate:{updateDate:!0}}}):n}async rewrapManyDataKey(e,t){return this._clientEncryption._libmongocrypt.rewrapManyDataKey(e,t)}async createDataKey(...e){return await this.createKey(...e)}async removeKeyAltName(...e){return await this.removeKeyAlternateName(...e)}async addKeyAltName(...e){return await this.addKeyAlternateName(...e)}};r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"createKey",null),r([(0,i.returnType)("Cursor"),(0,i.apiVersions)([1]),i.returnsPromise],d.prototype,"getKey",null),r([(0,i.returnType)("Cursor"),(0,i.apiVersions)([1]),i.returnsPromise],d.prototype,"getKeyByAltName",null),r([(0,i.returnType)("Cursor"),(0,i.apiVersions)([1]),i.returnsPromise],d.prototype,"getKeys",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"deleteKey",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"addKeyAlternateName",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"removeKeyAlternateName",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"rewrapManyDataKey",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"createDataKey",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"removeKeyAltName",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"addKeyAltName",null),d=r([i.shellApiClassDefault,(0,i.classPlatforms)([s.ReplPlatform.CLI])],d),t.KeyVault=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAnyLogEntry=void 0,t.parseAnyLogEntry=function(e){var t;try{const n=JSON.parse(e);return{id:n.id,timestamp:null===(t=n.t)||void 0===t?void 0:t.$date,severity:n.s,component:n.c,context:n.ctx,message:n.msg,attr:n.attr}}catch(t){return function(e){const t=e.trim().match(/^(?<timestamp>\S*) *(?<severity>\S*) *(?<component>\S*) *\[(?<context>[^\]]+)\]\s*(?<message>.*)$/);if(!t)throw new Error("Could not parse line "+JSON.stringify(e));return t.groups}(e)}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.DBQuery=void 0;const i=n(9);let s=class extends i.ShellApiClass{constructor(e){super(),this._instanceState=e}get shellBatchSize(){return this._instanceState.displayBatchSizeFromDBQuery}set shellBatchSize(e){this._instanceState.printDeprecationWarning('DBQuery.shellBatchSize is deprecated, please use config.set("displayBatchSize") instead'),this._instanceState.displayBatchSizeFromDBQuery=e}};s=r([i.shellApiClassDefault,i.classDeprecated],s),t.DBQuery=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CliUserConfigValidator=t.CliUserConfig=t.SnippetShellUserConfigValidator=t.SnippetShellUserConfig=t.ShellUserConfigValidator=t.ShellUserConfig=void 0;class r{constructor(){this.displayBatchSize=20,this.maxTimeMS=null,this.enableTelemetry=!1,this.editor=null}}t.ShellUserConfig=r;class i{static async validate(e,t){switch(e){case"displayBatchSize":return"number"!=typeof t||t<=0?e+" must be a positive integer":null;case"maxTimeMS":return null!==t&&("number"!=typeof t||t<=0)?e+" must be null or a positive integer":null;case"enableTelemetry":return"boolean"!=typeof t?e+" must be a boolean":null;case"editor":return"string"!=typeof t&&null!==t?e+" must be a string or null":null;default:return e+" is not a known config option"}}}t.ShellUserConfigValidator=i;class s extends r{constructor(){super(...arguments),this.snippetIndexSourceURLs="https://compass.mongodb.com/mongosh/snippets-index.bson.br",this.snippetRegistryURL="https://registry.npmjs.org",this.snippetAutoload=!0}}t.SnippetShellUserConfig=s;class o extends i{static async validate(e,t){switch(e){case"snippetIndexSourceURLs":return"string"!=typeof t||t.split(";").some(e=>e&&!a(e))?e+" must be a ;-separated list of valid URLs":null;case"snippetRegistryURL":return"string"==typeof t&&a(t)?null:e+" must be a valid URL";case"snippetAutoload":return"boolean"!=typeof t?e+" must be a boolean":null;default:return super.validate(e,t)}}}t.SnippetShellUserConfigValidator=o;t.CliUserConfig=class extends s{constructor(){super(...arguments),this.userId="",this.telemetryAnonymousId="",this.disableGreetingMessage=!1,this.forceDisableTelemetry=!1,this.inspectCompact=3,this.inspectDepth=6,this.historyLength=1e3,this.showStackTraces=!1,this.redactHistory="remove"}};function a(e){if("function"==typeof URL)try{return new URL(e),!0}catch(e){return!1}return!0}t.CliUserConfigValidator=class extends o{static async validate(e,t){switch(e){case"userId":case"telemetryAnonymousId":case"disableGreetingMessage":return null;case"inspectCompact":return"boolean"!=typeof t&&("number"!=typeof t||t<0)?e+" must be a boolean or a positive integer":null;case"inspectDepth":case"historyLength":return"number"!=typeof t||t<0?e+" must be a positive integer":null;case"forceDisableTelemetry":case"showStackTraces":return"boolean"!=typeof t?e+" must be a boolean":null;case"redactHistory":return"keep"!==t&&"remove"!==t&&"remove-redact"!==t?e+" must be one of 'keep', 'remove', or 'remove-redact'":null;default:return super.validate(e,t)}}}},function(e){e.exports=JSON.parse('{"name":"@mongosh/shell-api","version":"1.5.1","description":"MongoDB Shell API Classes Package","main":"lib/index.js","types":"lib/index.d.ts","config":{"unsafe-perm":true},"repository":{"type":"git","url":"git://github.com/mongodb-js/mongosh.git"},"scripts":{"compile-ts":"tsc -p tsconfig.json","pretest":"npm run compile-ts","lint":"eslint --report-unused-disable-directives \\"./{src,test}/**/*.{js,ts,tsx}\\"","check":"npm run lint && depcheck --skip-missing=true","report-missing-help":"ts-node bin/report-missing-help.ts","report-supported-api":"ts-node bin/report-supported-api.ts","test":"cross-env TS_NODE_PROJECT=../../config/tsconfig.test.json mocha -r \\"../../scripts/import-expansions.js\\" --timeout 60000 -r ts-node/register \\"./src/**/*.spec.ts\\"","test-ci":"node ../../scripts/run-if-package-requested.js npm test","test-apistrict-ci":"cross-env MONGOSH_TEST_FORCE_API_STRICT=1 npm run test-ci","prepublish":"npm run compile-ts"},"license":"Apache-2.0","publishConfig":{"access":"public"},"engines":{"node":">=14.15.1"},"precommit":["build"],"dependencies":{"@mongosh/arg-parser":"1.5.1","@mongosh/errors":"1.5.1","@mongosh/history":"1.5.1","@mongosh/i18n":"1.5.1","@mongosh/service-provider-core":"1.5.1","mongodb-redact":"^0.2.2"},"devDependencies":{"@mongosh/types":"1.5.1"},"gitHead":"0395e15ca5ffcad0aa22e337c014441e8da7909d"}')},function(e,t,n){const r=n(52);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},function(e,t,n){const r=n(52);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},function(e,t,n){const r=n(12);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(e){return null}}},function(e,t,n){const r=n(52),i=n(123);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),s=n.prerelease.length||i.prerelease.length,o=s?"pre":"",a=s?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return o+e;return a}}},function(e,t,n){const r=n(12);e.exports=(e,t)=>new r(e,t).major},function(e,t,n){const r=n(12);e.exports=(e,t)=>new r(e,t).minor},function(e,t,n){const r=n(12);e.exports=(e,t)=>new r(e,t).patch},function(e,t,n){const r=n(52);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},function(e,t,n){const r=n(19);e.exports=(e,t,n)=>r(t,e,n)},function(e,t,n){const r=n(19);e.exports=(e,t)=>r(e,t,!0)},function(e,t,n){const r=n(124);e.exports=(e,t)=>e.sort((e,n)=>r(e,n,t))},function(e,t,n){const r=n(124);e.exports=(e,t)=>e.sort((e,n)=>r(n,e,t))},function(e,t,n){const r=n(12),i=n(52),{re:s,t:o}=n(51);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=s[o.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[o.COERCERTL].lastIndex=-1}else n=e.match(s[o.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},function(e,t,n){"use strict";const r=n(490),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),u=Symbol("dispose"),c=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[a])return}else n&&(e[f]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},y=e=>{if(e[s]>e[i])for(let t=e[h].tail;e[s]>e[i]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[s]-=n.length,e[d].delete(n.key),e[h].removeNode(t)}};class b{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const w=(e,t,n,r)=>{let i=n.value;g(e,i)&&(v(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[u]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,y(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[s]=0,this[h].forEach(e=>{e.length=this[o](e.value,e.key),this[s]+=e.length})),y(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let n=this[h].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[h].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[h].toArray().map(e=>e.key)}values(){return this[h].toArray().map(e=>e.value)}reset(){this[u]&&this[h]&&this[h].length&&this[h].forEach(e=>this[u](e.key,e.value)),this[d]=new Map,this[h]=new r,this[s]=0}dump(){return this[h].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[h]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[o](t,e);if(this[d].has(e)){if(a>this[i])return v(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[u]&&(this[c]||this[u](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[s]+=a-o.length,o.length=a,this.get(e),y(this),!0}const f=new b(e,t,a,r,n);return f.length>this[i]?(this[u]&&this[u](e,t),!1):(this[s]+=f.length,this[h].unshift(f),this[d].set(e,this[h].head),y(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[h].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach((e,t)=>m(this,t,!1))}}},function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function s(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)n.push(s.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)n.push(s.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,s=this.head;null!==s&&r<e;r++)s=s.next;var o=[];for(r=0;s&&r<t;r++)o.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(r=0;r<n.length;r++)s=i(this,s,n[r]);return o},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(491)(r)}catch(e){}},function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,n){const r=n(20);e.exports=(e,t)=>new r(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,n){const r=n(12),i=n(20);e.exports=(e,t,n)=>{let s=null,o=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new r(s,n)))}),s}},function(e,t,n){const r=n(12),i=n(20);e.exports=(e,t,n)=>{let s=null,o=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new r(s,n)))}),s}},function(e,t,n){const r=n(12),i=n(20),s=n(74);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let o=null;i.forEach(e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!o||n&&!s(n,o)||(n=o)}return n&&e.test(n)?n:null}},function(e,t,n){const r=n(20);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},function(e,t,n){const r=n(128);e.exports=(e,t,n)=>r(e,t,">",n)},function(e,t,n){const r=n(128);e.exports=(e,t,n)=>r(e,t,"<",n)},function(e,t,n){const r=n(20);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},function(e,t,n){const r=n(76),i=n(19);e.exports=(e,t,n)=>{const s=[];let o=null,a=null;const l=e.sort((e,t)=>i(e,t,n));for(const e of l){r(e,t,n)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push("<="+t):u.push(`${e} - ${t}`):u.push(">="+e):u.push("*");const c=u.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return c.length<h.length?c:t}},function(e,t,n){const r=n(20),i=n(75),{ANY:s}=i,o=n(76),a=n(19),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=[new i(">=0.0.0")]}const r=new Set;let l,h,d,f,p,m,g;for(const t of e)">"===t.operator||">="===t.operator?l=u(l,t,n):"<"===t.operator||"<="===t.operator?h=c(h,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&h){if(d=a(l.semver,h.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==h.operator))return null}for(const e of r){if(l&&!o(e,String(l),n))return null;if(h&&!o(e,String(h),n))return null;for(const r of t)if(!o(e,String(r),n))return!1;return!0}let y=!(!h||n.includePrerelease||!h.semver.prerelease.length)&&h.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;y&&1===y.prerelease.length&&"<"===h.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(f=u(l,e,n),f===e&&f!==l)return!1}else if(">="===l.operator&&!o(l.semver,String(e),n))return!1;if(h)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(p=c(h,e,n),p===e&&p!==h)return!1}else if("<="===h.operator&&!o(h.semver,String(e),n))return!1;if(!e.operator&&(h||l)&&0!==d)return!1}return!(l&&m&&!h&&0!==d)&&(!(h&&g&&!l&&0!==d)&&(!v&&!y))},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},function(e,t,n){e.exports=n(129),e.exports.QueryAutoCompleter=n(129),e.exports.StageAutoCompleter=n(503),e.exports.ValidationAutoCompleter=n(504),e.exports.ACCUMULATORS=n(215),e.exports.BSON_TYPES=n(77),e.exports.EXPRESSION_OPERATORS=n(214),e.exports.CONVERSION_OPERATORS=n(213),e.exports.QUERY_OPERATORS=n(130),e.exports.STAGE_OPERATORS=n(505),e.exports.JSON_SCHEMA=n(216),e.exports.BSON_TYPE_ALIASES=n(217);const{ATLAS:r,ADL:i,ON_PREM:s,ENVS:o}=n(218);e.exports.ATLAS=r,e.exports.ADL=i,e.exports.ON_PREM=s,e.exports.ENVS=o},function(e,t,n){const r=n(121),i=n(213),s=n(214),o=n(215),a=n(77),l=n(129),u=n(131),c=s.concat(i.concat(a));e.exports=class{accumulators(){if(this.stageOperator){if("$project"===this.stageOperator)return o.filter(e=>e.projectVersion&&r.gte(this.version,e.projectVersion));if("$group"===this.stageOperator)return o}return[]}constructor(e,t,n,r){this.version=e,this.textCompleter=t,this.fields=n,this.variableFields=this.generateVariableFields(n),this.stageOperator=r,this.queryAutoCompleter=new l(e,t,n)}update(e,t){this.fields=e,this.variableFields=this.generateVariableFields(e),this.queryAutoCompleter.fields=e,this.stageOperator=t}generateVariableFields(e){return e.map(e=>({name:"$"+e.name.replace(/"/g,""),value:"$"+e.value.replace(/"/g,""),meta:e.meta,version:e.version,score:1}))}getCompletions(e,t,n,r,i){if(""===r)return i(null,[]);const s=t.getTokenAt(n.row,n.column);if("string"===s.type)return"$"===r?i(null,this.variableFields):this.textCompleter.getCompletions(e,t,n,r,i);if(s.type.includes("comment"))return i(null,[]);if(!this.stageOperator||"$match"!==this.stageOperator){const e=c.concat(this.accumulators()).concat(this.fields);return i(null,u(this.version,e,r))}this.queryAutoCompleter.getCompletions(e,t,n,r,i)}}},function(e,t,n){const r=n(130),i=n(77),s=n(216),o=n(217),a=n(131),l=r.concat(i);e.exports=class{constructor(e,t,n){this.version=e,this.textCompleter=t,this.fields=n}update(e){this.fields=e}getCompletions(e,t,n,r,i){if(""===r)return i(null,[]);if("string"===t.getTokenAt(n.row,n.column).type){const e=o.concat(this.fields);return i(null,a(this.version,e,r))}const u=l.concat(this.fields,s);return i(null,a(this.version,u,r))}}},function(e,t,n){const{ATLAS:r,ADL:i,ON_PREM:s}=n(218),o=[{name:"$addFields",value:"$addFields",label:"$addFields",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n*/\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$densify",value:"$densify",label:"$densify",score:1,env:[r,i,s],meta:"stage",version:"5.1.0",apiVersions:[1],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",score:1,env:[r],meta:"stage",version:"4.4.9",apiVersions:[1],description:"Returns literal results for a full-text search.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",score:1,env:[r,i,s],meta:"stage",version:"5.3.0",apiVersions:[1],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",score:1,env:[r,i,s],meta:"stage",version:"2.4.0",apiVersions:[1],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n}",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",score:1,env:[r,i,s],meta:"stage",version:"3.2.0",apiVersions:[],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$lookup",value:"$lookup",label:"$lookup",score:1,env:[r,i,s],meta:"stage",version:"3.2.0",apiVersions:[1],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: The pipeline to run on the joined collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: '${1:string}',\n localField: '${2:string}',\n foreignField: '${3:string}',\n as: '${4:string}'\n}"},{name:"$match",value:"$match",label:"$match",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",score:1,env:[r,i,s],meta:"stage",version:"4.1.11",apiVersions:[1],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$out",value:"$out",label:"$out",score:1,env:[r,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output collection.\n */\n",snippet:"'${1:string}'"},{name:"$out",value:"$out",label:"$out",score:1,env:[i],meta:"stage",version:"4.0.0",apiVersions:[1],description:"Writes the result of a pipeline to an Atlas cluster or S3 bucket.",comment:"/**\n * s3Url: A S3 URL to save the data.\n * atlas: Parameters to save to Atlas.\n */\n",snippet:"{\n s3: '${1:s3url}'\n atlas: {\n db: '${2:db}',\n coll: '${3:coll}',\n projectId: '${4:projectId}',\n clusterName: '${5:clusterName}'\n }\n}"},{name:"$project",value:"$project",label:"$project",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$redact",value:"$redact",label:"$redact",score:1,env:[r,i,s],meta:"stage",version:"2.6.0",apiVersions:[1],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",score:1,env:[r,i,s],meta:"stage",version:"4.2.0",apiVersions:[1],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",score:1,env:[r,i,s],meta:"stage",version:"3.2.0",apiVersions:[1],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$search",value:"$search",label:"$search",score:1,env:[r],meta:"stage",version:"4.1.11",apiVersions:[],description:"Performs a full-text search on the specified field(s).",comment:"/** \n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search.\n * term: Un-analyzed search.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}'\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",score:1,env:[r],meta:"stage",version:"4.4.9",apiVersions:[],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",score:1,env:[r,i,s],meta:"stage",version:"4.2.0",apiVersions:[1],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",score:1,env:[r,i,s],meta:"stage",version:"5.0.0",description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",score:1,env:[r,i,s],meta:"stage",version:"4.4.0",apiVersions:[1],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",score:1,env:[r,i,s],meta:"stage",version:"4.2.0",apiVersions:[1],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"}],a=o.map(e=>e.name);e.exports=o,e.exports.STAGE_OPERATOR_NAMES=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellEvaluator=void 0;const r=n(507);Object.defineProperty(t,"ShellEvaluator",{enumerable:!0,get:function(){return r.ShellEvaluator}}),t.default=r.ShellEvaluator},function(module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ShellEvaluator=void 0;const shell_api_1=__webpack_require__(44),async_rewriter2_1=__importDefault(__webpack_require__(508)),history_1=__webpack_require__(32);class ShellEvaluator{constructor(e,t=shell_api_1.toShellResult){this.hasAppliedAsyncWriterRuntimeSupport=!0,this.instanceState=e,this.resultHandler=t,this.asyncWriter=new async_rewriter2_1.default,this.hasAppliedAsyncWriterRuntimeSupport=!1}async innerEval(originalEval,input,context,filename){var _a,_b,_c,_d,_e;const{shellApi:shellApi}=this.instanceState,trimmedInput=input.trim(),argv=trimmedInput.replace(/;$/,"").split(/\s+/g),cmd=argv.shift();if((null===(_a=shellApi[cmd])||void 0===_a?void 0:_a.isDirectShellCommand)&&(null===(_b=shellApi[cmd])||void 0===_b?void 0:_b.acceptsRawInput)&&!(null!==(_c=argv[0])&&void 0!==_c?_c:"").startsWith("(")){const e=trimmedInput.replace(/^\S+\s*/,"");return shellApi[cmd](e)}if((null===(_d=shellApi[cmd])||void 0===_d?void 0:_d.isDirectShellCommand)&&!(null!==(_e=argv[0])&&void 0!==_e?_e:"").startsWith("("))return shellApi[cmd](...argv);let rewrittenInput=this.asyncWriter.process(input);const hiddenCommands=RegExp(history_1.HIDDEN_COMMANDS,"g");if(hiddenCommands.test(input)||hiddenCommands.test(rewrittenInput)||this.instanceState.messageBus.emit("mongosh:evaluate-input",{input:(0,history_1.redactSensitiveData)(trimmedInput)}),!this.hasAppliedAsyncWriterRuntimeSupport){this.hasAppliedAsyncWriterRuntimeSupport=!0;const supportCode=this.asyncWriter.runtimeSupportCode();eval(supportCode),rewrittenInput=supportCode+";\n"+rewrittenInput}try{return await originalEval(rewrittenInput,context,filename)}catch(e){throw this.instanceState.transformError(e)}}async customEval(e,t,n,r){const i=await this.innerEval(e,t,n,r);return await this.resultHandler(i)}}exports.ShellEvaluator=ShellEvaluator},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(509));t.default=i.default},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(31)),l=o(n(673)),u=o(n(674)),c=o(n(675)),h=o(n(676)),d=n(677);t.default=class{step(e,t,n=[],r={}){return(n=>e?a.transformFromAstSync(e,t,n):a.transformSync(t,n))({plugins:n,code:!1,ast:!0,cloneInputAst:!1,configFile:!1,babelrc:!1,browserslistConfigFile:!1,compact:t.length>1e4,sourceType:"script",...r})}process(e){var t,r,i,s;try{let o=null===(t=this.step(void 0,e,[n(678).default,n(679).default,n(682).default]))||void 0===t?void 0:t.ast;return o=null===(r=this.step(o,e,[u.default]))||void 0===r?void 0:r.ast,o=null===(i=this.step(o,e,[c.default]))||void 0===i?void 0:i.ast,null===(s=this.step(o,e,[[h.default,{customErrorBuilder:a.types.identifier("MongoshAsyncWriterError")}]],{code:!0,ast:!1}))||void 0===s?void 0:s.code}catch(e){const{message:t}=e;throw delete e.message,e.message=t.replace("unknown: ",""),e}}unprocessedRuntimeSupportCode(){return this.process(`\n class MongoshAsyncWriterError extends Error {\n constructor(message, codeIdentifier) {\n const code = (${JSON.stringify(d.AsyncRewriterErrors)})[codeIdentifier];\n super(\`[\${code}] \${message}\`);\n this.code = code;\n }\n }`)}runtimeSupportCode(){return l.default}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(222).default)("React.Component");t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];for(let n=0;n<e.children.length;n++){let s=e.children[n];(0,r.isJSXText)(s)?(0,i.default)(s,t):((0,r.isJSXExpressionContainer)(s)&&(s=s.expression),(0,r.isJSXEmptyExpression)(s)||t.push(s))}return t};var r=n(10),i=n(513)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=e.value.split(/\r\n|\n|\r/);let i=0;for(let e=0;e<n.length;e++)n[e].match(/[^ \t]/)&&(i=e);let s="";for(let e=0;e<n.length;e++){const t=n[e],r=0===e,o=e===n.length-1,a=e===i;let l=t.replace(/\t/g," ");r||(l=l.replace(/^[ ]+/,"")),o||(l=l.replace(/[ ]+$/,"")),l&&(a||(l+=" "),s+=l)}s&&t.push((0,r.stringLiteral)(s))};var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=this,t=r.BUILDER_KEYS[e],n=arguments.length;if(n>t.length)throw new Error(`${e}: Too many arguments passed. Received ${n} but can receive no more than ${t.length}`);const s={type:e};for(let i=0;i<t.length;++i){const o=t[i],a=r.NODE_FIELDS[e][o];let l;i<n&&(l=arguments[i]),void 0===l&&(l=Array.isArray(a.default)?[]:a.default),s[o]=l}for(const e in s)(0,i.default)(s,e,s[e]);return s};var r=n(18),i=n(135)},function(e,t,n){"use strict";let r=null;function i(e){if(null!==r&&(r.property,1)){const e=r;return r=i.prototype=null,e}return r=i.prototype=null==e?Object.create(null):e,new i}i(),e.exports=function(e){return i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentifierChar=h,t.isIdentifierName=function(e){let t=!0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296==(64512&r)&&n+1<e.length){const t=e.charCodeAt(++n);56320==(64512&t)&&(r=65536+((1023&r)<<10)+(1023&t))}if(t){if(t=!1,!c(r))return!1}else if(!h(r))return!1}return!t},t.isIdentifierStart=c;let r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const s=new RegExp("["+r+"]"),o=new RegExp("["+r+i+"]");r=i=null;const a=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],l=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function u(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function c(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):u(e,a)))}function h(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):u(e,a)||u(e,l))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isKeyword=function(e){return s.has(e)},t.isReservedWord=l,t.isStrictBindOnlyReservedWord=c,t.isStrictBindReservedWord=function(e,t){return u(e,t)||c(e)},t.isStrictReservedWord=u;const r=["implements","interface","let","package","private","protected","public","static","yield"],i=["eval","arguments"],s=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),o=new Set(r),a=new Set(i);function l(e,t){return t&&"await"===e||"enum"===e}function u(e,t){return l(e,t)||o.has(e)}function c(e){return a.has(e)}},function(e,t,n){"use strict";var r=n(34);const i=(0,r.defineAliasedType)("Flow"),s=(e,t="TypeParameterDeclaration")=>{i(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)(t),extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),mixins:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),implements:(0,r.validateOptional)((0,r.arrayOfType)("ClassImplements")),body:(0,r.validateType)("ObjectTypeAnnotation")}})};i("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,r.validateType)("FlowType")}}),i("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),s("DeclareClass"),i("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),predicate:(0,r.validateOptionalType)("DeclaredPredicate")}}),s("DeclareInterface"),i("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)("BlockStatement"),kind:(0,r.validateOptional)((0,r.assertOneOf)("CommonJS","ES"))}}),i("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),i("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),i("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType"),impltype:(0,r.validateOptionalType)("FlowType")}}),i("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier")}}),i("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,r.validateOptionalType)("Flow"),specifiers:(0,r.validateOptional)((0,r.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,r.validateOptionalType)("StringLiteral"),default:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),i("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:(0,r.validateType)("StringLiteral"),exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value"))}}),i("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,r.validateType)("Flow")}}),i("ExistsTypeAnnotation",{aliases:["FlowType"]}),i("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),params:(0,r.validate)((0,r.arrayOfType)("FunctionTypeParam")),rest:(0,r.validateOptionalType)("FunctionTypeParam"),this:(0,r.validateOptionalType)("FunctionTypeParam"),returnType:(0,r.validateType)("FlowType")}}),i("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,r.validateOptionalType)("Identifier"),typeAnnotation:(0,r.validateType)("FlowType"),optional:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),i("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),i("InferredPredicate",{aliases:["FlowPredicate"]}),i("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),s("InterfaceDeclaration"),i("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),body:(0,r.validateType)("ObjectTypeAnnotation")}}),i("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),i("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("number"))}}),i("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,r.validate)((0,r.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,r.assertValueType)("boolean"),default:!1},inexact:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,r.validateType)("Identifier"),value:(0,r.validateType)("FlowType"),optional:(0,r.validate)((0,r.assertValueType)("boolean")),static:(0,r.validate)((0,r.assertValueType)("boolean")),method:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,r.validateOptionalType)("Identifier"),key:(0,r.validateType)("FlowType"),value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance")}}),i("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,r.validateType)(["Identifier","StringLiteral"]),value:(0,r.validateType)("FlowType"),kind:(0,r.validate)((0,r.assertOneOf)("init","get","set")),static:(0,r.validate)((0,r.assertValueType)("boolean")),proto:(0,r.validate)((0,r.assertValueType)("boolean")),optional:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance"),method:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,r.validateType)("FlowType")}}),i("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType"),impltype:(0,r.validateType)("FlowType")}}),i("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:(0,r.validateType)("Identifier"),qualification:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"])}}),i("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("string"))}}),i("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,r.validateType)("FlowType")}}),i("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),i("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),i("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),i("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,r.validate)((0,r.assertValueType)("string")),bound:(0,r.validateOptionalType)("TypeAnnotation"),default:(0,r.validateOptionalType)("FlowType"),variance:(0,r.validateOptionalType)("Variance")}}),i("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("TypeParameter"))}}),i("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("Variance",{builder:["kind"],fields:{kind:(0,r.validate)((0,r.assertOneOf)("minus","plus"))}}),i("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,r.validateType)("Identifier"),body:(0,r.validateType)(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),i("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("BooleanLiteral")}}),i("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("NumericLiteral")}}),i("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("StringLiteral")}}),i("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),i("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,r.validateType)("FlowType"),indexType:(0,r.validateType)("FlowType")}}),i("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,r.validateType)("FlowType"),indexType:(0,r.validateType)("FlowType"),optional:(0,r.validate)((0,r.assertValueType)("boolean"))}})},function(e,t,n){"use strict";var r=n(34);const i=(0,r.defineAliasedType)("JSX");i("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,r.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),i("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),i("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:{openingElement:{validate:(0,r.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,r.assertNodeType)("JSXClosingElement")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))},selfClosing:{validate:(0,r.assertValueType)("boolean"),optional:!0}}}),i("JSXEmptyExpression",{}),i("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression","JSXEmptyExpression")}}}),i("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),i("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}}),i("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,r.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),i("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,r.assertNodeType)("JSXIdentifier")},name:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),i("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),i("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),i("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}}}),i("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,r.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,r.assertNodeType)("JSXClosingFragment")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),i("JSXOpeningFragment",{aliases:["Immutable"]}),i("JSXClosingFragment",{aliases:["Immutable"]})},function(e,t,n){"use strict";var r=n(34),i=n(226);const s=(0,r.defineAliasedType)("Miscellaneous");s("Noop",{visitor:[]}),s("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:(0,r.assertNodeType)("Identifier")},expectedNode:{validate:(0,r.assertOneOf)(...i.PLACEHOLDERS)}}}),s("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}})},function(e,t,n){"use strict";(function(e){var t=n(34);(0,t.default)("ArgumentPlaceholder",{}),(0,t.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:e.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,t.assertNodeType)("Expression")},callee:{validate:(0,t.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}}),(0,t.default)("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,t.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,t.assertNodeType)("StringLiteral")}}}),(0,t.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}}}),(0,t.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,t.assertNodeType)("BlockStatement")},async:{validate:(0,t.assertValueType)("boolean"),default:!1}}}),(0,t.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,t.assertNodeType)("Identifier")}}}),(0,t.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,t.chain)((0,t.assertValueType)("array"),(0,t.assertEach)((0,t.assertNodeType)("ObjectProperty","SpreadElement")))}}}),(0,t.default)("TupleExpression",{fields:{elements:{validate:(0,t.chain)((0,t.assertValueType)("array"),(0,t.assertEach)((0,t.assertNodeType)("Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,t.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,t.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,t.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,t.assertNodeType)("Program")}},aliases:["Expression"]}),(0,t.default)("TopicReference",{aliases:["Expression"]}),(0,t.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]})}).call(this,n(3))},function(e,t,n){"use strict";var r=n(34),i=n(224),s=n(62);const o=(0,r.defineAliasedType)("TypeScript"),a=(0,r.assertValueType)("boolean"),l={returnType:{validate:(0,r.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}};o("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,r.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,r.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}}}),o("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},i.functionDeclarationCommon,l)}),o("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},i.classMethodOrDeclareMethodCommon,l)}),o("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,r.validateType)("TSEntityName"),right:(0,r.validateType)("Identifier")}});const u={typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,r.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")},c={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:u};o("TSCallSignatureDeclaration",c),o("TSConstructSignatureDeclaration",c);const h={key:(0,r.validateType)("Expression"),computed:(0,r.validate)(a),optional:(0,r.validateOptional)(a)};o("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},h,{readonly:(0,r.validateOptional)(a),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),initializer:(0,r.validateOptionalType)("Expression"),kind:{validate:(0,r.assertOneOf)("get","set")}})}),o("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},u,h,{kind:{validate:(0,r.assertOneOf)("method","get","set")}})}),o("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(a),static:(0,r.validateOptional)(a),parameters:(0,r.validateArrayOfType)("Identifier"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")}});const d=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of d)o(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});o("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const f={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};o("TSFunctionType",Object.assign({},f,{fields:u})),o("TSConstructorType",Object.assign({},f,{fields:Object.assign({},u,{abstract:(0,r.validateOptional)(a)})})),o("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,r.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),asserts:(0,r.validateOptional)(a)}}),o("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,r.validateType)(["TSEntityName","TSImportType"])}}),o("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("TSTypeElement")}}),o("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,r.validateType)("TSType")}}),o("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,r.validateArrayOfType)(["TSType","TSNamedTupleMember"])}}),o("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,r.validateType)("Identifier"),optional:{validate:a,default:!1},elementType:(0,r.validateType)("TSType")}});const p={aliases:["TSType"],visitor:["types"],fields:{types:(0,r.validateArrayOfType)("TSType")}};o("TSUnionType",p),o("TSIntersectionType",p),o("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,r.validateType)("TSType"),extendsType:(0,r.validateType)("TSType"),trueType:(0,r.validateType)("TSType"),falseType:(0,r.validateType)("TSType")}}),o("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,r.validateType)("TSTypeParameter")}}),o("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,r.validate)((0,r.assertValueType)("string")),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,r.validateType)("TSType"),indexType:(0,r.validateType)("TSType")}}),o("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation","nameType"],fields:{readonly:(0,r.validateOptional)(a),typeParameter:(0,r.validateType)("TSTypeParameter"),optional:(0,r.validateOptional)(a),typeAnnotation:(0,r.validateOptionalType)("TSType"),nameType:(0,r.validateOptionalType)("TSType")}}),o("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const e=(0,r.assertNodeType)("NumericLiteral","BigIntLiteral"),t=(0,r.assertOneOf)("-"),n=(0,r.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral");function i(r,i,o){(0,s.default)("UnaryExpression",o)?(t(o,"operator",o.operator),e(o,"argument",o.argument)):n(r,i,o)}return i.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","UnaryExpression"],i}()}}}),o("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,r.validateOptional)((0,r.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,r.validateType)("TSInterfaceBody")}}),o("TSInterfaceBody",{visitor:["body"],fields:{body:(0,r.validateArrayOfType)("TSTypeElement")}}),o("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,r.validateType)("TSType"),expression:(0,r.validateType)("Expression")}}),o("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,r.validateOptional)(a),const:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),members:(0,r.validateArrayOfType)("TSEnumMember"),initializer:(0,r.validateOptionalType)("Expression")}}),o("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),initializer:(0,r.validateOptionalType)("Expression")}}),o("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,r.validateOptional)(a),global:(0,r.validateOptional)(a),id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)(["TSModuleBlock","TSModuleDeclaration"])}}),o("TSModuleBlock",{aliases:["Scopable","Block","BlockParent"],visitor:["body"],fields:{body:(0,r.validateArrayOfType)("Statement")}}),o("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:(0,r.validateType)("StringLiteral"),qualifier:(0,r.validateOptionalType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,r.validate)(a),id:(0,r.validateType)("Identifier"),moduleReference:(0,r.validateType)(["TSEntityName","TSExternalModuleReference"]),importKind:{validate:(0,r.assertOneOf)("type","value"),optional:!0}}}),o("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,r.validateType)("StringLiteral")}}),o("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),o("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),o("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),o("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,r.assertNodeType)("TSType")}}}),o("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSType")))}}}),o("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSTypeParameter")))}}}),o("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,r.assertValueType)("string")},constraint:{validate:(0,r.assertNodeType)("TSType"),optional:!0},default:{validate:(0,r.assertNodeType)("TSType"),optional:!0}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,r.default)(e)){var t;const n=null!=(t=null==e?void 0:e.type)?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${n}"`)}};var r=n(227)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertAccessor=function(e,t){i("Accessor",e,t)},t.assertAnyTypeAnnotation=function(e,t){i("AnyTypeAnnotation",e,t)},t.assertArgumentPlaceholder=function(e,t){i("ArgumentPlaceholder",e,t)},t.assertArrayExpression=function(e,t){i("ArrayExpression",e,t)},t.assertArrayPattern=function(e,t){i("ArrayPattern",e,t)},t.assertArrayTypeAnnotation=function(e,t){i("ArrayTypeAnnotation",e,t)},t.assertArrowFunctionExpression=function(e,t){i("ArrowFunctionExpression",e,t)},t.assertAssignmentExpression=function(e,t){i("AssignmentExpression",e,t)},t.assertAssignmentPattern=function(e,t){i("AssignmentPattern",e,t)},t.assertAwaitExpression=function(e,t){i("AwaitExpression",e,t)},t.assertBigIntLiteral=function(e,t){i("BigIntLiteral",e,t)},t.assertBinary=function(e,t){i("Binary",e,t)},t.assertBinaryExpression=function(e,t){i("BinaryExpression",e,t)},t.assertBindExpression=function(e,t){i("BindExpression",e,t)},t.assertBlock=function(e,t){i("Block",e,t)},t.assertBlockParent=function(e,t){i("BlockParent",e,t)},t.assertBlockStatement=function(e,t){i("BlockStatement",e,t)},t.assertBooleanLiteral=function(e,t){i("BooleanLiteral",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t){i("BooleanLiteralTypeAnnotation",e,t)},t.assertBooleanTypeAnnotation=function(e,t){i("BooleanTypeAnnotation",e,t)},t.assertBreakStatement=function(e,t){i("BreakStatement",e,t)},t.assertCallExpression=function(e,t){i("CallExpression",e,t)},t.assertCatchClause=function(e,t){i("CatchClause",e,t)},t.assertClass=function(e,t){i("Class",e,t)},t.assertClassAccessorProperty=function(e,t){i("ClassAccessorProperty",e,t)},t.assertClassBody=function(e,t){i("ClassBody",e,t)},t.assertClassDeclaration=function(e,t){i("ClassDeclaration",e,t)},t.assertClassExpression=function(e,t){i("ClassExpression",e,t)},t.assertClassImplements=function(e,t){i("ClassImplements",e,t)},t.assertClassMethod=function(e,t){i("ClassMethod",e,t)},t.assertClassPrivateMethod=function(e,t){i("ClassPrivateMethod",e,t)},t.assertClassPrivateProperty=function(e,t){i("ClassPrivateProperty",e,t)},t.assertClassProperty=function(e,t){i("ClassProperty",e,t)},t.assertCompletionStatement=function(e,t){i("CompletionStatement",e,t)},t.assertConditional=function(e,t){i("Conditional",e,t)},t.assertConditionalExpression=function(e,t){i("ConditionalExpression",e,t)},t.assertContinueStatement=function(e,t){i("ContinueStatement",e,t)},t.assertDebuggerStatement=function(e,t){i("DebuggerStatement",e,t)},t.assertDecimalLiteral=function(e,t){i("DecimalLiteral",e,t)},t.assertDeclaration=function(e,t){i("Declaration",e,t)},t.assertDeclareClass=function(e,t){i("DeclareClass",e,t)},t.assertDeclareExportAllDeclaration=function(e,t){i("DeclareExportAllDeclaration",e,t)},t.assertDeclareExportDeclaration=function(e,t){i("DeclareExportDeclaration",e,t)},t.assertDeclareFunction=function(e,t){i("DeclareFunction",e,t)},t.assertDeclareInterface=function(e,t){i("DeclareInterface",e,t)},t.assertDeclareModule=function(e,t){i("DeclareModule",e,t)},t.assertDeclareModuleExports=function(e,t){i("DeclareModuleExports",e,t)},t.assertDeclareOpaqueType=function(e,t){i("DeclareOpaqueType",e,t)},t.assertDeclareTypeAlias=function(e,t){i("DeclareTypeAlias",e,t)},t.assertDeclareVariable=function(e,t){i("DeclareVariable",e,t)},t.assertDeclaredPredicate=function(e,t){i("DeclaredPredicate",e,t)},t.assertDecorator=function(e,t){i("Decorator",e,t)},t.assertDirective=function(e,t){i("Directive",e,t)},t.assertDirectiveLiteral=function(e,t){i("DirectiveLiteral",e,t)},t.assertDoExpression=function(e,t){i("DoExpression",e,t)},t.assertDoWhileStatement=function(e,t){i("DoWhileStatement",e,t)},t.assertEmptyStatement=function(e,t){i("EmptyStatement",e,t)},t.assertEmptyTypeAnnotation=function(e,t){i("EmptyTypeAnnotation",e,t)},t.assertEnumBody=function(e,t){i("EnumBody",e,t)},t.assertEnumBooleanBody=function(e,t){i("EnumBooleanBody",e,t)},t.assertEnumBooleanMember=function(e,t){i("EnumBooleanMember",e,t)},t.assertEnumDeclaration=function(e,t){i("EnumDeclaration",e,t)},t.assertEnumDefaultedMember=function(e,t){i("EnumDefaultedMember",e,t)},t.assertEnumMember=function(e,t){i("EnumMember",e,t)},t.assertEnumNumberBody=function(e,t){i("EnumNumberBody",e,t)},t.assertEnumNumberMember=function(e,t){i("EnumNumberMember",e,t)},t.assertEnumStringBody=function(e,t){i("EnumStringBody",e,t)},t.assertEnumStringMember=function(e,t){i("EnumStringMember",e,t)},t.assertEnumSymbolBody=function(e,t){i("EnumSymbolBody",e,t)},t.assertExistsTypeAnnotation=function(e,t){i("ExistsTypeAnnotation",e,t)},t.assertExportAllDeclaration=function(e,t){i("ExportAllDeclaration",e,t)},t.assertExportDeclaration=function(e,t){i("ExportDeclaration",e,t)},t.assertExportDefaultDeclaration=function(e,t){i("ExportDefaultDeclaration",e,t)},t.assertExportDefaultSpecifier=function(e,t){i("ExportDefaultSpecifier",e,t)},t.assertExportNamedDeclaration=function(e,t){i("ExportNamedDeclaration",e,t)},t.assertExportNamespaceSpecifier=function(e,t){i("ExportNamespaceSpecifier",e,t)},t.assertExportSpecifier=function(e,t){i("ExportSpecifier",e,t)},t.assertExpression=function(e,t){i("Expression",e,t)},t.assertExpressionStatement=function(e,t){i("ExpressionStatement",e,t)},t.assertExpressionWrapper=function(e,t){i("ExpressionWrapper",e,t)},t.assertFile=function(e,t){i("File",e,t)},t.assertFlow=function(e,t){i("Flow",e,t)},t.assertFlowBaseAnnotation=function(e,t){i("FlowBaseAnnotation",e,t)},t.assertFlowDeclaration=function(e,t){i("FlowDeclaration",e,t)},t.assertFlowPredicate=function(e,t){i("FlowPredicate",e,t)},t.assertFlowType=function(e,t){i("FlowType",e,t)},t.assertFor=function(e,t){i("For",e,t)},t.assertForInStatement=function(e,t){i("ForInStatement",e,t)},t.assertForOfStatement=function(e,t){i("ForOfStatement",e,t)},t.assertForStatement=function(e,t){i("ForStatement",e,t)},t.assertForXStatement=function(e,t){i("ForXStatement",e,t)},t.assertFunction=function(e,t){i("Function",e,t)},t.assertFunctionDeclaration=function(e,t){i("FunctionDeclaration",e,t)},t.assertFunctionExpression=function(e,t){i("FunctionExpression",e,t)},t.assertFunctionParent=function(e,t){i("FunctionParent",e,t)},t.assertFunctionTypeAnnotation=function(e,t){i("FunctionTypeAnnotation",e,t)},t.assertFunctionTypeParam=function(e,t){i("FunctionTypeParam",e,t)},t.assertGenericTypeAnnotation=function(e,t){i("GenericTypeAnnotation",e,t)},t.assertIdentifier=function(e,t){i("Identifier",e,t)},t.assertIfStatement=function(e,t){i("IfStatement",e,t)},t.assertImmutable=function(e,t){i("Immutable",e,t)},t.assertImport=function(e,t){i("Import",e,t)},t.assertImportAttribute=function(e,t){i("ImportAttribute",e,t)},t.assertImportDeclaration=function(e,t){i("ImportDeclaration",e,t)},t.assertImportDefaultSpecifier=function(e,t){i("ImportDefaultSpecifier",e,t)},t.assertImportNamespaceSpecifier=function(e,t){i("ImportNamespaceSpecifier",e,t)},t.assertImportSpecifier=function(e,t){i("ImportSpecifier",e,t)},t.assertIndexedAccessType=function(e,t){i("IndexedAccessType",e,t)},t.assertInferredPredicate=function(e,t){i("InferredPredicate",e,t)},t.assertInterfaceDeclaration=function(e,t){i("InterfaceDeclaration",e,t)},t.assertInterfaceExtends=function(e,t){i("InterfaceExtends",e,t)},t.assertInterfaceTypeAnnotation=function(e,t){i("InterfaceTypeAnnotation",e,t)},t.assertInterpreterDirective=function(e,t){i("InterpreterDirective",e,t)},t.assertIntersectionTypeAnnotation=function(e,t){i("IntersectionTypeAnnotation",e,t)},t.assertJSX=function(e,t){i("JSX",e,t)},t.assertJSXAttribute=function(e,t){i("JSXAttribute",e,t)},t.assertJSXClosingElement=function(e,t){i("JSXClosingElement",e,t)},t.assertJSXClosingFragment=function(e,t){i("JSXClosingFragment",e,t)},t.assertJSXElement=function(e,t){i("JSXElement",e,t)},t.assertJSXEmptyExpression=function(e,t){i("JSXEmptyExpression",e,t)},t.assertJSXExpressionContainer=function(e,t){i("JSXExpressionContainer",e,t)},t.assertJSXFragment=function(e,t){i("JSXFragment",e,t)},t.assertJSXIdentifier=function(e,t){i("JSXIdentifier",e,t)},t.assertJSXMemberExpression=function(e,t){i("JSXMemberExpression",e,t)},t.assertJSXNamespacedName=function(e,t){i("JSXNamespacedName",e,t)},t.assertJSXOpeningElement=function(e,t){i("JSXOpeningElement",e,t)},t.assertJSXOpeningFragment=function(e,t){i("JSXOpeningFragment",e,t)},t.assertJSXSpreadAttribute=function(e,t){i("JSXSpreadAttribute",e,t)},t.assertJSXSpreadChild=function(e,t){i("JSXSpreadChild",e,t)},t.assertJSXText=function(e,t){i("JSXText",e,t)},t.assertLVal=function(e,t){i("LVal",e,t)},t.assertLabeledStatement=function(e,t){i("LabeledStatement",e,t)},t.assertLiteral=function(e,t){i("Literal",e,t)},t.assertLogicalExpression=function(e,t){i("LogicalExpression",e,t)},t.assertLoop=function(e,t){i("Loop",e,t)},t.assertMemberExpression=function(e,t){i("MemberExpression",e,t)},t.assertMetaProperty=function(e,t){i("MetaProperty",e,t)},t.assertMethod=function(e,t){i("Method",e,t)},t.assertMiscellaneous=function(e,t){i("Miscellaneous",e,t)},t.assertMixedTypeAnnotation=function(e,t){i("MixedTypeAnnotation",e,t)},t.assertModuleDeclaration=function(e,t){i("ModuleDeclaration",e,t)},t.assertModuleExpression=function(e,t){i("ModuleExpression",e,t)},t.assertModuleSpecifier=function(e,t){i("ModuleSpecifier",e,t)},t.assertNewExpression=function(e,t){i("NewExpression",e,t)},t.assertNoop=function(e,t){i("Noop",e,t)},t.assertNullLiteral=function(e,t){i("NullLiteral",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t){i("NullLiteralTypeAnnotation",e,t)},t.assertNullableTypeAnnotation=function(e,t){i("NullableTypeAnnotation",e,t)},t.assertNumberLiteral=function(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral"),i("NumberLiteral",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t){i("NumberLiteralTypeAnnotation",e,t)},t.assertNumberTypeAnnotation=function(e,t){i("NumberTypeAnnotation",e,t)},t.assertNumericLiteral=function(e,t){i("NumericLiteral",e,t)},t.assertObjectExpression=function(e,t){i("ObjectExpression",e,t)},t.assertObjectMember=function(e,t){i("ObjectMember",e,t)},t.assertObjectMethod=function(e,t){i("ObjectMethod",e,t)},t.assertObjectPattern=function(e,t){i("ObjectPattern",e,t)},t.assertObjectProperty=function(e,t){i("ObjectProperty",e,t)},t.assertObjectTypeAnnotation=function(e,t){i("ObjectTypeAnnotation",e,t)},t.assertObjectTypeCallProperty=function(e,t){i("ObjectTypeCallProperty",e,t)},t.assertObjectTypeIndexer=function(e,t){i("ObjectTypeIndexer",e,t)},t.assertObjectTypeInternalSlot=function(e,t){i("ObjectTypeInternalSlot",e,t)},t.assertObjectTypeProperty=function(e,t){i("ObjectTypeProperty",e,t)},t.assertObjectTypeSpreadProperty=function(e,t){i("ObjectTypeSpreadProperty",e,t)},t.assertOpaqueType=function(e,t){i("OpaqueType",e,t)},t.assertOptionalCallExpression=function(e,t){i("OptionalCallExpression",e,t)},t.assertOptionalIndexedAccessType=function(e,t){i("OptionalIndexedAccessType",e,t)},t.assertOptionalMemberExpression=function(e,t){i("OptionalMemberExpression",e,t)},t.assertParenthesizedExpression=function(e,t){i("ParenthesizedExpression",e,t)},t.assertPattern=function(e,t){i("Pattern",e,t)},t.assertPatternLike=function(e,t){i("PatternLike",e,t)},t.assertPipelineBareFunction=function(e,t){i("PipelineBareFunction",e,t)},t.assertPipelinePrimaryTopicReference=function(e,t){i("PipelinePrimaryTopicReference",e,t)},t.assertPipelineTopicExpression=function(e,t){i("PipelineTopicExpression",e,t)},t.assertPlaceholder=function(e,t){i("Placeholder",e,t)},t.assertPrivate=function(e,t){i("Private",e,t)},t.assertPrivateName=function(e,t){i("PrivateName",e,t)},t.assertProgram=function(e,t){i("Program",e,t)},t.assertProperty=function(e,t){i("Property",e,t)},t.assertPureish=function(e,t){i("Pureish",e,t)},t.assertQualifiedTypeIdentifier=function(e,t){i("QualifiedTypeIdentifier",e,t)},t.assertRecordExpression=function(e,t){i("RecordExpression",e,t)},t.assertRegExpLiteral=function(e,t){i("RegExpLiteral",e,t)},t.assertRegexLiteral=function(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"),i("RegexLiteral",e,t)},t.assertRestElement=function(e,t){i("RestElement",e,t)},t.assertRestProperty=function(e,t){console.trace("The node type RestProperty has been renamed to RestElement"),i("RestProperty",e,t)},t.assertReturnStatement=function(e,t){i("ReturnStatement",e,t)},t.assertScopable=function(e,t){i("Scopable",e,t)},t.assertSequenceExpression=function(e,t){i("SequenceExpression",e,t)},t.assertSpreadElement=function(e,t){i("SpreadElement",e,t)},t.assertSpreadProperty=function(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement"),i("SpreadProperty",e,t)},t.assertStandardized=function(e,t){i("Standardized",e,t)},t.assertStatement=function(e,t){i("Statement",e,t)},t.assertStaticBlock=function(e,t){i("StaticBlock",e,t)},t.assertStringLiteral=function(e,t){i("StringLiteral",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t){i("StringLiteralTypeAnnotation",e,t)},t.assertStringTypeAnnotation=function(e,t){i("StringTypeAnnotation",e,t)},t.assertSuper=function(e,t){i("Super",e,t)},t.assertSwitchCase=function(e,t){i("SwitchCase",e,t)},t.assertSwitchStatement=function(e,t){i("SwitchStatement",e,t)},t.assertSymbolTypeAnnotation=function(e,t){i("SymbolTypeAnnotation",e,t)},t.assertTSAnyKeyword=function(e,t){i("TSAnyKeyword",e,t)},t.assertTSArrayType=function(e,t){i("TSArrayType",e,t)},t.assertTSAsExpression=function(e,t){i("TSAsExpression",e,t)},t.assertTSBaseType=function(e,t){i("TSBaseType",e,t)},t.assertTSBigIntKeyword=function(e,t){i("TSBigIntKeyword",e,t)},t.assertTSBooleanKeyword=function(e,t){i("TSBooleanKeyword",e,t)},t.assertTSCallSignatureDeclaration=function(e,t){i("TSCallSignatureDeclaration",e,t)},t.assertTSConditionalType=function(e,t){i("TSConditionalType",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t){i("TSConstructSignatureDeclaration",e,t)},t.assertTSConstructorType=function(e,t){i("TSConstructorType",e,t)},t.assertTSDeclareFunction=function(e,t){i("TSDeclareFunction",e,t)},t.assertTSDeclareMethod=function(e,t){i("TSDeclareMethod",e,t)},t.assertTSEntityName=function(e,t){i("TSEntityName",e,t)},t.assertTSEnumDeclaration=function(e,t){i("TSEnumDeclaration",e,t)},t.assertTSEnumMember=function(e,t){i("TSEnumMember",e,t)},t.assertTSExportAssignment=function(e,t){i("TSExportAssignment",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t){i("TSExpressionWithTypeArguments",e,t)},t.assertTSExternalModuleReference=function(e,t){i("TSExternalModuleReference",e,t)},t.assertTSFunctionType=function(e,t){i("TSFunctionType",e,t)},t.assertTSImportEqualsDeclaration=function(e,t){i("TSImportEqualsDeclaration",e,t)},t.assertTSImportType=function(e,t){i("TSImportType",e,t)},t.assertTSIndexSignature=function(e,t){i("TSIndexSignature",e,t)},t.assertTSIndexedAccessType=function(e,t){i("TSIndexedAccessType",e,t)},t.assertTSInferType=function(e,t){i("TSInferType",e,t)},t.assertTSInterfaceBody=function(e,t){i("TSInterfaceBody",e,t)},t.assertTSInterfaceDeclaration=function(e,t){i("TSInterfaceDeclaration",e,t)},t.assertTSIntersectionType=function(e,t){i("TSIntersectionType",e,t)},t.assertTSIntrinsicKeyword=function(e,t){i("TSIntrinsicKeyword",e,t)},t.assertTSLiteralType=function(e,t){i("TSLiteralType",e,t)},t.assertTSMappedType=function(e,t){i("TSMappedType",e,t)},t.assertTSMethodSignature=function(e,t){i("TSMethodSignature",e,t)},t.assertTSModuleBlock=function(e,t){i("TSModuleBlock",e,t)},t.assertTSModuleDeclaration=function(e,t){i("TSModuleDeclaration",e,t)},t.assertTSNamedTupleMember=function(e,t){i("TSNamedTupleMember",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t){i("TSNamespaceExportDeclaration",e,t)},t.assertTSNeverKeyword=function(e,t){i("TSNeverKeyword",e,t)},t.assertTSNonNullExpression=function(e,t){i("TSNonNullExpression",e,t)},t.assertTSNullKeyword=function(e,t){i("TSNullKeyword",e,t)},t.assertTSNumberKeyword=function(e,t){i("TSNumberKeyword",e,t)},t.assertTSObjectKeyword=function(e,t){i("TSObjectKeyword",e,t)},t.assertTSOptionalType=function(e,t){i("TSOptionalType",e,t)},t.assertTSParameterProperty=function(e,t){i("TSParameterProperty",e,t)},t.assertTSParenthesizedType=function(e,t){i("TSParenthesizedType",e,t)},t.assertTSPropertySignature=function(e,t){i("TSPropertySignature",e,t)},t.assertTSQualifiedName=function(e,t){i("TSQualifiedName",e,t)},t.assertTSRestType=function(e,t){i("TSRestType",e,t)},t.assertTSStringKeyword=function(e,t){i("TSStringKeyword",e,t)},t.assertTSSymbolKeyword=function(e,t){i("TSSymbolKeyword",e,t)},t.assertTSThisType=function(e,t){i("TSThisType",e,t)},t.assertTSTupleType=function(e,t){i("TSTupleType",e,t)},t.assertTSType=function(e,t){i("TSType",e,t)},t.assertTSTypeAliasDeclaration=function(e,t){i("TSTypeAliasDeclaration",e,t)},t.assertTSTypeAnnotation=function(e,t){i("TSTypeAnnotation",e,t)},t.assertTSTypeAssertion=function(e,t){i("TSTypeAssertion",e,t)},t.assertTSTypeElement=function(e,t){i("TSTypeElement",e,t)},t.assertTSTypeLiteral=function(e,t){i("TSTypeLiteral",e,t)},t.assertTSTypeOperator=function(e,t){i("TSTypeOperator",e,t)},t.assertTSTypeParameter=function(e,t){i("TSTypeParameter",e,t)},t.assertTSTypeParameterDeclaration=function(e,t){i("TSTypeParameterDeclaration",e,t)},t.assertTSTypeParameterInstantiation=function(e,t){i("TSTypeParameterInstantiation",e,t)},t.assertTSTypePredicate=function(e,t){i("TSTypePredicate",e,t)},t.assertTSTypeQuery=function(e,t){i("TSTypeQuery",e,t)},t.assertTSTypeReference=function(e,t){i("TSTypeReference",e,t)},t.assertTSUndefinedKeyword=function(e,t){i("TSUndefinedKeyword",e,t)},t.assertTSUnionType=function(e,t){i("TSUnionType",e,t)},t.assertTSUnknownKeyword=function(e,t){i("TSUnknownKeyword",e,t)},t.assertTSVoidKeyword=function(e,t){i("TSVoidKeyword",e,t)},t.assertTaggedTemplateExpression=function(e,t){i("TaggedTemplateExpression",e,t)},t.assertTemplateElement=function(e,t){i("TemplateElement",e,t)},t.assertTemplateLiteral=function(e,t){i("TemplateLiteral",e,t)},t.assertTerminatorless=function(e,t){i("Terminatorless",e,t)},t.assertThisExpression=function(e,t){i("ThisExpression",e,t)},t.assertThisTypeAnnotation=function(e,t){i("ThisTypeAnnotation",e,t)},t.assertThrowStatement=function(e,t){i("ThrowStatement",e,t)},t.assertTopicReference=function(e,t){i("TopicReference",e,t)},t.assertTryStatement=function(e,t){i("TryStatement",e,t)},t.assertTupleExpression=function(e,t){i("TupleExpression",e,t)},t.assertTupleTypeAnnotation=function(e,t){i("TupleTypeAnnotation",e,t)},t.assertTypeAlias=function(e,t){i("TypeAlias",e,t)},t.assertTypeAnnotation=function(e,t){i("TypeAnnotation",e,t)},t.assertTypeCastExpression=function(e,t){i("TypeCastExpression",e,t)},t.assertTypeParameter=function(e,t){i("TypeParameter",e,t)},t.assertTypeParameterDeclaration=function(e,t){i("TypeParameterDeclaration",e,t)},t.assertTypeParameterInstantiation=function(e,t){i("TypeParameterInstantiation",e,t)},t.assertTypeScript=function(e,t){i("TypeScript",e,t)},t.assertTypeofTypeAnnotation=function(e,t){i("TypeofTypeAnnotation",e,t)},t.assertUnaryExpression=function(e,t){i("UnaryExpression",e,t)},t.assertUnaryLike=function(e,t){i("UnaryLike",e,t)},t.assertUnionTypeAnnotation=function(e,t){i("UnionTypeAnnotation",e,t)},t.assertUpdateExpression=function(e,t){i("UpdateExpression",e,t)},t.assertUserWhitespacable=function(e,t){i("UserWhitespacable",e,t)},t.assertV8IntrinsicIdentifier=function(e,t){i("V8IntrinsicIdentifier",e,t)},t.assertVariableDeclaration=function(e,t){i("VariableDeclaration",e,t)},t.assertVariableDeclarator=function(e,t){i("VariableDeclarator",e,t)},t.assertVariance=function(e,t){i("Variance",e,t)},t.assertVoidTypeAnnotation=function(e,t){i("VoidTypeAnnotation",e,t)},t.assertWhile=function(e,t){i("While",e,t)},t.assertWhileStatement=function(e,t){i("WhileStatement",e,t)},t.assertWithStatement=function(e,t){i("WithStatement",e,t)},t.assertYieldExpression=function(e,t){i("YieldExpression",e,t)};var r=n(62);function i(e,t,n){if(!(0,r.default)(e,t,n))throw new Error(`Expected type "${e}" with option ${JSON.stringify(n)}, but instead got "${t.type}".`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(15),i=function(e){switch(e){case"string":return(0,r.stringTypeAnnotation)();case"number":return(0,r.numberTypeAnnotation)();case"undefined":return(0,r.voidTypeAnnotation)();case"boolean":return(0,r.booleanTypeAnnotation)();case"function":return(0,r.genericTypeAnnotation)((0,r.identifier)("Function"));case"object":return(0,r.genericTypeAnnotation)((0,r.identifier)("Object"));case"symbol":return(0,r.genericTypeAnnotation)((0,r.identifier)("Symbol"));case"bigint":return(0,r.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+e)};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,i.default)(e);return 1===t.length?t[0]:(0,r.unionTypeAnnotation)(t)};var r=n(15),i=n(228)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.map(e=>e.typeAnnotation),n=(0,i.default)(t);return 1===n.length?n[0]:(0,r.tsUnionType)(n)};var r=n(15),i=n(528)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t={},n={},i=new Set,s=[];for(let t=0;t<e.length;t++){const o=e[t];if(o&&!(s.indexOf(o)>=0)){if((0,r.isTSAnyKeyword)(o))return[o];(0,r.isTSBaseType)(o)?n[o.type]=o:(0,r.isTSUnionType)(o)?i.has(o.types)||(e.push(...o.types),i.add(o.types)):s.push(o)}}for(const e of Object.keys(n))s.push(n[e]);for(const e of Object.keys(t))s.push(t[e]);return s};var r=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnyTypeAnnotation",{enumerable:!0,get:function(){return r.anyTypeAnnotation}}),Object.defineProperty(t,"ArgumentPlaceholder",{enumerable:!0,get:function(){return r.argumentPlaceholder}}),Object.defineProperty(t,"ArrayExpression",{enumerable:!0,get:function(){return r.arrayExpression}}),Object.defineProperty(t,"ArrayPattern",{enumerable:!0,get:function(){return r.arrayPattern}}),Object.defineProperty(t,"ArrayTypeAnnotation",{enumerable:!0,get:function(){return r.arrayTypeAnnotation}}),Object.defineProperty(t,"ArrowFunctionExpression",{enumerable:!0,get:function(){return r.arrowFunctionExpression}}),Object.defineProperty(t,"AssignmentExpression",{enumerable:!0,get:function(){return r.assignmentExpression}}),Object.defineProperty(t,"AssignmentPattern",{enumerable:!0,get:function(){return r.assignmentPattern}}),Object.defineProperty(t,"AwaitExpression",{enumerable:!0,get:function(){return r.awaitExpression}}),Object.defineProperty(t,"BigIntLiteral",{enumerable:!0,get:function(){return r.bigIntLiteral}}),Object.defineProperty(t,"BinaryExpression",{enumerable:!0,get:function(){return r.binaryExpression}}),Object.defineProperty(t,"BindExpression",{enumerable:!0,get:function(){return r.bindExpression}}),Object.defineProperty(t,"BlockStatement",{enumerable:!0,get:function(){return r.blockStatement}}),Object.defineProperty(t,"BooleanLiteral",{enumerable:!0,get:function(){return r.booleanLiteral}}),Object.defineProperty(t,"BooleanLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.booleanLiteralTypeAnnotation}}),Object.defineProperty(t,"BooleanTypeAnnotation",{enumerable:!0,get:function(){return r.booleanTypeAnnotation}}),Object.defineProperty(t,"BreakStatement",{enumerable:!0,get:function(){return r.breakStatement}}),Object.defineProperty(t,"CallExpression",{enumerable:!0,get:function(){return r.callExpression}}),Object.defineProperty(t,"CatchClause",{enumerable:!0,get:function(){return r.catchClause}}),Object.defineProperty(t,"ClassAccessorProperty",{enumerable:!0,get:function(){return r.classAccessorProperty}}),Object.defineProperty(t,"ClassBody",{enumerable:!0,get:function(){return r.classBody}}),Object.defineProperty(t,"ClassDeclaration",{enumerable:!0,get:function(){return r.classDeclaration}}),Object.defineProperty(t,"ClassExpression",{enumerable:!0,get:function(){return r.classExpression}}),Object.defineProperty(t,"ClassImplements",{enumerable:!0,get:function(){return r.classImplements}}),Object.defineProperty(t,"ClassMethod",{enumerable:!0,get:function(){return r.classMethod}}),Object.defineProperty(t,"ClassPrivateMethod",{enumerable:!0,get:function(){return r.classPrivateMethod}}),Object.defineProperty(t,"ClassPrivateProperty",{enumerable:!0,get:function(){return r.classPrivateProperty}}),Object.defineProperty(t,"ClassProperty",{enumerable:!0,get:function(){return r.classProperty}}),Object.defineProperty(t,"ConditionalExpression",{enumerable:!0,get:function(){return r.conditionalExpression}}),Object.defineProperty(t,"ContinueStatement",{enumerable:!0,get:function(){return r.continueStatement}}),Object.defineProperty(t,"DebuggerStatement",{enumerable:!0,get:function(){return r.debuggerStatement}}),Object.defineProperty(t,"DecimalLiteral",{enumerable:!0,get:function(){return r.decimalLiteral}}),Object.defineProperty(t,"DeclareClass",{enumerable:!0,get:function(){return r.declareClass}}),Object.defineProperty(t,"DeclareExportAllDeclaration",{enumerable:!0,get:function(){return r.declareExportAllDeclaration}}),Object.defineProperty(t,"DeclareExportDeclaration",{enumerable:!0,get:function(){return r.declareExportDeclaration}}),Object.defineProperty(t,"DeclareFunction",{enumerable:!0,get:function(){return r.declareFunction}}),Object.defineProperty(t,"DeclareInterface",{enumerable:!0,get:function(){return r.declareInterface}}),Object.defineProperty(t,"DeclareModule",{enumerable:!0,get:function(){return r.declareModule}}),Object.defineProperty(t,"DeclareModuleExports",{enumerable:!0,get:function(){return r.declareModuleExports}}),Object.defineProperty(t,"DeclareOpaqueType",{enumerable:!0,get:function(){return r.declareOpaqueType}}),Object.defineProperty(t,"DeclareTypeAlias",{enumerable:!0,get:function(){return r.declareTypeAlias}}),Object.defineProperty(t,"DeclareVariable",{enumerable:!0,get:function(){return r.declareVariable}}),Object.defineProperty(t,"DeclaredPredicate",{enumerable:!0,get:function(){return r.declaredPredicate}}),Object.defineProperty(t,"Decorator",{enumerable:!0,get:function(){return r.decorator}}),Object.defineProperty(t,"Directive",{enumerable:!0,get:function(){return r.directive}}),Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return r.directiveLiteral}}),Object.defineProperty(t,"DoExpression",{enumerable:!0,get:function(){return r.doExpression}}),Object.defineProperty(t,"DoWhileStatement",{enumerable:!0,get:function(){return r.doWhileStatement}}),Object.defineProperty(t,"EmptyStatement",{enumerable:!0,get:function(){return r.emptyStatement}}),Object.defineProperty(t,"EmptyTypeAnnotation",{enumerable:!0,get:function(){return r.emptyTypeAnnotation}}),Object.defineProperty(t,"EnumBooleanBody",{enumerable:!0,get:function(){return r.enumBooleanBody}}),Object.defineProperty(t,"EnumBooleanMember",{enumerable:!0,get:function(){return r.enumBooleanMember}}),Object.defineProperty(t,"EnumDeclaration",{enumerable:!0,get:function(){return r.enumDeclaration}}),Object.defineProperty(t,"EnumDefaultedMember",{enumerable:!0,get:function(){return r.enumDefaultedMember}}),Object.defineProperty(t,"EnumNumberBody",{enumerable:!0,get:function(){return r.enumNumberBody}}),Object.defineProperty(t,"EnumNumberMember",{enumerable:!0,get:function(){return r.enumNumberMember}}),Object.defineProperty(t,"EnumStringBody",{enumerable:!0,get:function(){return r.enumStringBody}}),Object.defineProperty(t,"EnumStringMember",{enumerable:!0,get:function(){return r.enumStringMember}}),Object.defineProperty(t,"EnumSymbolBody",{enumerable:!0,get:function(){return r.enumSymbolBody}}),Object.defineProperty(t,"ExistsTypeAnnotation",{enumerable:!0,get:function(){return r.existsTypeAnnotation}}),Object.defineProperty(t,"ExportAllDeclaration",{enumerable:!0,get:function(){return r.exportAllDeclaration}}),Object.defineProperty(t,"ExportDefaultDeclaration",{enumerable:!0,get:function(){return r.exportDefaultDeclaration}}),Object.defineProperty(t,"ExportDefaultSpecifier",{enumerable:!0,get:function(){return r.exportDefaultSpecifier}}),Object.defineProperty(t,"ExportNamedDeclaration",{enumerable:!0,get:function(){return r.exportNamedDeclaration}}),Object.defineProperty(t,"ExportNamespaceSpecifier",{enumerable:!0,get:function(){return r.exportNamespaceSpecifier}}),Object.defineProperty(t,"ExportSpecifier",{enumerable:!0,get:function(){return r.exportSpecifier}}),Object.defineProperty(t,"ExpressionStatement",{enumerable:!0,get:function(){return r.expressionStatement}}),Object.defineProperty(t,"File",{enumerable:!0,get:function(){return r.file}}),Object.defineProperty(t,"ForInStatement",{enumerable:!0,get:function(){return r.forInStatement}}),Object.defineProperty(t,"ForOfStatement",{enumerable:!0,get:function(){return r.forOfStatement}}),Object.defineProperty(t,"ForStatement",{enumerable:!0,get:function(){return r.forStatement}}),Object.defineProperty(t,"FunctionDeclaration",{enumerable:!0,get:function(){return r.functionDeclaration}}),Object.defineProperty(t,"FunctionExpression",{enumerable:!0,get:function(){return r.functionExpression}}),Object.defineProperty(t,"FunctionTypeAnnotation",{enumerable:!0,get:function(){return r.functionTypeAnnotation}}),Object.defineProperty(t,"FunctionTypeParam",{enumerable:!0,get:function(){return r.functionTypeParam}}),Object.defineProperty(t,"GenericTypeAnnotation",{enumerable:!0,get:function(){return r.genericTypeAnnotation}}),Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return r.identifier}}),Object.defineProperty(t,"IfStatement",{enumerable:!0,get:function(){return r.ifStatement}}),Object.defineProperty(t,"Import",{enumerable:!0,get:function(){return r.import}}),Object.defineProperty(t,"ImportAttribute",{enumerable:!0,get:function(){return r.importAttribute}}),Object.defineProperty(t,"ImportDeclaration",{enumerable:!0,get:function(){return r.importDeclaration}}),Object.defineProperty(t,"ImportDefaultSpecifier",{enumerable:!0,get:function(){return r.importDefaultSpecifier}}),Object.defineProperty(t,"ImportNamespaceSpecifier",{enumerable:!0,get:function(){return r.importNamespaceSpecifier}}),Object.defineProperty(t,"ImportSpecifier",{enumerable:!0,get:function(){return r.importSpecifier}}),Object.defineProperty(t,"IndexedAccessType",{enumerable:!0,get:function(){return r.indexedAccessType}}),Object.defineProperty(t,"InferredPredicate",{enumerable:!0,get:function(){return r.inferredPredicate}}),Object.defineProperty(t,"InterfaceDeclaration",{enumerable:!0,get:function(){return r.interfaceDeclaration}}),Object.defineProperty(t,"InterfaceExtends",{enumerable:!0,get:function(){return r.interfaceExtends}}),Object.defineProperty(t,"InterfaceTypeAnnotation",{enumerable:!0,get:function(){return r.interfaceTypeAnnotation}}),Object.defineProperty(t,"InterpreterDirective",{enumerable:!0,get:function(){return r.interpreterDirective}}),Object.defineProperty(t,"IntersectionTypeAnnotation",{enumerable:!0,get:function(){return r.intersectionTypeAnnotation}}),Object.defineProperty(t,"JSXAttribute",{enumerable:!0,get:function(){return r.jsxAttribute}}),Object.defineProperty(t,"JSXClosingElement",{enumerable:!0,get:function(){return r.jsxClosingElement}}),Object.defineProperty(t,"JSXClosingFragment",{enumerable:!0,get:function(){return r.jsxClosingFragment}}),Object.defineProperty(t,"JSXElement",{enumerable:!0,get:function(){return r.jsxElement}}),Object.defineProperty(t,"JSXEmptyExpression",{enumerable:!0,get:function(){return r.jsxEmptyExpression}}),Object.defineProperty(t,"JSXExpressionContainer",{enumerable:!0,get:function(){return r.jsxExpressionContainer}}),Object.defineProperty(t,"JSXFragment",{enumerable:!0,get:function(){return r.jsxFragment}}),Object.defineProperty(t,"JSXIdentifier",{enumerable:!0,get:function(){return r.jsxIdentifier}}),Object.defineProperty(t,"JSXMemberExpression",{enumerable:!0,get:function(){return r.jsxMemberExpression}}),Object.defineProperty(t,"JSXNamespacedName",{enumerable:!0,get:function(){return r.jsxNamespacedName}}),Object.defineProperty(t,"JSXOpeningElement",{enumerable:!0,get:function(){return r.jsxOpeningElement}}),Object.defineProperty(t,"JSXOpeningFragment",{enumerable:!0,get:function(){return r.jsxOpeningFragment}}),Object.defineProperty(t,"JSXSpreadAttribute",{enumerable:!0,get:function(){return r.jsxSpreadAttribute}}),Object.defineProperty(t,"JSXSpreadChild",{enumerable:!0,get:function(){return r.jsxSpreadChild}}),Object.defineProperty(t,"JSXText",{enumerable:!0,get:function(){return r.jsxText}}),Object.defineProperty(t,"LabeledStatement",{enumerable:!0,get:function(){return r.labeledStatement}}),Object.defineProperty(t,"LogicalExpression",{enumerable:!0,get:function(){return r.logicalExpression}}),Object.defineProperty(t,"MemberExpression",{enumerable:!0,get:function(){return r.memberExpression}}),Object.defineProperty(t,"MetaProperty",{enumerable:!0,get:function(){return r.metaProperty}}),Object.defineProperty(t,"MixedTypeAnnotation",{enumerable:!0,get:function(){return r.mixedTypeAnnotation}}),Object.defineProperty(t,"ModuleExpression",{enumerable:!0,get:function(){return r.moduleExpression}}),Object.defineProperty(t,"NewExpression",{enumerable:!0,get:function(){return r.newExpression}}),Object.defineProperty(t,"Noop",{enumerable:!0,get:function(){return r.noop}}),Object.defineProperty(t,"NullLiteral",{enumerable:!0,get:function(){return r.nullLiteral}}),Object.defineProperty(t,"NullLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.nullLiteralTypeAnnotation}}),Object.defineProperty(t,"NullableTypeAnnotation",{enumerable:!0,get:function(){return r.nullableTypeAnnotation}}),Object.defineProperty(t,"NumberLiteral",{enumerable:!0,get:function(){return r.numberLiteral}}),Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.numberLiteralTypeAnnotation}}),Object.defineProperty(t,"NumberTypeAnnotation",{enumerable:!0,get:function(){return r.numberTypeAnnotation}}),Object.defineProperty(t,"NumericLiteral",{enumerable:!0,get:function(){return r.numericLiteral}}),Object.defineProperty(t,"ObjectExpression",{enumerable:!0,get:function(){return r.objectExpression}}),Object.defineProperty(t,"ObjectMethod",{enumerable:!0,get:function(){return r.objectMethod}}),Object.defineProperty(t,"ObjectPattern",{enumerable:!0,get:function(){return r.objectPattern}}),Object.defineProperty(t,"ObjectProperty",{enumerable:!0,get:function(){return r.objectProperty}}),Object.defineProperty(t,"ObjectTypeAnnotation",{enumerable:!0,get:function(){return r.objectTypeAnnotation}}),Object.defineProperty(t,"ObjectTypeCallProperty",{enumerable:!0,get:function(){return r.objectTypeCallProperty}}),Object.defineProperty(t,"ObjectTypeIndexer",{enumerable:!0,get:function(){return r.objectTypeIndexer}}),Object.defineProperty(t,"ObjectTypeInternalSlot",{enumerable:!0,get:function(){return r.objectTypeInternalSlot}}),Object.defineProperty(t,"ObjectTypeProperty",{enumerable:!0,get:function(){return r.objectTypeProperty}}),Object.defineProperty(t,"ObjectTypeSpreadProperty",{enumerable:!0,get:function(){return r.objectTypeSpreadProperty}}),Object.defineProperty(t,"OpaqueType",{enumerable:!0,get:function(){return r.opaqueType}}),Object.defineProperty(t,"OptionalCallExpression",{enumerable:!0,get:function(){return r.optionalCallExpression}}),Object.defineProperty(t,"OptionalIndexedAccessType",{enumerable:!0,get:function(){return r.optionalIndexedAccessType}}),Object.defineProperty(t,"OptionalMemberExpression",{enumerable:!0,get:function(){return r.optionalMemberExpression}}),Object.defineProperty(t,"ParenthesizedExpression",{enumerable:!0,get:function(){return r.parenthesizedExpression}}),Object.defineProperty(t,"PipelineBareFunction",{enumerable:!0,get:function(){return r.pipelineBareFunction}}),Object.defineProperty(t,"PipelinePrimaryTopicReference",{enumerable:!0,get:function(){return r.pipelinePrimaryTopicReference}}),Object.defineProperty(t,"PipelineTopicExpression",{enumerable:!0,get:function(){return r.pipelineTopicExpression}}),Object.defineProperty(t,"Placeholder",{enumerable:!0,get:function(){return r.placeholder}}),Object.defineProperty(t,"PrivateName",{enumerable:!0,get:function(){return r.privateName}}),Object.defineProperty(t,"Program",{enumerable:!0,get:function(){return r.program}}),Object.defineProperty(t,"QualifiedTypeIdentifier",{enumerable:!0,get:function(){return r.qualifiedTypeIdentifier}}),Object.defineProperty(t,"RecordExpression",{enumerable:!0,get:function(){return r.recordExpression}}),Object.defineProperty(t,"RegExpLiteral",{enumerable:!0,get:function(){return r.regExpLiteral}}),Object.defineProperty(t,"RegexLiteral",{enumerable:!0,get:function(){return r.regexLiteral}}),Object.defineProperty(t,"RestElement",{enumerable:!0,get:function(){return r.restElement}}),Object.defineProperty(t,"RestProperty",{enumerable:!0,get:function(){return r.restProperty}}),Object.defineProperty(t,"ReturnStatement",{enumerable:!0,get:function(){return r.returnStatement}}),Object.defineProperty(t,"SequenceExpression",{enumerable:!0,get:function(){return r.sequenceExpression}}),Object.defineProperty(t,"SpreadElement",{enumerable:!0,get:function(){return r.spreadElement}}),Object.defineProperty(t,"SpreadProperty",{enumerable:!0,get:function(){return r.spreadProperty}}),Object.defineProperty(t,"StaticBlock",{enumerable:!0,get:function(){return r.staticBlock}}),Object.defineProperty(t,"StringLiteral",{enumerable:!0,get:function(){return r.stringLiteral}}),Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.stringLiteralTypeAnnotation}}),Object.defineProperty(t,"StringTypeAnnotation",{enumerable:!0,get:function(){return r.stringTypeAnnotation}}),Object.defineProperty(t,"Super",{enumerable:!0,get:function(){return r.super}}),Object.defineProperty(t,"SwitchCase",{enumerable:!0,get:function(){return r.switchCase}}),Object.defineProperty(t,"SwitchStatement",{enumerable:!0,get:function(){return r.switchStatement}}),Object.defineProperty(t,"SymbolTypeAnnotation",{enumerable:!0,get:function(){return r.symbolTypeAnnotation}}),Object.defineProperty(t,"TSAnyKeyword",{enumerable:!0,get:function(){return r.tsAnyKeyword}}),Object.defineProperty(t,"TSArrayType",{enumerable:!0,get:function(){return r.tsArrayType}}),Object.defineProperty(t,"TSAsExpression",{enumerable:!0,get:function(){return r.tsAsExpression}}),Object.defineProperty(t,"TSBigIntKeyword",{enumerable:!0,get:function(){return r.tsBigIntKeyword}}),Object.defineProperty(t,"TSBooleanKeyword",{enumerable:!0,get:function(){return r.tsBooleanKeyword}}),Object.defineProperty(t,"TSCallSignatureDeclaration",{enumerable:!0,get:function(){return r.tsCallSignatureDeclaration}}),Object.defineProperty(t,"TSConditionalType",{enumerable:!0,get:function(){return r.tsConditionalType}}),Object.defineProperty(t,"TSConstructSignatureDeclaration",{enumerable:!0,get:function(){return r.tsConstructSignatureDeclaration}}),Object.defineProperty(t,"TSConstructorType",{enumerable:!0,get:function(){return r.tsConstructorType}}),Object.defineProperty(t,"TSDeclareFunction",{enumerable:!0,get:function(){return r.tsDeclareFunction}}),Object.defineProperty(t,"TSDeclareMethod",{enumerable:!0,get:function(){return r.tsDeclareMethod}}),Object.defineProperty(t,"TSEnumDeclaration",{enumerable:!0,get:function(){return r.tsEnumDeclaration}}),Object.defineProperty(t,"TSEnumMember",{enumerable:!0,get:function(){return r.tsEnumMember}}),Object.defineProperty(t,"TSExportAssignment",{enumerable:!0,get:function(){return r.tsExportAssignment}}),Object.defineProperty(t,"TSExpressionWithTypeArguments",{enumerable:!0,get:function(){return r.tsExpressionWithTypeArguments}}),Object.defineProperty(t,"TSExternalModuleReference",{enumerable:!0,get:function(){return r.tsExternalModuleReference}}),Object.defineProperty(t,"TSFunctionType",{enumerable:!0,get:function(){return r.tsFunctionType}}),Object.defineProperty(t,"TSImportEqualsDeclaration",{enumerable:!0,get:function(){return r.tsImportEqualsDeclaration}}),Object.defineProperty(t,"TSImportType",{enumerable:!0,get:function(){return r.tsImportType}}),Object.defineProperty(t,"TSIndexSignature",{enumerable:!0,get:function(){return r.tsIndexSignature}}),Object.defineProperty(t,"TSIndexedAccessType",{enumerable:!0,get:function(){return r.tsIndexedAccessType}}),Object.defineProperty(t,"TSInferType",{enumerable:!0,get:function(){return r.tsInferType}}),Object.defineProperty(t,"TSInterfaceBody",{enumerable:!0,get:function(){return r.tsInterfaceBody}}),Object.defineProperty(t,"TSInterfaceDeclaration",{enumerable:!0,get:function(){return r.tsInterfaceDeclaration}}),Object.defineProperty(t,"TSIntersectionType",{enumerable:!0,get:function(){return r.tsIntersectionType}}),Object.defineProperty(t,"TSIntrinsicKeyword",{enumerable:!0,get:function(){return r.tsIntrinsicKeyword}}),Object.defineProperty(t,"TSLiteralType",{enumerable:!0,get:function(){return r.tsLiteralType}}),Object.defineProperty(t,"TSMappedType",{enumerable:!0,get:function(){return r.tsMappedType}}),Object.defineProperty(t,"TSMethodSignature",{enumerable:!0,get:function(){return r.tsMethodSignature}}),Object.defineProperty(t,"TSModuleBlock",{enumerable:!0,get:function(){return r.tsModuleBlock}}),Object.defineProperty(t,"TSModuleDeclaration",{enumerable:!0,get:function(){return r.tsModuleDeclaration}}),Object.defineProperty(t,"TSNamedTupleMember",{enumerable:!0,get:function(){return r.tsNamedTupleMember}}),Object.defineProperty(t,"TSNamespaceExportDeclaration",{enumerable:!0,get:function(){return r.tsNamespaceExportDeclaration}}),Object.defineProperty(t,"TSNeverKeyword",{enumerable:!0,get:function(){return r.tsNeverKeyword}}),Object.defineProperty(t,"TSNonNullExpression",{enumerable:!0,get:function(){return r.tsNonNullExpression}}),Object.defineProperty(t,"TSNullKeyword",{enumerable:!0,get:function(){return r.tsNullKeyword}}),Object.defineProperty(t,"TSNumberKeyword",{enumerable:!0,get:function(){return r.tsNumberKeyword}}),Object.defineProperty(t,"TSObjectKeyword",{enumerable:!0,get:function(){return r.tsObjectKeyword}}),Object.defineProperty(t,"TSOptionalType",{enumerable:!0,get:function(){return r.tsOptionalType}}),Object.defineProperty(t,"TSParameterProperty",{enumerable:!0,get:function(){return r.tsParameterProperty}}),Object.defineProperty(t,"TSParenthesizedType",{enumerable:!0,get:function(){return r.tsParenthesizedType}}),Object.defineProperty(t,"TSPropertySignature",{enumerable:!0,get:function(){return r.tsPropertySignature}}),Object.defineProperty(t,"TSQualifiedName",{enumerable:!0,get:function(){return r.tsQualifiedName}}),Object.defineProperty(t,"TSRestType",{enumerable:!0,get:function(){return r.tsRestType}}),Object.defineProperty(t,"TSStringKeyword",{enumerable:!0,get:function(){return r.tsStringKeyword}}),Object.defineProperty(t,"TSSymbolKeyword",{enumerable:!0,get:function(){return r.tsSymbolKeyword}}),Object.defineProperty(t,"TSThisType",{enumerable:!0,get:function(){return r.tsThisType}}),Object.defineProperty(t,"TSTupleType",{enumerable:!0,get:function(){return r.tsTupleType}}),Object.defineProperty(t,"TSTypeAliasDeclaration",{enumerable:!0,get:function(){return r.tsTypeAliasDeclaration}}),Object.defineProperty(t,"TSTypeAnnotation",{enumerable:!0,get:function(){return r.tsTypeAnnotation}}),Object.defineProperty(t,"TSTypeAssertion",{enumerable:!0,get:function(){return r.tsTypeAssertion}}),Object.defineProperty(t,"TSTypeLiteral",{enumerable:!0,get:function(){return r.tsTypeLiteral}}),Object.defineProperty(t,"TSTypeOperator",{enumerable:!0,get:function(){return r.tsTypeOperator}}),Object.defineProperty(t,"TSTypeParameter",{enumerable:!0,get:function(){return r.tsTypeParameter}}),Object.defineProperty(t,"TSTypeParameterDeclaration",{enumerable:!0,get:function(){return r.tsTypeParameterDeclaration}}),Object.defineProperty(t,"TSTypeParameterInstantiation",{enumerable:!0,get:function(){return r.tsTypeParameterInstantiation}}),Object.defineProperty(t,"TSTypePredicate",{enumerable:!0,get:function(){return r.tsTypePredicate}}),Object.defineProperty(t,"TSTypeQuery",{enumerable:!0,get:function(){return r.tsTypeQuery}}),Object.defineProperty(t,"TSTypeReference",{enumerable:!0,get:function(){return r.tsTypeReference}}),Object.defineProperty(t,"TSUndefinedKeyword",{enumerable:!0,get:function(){return r.tsUndefinedKeyword}}),Object.defineProperty(t,"TSUnionType",{enumerable:!0,get:function(){return r.tsUnionType}}),Object.defineProperty(t,"TSUnknownKeyword",{enumerable:!0,get:function(){return r.tsUnknownKeyword}}),Object.defineProperty(t,"TSVoidKeyword",{enumerable:!0,get:function(){return r.tsVoidKeyword}}),Object.defineProperty(t,"TaggedTemplateExpression",{enumerable:!0,get:function(){return r.taggedTemplateExpression}}),Object.defineProperty(t,"TemplateElement",{enumerable:!0,get:function(){return r.templateElement}}),Object.defineProperty(t,"TemplateLiteral",{enumerable:!0,get:function(){return r.templateLiteral}}),Object.defineProperty(t,"ThisExpression",{enumerable:!0,get:function(){return r.thisExpression}}),Object.defineProperty(t,"ThisTypeAnnotation",{enumerable:!0,get:function(){return r.thisTypeAnnotation}}),Object.defineProperty(t,"ThrowStatement",{enumerable:!0,get:function(){return r.throwStatement}}),Object.defineProperty(t,"TopicReference",{enumerable:!0,get:function(){return r.topicReference}}),Object.defineProperty(t,"TryStatement",{enumerable:!0,get:function(){return r.tryStatement}}),Object.defineProperty(t,"TupleExpression",{enumerable:!0,get:function(){return r.tupleExpression}}),Object.defineProperty(t,"TupleTypeAnnotation",{enumerable:!0,get:function(){return r.tupleTypeAnnotation}}),Object.defineProperty(t,"TypeAlias",{enumerable:!0,get:function(){return r.typeAlias}}),Object.defineProperty(t,"TypeAnnotation",{enumerable:!0,get:function(){return r.typeAnnotation}}),Object.defineProperty(t,"TypeCastExpression",{enumerable:!0,get:function(){return r.typeCastExpression}}),Object.defineProperty(t,"TypeParameter",{enumerable:!0,get:function(){return r.typeParameter}}),Object.defineProperty(t,"TypeParameterDeclaration",{enumerable:!0,get:function(){return r.typeParameterDeclaration}}),Object.defineProperty(t,"TypeParameterInstantiation",{enumerable:!0,get:function(){return r.typeParameterInstantiation}}),Object.defineProperty(t,"TypeofTypeAnnotation",{enumerable:!0,get:function(){return r.typeofTypeAnnotation}}),Object.defineProperty(t,"UnaryExpression",{enumerable:!0,get:function(){return r.unaryExpression}}),Object.defineProperty(t,"UnionTypeAnnotation",{enumerable:!0,get:function(){return r.unionTypeAnnotation}}),Object.defineProperty(t,"UpdateExpression",{enumerable:!0,get:function(){return r.updateExpression}}),Object.defineProperty(t,"V8IntrinsicIdentifier",{enumerable:!0,get:function(){return r.v8IntrinsicIdentifier}}),Object.defineProperty(t,"VariableDeclaration",{enumerable:!0,get:function(){return r.variableDeclaration}}),Object.defineProperty(t,"VariableDeclarator",{enumerable:!0,get:function(){return r.variableDeclarator}}),Object.defineProperty(t,"Variance",{enumerable:!0,get:function(){return r.variance}}),Object.defineProperty(t,"VoidTypeAnnotation",{enumerable:!0,get:function(){return r.voidTypeAnnotation}}),Object.defineProperty(t,"WhileStatement",{enumerable:!0,get:function(){return r.whileStatement}}),Object.defineProperty(t,"WithStatement",{enumerable:!0,get:function(){return r.withStatement}}),Object.defineProperty(t,"YieldExpression",{enumerable:!0,get:function(){return r.yieldExpression}});var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!1)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!0,!0)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!1,!0)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){return(0,r.default)(e,t,[{type:i?"CommentLine":"CommentBlock",value:n}])};var r=n(229)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r.COMMENT_KEYS.forEach(t=>{e[t]=null}),e};var r=n(41)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WHILE_TYPES=t.USERWHITESPACABLE_TYPES=t.UNARYLIKE_TYPES=t.TYPESCRIPT_TYPES=t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.TSENTITYNAME_TYPES=t.TSBASETYPE_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.STANDARDIZED_TYPES=t.SCOPABLE_TYPES=t.PUREISH_TYPES=t.PROPERTY_TYPES=t.PRIVATE_TYPES=t.PATTERN_TYPES=t.PATTERNLIKE_TYPES=t.OBJECTMEMBER_TYPES=t.MODULESPECIFIER_TYPES=t.MODULEDECLARATION_TYPES=t.MISCELLANEOUS_TYPES=t.METHOD_TYPES=t.LVAL_TYPES=t.LOOP_TYPES=t.LITERAL_TYPES=t.JSX_TYPES=t.IMMUTABLE_TYPES=t.FUNCTION_TYPES=t.FUNCTIONPARENT_TYPES=t.FOR_TYPES=t.FORXSTATEMENT_TYPES=t.FLOW_TYPES=t.FLOWTYPE_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.EXPRESSION_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.EXPORTDECLARATION_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.DECLARATION_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.CLASS_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.BINARY_TYPES=t.ACCESSOR_TYPES=void 0;var r=n(18);const i=r.FLIPPED_ALIAS_KEYS.Standardized;t.STANDARDIZED_TYPES=i;const s=r.FLIPPED_ALIAS_KEYS.Expression;t.EXPRESSION_TYPES=s;const o=r.FLIPPED_ALIAS_KEYS.Binary;t.BINARY_TYPES=o;const a=r.FLIPPED_ALIAS_KEYS.Scopable;t.SCOPABLE_TYPES=a;const l=r.FLIPPED_ALIAS_KEYS.BlockParent;t.BLOCKPARENT_TYPES=l;const u=r.FLIPPED_ALIAS_KEYS.Block;t.BLOCK_TYPES=u;const c=r.FLIPPED_ALIAS_KEYS.Statement;t.STATEMENT_TYPES=c;const h=r.FLIPPED_ALIAS_KEYS.Terminatorless;t.TERMINATORLESS_TYPES=h;const d=r.FLIPPED_ALIAS_KEYS.CompletionStatement;t.COMPLETIONSTATEMENT_TYPES=d;const f=r.FLIPPED_ALIAS_KEYS.Conditional;t.CONDITIONAL_TYPES=f;const p=r.FLIPPED_ALIAS_KEYS.Loop;t.LOOP_TYPES=p;const m=r.FLIPPED_ALIAS_KEYS.While;t.WHILE_TYPES=m;const g=r.FLIPPED_ALIAS_KEYS.ExpressionWrapper;t.EXPRESSIONWRAPPER_TYPES=g;const y=r.FLIPPED_ALIAS_KEYS.For;t.FOR_TYPES=y;const v=r.FLIPPED_ALIAS_KEYS.ForXStatement;t.FORXSTATEMENT_TYPES=v;const b=r.FLIPPED_ALIAS_KEYS.Function;t.FUNCTION_TYPES=b;const w=r.FLIPPED_ALIAS_KEYS.FunctionParent;t.FUNCTIONPARENT_TYPES=w;const _=r.FLIPPED_ALIAS_KEYS.Pureish;t.PUREISH_TYPES=_;const S=r.FLIPPED_ALIAS_KEYS.Declaration;t.DECLARATION_TYPES=S;const x=r.FLIPPED_ALIAS_KEYS.PatternLike;t.PATTERNLIKE_TYPES=x;const E=r.FLIPPED_ALIAS_KEYS.LVal;t.LVAL_TYPES=E;const A=r.FLIPPED_ALIAS_KEYS.TSEntityName;t.TSENTITYNAME_TYPES=A;const T=r.FLIPPED_ALIAS_KEYS.Literal;t.LITERAL_TYPES=T;const M=r.FLIPPED_ALIAS_KEYS.Immutable;t.IMMUTABLE_TYPES=M;const C=r.FLIPPED_ALIAS_KEYS.UserWhitespacable;t.USERWHITESPACABLE_TYPES=C;const P=r.FLIPPED_ALIAS_KEYS.Method;t.METHOD_TYPES=P;const k=r.FLIPPED_ALIAS_KEYS.ObjectMember;t.OBJECTMEMBER_TYPES=k;const O=r.FLIPPED_ALIAS_KEYS.Property;t.PROPERTY_TYPES=O;const I=r.FLIPPED_ALIAS_KEYS.UnaryLike;t.UNARYLIKE_TYPES=I;const R=r.FLIPPED_ALIAS_KEYS.Pattern;t.PATTERN_TYPES=R;const N=r.FLIPPED_ALIAS_KEYS.Class;t.CLASS_TYPES=N;const D=r.FLIPPED_ALIAS_KEYS.ModuleDeclaration;t.MODULEDECLARATION_TYPES=D;const F=r.FLIPPED_ALIAS_KEYS.ExportDeclaration;t.EXPORTDECLARATION_TYPES=F;const L=r.FLIPPED_ALIAS_KEYS.ModuleSpecifier;t.MODULESPECIFIER_TYPES=L;const B=r.FLIPPED_ALIAS_KEYS.Accessor;t.ACCESSOR_TYPES=B;const j=r.FLIPPED_ALIAS_KEYS.Private;t.PRIVATE_TYPES=j;const $=r.FLIPPED_ALIAS_KEYS.Flow;t.FLOW_TYPES=$;const U=r.FLIPPED_ALIAS_KEYS.FlowType;t.FLOWTYPE_TYPES=U;const V=r.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation;t.FLOWBASEANNOTATION_TYPES=V;const W=r.FLIPPED_ALIAS_KEYS.FlowDeclaration;t.FLOWDECLARATION_TYPES=W;const z=r.FLIPPED_ALIAS_KEYS.FlowPredicate;t.FLOWPREDICATE_TYPES=z;const K=r.FLIPPED_ALIAS_KEYS.EnumBody;t.ENUMBODY_TYPES=K;const H=r.FLIPPED_ALIAS_KEYS.EnumMember;t.ENUMMEMBER_TYPES=H;const q=r.FLIPPED_ALIAS_KEYS.JSX;t.JSX_TYPES=q;const G=r.FLIPPED_ALIAS_KEYS.Miscellaneous;t.MISCELLANEOUS_TYPES=G;const Y=r.FLIPPED_ALIAS_KEYS.TypeScript;t.TYPESCRIPT_TYPES=Y;const J=r.FLIPPED_ALIAS_KEYS.TSTypeElement;t.TSTYPEELEMENT_TYPES=J;const X=r.FLIPPED_ALIAS_KEYS.TSType;t.TSTYPE_TYPES=X;const Z=r.FLIPPED_ALIAS_KEYS.TSBaseType;t.TSBASETYPE_TYPES=Z},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="body"){return e[t]=(0,r.default)(e[t],e)};var r=n(234)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"eval"!==(e=(0,r.default)(e))&&"arguments"!==e||(e="_"+e);return e};var r=n(235)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.key||e.property){!e.computed&&(0,r.isIdentifier)(t)&&(t=(0,i.stringLiteral)(t.name));return t};var r=n(10),i=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(10),i=function(e){(0,r.isExpressionStatement)(e)&&(e=e.expression);if((0,r.isExpression)(e))return e;(0,r.isClass)(e)?e.type="ClassExpression":(0,r.isFunction)(e)&&(e.type="FunctionExpression");if(!(0,r.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(10),i=n(42),s=n(236);function o(e,t=e.key){let n;return"method"===e.kind?o.increment()+"":(n=(0,r.isIdentifier)(t)?t.name:(0,r.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,s.default)((0,i.default)(t))),e.computed&&(n=`[${n}]`),e.static&&(n="static:"+n),n)}o.uid=0,o.increment=function(){return o.uid>=Number.MAX_SAFE_INTEGER?o.uid=0:o.uid++}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e||!e.length)return;const n=[],i=(0,r.default)(e,t,n);if(!i)return;for(const e of n)t.push(e);return i};var r=n(543)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,a){const l=[];let u=!0;for(const c of t)if((0,i.isEmptyStatement)(c)||(u=!1),(0,i.isExpression)(c))l.push(c);else if((0,i.isExpressionStatement)(c))l.push(c.expression);else if((0,i.isVariableDeclaration)(c)){if("var"!==c.kind)return;for(const e of c.declarations){const t=(0,r.default)(e);for(const e of Object.keys(t))a.push({kind:c.kind,id:(0,o.default)(t[e])});e.init&&l.push((0,s.assignmentExpression)("=",e.id,e.init))}u=!0}else if((0,i.isIfStatement)(c)){const t=c.consequent?e([c.consequent],n,a):n.buildUndefinedNode(),r=c.alternate?e([c.alternate],n,a):n.buildUndefinedNode();if(!t||!r)return;l.push((0,s.conditionalExpression)(c.test,t,r))}else if((0,i.isBlockStatement)(c)){const t=e(c.body,n,a);if(!t)return;l.push(t)}else{if(!(0,i.isEmptyStatement)(c))return;0===t.indexOf(c)&&(u=!0)}u&&l.push(n.buildUndefinedNode());return 1===l.length?l[0]:(0,s.sequenceExpression)(l)};var r=n(78),i=n(10),s=n(15),o=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(10),i=n(15),s=function(e,t){if((0,r.isStatement)(e))return e;let n,s=!1;if((0,r.isClass)(e))s=!0,n="ClassDeclaration";else if((0,r.isFunction)(e))s=!0,n="FunctionDeclaration";else if((0,r.isAssignmentExpression)(e))return(0,i.expressionStatement)(e);s&&!e.id&&(n=!1);if(!n){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=n,e};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(63),i=n(15),s=function e(t){if(void 0===t)return(0,i.identifier)("undefined");if(!0===t||!1===t)return(0,i.booleanLiteral)(t);if(null===t)return(0,i.nullLiteral)();if("string"==typeof t)return(0,i.stringLiteral)(t);if("number"==typeof t){let e;if(Number.isFinite(t))e=(0,i.numericLiteral)(Math.abs(t));else{let n;n=Number.isNaN(t)?(0,i.numericLiteral)(0):(0,i.numericLiteral)(1),e=(0,i.binaryExpression)("/",n,(0,i.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,i.unaryExpression)("-",e)),e}if(function(e){return"[object RegExp]"===o(e)}(t)){const e=t.source,n=t.toString().match(/\/([a-z]+|)$/)[1];return(0,i.regExpLiteral)(e,n)}if(Array.isArray(t))return(0,i.arrayExpression)(t.map(e));if(function(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(t)){const n=[];for(const s of Object.keys(t)){let o;o=(0,r.default)(s)?(0,i.identifier)(s):(0,i.stringLiteral)(s),n.push((0,i.objectProperty)(o,e(t[s])))}return(0,i.objectExpression)(n)}throw new Error("don't know how to turn this value into a node")};t.default=s;const o=Function.call.bind(Object.prototype.toString)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n=!1){return e.object=(0,r.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e};var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const n of r.INHERIT_KEYS.optional)null==e[n]&&(e[n]=t[n]);for(const n of Object.keys(t))"_"===n[0]&&"__clone"!==n&&(e[n]=t[n]);for(const n of r.INHERIT_KEYS.force)e[n]=t[n];return(0,i.default)(e,t),e};var r=n(41),i=n(232)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.object=(0,r.memberExpression)(t,e.object),e};var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(78),i=function(e,t){return(0,r.default)(e,t,!0)};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"function"==typeof t&&(t={enter:t});const{enter:i,exit:s}=t;!function e(t,n,i,s,o){const a=r.VISITOR_KEYS[t.type];if(!a)return;n&&n(t,o,s);for(const r of a){const a=t[r];if(Array.isArray(a))for(let l=0;l<a.length;l++){const u=a[l];u&&(o.push({node:t,key:r,index:l}),e(u,n,i,s,o),o.pop())}else a&&(o.push({node:t,key:r}),e(a,n,i,s,o),o.pop())}i&&i(t,o,s)}(e,i,s,n,[])};var r=n(18)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(n&&"Identifier"===e.type&&"ObjectProperty"===t.type&&"ObjectExpression"===n.type)return!1;const i=r.default.keys[t.type];if(i)for(let n=0;n<i.length;n++){const r=i[n],s=t[r];if(Array.isArray(s)){if(s.indexOf(e)>=0)return!0}else if(s===e)return!0}return!1};var r=n(78)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isFunctionDeclaration)(e)||(0,r.isClassDeclaration)(e)||(0,i.default)(e)};var r=n(10),i=n(239)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(e.type,"Immutable"))return!0;if((0,i.isIdentifier)(e))return"undefined"===e.name;return!1};var r=n(134),i=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){if("object"!=typeof t||"object"!=typeof n||null==t||null==n)return t===n;if(t.type!==n.type)return!1;const i=Object.keys(r.NODE_FIELDS[t.type]||t.type),s=r.VISITOR_KEYS[t.type];for(const r of i){if(typeof t[r]!=typeof n[r])return!1;if(null!=t[r]||null!=n[r]){if(null==t[r]||null==n[r])return!1;if(Array.isArray(t[r])){if(!Array.isArray(n[r]))return!1;if(t[r].length!==n[r].length)return!1;for(let i=0;i<t[r].length;i++)if(!e(t[r][i],n[r][i]))return!1}else if("object"!=typeof t[r]||null!=s&&s.includes(r)){if(!e(t[r],n[r]))return!1}else for(const e of Object.keys(t[r]))if(t[r][e]!==n[r][e])return!1}}return!0};var r=n(18)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":return t.property===e?!!t.computed:t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return t.key===e&&!!t.computed;case"ObjectProperty":return t.key===e?!!t.computed:!n||"ObjectPattern"!==n.type;case"ClassProperty":case"ClassAccessorProperty":return t.key!==e||!!t.computed;case"ClassPrivateProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"LabeledStatement":case"CatchClause":case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return(null==n||!n.source)&&t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportAttribute":case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":case"MetaProperty":return!1;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":return t.key!==e||!!t.computed}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.isBlockStatement)(e)&&((0,r.isFunction)(t)||(0,r.isCatchClause)(t)))return!1;if((0,r.isPattern)(e)&&((0,r.isFunction)(t)||(0,r.isCatchClause)(t)))return!0;return(0,r.isScopable)(e)};var r=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isImportDefaultSpecifier)(e)||(0,r.isIdentifier)(e.imported||e.exported,{name:"default"})};var r=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e)&&!i.has(e)};var r=n(63);const i=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isVariableDeclaration)(e,{kind:"var"})&&!e[i.BLOCK_SCOPED_SYMBOL]};var r=n(10),i=n(41)},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(35),i=n(1);const{VISITOR_KEYS:s}=i;t.default=class{constructor(e,t,n,r){this.queue=null,this.priorityQueue=null,this.parentPath=r,this.scope=e,this.state=n,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const n=s[e.type];if(null==n||!n.length)return!1;for(const t of n)if(e[t])return!0;return!1}create(e,t,n,i){return r.default.get({parentPath:this.parentPath,parent:e,container:t,key:n,listKey:i})}maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,n){if(0===e.length)return!1;const r=[];for(let i=0;i<e.length;i++){const s=e[i];s&&this.shouldVisit(s)&&r.push(this.create(t,e,i,n))}return this.visitQueue(r)}visitSingle(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])}visitQueue(e){this.queue=e,this.priorityQueue=[];const t=new WeakSet;let n=!1;for(const r of e){if(r.resync(),0!==r.contexts.length&&r.contexts[r.contexts.length-1]===this||r.pushContext(this),null===r.key)continue;const{node:i}=r;if(!t.has(i)){if(i&&t.add(i),r.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,n))break}}for(const t of e)t.popContext();return this.queue=null,n}visit(e,t){const n=e[t];return!!n&&(Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t))}}},function(e,t,n){e.exports=function(e){function t(e){let n,i,s,o=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];n=s.call(r,t),e.splice(o,1),o--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(563),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=6e4,i=60*r,s=24*i;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*s;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=s)return o(e,t,s,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=s)return Math.round(e/s)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(242);var r=n(243),i=n(1);const{VISITOR_KEYS:s,assignmentExpression:o,identifier:a,toExpression:l,variableDeclaration:u,variableDeclarator:c}=i,h={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||function(e){if(!e.isMethod()||!e.node.computed)return void e.skip();const t=s[e.type];for(const n of t)"key"!==n&&e.skipKey(n)}(e)},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;const n=e.getOuterBindingIdentifiers();for(const e in n)e===t.oldName&&(n[e].name=t.newName)}};t.default=class{constructor(e,t,n){this.newName=n,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;t.isExportDeclaration()&&(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id||(0,r.default)(t))}maybeConvertFromClassFunctionDeclaration(e){}maybeConvertFromClassFunctionExpression(e){}rename(e){const{binding:t,oldName:n,newName:r}=this,{scope:i,path:s}=t,o=s.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());if(o){o.getOuterBindingIdentifiers()[n]===t.identifier&&this.maybeConvertFromExportDeclaration(o)}const a=e||i.block;"SwitchStatement"===(null==a?void 0:a.type)?a.cases.forEach(e=>{i.traverse(e,h,this)}):i.traverse(a,h,this),e||(i.removeOwnBinding(n),i.bindings[r]=t,this.binding.identifier.name=r),o&&(this.maybeConvertFromClassFunctionDeclaration(o),this.maybeConvertFromClassFunctionExpression(o))}}},function(e,t,n){"use strict";e.exports=n(566)},function(e){e.exports=JSON.parse('{"builtin":{"Array":false,"ArrayBuffer":false,"Atomics":false,"BigInt":false,"BigInt64Array":false,"BigUint64Array":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"globalThis":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es5":{"Array":false,"Boolean":false,"constructor":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"propertyIsEnumerable":false,"RangeError":false,"ReferenceError":false,"RegExp":false,"String":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false},"es2015":{"Array":false,"ArrayBuffer":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es2017":{"Array":false,"ArrayBuffer":false,"Atomics":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"browser":{"AbortController":false,"AbortSignal":false,"addEventListener":false,"alert":false,"AnalyserNode":false,"Animation":false,"AnimationEffectReadOnly":false,"AnimationEffectTiming":false,"AnimationEffectTimingReadOnly":false,"AnimationEvent":false,"AnimationPlaybackEvent":false,"AnimationTimeline":false,"applicationCache":false,"ApplicationCache":false,"ApplicationCacheErrorEvent":false,"atob":false,"Attr":false,"Audio":false,"AudioBuffer":false,"AudioBufferSourceNode":false,"AudioContext":false,"AudioDestinationNode":false,"AudioListener":false,"AudioNode":false,"AudioParam":false,"AudioProcessingEvent":false,"AudioScheduledSourceNode":false,"AudioWorkletGlobalScope ":false,"AudioWorkletNode":false,"AudioWorkletProcessor":false,"BarProp":false,"BaseAudioContext":false,"BatteryManager":false,"BeforeUnloadEvent":false,"BiquadFilterNode":false,"Blob":false,"BlobEvent":false,"blur":false,"BroadcastChannel":false,"btoa":false,"BudgetService":false,"ByteLengthQueuingStrategy":false,"Cache":false,"caches":false,"CacheStorage":false,"cancelAnimationFrame":false,"cancelIdleCallback":false,"CanvasCaptureMediaStreamTrack":false,"CanvasGradient":false,"CanvasPattern":false,"CanvasRenderingContext2D":false,"ChannelMergerNode":false,"ChannelSplitterNode":false,"CharacterData":false,"clearInterval":false,"clearTimeout":false,"clientInformation":false,"ClipboardEvent":false,"close":false,"closed":false,"CloseEvent":false,"Comment":false,"CompositionEvent":false,"confirm":false,"console":false,"ConstantSourceNode":false,"ConvolverNode":false,"CountQueuingStrategy":false,"createImageBitmap":false,"Credential":false,"CredentialsContainer":false,"crypto":false,"Crypto":false,"CryptoKey":false,"CSS":false,"CSSConditionRule":false,"CSSFontFaceRule":false,"CSSGroupingRule":false,"CSSImportRule":false,"CSSKeyframeRule":false,"CSSKeyframesRule":false,"CSSMediaRule":false,"CSSNamespaceRule":false,"CSSPageRule":false,"CSSRule":false,"CSSRuleList":false,"CSSStyleDeclaration":false,"CSSStyleRule":false,"CSSStyleSheet":false,"CSSSupportsRule":false,"CustomElementRegistry":false,"customElements":false,"CustomEvent":false,"DataTransfer":false,"DataTransferItem":false,"DataTransferItemList":false,"defaultstatus":false,"defaultStatus":false,"DelayNode":false,"DeviceMotionEvent":false,"DeviceOrientationEvent":false,"devicePixelRatio":false,"dispatchEvent":false,"document":false,"Document":false,"DocumentFragment":false,"DocumentType":false,"DOMError":false,"DOMException":false,"DOMImplementation":false,"DOMMatrix":false,"DOMMatrixReadOnly":false,"DOMParser":false,"DOMPoint":false,"DOMPointReadOnly":false,"DOMQuad":false,"DOMRect":false,"DOMRectReadOnly":false,"DOMStringList":false,"DOMStringMap":false,"DOMTokenList":false,"DragEvent":false,"DynamicsCompressorNode":false,"Element":false,"ErrorEvent":false,"event":false,"Event":false,"EventSource":false,"EventTarget":false,"external":false,"fetch":false,"File":false,"FileList":false,"FileReader":false,"find":false,"focus":false,"FocusEvent":false,"FontFace":false,"FontFaceSetLoadEvent":false,"FormData":false,"frameElement":false,"frames":false,"GainNode":false,"Gamepad":false,"GamepadButton":false,"GamepadEvent":false,"getComputedStyle":false,"getSelection":false,"HashChangeEvent":false,"Headers":false,"history":false,"History":false,"HTMLAllCollection":false,"HTMLAnchorElement":false,"HTMLAreaElement":false,"HTMLAudioElement":false,"HTMLBaseElement":false,"HTMLBodyElement":false,"HTMLBRElement":false,"HTMLButtonElement":false,"HTMLCanvasElement":false,"HTMLCollection":false,"HTMLContentElement":false,"HTMLDataElement":false,"HTMLDataListElement":false,"HTMLDetailsElement":false,"HTMLDialogElement":false,"HTMLDirectoryElement":false,"HTMLDivElement":false,"HTMLDListElement":false,"HTMLDocument":false,"HTMLElement":false,"HTMLEmbedElement":false,"HTMLFieldSetElement":false,"HTMLFontElement":false,"HTMLFormControlsCollection":false,"HTMLFormElement":false,"HTMLFrameElement":false,"HTMLFrameSetElement":false,"HTMLHeadElement":false,"HTMLHeadingElement":false,"HTMLHRElement":false,"HTMLHtmlElement":false,"HTMLIFrameElement":false,"HTMLImageElement":false,"HTMLInputElement":false,"HTMLLabelElement":false,"HTMLLegendElement":false,"HTMLLIElement":false,"HTMLLinkElement":false,"HTMLMapElement":false,"HTMLMarqueeElement":false,"HTMLMediaElement":false,"HTMLMenuElement":false,"HTMLMetaElement":false,"HTMLMeterElement":false,"HTMLModElement":false,"HTMLObjectElement":false,"HTMLOListElement":false,"HTMLOptGroupElement":false,"HTMLOptionElement":false,"HTMLOptionsCollection":false,"HTMLOutputElement":false,"HTMLParagraphElement":false,"HTMLParamElement":false,"HTMLPictureElement":false,"HTMLPreElement":false,"HTMLProgressElement":false,"HTMLQuoteElement":false,"HTMLScriptElement":false,"HTMLSelectElement":false,"HTMLShadowElement":false,"HTMLSlotElement":false,"HTMLSourceElement":false,"HTMLSpanElement":false,"HTMLStyleElement":false,"HTMLTableCaptionElement":false,"HTMLTableCellElement":false,"HTMLTableColElement":false,"HTMLTableElement":false,"HTMLTableRowElement":false,"HTMLTableSectionElement":false,"HTMLTemplateElement":false,"HTMLTextAreaElement":false,"HTMLTimeElement":false,"HTMLTitleElement":false,"HTMLTrackElement":false,"HTMLUListElement":false,"HTMLUnknownElement":false,"HTMLVideoElement":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"IdleDeadline":false,"IIRFilterNode":false,"Image":false,"ImageBitmap":false,"ImageBitmapRenderingContext":false,"ImageCapture":false,"ImageData":false,"indexedDB":false,"innerHeight":false,"innerWidth":false,"InputEvent":false,"IntersectionObserver":false,"IntersectionObserverEntry":false,"Intl":false,"isSecureContext":false,"KeyboardEvent":false,"KeyframeEffect":false,"KeyframeEffectReadOnly":false,"length":false,"localStorage":false,"location":true,"Location":false,"locationbar":false,"matchMedia":false,"MediaDeviceInfo":false,"MediaDevices":false,"MediaElementAudioSourceNode":false,"MediaEncryptedEvent":false,"MediaError":false,"MediaKeyMessageEvent":false,"MediaKeySession":false,"MediaKeyStatusMap":false,"MediaKeySystemAccess":false,"MediaList":false,"MediaQueryList":false,"MediaQueryListEvent":false,"MediaRecorder":false,"MediaSettingsRange":false,"MediaSource":false,"MediaStream":false,"MediaStreamAudioDestinationNode":false,"MediaStreamAudioSourceNode":false,"MediaStreamEvent":false,"MediaStreamTrack":false,"MediaStreamTrackEvent":false,"menubar":false,"MessageChannel":false,"MessageEvent":false,"MessagePort":false,"MIDIAccess":false,"MIDIConnectionEvent":false,"MIDIInput":false,"MIDIInputMap":false,"MIDIMessageEvent":false,"MIDIOutput":false,"MIDIOutputMap":false,"MIDIPort":false,"MimeType":false,"MimeTypeArray":false,"MouseEvent":false,"moveBy":false,"moveTo":false,"MutationEvent":false,"MutationObserver":false,"MutationRecord":false,"name":false,"NamedNodeMap":false,"NavigationPreloadManager":false,"navigator":false,"Navigator":false,"NetworkInformation":false,"Node":false,"NodeFilter":false,"NodeIterator":false,"NodeList":false,"Notification":false,"OfflineAudioCompletionEvent":false,"OfflineAudioContext":false,"offscreenBuffering":false,"OffscreenCanvas":true,"onabort":true,"onafterprint":true,"onanimationend":true,"onanimationiteration":true,"onanimationstart":true,"onappinstalled":true,"onauxclick":true,"onbeforeinstallprompt":true,"onbeforeprint":true,"onbeforeunload":true,"onblur":true,"oncancel":true,"oncanplay":true,"oncanplaythrough":true,"onchange":true,"onclick":true,"onclose":true,"oncontextmenu":true,"oncuechange":true,"ondblclick":true,"ondevicemotion":true,"ondeviceorientation":true,"ondeviceorientationabsolute":true,"ondrag":true,"ondragend":true,"ondragenter":true,"ondragleave":true,"ondragover":true,"ondragstart":true,"ondrop":true,"ondurationchange":true,"onemptied":true,"onended":true,"onerror":true,"onfocus":true,"ongotpointercapture":true,"onhashchange":true,"oninput":true,"oninvalid":true,"onkeydown":true,"onkeypress":true,"onkeyup":true,"onlanguagechange":true,"onload":true,"onloadeddata":true,"onloadedmetadata":true,"onloadstart":true,"onlostpointercapture":true,"onmessage":true,"onmessageerror":true,"onmousedown":true,"onmouseenter":true,"onmouseleave":true,"onmousemove":true,"onmouseout":true,"onmouseover":true,"onmouseup":true,"onmousewheel":true,"onoffline":true,"ononline":true,"onpagehide":true,"onpageshow":true,"onpause":true,"onplay":true,"onplaying":true,"onpointercancel":true,"onpointerdown":true,"onpointerenter":true,"onpointerleave":true,"onpointermove":true,"onpointerout":true,"onpointerover":true,"onpointerup":true,"onpopstate":true,"onprogress":true,"onratechange":true,"onrejectionhandled":true,"onreset":true,"onresize":true,"onscroll":true,"onsearch":true,"onseeked":true,"onseeking":true,"onselect":true,"onstalled":true,"onstorage":true,"onsubmit":true,"onsuspend":true,"ontimeupdate":true,"ontoggle":true,"ontransitionend":true,"onunhandledrejection":true,"onunload":true,"onvolumechange":true,"onwaiting":true,"onwheel":true,"open":false,"openDatabase":false,"opener":false,"Option":false,"origin":false,"OscillatorNode":false,"outerHeight":false,"outerWidth":false,"PageTransitionEvent":false,"pageXOffset":false,"pageYOffset":false,"PannerNode":false,"parent":false,"Path2D":false,"PaymentAddress":false,"PaymentRequest":false,"PaymentRequestUpdateEvent":false,"PaymentResponse":false,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceLongTaskTiming":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceNavigationTiming":false,"PerformanceObserver":false,"PerformanceObserverEntryList":false,"PerformancePaintTiming":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"PeriodicWave":false,"Permissions":false,"PermissionStatus":false,"personalbar":false,"PhotoCapabilities":false,"Plugin":false,"PluginArray":false,"PointerEvent":false,"PopStateEvent":false,"postMessage":false,"Presentation":false,"PresentationAvailability":false,"PresentationConnection":false,"PresentationConnectionAvailableEvent":false,"PresentationConnectionCloseEvent":false,"PresentationConnectionList":false,"PresentationReceiver":false,"PresentationRequest":false,"print":false,"ProcessingInstruction":false,"ProgressEvent":false,"PromiseRejectionEvent":false,"prompt":false,"PushManager":false,"PushSubscription":false,"PushSubscriptionOptions":false,"queueMicrotask":false,"RadioNodeList":false,"Range":false,"ReadableStream":false,"registerProcessor":false,"RemotePlayback":false,"removeEventListener":false,"Request":false,"requestAnimationFrame":false,"requestIdleCallback":false,"resizeBy":false,"ResizeObserver":false,"ResizeObserverEntry":false,"resizeTo":false,"Response":false,"RTCCertificate":false,"RTCDataChannel":false,"RTCDataChannelEvent":false,"RTCDtlsTransport":false,"RTCIceCandidate":false,"RTCIceGatherer":false,"RTCIceTransport":false,"RTCPeerConnection":false,"RTCPeerConnectionIceEvent":false,"RTCRtpContributingSource":false,"RTCRtpReceiver":false,"RTCRtpSender":false,"RTCSctpTransport":false,"RTCSessionDescription":false,"RTCStatsReport":false,"RTCTrackEvent":false,"screen":false,"Screen":false,"screenLeft":false,"ScreenOrientation":false,"screenTop":false,"screenX":false,"screenY":false,"ScriptProcessorNode":false,"scroll":false,"scrollbars":false,"scrollBy":false,"scrollTo":false,"scrollX":false,"scrollY":false,"SecurityPolicyViolationEvent":false,"Selection":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerRegistration":false,"sessionStorage":false,"setInterval":false,"setTimeout":false,"ShadowRoot":false,"SharedWorker":false,"SourceBuffer":false,"SourceBufferList":false,"speechSynthesis":false,"SpeechSynthesisEvent":false,"SpeechSynthesisUtterance":false,"StaticRange":false,"status":false,"statusbar":false,"StereoPannerNode":false,"stop":false,"Storage":false,"StorageEvent":false,"StorageManager":false,"styleMedia":false,"StyleSheet":false,"StyleSheetList":false,"SubtleCrypto":false,"SVGAElement":false,"SVGAngle":false,"SVGAnimatedAngle":false,"SVGAnimatedBoolean":false,"SVGAnimatedEnumeration":false,"SVGAnimatedInteger":false,"SVGAnimatedLength":false,"SVGAnimatedLengthList":false,"SVGAnimatedNumber":false,"SVGAnimatedNumberList":false,"SVGAnimatedPreserveAspectRatio":false,"SVGAnimatedRect":false,"SVGAnimatedString":false,"SVGAnimatedTransformList":false,"SVGAnimateElement":false,"SVGAnimateMotionElement":false,"SVGAnimateTransformElement":false,"SVGAnimationElement":false,"SVGCircleElement":false,"SVGClipPathElement":false,"SVGComponentTransferFunctionElement":false,"SVGDefsElement":false,"SVGDescElement":false,"SVGDiscardElement":false,"SVGElement":false,"SVGEllipseElement":false,"SVGFEBlendElement":false,"SVGFEColorMatrixElement":false,"SVGFEComponentTransferElement":false,"SVGFECompositeElement":false,"SVGFEConvolveMatrixElement":false,"SVGFEDiffuseLightingElement":false,"SVGFEDisplacementMapElement":false,"SVGFEDistantLightElement":false,"SVGFEDropShadowElement":false,"SVGFEFloodElement":false,"SVGFEFuncAElement":false,"SVGFEFuncBElement":false,"SVGFEFuncGElement":false,"SVGFEFuncRElement":false,"SVGFEGaussianBlurElement":false,"SVGFEImageElement":false,"SVGFEMergeElement":false,"SVGFEMergeNodeElement":false,"SVGFEMorphologyElement":false,"SVGFEOffsetElement":false,"SVGFEPointLightElement":false,"SVGFESpecularLightingElement":false,"SVGFESpotLightElement":false,"SVGFETileElement":false,"SVGFETurbulenceElement":false,"SVGFilterElement":false,"SVGForeignObjectElement":false,"SVGGElement":false,"SVGGeometryElement":false,"SVGGradientElement":false,"SVGGraphicsElement":false,"SVGImageElement":false,"SVGLength":false,"SVGLengthList":false,"SVGLinearGradientElement":false,"SVGLineElement":false,"SVGMarkerElement":false,"SVGMaskElement":false,"SVGMatrix":false,"SVGMetadataElement":false,"SVGMPathElement":false,"SVGNumber":false,"SVGNumberList":false,"SVGPathElement":false,"SVGPatternElement":false,"SVGPoint":false,"SVGPointList":false,"SVGPolygonElement":false,"SVGPolylineElement":false,"SVGPreserveAspectRatio":false,"SVGRadialGradientElement":false,"SVGRect":false,"SVGRectElement":false,"SVGScriptElement":false,"SVGSetElement":false,"SVGStopElement":false,"SVGStringList":false,"SVGStyleElement":false,"SVGSVGElement":false,"SVGSwitchElement":false,"SVGSymbolElement":false,"SVGTextContentElement":false,"SVGTextElement":false,"SVGTextPathElement":false,"SVGTextPositioningElement":false,"SVGTitleElement":false,"SVGTransform":false,"SVGTransformList":false,"SVGTSpanElement":false,"SVGUnitTypes":false,"SVGUseElement":false,"SVGViewElement":false,"TaskAttributionTiming":false,"Text":false,"TextDecoder":false,"TextEncoder":false,"TextEvent":false,"TextMetrics":false,"TextTrack":false,"TextTrackCue":false,"TextTrackCueList":false,"TextTrackList":false,"TimeRanges":false,"toolbar":false,"top":false,"Touch":false,"TouchEvent":false,"TouchList":false,"TrackEvent":false,"TransitionEvent":false,"TreeWalker":false,"UIEvent":false,"URL":false,"URLSearchParams":false,"ValidityState":false,"visualViewport":false,"VisualViewport":false,"VTTCue":false,"WaveShaperNode":false,"WebAssembly":false,"WebGL2RenderingContext":false,"WebGLActiveInfo":false,"WebGLBuffer":false,"WebGLContextEvent":false,"WebGLFramebuffer":false,"WebGLProgram":false,"WebGLQuery":false,"WebGLRenderbuffer":false,"WebGLRenderingContext":false,"WebGLSampler":false,"WebGLShader":false,"WebGLShaderPrecisionFormat":false,"WebGLSync":false,"WebGLTexture":false,"WebGLTransformFeedback":false,"WebGLUniformLocation":false,"WebGLVertexArrayObject":false,"WebSocket":false,"WheelEvent":false,"window":false,"Window":false,"Worker":false,"WritableStream":false,"XMLDocument":false,"XMLHttpRequest":false,"XMLHttpRequestEventTarget":false,"XMLHttpRequestUpload":false,"XMLSerializer":false,"XPathEvaluator":false,"XPathExpression":false,"XPathResult":false,"XSLTProcessor":false},"worker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"clearInterval":false,"clearTimeout":false,"close":true,"console":false,"fetch":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":true,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onlanguagechange":true,"onmessage":true,"onoffline":true,"ononline":true,"onrejectionhandled":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"removeEventListener":false,"Request":false,"Response":false,"self":true,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"node":{"__dirname":false,"__filename":false,"Buffer":false,"clearImmediate":false,"clearInterval":false,"clearTimeout":false,"console":false,"exports":true,"global":false,"Intl":false,"module":false,"process":false,"queueMicrotask":false,"require":false,"setImmediate":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false},"commonjs":{"exports":true,"global":false,"module":false,"require":false},"amd":{"define":false,"require":false},"mocha":{"after":false,"afterEach":false,"before":false,"beforeEach":false,"context":false,"describe":false,"it":false,"mocha":false,"run":false,"setup":false,"specify":false,"suite":false,"suiteSetup":false,"suiteTeardown":false,"teardown":false,"test":false,"xcontext":false,"xdescribe":false,"xit":false,"xspecify":false},"jasmine":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fail":false,"fdescribe":false,"fit":false,"it":false,"jasmine":false,"pending":false,"runs":false,"spyOn":false,"spyOnProperty":false,"waits":false,"waitsFor":false,"xdescribe":false,"xit":false},"jest":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fdescribe":false,"fit":false,"it":false,"jest":false,"pit":false,"require":false,"test":false,"xdescribe":false,"xit":false,"xtest":false},"qunit":{"asyncTest":false,"deepEqual":false,"equal":false,"expect":false,"module":false,"notDeepEqual":false,"notEqual":false,"notOk":false,"notPropEqual":false,"notStrictEqual":false,"ok":false,"propEqual":false,"QUnit":false,"raises":false,"start":false,"stop":false,"strictEqual":false,"test":false,"throws":false},"phantomjs":{"console":true,"exports":true,"phantom":true,"require":true,"WebPage":true},"couch":{"emit":false,"exports":false,"getRow":false,"log":false,"module":false,"provides":false,"require":false,"respond":false,"send":false,"start":false,"sum":false},"rhino":{"defineClass":false,"deserialize":false,"gc":false,"help":false,"importClass":false,"importPackage":false,"java":false,"load":false,"loadClass":false,"Packages":false,"print":false,"quit":false,"readFile":false,"readUrl":false,"runCommand":false,"seal":false,"serialize":false,"spawn":false,"sync":false,"toint32":false,"version":false},"nashorn":{"__DIR__":false,"__FILE__":false,"__LINE__":false,"com":false,"edu":false,"exit":false,"java":false,"Java":false,"javafx":false,"JavaImporter":false,"javax":false,"JSAdapter":false,"load":false,"loadWithNewGlobal":false,"org":false,"Packages":false,"print":false,"quit":false},"wsh":{"ActiveXObject":true,"Enumerator":true,"GetObject":true,"ScriptEngine":true,"ScriptEngineBuildVersion":true,"ScriptEngineMajorVersion":true,"ScriptEngineMinorVersion":true,"VBArray":true,"WScript":true,"WSH":true,"XDomainRequest":true},"jquery":{"$":false,"jQuery":false},"yui":{"YAHOO":false,"YAHOO_config":false,"YUI":false,"YUI_config":false},"shelljs":{"cat":false,"cd":false,"chmod":false,"config":false,"cp":false,"dirs":false,"echo":false,"env":false,"error":false,"exec":false,"exit":false,"find":false,"grep":false,"ln":false,"ls":false,"mkdir":false,"mv":false,"popd":false,"pushd":false,"pwd":false,"rm":false,"sed":false,"set":false,"target":false,"tempdir":false,"test":false,"touch":false,"which":false},"prototypejs":{"$":false,"$$":false,"$A":false,"$break":false,"$continue":false,"$F":false,"$H":false,"$R":false,"$w":false,"Abstract":false,"Ajax":false,"Autocompleter":false,"Builder":false,"Class":false,"Control":false,"Draggable":false,"Draggables":false,"Droppables":false,"Effect":false,"Element":false,"Enumerable":false,"Event":false,"Field":false,"Form":false,"Hash":false,"Insertion":false,"ObjectRange":false,"PeriodicalExecuter":false,"Position":false,"Prototype":false,"Scriptaculous":false,"Selector":false,"Sortable":false,"SortableObserver":false,"Sound":false,"Template":false,"Toggle":false,"Try":false},"meteor":{"_":false,"$":false,"Accounts":false,"AccountsClient":false,"AccountsCommon":false,"AccountsServer":false,"App":false,"Assets":false,"Blaze":false,"check":false,"Cordova":false,"DDP":false,"DDPRateLimiter":false,"DDPServer":false,"Deps":false,"EJSON":false,"Email":false,"HTTP":false,"Log":false,"Match":false,"Meteor":false,"Mongo":false,"MongoInternals":false,"Npm":false,"Package":false,"Plugin":false,"process":false,"Random":false,"ReactiveDict":false,"ReactiveVar":false,"Router":false,"ServiceConfiguration":false,"Session":false,"share":false,"Spacebars":false,"Template":false,"Tinytest":false,"Tracker":false,"UI":false,"Utils":false,"WebApp":false,"WebAppInternals":false},"mongo":{"_isWindows":false,"_rand":false,"BulkWriteResult":false,"cat":false,"cd":false,"connect":false,"db":false,"getHostName":false,"getMemInfo":false,"hostname":false,"ISODate":false,"listFiles":false,"load":false,"ls":false,"md5sumFile":false,"mkdir":false,"Mongo":false,"NumberInt":false,"NumberLong":false,"ObjectId":false,"PlanCache":false,"print":false,"printjson":false,"pwd":false,"quit":false,"removeFile":false,"rs":false,"sh":false,"UUID":false,"version":false,"WriteResult":false},"applescript":{"$":false,"Application":false,"Automation":false,"console":false,"delay":false,"Library":false,"ObjC":false,"ObjectSpecifier":false,"Path":false,"Progress":false,"Ref":false},"serviceworker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"CacheStorage":false,"clearInterval":false,"clearTimeout":false,"Client":false,"clients":false,"Clients":false,"close":true,"console":false,"ExtendableEvent":false,"ExtendableMessageEvent":false,"fetch":false,"FetchEvent":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":false,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onfetch":true,"oninstall":true,"onlanguagechange":true,"onmessage":true,"onmessageerror":true,"onnotificationclick":true,"onnotificationclose":true,"onoffline":true,"ononline":true,"onpush":true,"onpushsubscriptionchange":true,"onrejectionhandled":true,"onsync":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"registration":false,"removeEventListener":false,"Request":false,"Response":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerGlobalScope":false,"ServiceWorkerMessageEvent":false,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"skipWaiting":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"WindowClient":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"atomtest":{"advanceClock":false,"fakeClearInterval":false,"fakeClearTimeout":false,"fakeSetInterval":false,"fakeSetTimeout":false,"resetTimeouts":false,"waitsForPromise":false},"embertest":{"andThen":false,"click":false,"currentPath":false,"currentRouteName":false,"currentURL":false,"fillIn":false,"find":false,"findAll":false,"findWithAssert":false,"keyEvent":false,"pauseTest":false,"resumeTest":false,"triggerEvent":false,"visit":false,"wait":false},"protractor":{"$":false,"$$":false,"browser":false,"by":false,"By":false,"DartObject":false,"element":false,"protractor":false},"shared-node-browser":{"clearInterval":false,"clearTimeout":false,"console":false,"setInterval":false,"setTimeout":false,"URL":false,"URLSearchParams":false},"webextensions":{"browser":false,"chrome":false,"opr":false},"greasemonkey":{"cloneInto":false,"createObjectIn":false,"exportFunction":false,"GM":false,"GM_addStyle":false,"GM_deleteValue":false,"GM_getResourceText":false,"GM_getResourceURL":false,"GM_getValue":false,"GM_info":false,"GM_listValues":false,"GM_log":false,"GM_openInTab":false,"GM_registerMenuCommand":false,"GM_setClipboard":false,"GM_setValue":false,"GM_xmlhttpRequest":false,"unsafeWindow":false},"devtools":{"$":false,"$_":false,"$$":false,"$0":false,"$1":false,"$2":false,"$3":false,"$4":false,"$x":false,"chrome":false,"clear":false,"copy":false,"debug":false,"dir":false,"dirxml":false,"getEventListeners":false,"inspect":false,"keys":false,"monitor":false,"monitorEvents":false,"profile":false,"profileEnd":false,"queryObjects":false,"table":false,"undebug":false,"unmonitor":false,"unmonitorEvents":false,"values":false}}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(244);t.default=class{constructor(e,t){this._cachedMap=void 0,this._code=void 0,this._opts=void 0,this._rawMappings=void 0,this._lastGenLine=void 0,this._lastSourceLine=void 0,this._lastSourceColumn=void 0,this._cachedMap=null,this._code=t,this._opts=e,this._rawMappings=[]}get(){if(!this._cachedMap){const e=this._cachedMap=new r.SourceMapGenerator({sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName.replace(/\\/g,"/"),t):"object"==typeof t&&Object.keys(t).forEach(n=>{e.setSourceContent(n.replace(/\\/g,"/"),t[n])}),this._rawMappings.forEach(t=>e.addMapping(t),e)}return this._cachedMap.toJSON()}getRawMappings(){return this._rawMappings.slice()}mark(e,t,n,r,i,s,o){this._lastGenLine!==e&&null===n||(o||this._lastGenLine!==e||this._lastSourceLine!==n||this._lastSourceColumn!==r)&&(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=n,this._lastSourceColumn=r,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==n?void 0:(s||this._opts.sourceFileName).replace(/\\/g,"/"),original:null==n?void 0:{line:n,column:r}}))}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},function(e,t,n){var r=n(65);function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,n,i,s,o,a;t=this._last,n=e,i=t.generatedLine,s=n.generatedLine,o=t.generatedColumn,a=n.generatedColumn,s>i||s==i&&a>=o||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t,n){var r=n(65),i=n(571),s=n(247).ArraySet,o=n(246),a=n(572).quickSort;function l(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new h(t):new u(t)}function u(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sources"),o=r.getArg(t,"names",[]),a=r.getArg(t,"sourceRoot",null),l=r.getArg(t,"sourcesContent",null),u=r.getArg(t,"mappings"),c=r.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);i=i.map(String).map(r.normalize).map((function(e){return a&&r.isAbsolute(a)&&r.isAbsolute(e)?r.relative(a,e):e})),this._names=s.fromArray(o.map(String),!0),this._sources=s.fromArray(i,!0),this.sourceRoot=a,this.sourcesContent=l,this._mappings=u,this.file=c}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function h(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new s,this._names=new s;var o={line:-1,column:0};this._sections=i.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=r.getArg(e,"offset"),n=r.getArg(t,"line"),i=r.getArg(t,"column");if(n<o.line||n===o.line&&i<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=t,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new l(r.getArg(e,"map"))}}))}l.fromSourceMap=function(e){return u.fromSourceMap(e)},l.prototype._version=3,l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),l.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},l.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.GREATEST_LOWER_BOUND=1,l.LEAST_UPPER_BOUND=2,l.prototype.eachMapping=function(e,t,n){var i,s=t||null;switch(n||l.GENERATED_ORDER){case l.GENERATED_ORDER:i=this._generatedMappings;break;case l.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;i.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=o&&(t=r.join(o,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,s)},l.prototype.allGeneratedPositionsFor=function(e){var t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(null!=this.sourceRoot&&(n.source=r.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var s=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(void 0===e.column)for(var l=a.originalLine;a&&a.originalLine===l;)s.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var u=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==u;)s.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return s},t.SourceMapConsumer=l,u.prototype=Object.create(l.prototype),u.prototype.consumer=l,u.fromSourceMap=function(e){var t=Object.create(u.prototype),n=t._names=s.fromArray(e._names.toArray(),!0),i=t._sources=s.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),l=t.__generatedMappings=[],h=t.__originalMappings=[],d=0,f=o.length;d<f;d++){var p=o[d],m=new c;m.generatedLine=p.generatedLine,m.generatedColumn=p.generatedColumn,p.source&&(m.source=i.indexOf(p.source),m.originalLine=p.originalLine,m.originalColumn=p.originalColumn,p.name&&(m.name=n.indexOf(p.name)),h.push(m)),l.push(m)}return a(t.__originalMappings,r.compareByOriginalPositions),t},u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._sources.toArray().map((function(e){return null!=this.sourceRoot?r.join(this.sourceRoot,e):e}),this)}}),u.prototype._parseMappings=function(e,t){for(var n,i,s,l,u,h=1,d=0,f=0,p=0,m=0,g=0,y=e.length,v=0,b={},w={},_=[],S=[];v<y;)if(";"===e.charAt(v))h++,v++,d=0;else if(","===e.charAt(v))v++;else{for((n=new c).generatedLine=h,l=v;l<y&&!this._charIsMappingSeparator(e,l);l++);if(s=b[i=e.slice(v,l)])v+=i.length;else{for(s=[];v<l;)o.decode(e,v,w),u=w.value,v=w.rest,s.push(u);if(2===s.length)throw new Error("Found a source, but no line and column");if(3===s.length)throw new Error("Found a source and line, but no column");b[i]=s}n.generatedColumn=d+s[0],d=n.generatedColumn,s.length>1&&(n.source=m+s[1],m+=s[1],n.originalLine=f+s[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=p+s[3],p=n.originalColumn,s.length>4&&(n.name=g+s[4],g+=s[4])),S.push(n),"number"==typeof n.originalLine&&_.push(n)}a(S,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,a(_,r.compareByOriginalPositions),this.__originalMappings=_},u.prototype._findMapping=function(e,t,n,r,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,s,o)},u.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},u.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=r.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=r.join(this.sourceRoot,s)));var o=r.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},u.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var i=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if(null!=this.sourceRoot&&(t=r.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=u,h.prototype=Object.create(l.prototype),h.prototype.constructor=l,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),h.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=i.search(t,this._sections,(function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n||e.generatedColumn-t.generatedOffset.generatedColumn})),s=this._sections[n];return s?s.consumer.originalPositionFor({line:t.generatedLine-(s.generatedOffset.generatedLine-1),column:t.generatedColumn-(s.generatedOffset.generatedLine===t.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},h.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer.sources.indexOf(r.getArg(e,"source"))){var i=n.consumer.generatedPositionFor(e);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var l=s[o],u=i.consumer._sources.at(l.source);null!==i.consumer.sourceRoot&&(u=r.join(i.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var c=i.consumer._names.at(l.name);this._names.add(c),c=this._names.indexOf(c);var h={source:u,generatedLine:l.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(i.generatedOffset.generatedLine===l.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:c};this.__generatedMappings.push(h),"number"==typeof h.originalLine&&this.__originalMappings.push(h)}a(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),a(this.__originalMappings,r.compareByOriginalPositions)},t.IndexedSourceMapConsumer=h},function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,r,i){if(0===n.length)return-1;var s=function e(n,r,i,s,o,a){var l=Math.floor((r-n)/2)+n,u=o(i,s[l],!0);return 0===u?l:u>0?r-l>1?e(l,r,i,s,o,a):a==t.LEAST_UPPER_BOUND?r<s.length?r:-1:l:l-n>1?e(n,l,i,s,o,a):a==t.LEAST_UPPER_BOUND?l:n<0?-1:n}(-1,n.length,e,n,r,i||t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===r(n[s],n[s-1],!0);)--s;return s}},function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,i,s){if(i<s){var o=i-1;n(e,(c=i,h=s,Math.round(c+Math.random()*(h-c))),s);for(var a=e[s],l=i;l<s;l++)t(e[l],a)<=0&&n(e,o+=1,l);n(e,o+1,l);var u=o+1;r(e,t,i,u-1),r(e,t,u+1,s)}var c,h}t.quickSort=function(e,t){r(e,t,0,e.length-1)}},function(e,t,n){var r=n(245).SourceMapGenerator,i=n(65),s=/(\r?\n)/,o="$$$isSourceNode$$$";function a(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[o]=!0,null!=r&&this.add(r)}a.fromStringWithSourceMap=function(e,t,n){var r=new a,o=e.split(s),l=0,u=function(){return e()+(e()||"");function e(){return l<o.length?o[l++]:void 0}},c=1,h=0,d=null;return t.eachMapping((function(e){if(null!==d){if(!(c<e.generatedLine)){var t=(n=o[l]).substr(0,e.generatedColumn-h);return o[l]=n.substr(e.generatedColumn-h),h=e.generatedColumn,f(d,t),void(d=e)}f(d,u()),c++,h=0}for(;c<e.generatedLine;)r.add(u()),c++;if(h<e.generatedColumn){var n=o[l];r.add(n.substr(0,e.generatedColumn)),o[l]=n.substr(e.generatedColumn),h=e.generatedColumn}d=e}),this),l<o.length&&(d&&f(d,u()),r.add(o.splice(l).join(""))),t.sources.forEach((function(e){var s=t.sourceContentFor(e);null!=s&&(null!=n&&(e=i.join(n,e)),r.setSourceContent(e,s))})),r;function f(e,t){if(null===e||void 0===e.source)r.add(t);else{var s=n?i.join(n,e.source):e.source;r.add(new a(e.originalLine,e.originalColumn,s,t,e.name))}}},a.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},a.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},a.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},a.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[o]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},a.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},a.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(t=0,n=r.length;t<n;t++)e(i.fromSetString(r[t]),this.sourceContents[r[t]])},a.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},a.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),i=!1,s=null,o=null,a=null,l=null;return this.walk((function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?(s===r.source&&o===r.line&&a===r.column&&l===r.name||n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),s=r.source,o=r.line,a=r.column,l=r.name,i=!0):i&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,i=!1);for(var u=0,c=e.length;u<c;u++)10===e.charCodeAt(u)?(t.line++,t.column=0,u+1===c?(s=null,i=!1):i&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:t.code,map:n}},t.SourceNode=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(575),i=n(248),s=n(1),o=n(578);const{isProgram:a,isFile:l,isEmptyStatement:u}=s,c=/e/i,h=/\.0+$/,d=/^0[box]/,f=/^\s*[@#]__PURE__\s*$/,{needsParens:p,needsWhitespaceAfter:m,needsWhitespaceBefore:g}=i;class y{constructor(e,t){this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._parenPushNewlineState=null,this._noLineTerminator=!1,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new WeakSet,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=e,this._buf=new r.default(t)}generate(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(){this.format.compact||this.format.concise||this._indent++}dedent(){this.format.compact||this.format.concise||this._indent--}semicolon(e=!1){this._maybeAddAuxComment(),this._append(";",!e)}rightBrace(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")}space(e=!1){if(!this.format.compact)if(e)this._space();else if(this._buf.hasContent()){const e=this.getLastChar();32!==e&&10!==e&&this._space()}}word(e){(this._endsWithWord||this.endsWith(47)&&47===e.charCodeAt(0))&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0}number(e){this.word(e),this._endsWithInteger=Number.isInteger(+e)&&!d.test(e)&&!c.test(e)&&!h.test(e)&&46!==e.charCodeAt(e.length-1)}token(e){const t=this.getLastChar(),n=e.charCodeAt(0);("--"===e&&33===t||43===n&&43===t||45===n&&45===t||46===n&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)}newline(e=1){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();const t=this.endsWithCharAndNewline();if(10!==t&&(123!==t&&58!==t||e--,!(e<=0)))for(let t=0;t<e;t++)this._newline()}endsWith(e){return this.getLastChar()===e}getLastChar(){return this._buf.getLastChar()}endsWithCharAndNewline(){return this._buf.endsWithCharAndNewline()}removeTrailingNewline(){this._buf.removeTrailingNewline()}exactSource(e,t){this._catchUp("start",e),this._buf.exactSource(e,t)}source(e,t){this._catchUp(e,t),this._buf.source(e,t)}withSource(e,t,n){this._catchUp(e,t),this._buf.withSource(e,t,n)}_space(){this._append(" ",!0)}_newline(){this._append("\n",!0)}_append(e,t=!1){this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1}_maybeIndent(e){this._indent&&this.endsWith(10)&&10!==e.charCodeAt(0)&&this._buf.queue(this._getIndent())}_maybeAddParen(e){const t=this._parenPushNewlineState;if(!t)return;let n;for(n=0;n<e.length&&" "===e[n];n++)continue;if(n===e.length)return;const r=e[n];if("\n"!==r){if("/"!==r||n+1===e.length)return void(this._parenPushNewlineState=null);const t=e[n+1];if("*"===t){if(f.test(e.slice(n+2,e.length-2)))return}else if("/"!==t)return void(this._parenPushNewlineState=null)}this.token("("),this.indent(),t.printed=!0}_catchUp(e,t){if(!this.format.retainLines)return;const n=t?t[e]:null;if(null!=(null==n?void 0:n.line)){const e=n.line-this._buf.getCurrentLine();for(let t=0;t<e;t++)this._newline()}}_getIndent(){return this.format.indent.style.repeat(this._indent)}startTerminatorless(e=!1){return e?(this._noLineTerminator=!0,null):this._parenPushNewlineState={printed:!1}}endTerminatorless(e){this._noLineTerminator=!1,null!=e&&e.printed&&(this.dedent(),this.newline(),this.token(")"))}print(e,t){if(!e)return;const n=this.format.concise;e._compact&&(this.format.concise=!0);const r=this[e.type];if(!r)throw new ReferenceError(`unknown node of type ${JSON.stringify(e.type)} with constructor ${JSON.stringify(null==e?void 0:e.constructor.name)}`);this._printStack.push(e);const i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);let s=p(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e);const o=a(e)||l(e)?null:e.loc;this.withSource("start",o,()=>{r.call(this,e,t)}),this._printTrailingComments(e),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}getPossibleRaw(e){const t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,n={}){if(null==e||!e.length)return;n.indent&&this.indent();const r={addNewlines:n.addNewlines};for(let i=0;i<e.length;i++){const s=e[i];s&&(n.statement&&this._printNewline(!0,s,t,r),this.print(s,t),n.iterator&&n.iterator(s,i),n.separator&&i<e.length-1&&n.separator.call(this),n.statement&&this._printNewline(!1,s,t,r))}n.indent&&this.dedent()}printAndIndentOnComments(e,t){const n=e.leadingComments&&e.leadingComments.length>0;n&&this.indent(),this.print(e,t),n&&this.dedent()}printBlock(e){const t=e.body;u(t)||this.space(),this.print(t,e)}_printTrailingComments(e){this._printComments(this._getComments(!1,e))}_printLeadingComments(e){this._printComments(this._getComments(!0,e),!0)}printInnerComments(e,t=!0){var n;null!=(n=e.innerComments)&&n.length&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())}printSequence(e,t,n={}){return n.statement=!0,this.printJoin(e,t,n)}printList(e,t,n={}){return null==n.separator&&(n.separator=b),this.printJoin(e,t,n)}_printNewline(e,t,n,r){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();let i=0;if(this._buf.hasContent()){e||i++,r.addNewlines&&(i+=r.addNewlines(e,t)||0);(e?g:m)(t,n)&&i++}this.newline(Math.min(2,i))}_getComments(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]}_printComment(e,t){if(!this.format.shouldPrintComment(e.value))return;if(e.ignore)return;if(this._printedComments.has(e))return;this._printedComments.add(e);const n="CommentBlock"===e.type,r=n&&!t&&!this._noLineTerminator;r&&this._buf.hasContent()&&this.newline(1);const i=this.getLastChar();91!==i&&123!==i&&this.space();let s=n||this._noLineTerminator?`/*${e.value}*/`:`//${e.value}\n`;if(n&&this.format.indent.adjustMultilineComment){var o;const t=null==(o=e.loc)?void 0:o.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");s=s.replace(e,"\n")}const n=Math.max(this._getIndent().length,this.format.retainLines?0:this._buf.getCurrentColumn());s=s.replace(/\n(?!$)/g,"\n"+" ".repeat(n))}this.endsWith(47)&&this._space(),this.withSource("start",e.loc,()=>{this._append(s)}),r&&this.newline(1)}_printComments(e,t){if(null!=e&&e.length)if(t&&1===e.length&&f.test(e[0].value))this._printComment(e[0],this._buf.hasContent()&&!this.endsWith(10));else for(const t of e)this._printComment(t)}printAssertions(e){var t;null!=(t=e.assertions)&&t.length&&(this.space(),this.word("assert"),this.space(),this.token("{"),this.space(),this.printList(e.assertions,e),this.space(),this.token("}"))}}Object.assign(y.prototype,o),y.prototype.Noop=function(){};var v=y;function b(){this.token(","),this.space()}t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=/^[ \t]+$/;t.default=class{constructor(e){this._map=null,this._buf="",this._last=0,this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._disallowedPop=null,this._map=e}get(){this._flush();const e=this._map,t={code:this._buf.trimRight(),map:null,rawMappings:null==e?void 0:e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get(){return this.map=e.get()},set(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t}append(e){this._flush();const{line:t,column:n,filename:r,identifierName:i,force:s}=this._sourcePosition;this._append(e,t,n,i,r,s)}queue(e){if("\n"===e)for(;this._queue.length>0&&r.test(this._queue[0][0]);)this._queue.shift();const{line:t,column:n,filename:i,identifierName:s,force:o}=this._sourcePosition;this._queue.unshift([e,t,n,s,i,o])}_flush(){let e;for(;e=this._queue.pop();)this._append(...e)}_append(e,t,n,r,i,s){this._buf+=e,this._last=e.charCodeAt(e.length-1);let o=e.indexOf("\n"),a=0;for(0!==o&&this._mark(t,n,r,i,s);-1!==o;)this._position.line++,this._position.column=0,a=o+1,a<e.length&&this._mark(++t,0,r,i,s),o=e.indexOf("\n",a);this._position.column+=e.length-a}_mark(e,t,n,r,i){var s;null==(s=this._map)||s.mark(this._position.line,this._position.column,e,t,n,r,i)}removeTrailingNewline(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()}removeLastSemicolon(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()}getLastChar(){let e;if(this._queue.length>0){e=this._queue[0][0].charCodeAt(0)}else e=this._last;return e}endsWithCharAndNewline(){const e=this._queue;if(e.length>0){if(10!==e[0][0].charCodeAt(0))return;if(e.length>1){return e[1][0].charCodeAt(0)}return this._last}}hasContent(){return this._queue.length>0||!!this._last}exactSource(e,t){this.source("start",e,!0),t(),this.source("end",e),this._disallowPop("start",e)}source(e,t,n){e&&!t||this._normalizePosition(e,t,this._sourcePosition,n)}withSource(e,t,n){if(!this._map)return n();const r=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,o=this._sourcePosition.identifierName;this.source(e,t),n(),this._sourcePosition.force&&this._sourcePosition.line===r&&this._sourcePosition.column===i&&this._sourcePosition.filename===s||this._disallowedPop&&this._disallowedPop.line===r&&this._disallowedPop.column===i&&this._disallowedPop.filename===s||(this._sourcePosition.line=r,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=o,this._sourcePosition.force=!1,this._disallowedPop=null)}_disallowPop(e,t){e&&!t||(this._disallowedPop=this._normalizePosition(e,t))}_normalizePosition(e,t,n,r){const i=t?t[e]:null;void 0===n&&(n={identifierName:null,line:null,column:null,filename:null,force:!1});const s=n.line,o=n.column,a=n.filename;return n.identifierName="start"===e&&(null==t?void 0:t.identifierName)||null,n.line=null==i?void 0:i.line,n.column=null==i?void 0:i.column,n.filename=null==t?void 0:t.filename,(r||n.line!==s||n.column!==o||n.filename!==a)&&(n.force=r),n}getCurrentColumn(){const e=this._queue.reduce((e,t)=>t[0]+e,""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t}getCurrentLine(){const e=this._queue.reduce((e,t)=>t[0]+e,"");let t=0;for(let n=0;n<e.length;n++)"\n"===e[n]&&t++;return this._position.line+t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nodes=t.list=void 0;var r=n(1);const{FLIPPED_ALIAS_KEYS:i,isArrayExpression:s,isAssignmentExpression:o,isBinary:a,isBlockStatement:l,isCallExpression:u,isFunction:c,isIdentifier:h,isLiteral:d,isMemberExpression:f,isObjectExpression:p,isOptionalCallExpression:m,isOptionalMemberExpression:g,isStringLiteral:y}=r;function v(e,t={}){return f(e)||g(e)?(v(e.object,t),e.computed&&v(e.property,t)):a(e)||o(e)?(v(e.left,t),v(e.right,t)):u(e)||m(e)?(t.hasCall=!0,v(e.callee,t)):c(e)?t.hasFunction=!0:h(e)&&(t.hasHelper=t.hasHelper||b(e.callee)),t}function b(e){return f(e)?b(e.object)||b(e.property):h(e)?"require"===e.name||"_"===e.name[0]:u(e)?b(e.callee):!(!a(e)&&!o(e))&&(h(e.left)&&b(e.left)||b(e.right))}function w(e){return d(e)||p(e)||s(e)||h(e)||f(e)}const _={AssignmentExpression(e){const t=v(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:(e,t)=>({before:!!e.consequent.length||t.cases[0]===e,after:!e.consequent.length&&t.cases[t.cases.length-1]===e}),LogicalExpression(e){if(c(e.left)||c(e.right))return{after:!0}},Literal(e){if(y(e)&&"use strict"===e.value)return{after:!0}},CallExpression(e){if(c(e.callee)||b(e))return{before:!0,after:!0}},OptionalCallExpression(e){if(c(e.callee))return{before:!0,after:!0}},VariableDeclaration(e){for(let t=0;t<e.declarations.length;t++){const n=e.declarations[t];let r=b(n.id)&&!w(n.init);if(!r){const e=v(n.init);r=b(n.init)&&e.hasCall||e.hasFunction}if(r)return{before:!0,after:!0}}},IfStatement(e){if(l(e.consequent))return{before:!0,after:!0}}};t.nodes=_,_.ObjectProperty=_.ObjectTypeProperty=_.ObjectMethod=function(e,t){if(t.properties[0]===e)return{before:!0}},_.ObjectTypeCallProperty=function(e,t){var n;if(t.callProperties[0]===e&&(null==(n=t.properties)||!n.length))return{before:!0}},_.ObjectTypeIndexer=function(e,t){var n,r;if(!(t.indexers[0]!==e||null!=(n=t.properties)&&n.length||null!=(r=t.callProperties)&&r.length))return{before:!0}},_.ObjectTypeInternalSlot=function(e,t){var n,r,i;if(!(t.internalSlots[0]!==e||null!=(n=t.properties)&&n.length||null!=(r=t.callProperties)&&r.length||null!=(i=t.indexers)&&i.length))return{before:!0}};const S={VariableDeclaration:e=>e.declarations.map(e=>e.init),ArrayExpression:e=>e.elements,ObjectExpression:e=>e.properties};t.list=S,[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach((function([e,t]){"boolean"==typeof t&&(t={after:t,before:t}),[e].concat(i[e]||[]).forEach((function(e){_[e]=function(){return t}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowFunctionExpression=function(e,t){return m(t)||te(e,t)},t.AssignmentExpression=function(e,t){return!!P(e.left)||te(e,t)},t.Binary=function(e,t){if("**"===e.operator&&u(t,{operator:"**"}))return t.left===e;if(Z(e,t))return!0;if(Q(e,t)||H(t)||a(t))return!0;if(l(t)){const n=t.operator,r=X[n],i=e.operator,s=X[i];if(r===s&&t.right===e&&!A(t)||r>s)return!0}},t.BinaryExpression=function(e,t){return"in"===e.operator&&(G(t)||v(t))},t.ClassExpression=function(e,t,n){return ne(n,{expressionStatement:!0,exportDefault:!0})},t.ConditionalExpression=te,t.DoExpression=function(e,t,n){return!e.async&&ne(n,{expressionStatement:!0})},t.FunctionExpression=function(e,t,n){return ne(n,{expressionStatement:!0,exportDefault:!0})},t.FunctionTypeAnnotation=function(e,t,n){return q(t)||E(t)||i(t)||K(t)&&s(n[n.length-3])},t.Identifier=function(e,t,n){if("let"===e.name){const r=T(t,{object:e,computed:!0})||O(t,{object:e,computed:!0,optional:!1});return ne(n,{expressionStatement:r,forHead:r,forInHead:r,forOfHead:!0})}return"async"===e.name&&w(t)&&e===t.left},t.LogicalExpression=function(e,t){switch(e.operator){case"||":return!!A(t)&&("??"===t.operator||"&&"===t.operator);case"&&":return A(t,{operator:"??"});case"??":return A(t)&&"??"!==t.operator}},t.NullableTypeAnnotation=function(e,t){return i(t)},t.ObjectExpression=function(e,t,n){return ne(n,{expressionStatement:!0,arrowBody:!0})},t.OptionalIndexedAccessType=function(e,t){return x(t,{objectType:e})},t.OptionalCallExpression=t.OptionalMemberExpression=function(e,t){return c(t,{callee:e})||T(t,{object:e})},t.SequenceExpression=function(e,t){if(_(t)||z(t)||I(t)||S(t)&&t.test===e||Y(t)&&t.test===e||b(t)&&t.right===e||N(t)&&t.discriminant===e||y(t)&&t.expression===e)return!1;return!0},t.TSAsExpression=function(){return!0},t.TSInferType=function(e,t){return D(t)||j(t)},t.TSTypeAssertion=function(){return!0},t.TSIntersectionType=t.TSUnionType=function(e,t){return D(t)||j(t)||L(t)||V(t)||$(t)},t.UnaryLike=ee,t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t){return i(t)||C(t)||E(t)||q(t)},t.UpdateExpression=function(e,t){return Q(e,t)||Z(e,t)},t.AwaitExpression=t.YieldExpression=function(e,t){return l(t)||H(t)||Q(e,t)||a(t)&&J(e)||p(t)&&e===t.test||Z(e,t)};var r=n(1);const{isArrayTypeAnnotation:i,isArrowFunctionExpression:s,isAssignmentExpression:o,isAwaitExpression:a,isBinary:l,isBinaryExpression:u,isCallExpression:c,isClassDeclaration:h,isClassExpression:d,isConditional:f,isConditionalExpression:p,isExportDeclaration:m,isExportDefaultDeclaration:g,isExpressionStatement:y,isFor:v,isForInStatement:b,isForOfStatement:w,isForStatement:_,isIfStatement:S,isIndexedAccessType:x,isIntersectionTypeAnnotation:E,isLogicalExpression:A,isMemberExpression:T,isNewExpression:M,isNullableTypeAnnotation:C,isObjectPattern:P,isOptionalCallExpression:k,isOptionalMemberExpression:O,isReturnStatement:I,isSequenceExpression:R,isSwitchStatement:N,isTSArrayType:D,isTSAsExpression:F,isTSIntersectionType:L,isTSNonNullExpression:B,isTSOptionalType:j,isTSRestType:$,isTSTypeAssertion:U,isTSUnionType:V,isTaggedTemplateExpression:W,isThrowStatement:z,isTypeAnnotation:K,isUnaryLike:H,isUnionTypeAnnotation:q,isVariableDeclarator:G,isWhileStatement:Y,isYieldExpression:J}=r,X={"||":0,"??":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10},Z=(e,t)=>(h(t)||d(t))&&t.superClass===e,Q=(e,t)=>(T(t)||O(t))&&t.object===e||(c(t)||k(t)||M(t))&&t.callee===e||W(t)&&t.tag===e||B(t);function ee(e,t){return Q(e,t)||u(t,{operator:"**",left:e})||Z(e,t)}function te(e,t){return!!(H(t)||l(t)||p(t,{test:e})||a(t)||U(t)||F(t))||ee(e,t)}function ne(e,{expressionStatement:t=!1,arrowBody:n=!1,exportDefault:r=!1,forHead:i=!1,forInHead:a=!1,forOfHead:u=!1}){let c=e.length-1,h=e[c];c--;let d=e[c];for(;c>=0;){if(t&&y(d,{expression:h})||r&&g(d,{declaration:h})||n&&s(d,{body:h})||i&&_(d,{init:h})||a&&b(d,{left:h})||u&&w(d,{left:h}))return!0;if(!(Q(h,d)&&!M(d)||R(d)&&d.expressions[0]===h||f(d,{test:h})||l(d,{left:h})||o(d,{left:h})))return!1;h=d,c--,d=e[c]}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(579);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var i=n(580);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(581);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var o=n(582);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(583);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var l=n(249);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=n(250);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(585);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var h=n(586);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var d=n(587);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=n(588);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.typeParameters,e),this.print(e.quasi,e)},t.TemplateElement=function(e,t){const n=t.quasis[0]===e,r=t.quasis[t.quasis.length-1]===e,i=(n?"`":"}")+e.value.raw+(r?"`":"${");this.token(i)},t.TemplateLiteral=function(e){const t=e.quasis;for(let n=0;n<t.length;n++)this.print(t[n],e),n+1<t.length&&this.print(e.expressions[n],e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogicalExpression=t.BinaryExpression=t.AssignmentExpression=function(e,t){const n=this.inForStatementInitCounter&&"in"===e.operator&&!i.needsParens(e,t);n&&this.token("(");this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator);this.space(),this.print(e.right,e),n&&this.token(")")},t.AssignmentPattern=function(e){this.print(e.left,e),e.left.optional&&this.token("?");this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)},t.AwaitExpression=void 0,t.BindExpression=function(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)},t.CallExpression=function(e){this.print(e.callee,e),this.print(e.typeArguments,e),this.print(e.typeParameters,e),this.token("("),this.printList(e.arguments,e),this.token(")")},t.ConditionalExpression=function(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)},t.Decorator=function(e){this.token("@"),this.print(e.expression,e),this.newline()},t.DoExpression=function(e){e.async&&(this.word("async"),this.space());this.word("do"),this.space(),this.print(e.body,e)},t.EmptyStatement=function(){this.semicolon(!0)},t.ExpressionStatement=function(e){this.print(e.expression,e),this.semicolon()},t.Import=function(){this.word("import")},t.MemberExpression=function(e){if(this.print(e.object,e),!e.computed&&a(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;o(e.property)&&"number"==typeof e.property.value&&(t=!0);t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))},t.MetaProperty=function(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)},t.ModuleExpression=function(e){this.word("module"),this.space(),this.token("{"),0===e.body.body.length?this.token("}"):(this.newline(),this.printSequence(e.body.body,e,{indent:!0}),this.rightBrace())},t.NewExpression=function(e,t){if(this.word("new"),this.space(),this.print(e.callee,e),this.format.minified&&0===e.arguments.length&&!e.optional&&!s(t,{callee:e})&&!a(t)&&!l(t))return;this.print(e.typeArguments,e),this.print(e.typeParameters,e),e.optional&&this.token("?.");this.token("("),this.printList(e.arguments,e),this.token(")")},t.OptionalCallExpression=function(e){this.print(e.callee,e),this.print(e.typeArguments,e),this.print(e.typeParameters,e),e.optional&&this.token("?.");this.token("("),this.printList(e.arguments,e),this.token(")")},t.OptionalMemberExpression=function(e){if(this.print(e.object,e),!e.computed&&a(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;o(e.property)&&"number"==typeof e.property.value&&(t=!0);e.optional&&this.token("?.");t?(this.token("["),this.print(e.property,e),this.token("]")):(e.optional||this.token("."),this.print(e.property,e))},t.ParenthesizedExpression=function(e){this.token("("),this.print(e.expression,e),this.token(")")},t.PrivateName=function(e){this.token("#"),this.print(e.id,e)},t.SequenceExpression=function(e){this.printList(e.expressions,e)},t.Super=function(){this.word("super")},t.ThisExpression=function(){this.word("this")},t.UnaryExpression=function(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator||"throw"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator);this.print(e.argument,e)},t.UpdateExpression=function(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.startTerminatorless(!0),this.print(e.argument,e),this.endTerminatorless(),this.token(e.operator))},t.V8IntrinsicIdentifier=function(e){this.token("%"),this.word(e.name)},t.YieldExpression=void 0;var r=n(1),i=n(248);const{isCallExpression:s,isLiteral:o,isMemberExpression:a,isNewExpression:l}=r;function u(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();const e=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(e)}}}const c=u("yield");t.YieldExpression=c;const h=u("await");t.AwaitExpression=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakStatement=void 0,t.CatchClause=function(e){this.word("catch"),this.space(),e.param&&(this.token("("),this.print(e.param,e),this.print(e.param.typeAnnotation,e),this.token(")"),this.space());this.print(e.body,e)},t.ContinueStatement=void 0,t.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},t.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()},t.ForOfStatement=t.ForInStatement=void 0,t.ForStatement=function(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e));this.token(";"),e.update&&(this.space(),this.print(e.update,e));this.token(")"),this.printBlock(e)},t.IfStatement=function(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();const t=e.alternate&&o(function e(t){return a(t.body)?e(t.body):t}(e.consequent));t&&(this.token("{"),this.newline(),this.indent());this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}"));e.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))},t.LabeledStatement=function(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)},t.ReturnStatement=void 0,t.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":"));e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},t.SwitchStatement=function(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines(t,n){if(!t&&e.cases[e.cases.length-1]===n)return-1}}),this.token("}")},t.ThrowStatement=void 0,t.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e);e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))},t.VariableDeclaration=function(e,t){e.declare&&(this.word("declare"),this.space());this.word(e.kind),this.space();let n,r=!1;if(!i(t))for(const t of e.declarations)t.init&&(r=!0);r&&(n="const"===e.kind?y:g);if(this.printList(e.declarations,e,{separator:n}),i(t))if(s(t)){if(t.init===e)return}else if(t.left===e)return;this.semicolon()},t.VariableDeclarator=function(e){this.print(e.id,e),e.definite&&this.token("!");this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))},t.WhileStatement=function(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)},t.WithStatement=function(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)};var r=n(1);const{isFor:i,isForStatement:s,isIfStatement:o,isStatement:a}=r;const l=function(e){return function(t){this.word("for"),this.space(),"of"===e&&t.await&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word(e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}},u=l("in");t.ForInStatement=u;const c=l("of");function h(e,t="label"){return function(n){this.word(e);const r=n[t];if(r){this.space();const e="label"==t,i=this.startTerminatorless(e);this.print(r,n),this.endTerminatorless(i)}this.semicolon()}}t.ForOfStatement=c;const d=h("continue");t.ContinueStatement=d;const f=h("return","argument");t.ReturnStatement=f;const p=h("break");t.BreakStatement=p;const m=h("throw","argument");function g(){if(this.token(","),this.newline(),this.endsWith(10))for(let e=0;e<4;e++)this.space(!0)}function y(){if(this.token(","),this.newline(),this.endsWith(10))for(let e=0;e<6;e++)this.space(!0)}t.ThrowStatement=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClassAccessorProperty=function(e){this.printJoin(e.decorators,e),this.source("end",e.key.loc),this.tsPrintClassMemberModifiers(e,!0),this.word("accessor"),this.printInnerComments(e),this.space(),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e));e.optional&&this.token("?");e.definite&&this.token("!");this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e));this.semicolon()},t.ClassBody=function(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith(10)||this.newline(),this.rightBrace())},t.ClassExpression=t.ClassDeclaration=function(e,t){this.format.decoratorsBeforeExport&&(i(t)||s(t))||this.printJoin(e.decorators,e);e.declare&&(this.word("declare"),this.space());e.abstract&&(this.word("abstract"),this.space());this.word("class"),this.printInnerComments(e),e.id&&(this.space(),this.print(e.id,e));this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e));e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e));this.space(),this.print(e.body,e)},t.ClassMethod=function(e){this._classMethodHead(e),this.space(),this.print(e.body,e)},t.ClassPrivateMethod=function(e){this._classMethodHead(e),this.space(),this.print(e.body,e)},t.ClassPrivateProperty=function(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space());this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e));this.semicolon()},t.ClassProperty=function(e){this.printJoin(e.decorators,e),this.source("end",e.key.loc),this.tsPrintClassMemberModifiers(e,!0),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e));e.optional&&this.token("?");e.definite&&this.token("!");this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e));this.semicolon()},t.StaticBlock=function(e){this.word("static"),this.space(),this.token("{"),0===e.body.length?this.token("}"):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.rightBrace())},t._classMethodHead=function(e){this.printJoin(e.decorators,e),this.source("end",e.key.loc),this.tsPrintClassMemberModifiers(e,!1),this._methodHead(e)};var r=n(1);const{isExportDefaultDeclaration:i,isExportNamedDeclaration:s}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowFunctionExpression=function(e){e.async&&(this.word("async"),this.space());const t=e.params[0];this.format.retainLines||this.format.auxiliaryCommentBefore||this.format.auxiliaryCommentAfter||1!==e.params.length||!i(t)||function(e,t){var n,r;return!!(e.typeParameters||e.returnType||e.predicate||t.typeAnnotation||t.optional||null!=(n=t.leadingComments)&&n.length||null!=(r=t.trailingComments)&&r.length)}(e,t)?this._params(e):this.print(t,e);this._predicate(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)},t.FunctionDeclaration=t.FunctionExpression=function(e){this._functionHead(e),this.space(),this.print(e.body,e)},t._functionHead=function(e){e.async&&(this.word("async"),this.space());this.word("function"),e.generator&&this.token("*");this.printInnerComments(e),this.space(),e.id&&this.print(e.id,e);this._params(e),this._predicate(e)},t._methodHead=function(e){const t=e.kind,n=e.key;"get"!==t&&"set"!==t||(this.word(t),this.space());e.async&&(this._catchUp("start",n.loc),this.word("async"),this.space());"method"!==t&&"init"!==t||e.generator&&this.token("*");e.computed?(this.token("["),this.print(n,e),this.token("]")):this.print(n,e);e.optional&&this.token("?");this._params(e)},t._param=function(e,t){this.printJoin(e.decorators,e),this.print(e,t),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t._parameters=function(e,t){for(let n=0;n<e.length;n++)this._param(e[n],t),n<e.length-1&&(this.token(","),this.space())},t._params=function(e){this.print(e.typeParameters,e),this.token("("),this._parameters(e.params,e),this.token(")"),this.print(e.returnType,e)},t._predicate=function(e){e.predicate&&(e.returnType||this.token(":"),this.space(),this.print(e.predicate,e))};var r=n(1);const{isIdentifier:i}=r},function(e,t,n){"use strict";(function(t){const n={},r=n.hasOwnProperty,i=(e,t)=>{for(const n in e)r.call(e,n)&&t(n,e[n])},s=n.toString,o=Array.isArray,a=t.isBuffer,l={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},u=/["'\\\b\f\n\r\t]/,c=/[0-9]/,h=/[ !#-&\(-\[\]-_a-~]/,d=(e,t)=>{const n=()=>{w=b,++t.indentLevel,b=t.indent.repeat(t.indentLevel)},r={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},f=t&&t.json;var p,m;f&&(r.quotes="double",r.wrap=!0),p=r,"single"!=(t=(m=t)?(i(m,(e,t)=>{p[e]=t}),p):p).quotes&&"double"!=t.quotes&&"backtick"!=t.quotes&&(t.quotes="single");const g="double"==t.quotes?'"':"backtick"==t.quotes?"`":"'",y=t.compact,v=t.lowercaseHex;let b=t.indent.repeat(t.indentLevel),w="";const _=t.__inline1__,S=t.__inline2__,x=y?"":"\n";let E,A=!0;const T="binary"==t.numbers,M="octal"==t.numbers,C="decimal"==t.numbers,P="hexadecimal"==t.numbers;if(f&&e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!(e=>"string"==typeof e||"[object String]"==s.call(e))(e)){if((e=>"[object Map]"==s.call(e))(e))return 0==e.size?"new Map()":(y||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+d(Array.from(e),t)+")");if((e=>"[object Set]"==s.call(e))(e))return 0==e.size?"new Set()":"new Set("+d(Array.from(e),t)+")";if(a(e))return 0==e.length?"Buffer.from([])":"Buffer.from("+d(Array.from(e),t)+")";if(o(e))return E=[],t.wrap=!0,_&&(t.__inline1__=!1,t.__inline2__=!0),S||n(),((e,t)=>{const n=e.length;let r=-1;for(;++r<n;)t(e[r])})(e,e=>{A=!1,S&&(t.__inline2__=!1),E.push((y||S?"":b)+d(e,t))}),A?"[]":S?"["+E.join(", ")+"]":"["+x+E.join(","+x)+x+(y?"":w)+"]";if(!(e=>"number"==typeof e||"[object Number]"==s.call(e))(e))return(e=>"[object Object]"==s.call(e))(e)?(E=[],t.wrap=!0,n(),i(e,(e,n)=>{A=!1,E.push((y?"":b)+d(e,t)+":"+(y?"":" ")+d(n,t))}),A?"{}":"{"+x+E.join(","+x)+x+(y?"":w)+"}"):f?JSON.stringify(e)||"null":String(e);if(f)return JSON.stringify(e);if(C)return String(e);if(P){let t=e.toString(16);return v||(t=t.toUpperCase()),"0x"+t}if(T)return"0b"+e.toString(2);if(M)return"0o"+e.toString(8)}const k=e;let O=-1;const I=k.length;for(E="";++O<I;){const e=k.charAt(O);if(t.es6){const e=k.charCodeAt(O);if(e>=55296&&e<=56319&&I>O+1){const t=k.charCodeAt(O+1);if(t>=56320&&t<=57343){let n=(1024*(e-55296)+t-56320+65536).toString(16);v||(n=n.toUpperCase()),E+="\\u{"+n+"}",++O;continue}}}if(!t.escapeEverything){if(h.test(e)){E+=e;continue}if('"'==e){E+=g==e?'\\"':e;continue}if("`"==e){E+=g==e?"\\`":e;continue}if("'"==e){E+=g==e?"\\'":e;continue}}if("\0"==e&&!f&&!c.test(k.charAt(O+1))){E+="\\0";continue}if(u.test(e)){E+=l[e];continue}const n=e.charCodeAt(0);if(t.minimal&&8232!=n&&8233!=n){E+=e;continue}let r=n.toString(16);v||(r=r.toUpperCase());const i=r.length>2||f,s="\\"+(i?"u":"x")+("0000"+r).slice(i?-4:-2);E+=s}return t.wrap&&(E=g+E+g),"`"==g&&(E=E.replace(/\$\{/g,"\\${")),t.isScriptContext?E.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,f?"\\u003C!--":"\\x3C!--"):E};d.version="2.5.2",e.exports=d}).call(this,n(4).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnyTypeAnnotation=function(){this.word("any")},t.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},t.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},t.BooleanTypeAnnotation=function(){this.word("boolean")},t.DeclareClass=function(e,t){o(t)||(this.word("declare"),this.space());this.word("class"),this.space(),this._interfaceish(e)},t.DeclareExportAllDeclaration=function(){this.word("declare"),this.space(),i.ExportAllDeclaration.apply(this,arguments)},t.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space());h.apply(this,arguments)},t.DeclareFunction=function(e,t){o(t)||(this.word("declare"),this.space());this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),e.predicate&&(this.space(),this.print(e.predicate,e));this.semicolon()},t.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},t.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},t.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},t.DeclareOpaqueType=function(e,t){o(t)||(this.word("declare"),this.space());this.OpaqueType(e)},t.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},t.DeclareVariable=function(e,t){o(t)||(this.word("declare"),this.space());this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},t.DeclaredPredicate=function(e){this.token("%"),this.word("checks"),this.token("("),this.print(e.value,e),this.token(")")},t.EmptyTypeAnnotation=function(){this.word("empty")},t.EnumBooleanBody=function(e){const{explicitType:t}=e;l(this,"boolean",t),u(this,e)},t.EnumBooleanMember=function(e){c(this,e)},t.EnumDeclaration=function(e){const{id:t,body:n}=e;this.word("enum"),this.space(),this.print(t,e),this.print(n,e)},t.EnumDefaultedMember=function(e){const{id:t}=e;this.print(t,e),this.token(",")},t.EnumNumberBody=function(e){const{explicitType:t}=e;l(this,"number",t),u(this,e)},t.EnumNumberMember=function(e){c(this,e)},t.EnumStringBody=function(e){const{explicitType:t}=e;l(this,"string",t),u(this,e)},t.EnumStringMember=function(e){c(this,e)},t.EnumSymbolBody=function(e){l(this,"symbol",!0),u(this,e)},t.ExistsTypeAnnotation=function(){this.token("*")},t.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),e.this&&(this.word("this"),this.token(":"),this.space(),this.print(e.this.typeAnnotation,e),(e.params.length||e.rest)&&(this.token(","),this.space()));this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e));this.token(")"),t&&("ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type||"ObjectTypeProperty"===t.type&&t.method)?this.token(":"):(this.space(),this.token("=>"));this.space(),this.print(e.returnType,e)},t.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?");e.name&&(this.token(":"),this.space());this.print(e.typeAnnotation,e)},t.IndexedAccessType=function(e){this.print(e.objectType,e),this.token("["),this.print(e.indexType,e),this.token("]")},t.InferredPredicate=function(){this.token("%"),this.word("checks")},t.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},t.GenericTypeAnnotation=t.ClassImplements=t.InterfaceExtends=function(e){this.print(e.id,e),this.print(e.typeParameters,e)},t.InterfaceTypeAnnotation=function(e){this.word("interface"),e.extends&&e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e));this.space(),this.print(e.body,e)},t.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:d})},t.MixedTypeAnnotation=function(){this.word("mixed")},t.NullLiteralTypeAnnotation=function(){this.word("null")},t.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)},Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return s.NumericLiteral}}),t.NumberTypeAnnotation=function(){this.word("number")},t.ObjectTypeAnnotation=function(e){e.exact?this.token("{|"):this.token("{");const t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.space(),this.printJoin(t,e,{addNewlines(e){if(e&&!t[0])return 1},indent:!0,statement:!0,iterator:()=>{(1!==t.length||e.inexact)&&(this.token(","),this.space())}}),this.space());e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent());e.exact?this.token("|}"):this.token("}")},t.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space());this.print(e.value,e)},t.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space());this._variance(e),this.token("["),e.id&&(this.print(e.id,e),this.token(":"),this.space());this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},t.ObjectTypeInternalSlot=function(e){e.static&&(this.word("static"),this.space());this.token("["),this.token("["),this.print(e.id,e),this.token("]"),this.token("]"),e.optional&&this.token("?");e.method||(this.token(":"),this.space());this.print(e.value,e)},t.ObjectTypeProperty=function(e){e.proto&&(this.word("proto"),this.space());e.static&&(this.word("static"),this.space());"get"!==e.kind&&"set"!==e.kind||(this.word(e.kind),this.space());this._variance(e),this.print(e.key,e),e.optional&&this.token("?");e.method||(this.token(":"),this.space());this.print(e.value,e)},t.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},t.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e));e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e));this.semicolon()},t.OptionalIndexedAccessType=function(e){this.print(e.objectType,e),e.optional&&this.token("?.");this.token("["),this.print(e.indexType,e),this.token("]")},t.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return s.StringLiteral}}),t.StringTypeAnnotation=function(){this.word("string")},t.SymbolTypeAnnotation=function(){this.word("symbol")},t.ThisTypeAnnotation=function(){this.word("this")},t.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},t.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},t.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},t.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e);e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},t.TypeParameterDeclaration=t.TypeParameterInstantiation=function(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")},t.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},t.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:f})},t.Variance=function(e){"plus"===e.kind?this.token("+"):this.token("-")},t.VoidTypeAnnotation=function(){this.word("void")},t._interfaceish=function(e){var t;this.print(e.id,e),this.print(e.typeParameters,e),null!=(t=e.extends)&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e));e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e));e.implements&&e.implements.length&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e));this.space(),this.print(e.body,e)},t._variance=function(e){e.variance&&("plus"===e.variance.kind?this.token("+"):"minus"===e.variance.kind&&this.token("-"))};var r=n(1),i=n(249),s=n(250);const{isDeclareExportDeclaration:o,isStatement:a}=r;function l(e,t,n){n&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function u(e,t){const{members:n}=t;e.token("{"),e.indent(),e.newline();for(const r of n)e.print(r,t),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function c(e,t){const{id:n,init:r}=t;e.print(n,t),e.space(),e.token("="),e.space(),e.print(r,t),e.token(",")}function h(e){if(e.declaration){const t=e.declaration;this.print(t,e),a(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}function d(){this.space(),this.token("&"),this.space()}function f(){this.space(),this.token("|"),this.space()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockStatement=function(e){var t;this.token("{"),this.printInnerComments(e);const n=null==(t=e.directives)?void 0:t.length;e.body.length||n?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),n&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith(10)||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))},t.Directive=function(e){this.print(e.value,e),this.semicolon()},t.DirectiveLiteral=function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&null!=t)return void this.token(t);const{value:n}=e;if(i.test(n)){if(r.test(n))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${n}'`)}else this.token(`"${n}"`)},t.File=function(e){e.program&&this.print(e.program.interpreter,e);this.print(e.program,e)},t.InterpreterDirective=function(e){this.token(`#!${e.value}\n`)},t.Placeholder=function(e){this.token("%%"),this.print(e.name),this.token("%%"),"Statement"===e.expectedNode&&this.semicolon()},t.Program=function(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline();this.printSequence(e.body,e)};const r=/(?:^|[^\\])(?:\\\\)*'/,i=/(?:^|[^\\])(?:\\\\)*"/},function(e,t,n){"use strict";function r(){this.space()}Object.defineProperty(t,"__esModule",{value:!0}),t.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},t.JSXClosingElement=function(e){this.token("</"),this.print(e.name,e),this.token(">")},t.JSXClosingFragment=function(){this.token("</"),this.token(">")},t.JSXElement=function(e){const t=e.openingElement;if(this.print(t,e),t.selfClosing)return;this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingElement,e)},t.JSXEmptyExpression=function(e){this.printInnerComments(e)},t.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},t.JSXFragment=function(e){this.print(e.openingFragment,e),this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingFragment,e)},t.JSXIdentifier=function(e){this.word(e.name)},t.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},t.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},t.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),this.print(e.typeParameters,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:r}));e.selfClosing?(this.space(),this.token("/>")):this.token(">")},t.JSXOpeningFragment=function(){this.token("<"),this.token(">")},t.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},t.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},t.JSXText=function(e){const t=this.getPossibleRaw(e);null!=t?this.token(t):this.token(e.value)}},function(e,t,n){"use strict";function r(e,t){!0!==t&&e.token(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TSAnyKeyword=function(){this.word("any")},t.TSArrayType=function(e){this.print(e.elementType,e),this.token("[]")},t.TSAsExpression=function(e){const{expression:t,typeAnnotation:n}=e;this.print(t,e),this.space(),this.word("as"),this.space(),this.print(n,e)},t.TSBigIntKeyword=function(){this.word("bigint")},t.TSBooleanKeyword=function(){this.word("boolean")},t.TSCallSignatureDeclaration=function(e){this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSConditionalType=function(e){this.print(e.checkType),this.space(),this.word("extends"),this.space(),this.print(e.extendsType),this.space(),this.token("?"),this.space(),this.print(e.trueType),this.space(),this.token(":"),this.space(),this.print(e.falseType)},t.TSConstructSignatureDeclaration=function(e){this.word("new"),this.space(),this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSConstructorType=function(e){e.abstract&&(this.word("abstract"),this.space());this.word("new"),this.space(),this.tsPrintFunctionOrConstructorType(e)},t.TSDeclareFunction=function(e){e.declare&&(this.word("declare"),this.space());this._functionHead(e),this.token(";")},t.TSDeclareMethod=function(e){this._classMethodHead(e),this.token(";")},t.TSEnumDeclaration=function(e){const{declare:t,const:n,id:r,members:i}=e;t&&(this.word("declare"),this.space());n&&(this.word("const"),this.space());this.word("enum"),this.space(),this.print(r,e),this.space(),this.tsPrintBraced(i,e)},t.TSEnumMember=function(e){const{id:t,initializer:n}=e;this.print(t,e),n&&(this.space(),this.token("="),this.space(),this.print(n,e));this.token(",")},t.TSExportAssignment=function(e){this.word("export"),this.space(),this.token("="),this.space(),this.print(e.expression,e),this.token(";")},t.TSExpressionWithTypeArguments=function(e){this.print(e.expression,e),this.print(e.typeParameters,e)},t.TSExternalModuleReference=function(e){this.token("require("),this.print(e.expression,e),this.token(")")},t.TSFunctionType=function(e){this.tsPrintFunctionOrConstructorType(e)},t.TSImportEqualsDeclaration=function(e){const{isExport:t,id:n,moduleReference:r}=e;t&&(this.word("export"),this.space());this.word("import"),this.space(),this.print(n,e),this.space(),this.token("="),this.space(),this.print(r,e),this.token(";")},t.TSImportType=function(e){const{argument:t,qualifier:n,typeParameters:r}=e;this.word("import"),this.token("("),this.print(t,e),this.token(")"),n&&(this.token("."),this.print(n,e));r&&this.print(r,e)},t.TSIndexSignature=function(e){const{readonly:t,static:n}=e;n&&(this.word("static"),this.space());t&&(this.word("readonly"),this.space());this.token("["),this._parameters(e.parameters,e),this.token("]"),this.print(e.typeAnnotation,e),this.token(";")},t.TSIndexedAccessType=function(e){this.print(e.objectType,e),this.token("["),this.print(e.indexType,e),this.token("]")},t.TSInferType=function(e){this.token("infer"),this.space(),this.print(e.typeParameter)},t.TSInterfaceBody=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.body,e)},t.TSInterfaceDeclaration=function(e){const{declare:t,id:n,typeParameters:r,extends:i,body:s}=e;t&&(this.word("declare"),this.space());this.word("interface"),this.space(),this.print(n,e),this.print(r,e),null!=i&&i.length&&(this.space(),this.word("extends"),this.space(),this.printList(i,e));this.space(),this.print(s,e)},t.TSIntersectionType=function(e){this.tsPrintUnionOrIntersectionType(e,"&")},t.TSIntrinsicKeyword=function(){this.word("intrinsic")},t.TSLiteralType=function(e){this.print(e.literal,e)},t.TSMappedType=function(e){const{nameType:t,optional:n,readonly:i,typeParameter:s}=e;this.token("{"),this.space(),i&&(r(this,i),this.word("readonly"),this.space());this.token("["),this.word(s.name),this.space(),this.word("in"),this.space(),this.print(s.constraint,s),t&&(this.space(),this.word("as"),this.space(),this.print(t,e));this.token("]"),n&&(r(this,n),this.token("?"));this.token(":"),this.space(),this.print(e.typeAnnotation,e),this.space(),this.token("}")},t.TSMethodSignature=function(e){const{kind:t}=e;"set"!==t&&"get"!==t||(this.word(t),this.space());this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSModuleBlock=function(e){this.tsPrintBraced(e.body,e)},t.TSModuleDeclaration=function(e){const{declare:t,id:n}=e;t&&(this.word("declare"),this.space());e.global||(this.word("Identifier"===n.type?"namespace":"module"),this.space());if(this.print(n,e),!e.body)return void this.token(";");let r=e.body;for(;"TSModuleDeclaration"===r.type;)this.token("."),this.print(r.id,r),r=r.body;this.space(),this.print(r,e)},t.TSNamedTupleMember=function(e){this.print(e.label,e),e.optional&&this.token("?");this.token(":"),this.space(),this.print(e.elementType,e)},t.TSNamespaceExportDeclaration=function(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id,e)},t.TSNeverKeyword=function(){this.word("never")},t.TSNonNullExpression=function(e){this.print(e.expression,e),this.token("!")},t.TSNullKeyword=function(){this.word("null")},t.TSNumberKeyword=function(){this.word("number")},t.TSObjectKeyword=function(){this.word("object")},t.TSOptionalType=function(e){this.print(e.typeAnnotation,e),this.token("?")},t.TSParameterProperty=function(e){e.accessibility&&(this.word(e.accessibility),this.space());e.readonly&&(this.word("readonly"),this.space());this._param(e.parameter)},t.TSParenthesizedType=function(e){this.token("("),this.print(e.typeAnnotation,e),this.token(")")},t.TSPropertySignature=function(e){const{readonly:t,initializer:n}=e;t&&(this.word("readonly"),this.space());this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation,e),n&&(this.space(),this.token("="),this.space(),this.print(n,e));this.token(";")},t.TSQualifiedName=function(e){this.print(e.left,e),this.token("."),this.print(e.right,e)},t.TSRestType=function(e){this.token("..."),this.print(e.typeAnnotation,e)},t.TSStringKeyword=function(){this.word("string")},t.TSSymbolKeyword=function(){this.word("symbol")},t.TSThisType=function(){this.word("this")},t.TSTupleType=function(e){this.token("["),this.printList(e.elementTypes,e),this.token("]")},t.TSTypeAliasDeclaration=function(e){const{declare:t,id:n,typeParameters:r,typeAnnotation:i}=e;t&&(this.word("declare"),this.space());this.word("type"),this.space(),this.print(n,e),this.print(r,e),this.space(),this.token("="),this.space(),this.print(i,e),this.token(";")},t.TSTypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t.TSTypeAssertion=function(e){const{typeAnnotation:t,expression:n}=e;this.token("<"),this.print(t,e),this.token(">"),this.space(),this.print(n,e)},t.TSTypeLiteral=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.members,e)},t.TSTypeOperator=function(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation,e)},t.TSTypeParameter=function(e){this.word(e.name),e.constraint&&(this.space(),this.word("extends"),this.space(),this.print(e.constraint,e));e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},t.TSTypeParameterDeclaration=t.TSTypeParameterInstantiation=function(e,t){this.token("<"),this.printList(e.params,e,{}),"ArrowFunctionExpression"===t.type&&1===e.params.length&&this.token(",");this.token(">")},t.TSTypePredicate=function(e){e.asserts&&(this.word("asserts"),this.space());this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(e.typeAnnotation.typeAnnotation))},t.TSTypeQuery=function(e){this.word("typeof"),this.space(),this.print(e.exprName)},t.TSTypeReference=function(e){this.print(e.typeName,e),this.print(e.typeParameters,e)},t.TSUndefinedKeyword=function(){this.word("undefined")},t.TSUnionType=function(e){this.tsPrintUnionOrIntersectionType(e,"|")},t.TSUnknownKeyword=function(){this.word("unknown")},t.TSVoidKeyword=function(){this.word("void")},t.tsPrintBraced=function(e,t){if(this.token("{"),e.length){this.indent(),this.newline();for(const n of e)this.print(n,t),this.newline();this.dedent(),this.rightBrace()}else this.token("}")},t.tsPrintClassMemberModifiers=function(e,t){t&&e.declare&&(this.word("declare"),this.space());e.accessibility&&(this.word(e.accessibility),this.space());e.static&&(this.word("static"),this.space());e.override&&(this.word("override"),this.space());e.abstract&&(this.word("abstract"),this.space());t&&e.readonly&&(this.word("readonly"),this.space())},t.tsPrintFunctionOrConstructorType=function(e){const{typeParameters:t}=e,n=e.parameters;this.print(t,e),this.token("("),this._parameters(n,e),this.token(")"),this.space(),this.token("=>"),this.space();const r=e.typeAnnotation;this.print(r.typeAnnotation,e)},t.tsPrintPropertyOrMethodName=function(e){e.computed&&this.token("[");this.print(e.key,e),e.computed&&this.token("]");e.optional&&this.token("?")},t.tsPrintSignatureDeclarationBase=function(e){const{typeParameters:t}=e,n=e.parameters;this.print(t,e),this.token("("),this._parameters(n,e),this.token(")");const r=e.typeAnnotation;this.print(r,e)},t.tsPrintTypeLiteralOrInterfaceBody=function(e,t){this.tsPrintBraced(e,t)},t.tsPrintUnionOrIntersectionType=function(e,t){this.printJoin(e.types,e,{separator(){this.space(),this.token(t),this.space()}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.find=function(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null},t.findParent=function(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null},t.getAncestry=function(){let e=this;const t=[];do{t.push(e)}while(e=e.parentPath);return t},t.getDeepestCommonAncestorFrom=function(e,t){if(!e.length)return this;if(1===e.length)return e[0];let n,r,i=1/0;const s=e.map(e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);return t.length<i&&(i=t.length),t}),o=s[0];e:for(let e=0;e<i;e++){const t=o[e];for(const n of s)if(n[e]!==t)break e;n=e,r=t}if(r)return t?t(r,n,s):r;throw new Error("Couldn't find intersection")},t.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,(function(e,t,n){let r;const s=i[e.type];for(const e of n){const n=e[t+1];if(!r){r=n;continue}if(n.listKey&&r.listKey===n.listKey&&n.key<r.key){r=n;continue}s.indexOf(r.parentKey)>s.indexOf(n.parentKey)&&(r=n)}return r}))},t.getFunctionParent=function(){return this.findParent(e=>e.isFunction())},t.getStatementParent=function(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},t.inType=function(...e){let t=this;for(;t;){for(const n of e)if(t.node.type===n)return!0;t=t.parentPath}return!1},t.isAncestor=function(e){return e.isDescendant(this)},t.isDescendant=function(e){return!!this.findParent(t=>t===e)};var r=n(1);n(35);const{VISITOR_KEYS:i}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getTypeAnnotation=function(){const e=this.node;if(!e){if("init"===this.key&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath,t=e.parentPath;return"left"===e.key&&t.isForInStatement()?v():"left"===e.key&&t.isForOfStatement()?s():b()}return}if(e.typeAnnotation)return e.typeAnnotation;if(w.has(e))return;w.add(e);try{var t;let n=r[e.type];if(n)return n.call(this,e);if(n=r[this.parentPath.type],null!=(t=n)&&t.validParent)return this.parentPath.getTypeAnnotation()}finally{w.delete(e)}},t.baseTypeStrictlyMatches=function(e){const t=this.getTypeAnnotation(),n=e.getTypeAnnotation();if(!o(t)&&u(t))return n.type===t.type;return!1},t.couldBeBaseType=function(e){const t=this.getTypeAnnotation();if(o(t))return!0;if(g(t)){for(const n of t.types)if(o(n)||_(e,n,!0))return!0;return!1}return _(e,t,!0)},t.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;let e=this._getTypeAnnotation()||s();m(e)&&(e=e.typeAnnotation);return this.typeAnnotation=e},t.isBaseType=function(e,t){return _(e,this.getTypeAnnotation(),t)},t.isGenericType=function(e){const t=this.getTypeAnnotation();return c(t)&&h(t.id,{name:e})};var r=n(591),i=n(1);const{anyTypeAnnotation:s,isAnyTypeAnnotation:o,isBooleanTypeAnnotation:a,isEmptyTypeAnnotation:l,isFlowBaseAnnotation:u,isGenericTypeAnnotation:c,isIdentifier:h,isMixedTypeAnnotation:d,isNumberTypeAnnotation:f,isStringTypeAnnotation:p,isTypeAnnotation:m,isUnionTypeAnnotation:g,isVoidTypeAnnotation:y,stringTypeAnnotation:v,voidTypeAnnotation:b}=i;const w=new WeakSet;function _(e,t,n){if("string"===e)return p(t);if("number"===e)return f(t);if("boolean"===e)return a(t);if("any"===e)return o(t);if("mixed"===e)return d(t);if("empty"===e)return l(t);if("void"===e)return y(t);if(n)return!1;throw new Error("Unknown base type "+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayExpression=M,t.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},t.BinaryExpression=function(e){const t=e.operator;if(a.indexOf(t)>=0)return _();if(s.indexOf(t)>=0)return d();if("+"===t){const e=this.get("right"),t=this.get("left");return t.isBaseType("number")&&e.isBaseType("number")?_():t.isBaseType("string")||e.isBaseType("string")?S():E([S(),_()])}},t.BooleanLiteral=function(){return d()},t.CallExpression=function(){const{callee:e}=this.node;if(k(e))return h(S());if(P(e)||O(e))return h(c());if(I(e))return h(x([S(),c()]));return R(this.get("callee"))},t.ConditionalExpression=function(){const e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];if(b(e[0])&&m)return m(e);if(p)return p(e);return g(e)},t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=function(){return y(v("Function"))},Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return i.default}}),t.LogicalExpression=function(){const e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];if(b(e[0])&&m)return m(e);if(p)return p(e);return g(e)},t.NewExpression=function(e){if(this.get("callee").isIdentifier())return y(e.callee)},t.NullLiteral=function(){return w()},t.NumericLiteral=function(){return _()},t.ObjectExpression=function(){return y(v("Object"))},t.ParenthesizedExpression=function(){return this.get("expression").getTypeAnnotation()},t.RegExpLiteral=function(){return y(v("RegExp"))},t.RestElement=C,t.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},t.StringLiteral=function(){return S()},t.TaggedTemplateExpression=function(){return R(this.get("tag"))},t.TemplateLiteral=function(){return S()},t.TypeCastExpression=T,t.UnaryExpression=function(e){const t=e.operator;if("void"===t)return A();if(l.indexOf(t)>=0)return _();if(u.indexOf(t)>=0)return S();if(o.indexOf(t)>=0)return d()},t.UpdateExpression=function(e){const t=e.operator;if("++"===t||"--"===t)return _()},t.VariableDeclarator=function(){var e;if(!this.get("id").isIdentifier())return;const t=this.get("init");let n=t.getTypeAnnotation();"AnyTypeAnnotation"===(null==(e=n)?void 0:e.type)&&t.isCallExpression()&&t.get("callee").isIdentifier({name:"Array"})&&!t.scope.hasBinding("Array",!0)&&(n=M());return n};var r=n(1),i=n(592);const{BOOLEAN_BINARY_OPERATORS:s,BOOLEAN_UNARY_OPERATORS:o,NUMBER_BINARY_OPERATORS:a,NUMBER_UNARY_OPERATORS:l,STRING_UNARY_OPERATORS:u,anyTypeAnnotation:c,arrayTypeAnnotation:h,booleanTypeAnnotation:d,buildMatchMemberExpression:f,createFlowUnionType:p,createTSUnionType:m,createUnionTypeAnnotation:g,genericTypeAnnotation:y,identifier:v,isTSTypeAnnotation:b,nullLiteralTypeAnnotation:w,numberTypeAnnotation:_,stringTypeAnnotation:S,tupleTypeAnnotation:x,unionTypeAnnotation:E,voidTypeAnnotation:A}=r;function T(e){return e.typeAnnotation}function M(){return y(v("Array"))}function C(){return M()}T.validParent=!0,C.validParent=!0;const P=f("Array.from"),k=f("Object.keys"),O=f("Object.values"),I=f("Object.entries");function R(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?y(v("AsyncIterator")):y(v("Promise"));if(e.node.returnType)return e.node.returnType}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!this.isReferenced())return;const t=this.scope.getBinding(e.name);if(t)return t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t,n){const r=[],i=[];let a=d(e,t,i);const c=function e(t,n,r){const i=function(e,t,n){let r;for(;r=t.parentPath;){if(r.isIfStatement()||r.isConditionalExpression()){if("test"===t.key)return;return r}if(r.isFunction()&&r.parentPath.scope.getBinding(n)!==e)return;t=r}}(t,n,r);if(!i)return;const a=[i.get("test")],c=[];for(let e=0;e<a.length;e++){const t=a[e];if(t.isLogicalExpression())"&&"===t.node.operator&&(a.push(t.get("left")),a.push(t.get("right")));else if(t.isBinaryExpression()){const e=f(r,t);e&&c.push(e)}}if(c.length)return u(c[0])&&o?{typeAnnotation:o(c),ifStatement:i}:s?{typeAnnotation:s(c),ifStatement:i}:{typeAnnotation:l(c),ifStatement:i};return e(i,r)}(e,t,n);if(c){const t=d(e,c.ifStatement);a=a.filter(e=>t.indexOf(e)<0),r.push(c.typeAnnotation)}if(a.length){a.push(...i);for(const e of a)r.push(e.getTypeAnnotation())}if(!r.length)return;if(u(r[0])&&o)return o(r);if(s)return s(r);return l(r)}(t,this,e.name);if("undefined"===e.name)return h();if("NaN"===e.name||"Infinity"===e.name)return c();e.name};var r=n(1);const{BOOLEAN_NUMBER_BINARY_OPERATORS:i,createFlowUnionType:s,createTSUnionType:o,createTypeAnnotationBasedOnTypeof:a,createUnionTypeAnnotation:l,isTSTypeAnnotation:u,numberTypeAnnotation:c,voidTypeAnnotation:h}=r;function d(e,t,n){const r=e.constantViolations.slice();return r.unshift(e.path),r.filter(e=>{const r=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return n&&"unknown"===r&&n.push(e),"before"===r})}function f(e,t){const n=t.node.operator,r=t.get("right").resolve(),s=t.get("left").resolve();let o,l,u;if(s.isIdentifier({name:e})?o=r:r.isIdentifier({name:e})&&(o=s),o)return"==="===n?o.getTypeAnnotation():i.indexOf(n)>=0?c():void 0;if("==="!==n&&"=="!==n)return;if(s.isUnaryExpression({operator:"typeof"})?(l=s,u=r):r.isUnaryExpression({operator:"typeof"})&&(l=r,u=s),!l)return;if(!l.get("argument").isIdentifier({name:e}))return;if(u=u.resolve(),!u.isLiteral())return;const h=u.node.value;return"string"==typeof h?a(h):void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._replaceWith=function(e){var t;if(!this.container)throw new ReferenceError("Container is falsy");this.inList?C(this.parent,this.key,[e]):C(this.parent,this.key,e);this.debug("Replace with "+(null==e?void 0:e.type)),null==(t=o.path.get(this.parent))||t.set(e,this).delete(this.node),this.node=this.container[this.key]=e},t.replaceExpressionWithStatements=function(e){this.resync();const t=M(e,this.scope);if(t)return this.replaceWith(t)[0].get("expressions");const n=this.getFunctionParent(),r=null==n?void 0:n.is("async"),s=null==n?void 0:n.is("generator"),o=h([],p(e));this.replaceWith(m(o,[]));const a=this.get("callee");(0,u.default)(a.get("body"),e=>{this.scope.push({id:e})},"var");const l=this.get("callee").getCompletionRecords();for(const e of l){if(!e.isExpressionStatement())continue;const t=e.findParent(e=>e.isLoop());if(t){let n=t.getData("expressionReplacementReturnUid");n?n=v(n.name):(n=a.scope.generateDeclaredUidIdentifier("ret"),a.get("body").pushContainer("body",T(g(n))),t.setData("expressionReplacementReturnUid",n)),e.get("expression").replaceWith(d("=",g(n),e.node.expression))}else e.replaceWith(T(e.node.expression))}a.arrowFunctionToExpression();const y=a,b=r&&i.default.hasType(this.get("callee.body").node,"AwaitExpression",c),w=s&&i.default.hasType(this.get("callee.body").node,"YieldExpression",c);b&&(y.set("async",!0),w||this.replaceWith(f(this.node)));w&&(y.set("generator",!0),this.replaceWith(P(this.node,!0)));return y.get("body.body")},t.replaceInline=function(e){if(this.resync(),Array.isArray(e)){if(Array.isArray(this.container)){e=this._verifyNodeList(e);const t=this._containerInsertAfter(e);return this.remove(),t}return this.replaceWithMultiple(e)}return this.replaceWith(e)},t.replaceWith=function(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");e instanceof s.default&&(e=e.node);if(!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===e)return[this];if(this.isProgram()&&!x(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let t="";this.isNodeType("Statement")&&S(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=y(e),t="expression"));if(this.isNodeType("Expression")&&E(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);const n=this.node;n&&(_(e,n),A(n));return this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue(),[t?this.get(t):this]},t.replaceWithMultiple=function(e){var t;this.resync(),e=this._verifyNodeList(e),b(e[0],this.node),w(e[e.length-1],this.node),null==(t=o.path.get(this.parent))||t.delete(this.node),this.node=this.container[this.key]=null;const n=this.insertAfter(e);this.node?this.requeue():this.remove();return n},t.replaceWithSourceString=function(e){this.resync();try{e=`(${e})`,e=(0,a.parse)(e)}catch(t){const n=t.loc;throw n&&(t.message+=" - make sure this is an expression.\n"+(0,r.codeFrameColumns)(e,{start:{line:n.line,column:n.column+1}}),t.code="BABEL_REPLACE_SOURCE_ERROR"),t}return e=e.program.body[0].expression,i.default.removeProperties(e),this.replaceWith(e)};var r=n(79),i=n(25),s=n(35),o=n(53),a=n(80),l=n(1),u=n(604);const{FUNCTION_TYPES:c,arrowFunctionExpression:h,assignmentExpression:d,awaitExpression:f,blockStatement:p,callExpression:m,cloneNode:g,expressionStatement:y,identifier:v,inheritLeadingComments:b,inheritTrailingComments:w,inheritsComments:_,isExpression:S,isProgram:x,isStatement:E,removeComments:A,returnStatement:T,toSequenceExpression:M,validate:C,yieldExpression:P}=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={}){if(""!==e&&c(t)){const n=h(t);return function(e,t){let n="";for(const{type:r,value:i}of u(t)){const t=e[r];n+=t?i.split(a).map(e=>t(e)).join("\n"):i}return n}(function(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}(n),e)}return e},t.getChalk=h,t.shouldHighlight=c;var r=n(595),i=n(64),s=n(596);const o=new Set(["as","async","from","get","of","set"]);const a=/\r\n|[\n\r\u2028\u2029]/,l=/^[()[\]{}]$/;let u;{const e=/^[a-z][\w-]*$/i,t=function(t,n,r){if("name"===t.type){if((0,i.isKeyword)(t.value)||(0,i.isStrictReservedWord)(t.value,!0)||o.has(t.value))return"keyword";if(e.test(t.value)&&("<"===r[n-1]||"</"==r.substr(n-2,2)))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return"punctuator"===t.type&&l.test(t.value)?"bracket":"invalid"!==t.type||"@"!==t.value&&"#"!==t.value?t.type:"punctuator"};u=function*(e){let n;for(;n=r.default.exec(e);){const i=r.matchToToken(n);yield{type:t(i,n.index,e),value:i.value}}}}function c(e){return!!s.supportsColor||e.forceColor}function h(e){return e.forceColor?new s.constructor({enabled:!0,level:1}):s}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t,n){"use strict";(function(t){const r=n(597),i=n(598),s=n(602).stdout,o=n(603),a="win32"===t.platform&&!(t.env.TERM||"").toLowerCase().startsWith("xterm"),l=["ansi","ansi","ansi256","ansi16m"],u=new Set(["gray"]),c=Object.create(null);function h(e,t){t=t||{};const n=s?s.level:0;e.level=void 0===t.level?n:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function d(e){if(!this||!(this instanceof d)||this.template){const t={};return h(t,e),t.template=function(){const e=[].slice.call(arguments);return g.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,d.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=d,t.template}h(this,e)}a&&(i.blue.open="");for(const e of Object.keys(i))i[e].closeRe=new RegExp(r(i[e].close),"g"),c[e]={get(){const t=i[e];return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};c.visible={get(){return p.call(this,this._styles||[],!0,"visible")}},i.color.closeRe=new RegExp(r(i.color.close),"g");for(const e of Object.keys(i.color.ansi))u.has(e)||(c[e]={get(){const t=this.level;return function(){const n=i.color[l[t]][e].apply(null,arguments),r={open:n,close:i.color.close,closeRe:i.color.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}});i.bgColor.closeRe=new RegExp(r(i.bgColor.close),"g");for(const e of Object.keys(i.bgColor.ansi)){if(u.has(e))continue;c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=i.bgColor[l[t]][e].apply(null,arguments),r={open:n,close:i.bgColor.close,closeRe:i.bgColor.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}}}const f=Object.defineProperties(()=>{},c);function p(e,t,n){const r=function(){return m.apply(r,arguments)};r._styles=e,r._empty=t;const i=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>i.enabled,set(e){i.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===n||"grey"===n,r.__proto__=f,r}function m(){const e=arguments,t=e.length;let n=String(arguments[0]);if(0===t)return"";if(t>1)for(let r=1;r<t;r++)n+=" "+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const r=i.dim.open;a&&this.hasGrey&&(i.dim.open="");for(const e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return i.dim.open=r,n}function g(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const n=[].slice.call(arguments,2),r=[t.raw[0]];for(let e=1;e<t.length;e++)r.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&")),r.push(String(t.raw[e]));return o(e,r.join(""))}Object.defineProperties(d.prototype,c),e.exports=d(),e.exports.supportsColor=s,e.exports.default=e.exports}).call(this,n(3))},function(e,t,n){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},function(e,t,n){"use strict";(function(e){const t=n(599),r=(e,n)=>function(){const r=e.apply(t,arguments);return`[${r+n}m`},i=(e,n)=>function(){const r=e.apply(t,arguments);return`[${38+n};5;${r}m`},s=(e,n)=>function(){const r=e.apply(t,arguments);return`[${38+n};2;${r[0]};${r[1]};${r[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,n={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};n.color.grey=n.color.gray;for(const t of Object.keys(n)){const r=n[t];for(const t of Object.keys(r)){const i=r[t];n[t]={open:`[${i[0]}m`,close:`[${i[1]}m`},r[t]=n[t],e.set(i[0],i[1])}Object.defineProperty(n,t,{value:r,enumerable:!1}),Object.defineProperty(n,"codes",{value:e,enumerable:!1})}const o=e=>e,a=(e,t,n)=>[e,t,n];n.color.close="",n.bgColor.close="",n.color.ansi={ansi:r(o,0)},n.color.ansi256={ansi256:i(o,0)},n.color.ansi16m={rgb:s(a,0)},n.bgColor.ansi={ansi:r(o,10)},n.bgColor.ansi256={ansi256:i(o,10)},n.bgColor.ansi16m={rgb:s(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const o=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in o&&(n.color.ansi[e]=r(o.ansi16,0),n.bgColor.ansi[e]=r(o.ansi16,10)),"ansi256"in o&&(n.color.ansi256[e]=i(o.ansi256,0),n.bgColor.ansi256[e]=i(o.ansi256,10)),"rgb"in o&&(n.color.ansi16m[e]=s(o.rgb,0),n.bgColor.ansi16m[e]=s(o.rgb,10))}return n}})}).call(this,n(14)(e))},function(e,t,n){var r=n(251),i=n(601),s={};Object.keys(r).forEach((function(e){s[e]={},Object.defineProperty(s[e],"channels",{value:r[e].channels}),Object.defineProperty(s[e],"labels",{value:r[e].labels});var t=i(e);Object.keys(t).forEach((function(n){var r=t[n];s[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),s[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=s},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(251);function i(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),s=Object.keys(r[i]),o=s.length,a=0;a<o;a++){var l=s[a],u=t[l];-1===u.distance&&(u.distance=t[i].distance+1,u.parent=i,n.unshift(l))}return t}function s(e,t){return function(n){return t(e(n))}}function o(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),i=s(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){for(var t=i(e),n={},r=Object.keys(t),s=r.length,a=0;a<s;a++){var l=r[a];null!==t[l].parent&&(n[l]=o(l,t))}return n}},function(e,t,n){"use strict";e.exports={stdout:!1,stderr:!1}},function(e,t,n){"use strict";const r=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,i=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,s=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,o=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,a=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function l(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):a.get(e)||e}function u(e,t){const n=[],r=t.trim().split(/\s*,\s*/g);let i;for(const t of r)if(isNaN(t)){if(!(i=t.match(s)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(i[2].replace(o,(e,t,n)=>t?l(t):n))}else n.push(Number(t));return n}function c(e){i.lastIndex=0;const t=[];let n;for(;null!==(n=i.exec(e));){const e=n[1];if(n[2]){const r=u(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function h(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw new Error("Unknown Chalk style: "+e);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}e.exports=(e,t)=>{const n=[],i=[];let s=[];if(t.replace(r,(t,r,o,a,u,d)=>{if(r)s.push(l(r));else if(a){const t=s.join("");s=[],i.push(0===n.length?t:h(e,n)(t)),n.push({inverse:o,styles:c(a)})}else if(u){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");i.push(h(e,n)(s.join(""))),s=[],n.pop()}else s.push(d)}),i.push(s.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n="var"){e.traverse(a,{kind:n,emit:t})};var r=n(1);const{assignmentExpression:i,expressionStatement:s,identifier:o}=r,a={Scope(e,t){"let"===t.kind&&e.skip()},FunctionParent(e){e.skip()},VariableDeclaration(e,t){if(t.kind&&e.node.kind!==t.kind)return;const n=[],r=e.get("declarations");let a;for(const e of r){a=e.node.id,e.node.init&&n.push(s(i("=",e.node.id,e.node.init)));for(const n of Object.keys(e.getBindingIdentifiers()))t.emit(o(n),n,null!==e.node.init)}e.parentPath.isFor({left:e.node})?e.replaceWith(a):e.replaceWithMultiple(n)}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.evaluate=function(){const e={confident:!0,deoptPath:null,seen:new Map};let t=s(this,e);e.confident||(t=void 0);return{confident:e.confident,deopt:e.deoptPath,value:t}},t.evaluateTruthy=function(){const e=this.evaluate();if(e.confident)return!!e.value};const n=["String","Number","Math"],r=["random"];function i(e,t){t.confident&&(t.deoptPath=e,t.confident=!1)}function s(t,a){const{node:l}=t,{seen:u}=a;if(u.has(l)){const e=u.get(l);return e.resolved?e.value:void i(t,a)}{const c={resolved:!1};u.set(l,c);const h=function(t,a){if(!a.confident)return;if(t.isSequenceExpression()){const e=t.get("expressions");return s(e[e.length-1],a)}if(t.isStringLiteral()||t.isNumericLiteral()||t.isBooleanLiteral())return t.node.value;if(t.isNullLiteral())return null;if(t.isTemplateLiteral())return o(t,t.node.quasis,a);if(t.isTaggedTemplateExpression()&&t.get("tag").isMemberExpression()){const e=t.get("tag.object"),{node:{name:n}}=e,r=t.get("tag.property");if(e.isIdentifier()&&"String"===n&&!t.scope.getBinding(n)&&r.isIdentifier()&&"raw"===r.node.name)return o(t,t.node.quasi.quasis,a,!0)}if(t.isConditionalExpression()){const e=s(t.get("test"),a);if(!a.confident)return;return s(e?t.get("consequent"):t.get("alternate"),a)}if(t.isExpressionWrapper())return s(t.get("expression"),a);if(t.isMemberExpression()&&!t.parentPath.isCallExpression({callee:t.node})){const e=t.get("property"),n=t.get("object");if(n.isLiteral()&&e.isIdentifier()){const t=n.node.value,r=typeof t;if("number"===r||"string"===r)return t[e.node.name]}}if(t.isReferencedIdentifier()){const e=t.scope.getBinding(t.node.name);if(e&&e.constantViolations.length>0)return i(e.path,a);if(e&&t.node.start<e.path.node.end)return i(e.path,a);if(null!=e&&e.hasValue)return e.value;{if("undefined"===t.node.name)return e?i(e.path,a):void 0;if("Infinity"===t.node.name)return e?i(e.path,a):1/0;if("NaN"===t.node.name)return e?i(e.path,a):NaN;const n=t.resolve();return n===t?i(t,a):s(n,a)}}if(t.isUnaryExpression({prefix:!0})){if("void"===t.node.operator)return;const e=t.get("argument");if("typeof"===t.node.operator&&(e.isFunction()||e.isClass()))return"function";const n=s(e,a);if(!a.confident)return;switch(t.node.operator){case"!":return!n;case"+":return+n;case"-":return-n;case"~":return~n;case"typeof":return typeof n}}if(t.isArrayExpression()){const e=[],n=t.get("elements");for(const t of n){const n=t.evaluate();if(!n.confident)return i(n.deopt,a);e.push(n.value)}return e}if(t.isObjectExpression()){const e={},n=t.get("properties");for(const t of n){if(t.isObjectMethod()||t.isSpreadElement())return i(t,a);let n=t.get("key");if(t.node.computed){if(n=n.evaluate(),!n.confident)return i(n.deopt,a);n=n.value}else n=n.isIdentifier()?n.node.name:n.node.value;let r=t.get("value").evaluate();if(!r.confident)return i(r.deopt,a);r=r.value,e[n]=r}return e}if(t.isLogicalExpression()){const e=a.confident,n=s(t.get("left"),a),r=a.confident;a.confident=e;const i=s(t.get("right"),a),o=a.confident;switch(t.node.operator){case"||":if(a.confident=r&&(!!n||o),!a.confident)return;return n||i;case"&&":if(a.confident=r&&(!n||o),!a.confident)return;return n&&i}}if(t.isBinaryExpression()){const e=s(t.get("left"),a);if(!a.confident)return;const n=s(t.get("right"),a);if(!a.confident)return;switch(t.node.operator){case"-":return e-n;case"+":return e+n;case"/":return e/n;case"*":return e*n;case"%":return e%n;case"**":return Math.pow(e,n);case"<":return e<n;case">":return e>n;case"<=":return e<=n;case">=":return e>=n;case"==":return e==n;case"!=":return e!=n;case"===":return e===n;case"!==":return e!==n;case"|":return e|n;case"&":return e&n;case"^":return e^n;case"<<":return e<<n;case">>":return e>>n;case">>>":return e>>>n}}if(t.isCallExpression()){const i=t.get("callee");let o,l;if(i.isIdentifier()&&!t.scope.getBinding(i.node.name)&&n.indexOf(i.node.name)>=0&&(l=e[i.node.name]),i.isMemberExpression()){const t=i.get("object"),s=i.get("property");if(t.isIdentifier()&&s.isIdentifier()&&n.indexOf(t.node.name)>=0&&r.indexOf(s.node.name)<0&&(o=e[t.node.name],l=o[s.node.name]),t.isLiteral()&&s.isIdentifier()){const e=typeof t.node.value;"string"!==e&&"number"!==e||(o=t.node.value,l=o[s.node.name])}}if(l){const e=t.get("arguments").map(e=>s(e,a));if(!a.confident)return;return l.apply(o,e)}}i(t,a)}(t,a);return a.confident&&(c.resolved=!0,c.value=h),h}}function o(e,t,n,r=!1){let i="",o=0;const a=e.get("expressions");for(const e of t){if(!n.confident)break;i+=r?e.value.raw:e.value.cooked;const t=a[o++];t&&(i+=String(s(t,n)))}if(n.confident)return i}}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrowFunctionToExpression=function({allowInsertArrow:e=!0,specCompliant:t=!1,noNewArrows:n=!t}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");const{thisBinding:r,fnPath:i}=R(this,n,e);if(i.ensureBlock(),i.node.type="FunctionExpression",!n){const e=r?null:i.scope.generateUidIdentifier("arrowCheckId");e&&i.parentPath.scope.push({id:e,init:S([])}),i.get("body").unshiftContainer("body",f(h(this.hub.addHelper("newArrowCheck"),[P(),p(e?e.name:r)]))),i.replaceWith(h(b((0,s.default)(this,!0)||i.node,p("bind")),[e?p(e.name):P()]))}},t.arrowFunctionToShadowed=function(){if(!this.isArrowFunctionExpression())return;this.arrowFunctionToExpression()},t.ensureBlock=function(){const e=this.get("body"),t=e.node;if(Array.isArray(e))throw new Error("Can't convert array path to a block statement");if(!t)throw new Error("Can't convert node without a body");if(e.isBlockStatement())return t;const n=[];let r,i,s="body";e.isStatement()?(i="body",r=0,n.push(e.node)):(s+=".body.0",this.isFunction()?(r="argument",n.push(E(e.node))):(r="expression",n.push(f(e.node))));this.node.body=c(n);const o=this.get(s);return e.setup(o,i?o.node[i]:o.node,i,r),this.node},t.toComputedKey=function(){let e;if(this.isMemberExpression())e=this.node.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");e=this.node.key}this.node.computed||m(e)&&(e=M(e.name));return e},t.unwrapFunctionEnvironment=function(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");R(this)};var r=n(1),i=n(252),s=n(607),o=n(220);const{arrowFunctionExpression:a,assignmentExpression:l,binaryExpression:u,blockStatement:c,callExpression:h,conditionalExpression:d,expressionStatement:f,identifier:p,isIdentifier:m,jsxIdentifier:g,logicalExpression:y,LOGICAL_OPERATORS:v,memberExpression:b,metaProperty:w,numericLiteral:_,objectExpression:S,restElement:x,returnStatement:E,sequenceExpression:A,spreadElement:T,stringLiteral:M,super:C,thisExpression:P,toExpression:k,unaryExpression:O}=r;const I=(0,o.merge)([{CallExpression(e,{allSuperCalls:t}){e.get("callee").isSuper()&&t.push(e)}},i.default]);function R(e,t=!0,n=!0){let r,i=e.findParent(e=>e.isArrowFunctionExpression()?(null!=r||(r=e),!1):e.isFunction()||e.isProgram()||e.isClassProperty({static:!1})||e.isClassPrivateProperty({static:!1}));const s=i.isClassMethod({kind:"constructor"});if(i.isClassProperty()||i.isClassPrivateProperty())if(r)i=r;else{if(!n)throw e.buildCodeFrameError("Unable to transform arrow inside class property");e.replaceWith(h(a([],k(e.node)),[])),i=e.get("callee"),e=i.get("body")}const{thisPaths:o,argumentsPaths:c,newTargetPaths:f,superProps:m,superCalls:S}=function(e){const t=[],n=[],r=[],i=[],s=[];return e.traverse(L,{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}),{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}}(e);if(s&&S.length>0){if(!n)throw S[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");const e=[];i.traverse(I,{allSuperCalls:e});const t=function(e){return F(e,"supercall",()=>{const t=e.scope.generateUidIdentifier("args");return a([x(t)],h(C(),[T(p(t.name))]))})}(i);e.forEach(e=>{const n=p(t);n.loc=e.node.callee.loc,e.get("callee").replaceWith(n)})}if(c.length>0){const e=F(i,"arguments",()=>{const e=()=>p("arguments");return i.scope.path.isProgram()?d(u("===",O("typeof",e()),M("undefined")),i.scope.buildUndefinedNode(),e()):e()});c.forEach(t=>{const n=p(e);n.loc=t.node.loc,t.replaceWith(n)})}if(f.length>0){const e=F(i,"newtarget",()=>w(p("new"),p("target")));f.forEach(t=>{const n=p(e);n.loc=t.node.loc,t.replaceWith(n)})}if(m.length>0){if(!n)throw m[0].buildCodeFrameError("Unable to handle nested super.prop usage");m.reduce((e,t)=>e.concat(function(e){if(e.parentPath.isAssignmentExpression()&&"="!==e.parentPath.node.operator){const n=e.parentPath,r=n.node.operator.slice(0,-1),i=n.node.right,s=function(e){return v.includes(e)}(r);if(e.node.computed){const o=e.scope.generateDeclaredUidIdentifier("tmp"),a=e.node.object,u=e.node.property;n.get("left").replaceWith(b(a,l("=",o,u),!0)),n.get("right").replaceWith(t(s?"=":r,b(a,p(o.name),!0),i))}else{const o=e.node.object,a=e.node.property;n.get("left").replaceWith(b(o,a)),n.get("right").replaceWith(t(s?"=":r,b(o,p(a.name)),i))}return s?n.replaceWith(y(r,n.node.left,n.node.right)):n.node.operator="=",[n.get("left"),n.get("right").get("left")]}if(e.parentPath.isUpdateExpression()){const t=e.parentPath,n=e.scope.generateDeclaredUidIdentifier("tmp"),r=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null,i=[l("=",n,b(e.node.object,r?l("=",r,e.node.property):e.node.property,e.node.computed)),l("=",b(e.node.object,r?p(r.name):e.node.property,e.node.computed),u(e.parentPath.node.operator[0],p(n.name),_(1)))];e.parentPath.node.prefix||i.push(p(n.name)),t.replaceWith(A(i));const s=t.get("expressions.0.right"),o=t.get("expressions.1.left");return[s,o]}return[e];function t(e,t,n){return"="===e?l("=",t,n):u(e,t,n)}}(t)),[]).forEach(e=>{const t=e.node.computed?"":e.get("property").node.name,n=e.parentPath.isAssignmentExpression({left:e.node}),r=e.parentPath.isCallExpression({callee:e.node}),s=function(e,t,n){return F(e,`superprop_${t?"set":"get"}:${n||""}`,()=>{const r=[];let i;if(n)i=b(C(),p(n));else{const t=e.scope.generateUidIdentifier("prop");r.unshift(t),i=b(C(),p(t.name),!0)}if(t){const t=e.scope.generateUidIdentifier("value");r.push(t),i=l("=",i,p(t.name))}return a(r,i)})}(i,n,t),u=[];if(e.node.computed&&u.push(e.get("property").node),n){const t=e.parentPath.node.right;u.push(t)}const c=h(p(s),u);r?(e.parentPath.unshiftContainer("arguments",P()),e.replaceWith(b(c,p("call"))),o.push(e.parentPath.get("arguments.0"))):n?e.parentPath.replaceWith(c):e.replaceWith(c)})}let E;return(o.length>0||!t)&&(E=function(e,t){return F(e,"this",n=>{if(!t||!N(e))return P();e.traverse(D,{supers:new WeakSet,thisBinding:n})})}(i,s),(t||s&&N(i))&&(o.forEach(e=>{const t=e.isJSX()?g(E):p(E);t.loc=e.node.loc,e.replaceWith(t)}),t||(E=null))),{thisBinding:E,fnPath:e}}function N(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}const D=(0,o.merge)([{CallExpression(e,{supers:t,thisBinding:n}){e.get("callee").isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,l("=",p(n),p("this"))])))}},i.default]);function F(e,t,n){const r="binding:"+t;let i=e.getData(r);if(!i){const s=e.scope.generateUidIdentifier(t);i=s.name,e.setData(r,i),e.scope.push({id:s,init:n(i)})}return i}const L=(0,o.merge)([{ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){"this"===e.node.name&&(e.parentPath.isJSXMemberExpression({object:e.node})||e.parentPath.isJSXOpeningElement({name:e.node}))&&t.push(e)},CallExpression(e,{superCalls:t}){e.get("callee").isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get("object").isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let n=e.scope;do{if(n.hasOwnBinding("arguments"))return void n.rename("arguments");if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get("meta").isIdentifier({name:"new"})&&e.get("property").isIdentifier({name:"target"})&&t.push(e)}},i.default])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({node:e,parent:t,scope:n,id:i},s=!1,x=!1){if(e.id)return;if(!m(t)&&!p(t,{kind:"method"})||t.computed&&!d(t.key)){if(v(t)){if(i=t.id,h(i)&&!s){const t=n.parent.getBinding(i.name);if(t&&t.constant&&n.getBinding(i.name)===t)return e.id=a(i),void(e.id[o]=!0)}}else if(u(t,{operator:"="}))i=t.left;else if(!i)return}else i=t.key;let E;i&&d(i)?E=function(e){if(f(e))return"null";if(g(e))return`_${e.pattern}_${e.flags}`;if(y(e))return e.quasis.map(e=>e.value.raw).join("");if(void 0!==e.value)return e.value+"";return""}(i):i&&h(i)&&(E=i.name);if(void 0===E)return;if(!x&&c(e)&&/[\uD800-\uDFFF]/.test(E))return;E=b(E),(i=l(E))[o]=!0;return function(e,t,n,i){if(e.selfReference){if(!i.hasBinding(n.name)||i.hasGlobal(n.name)){if(!c(t))return;let e=w;t.generator&&(e=_);const s=e({FUNCTION:t,FUNCTION_ID:n,FUNCTION_KEY:i.generateUidIdentifier(n.name)}).expression,o=s.callee.body.body[0].params;for(let e=0,n=(0,r.default)(t);e<n;e++)o.push(i.generateUidIdentifier("x"));return s}i.rename(n.name)}t.id=n,i.getProgramParent().references[n.name]=!0}(function(e,t,n){const r={selfAssignment:!1,selfReference:!1,outerDeclar:n.getBindingIdentifier(t),references:[],name:t},i=n.getOwnBinding(t);i?"param"===i.kind&&(r.selfReference=!0):(r.outerDeclar||n.hasGlobal(t))&&n.traverse(e,S,r);return r}(e,E,n),e,i,n)||e};var r=n(608),i=n(43),s=n(1);const{NOT_LOCAL_BINDING:o,cloneNode:a,identifier:l,isAssignmentExpression:u,isFunction:c,isIdentifier:h,isLiteral:d,isNullLiteral:f,isObjectMethod:p,isObjectProperty:m,isRegExpLiteral:g,isTemplateLiteral:y,isVariableDeclarator:v,toBindingIdentifierName:b}=s,w=(0,i.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),_=(0,i.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),S={"ReferencedIdentifier|BindingIdentifier"(e,t){if(e.node.name!==t.name)return;e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.params;for(let e=0;e<t.length;e++){const n=t[e];if(i(n)||s(n))return e}return t.length};var r=n(1);const{isAssignmentPattern:i,isRestElement:s}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statements=t.statement=t.smart=t.program=t.expression=void 0;var r=n(1);const{assertExpressionStatement:i}=r;function s(e){return{code:e=>"/* @babel/template */;\n"+e,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}const o=s(e=>e.length>1?e:e[0]);t.smart=o;const a=s(e=>e);t.statements=a;const l=s(e=>{if(0===e.length)throw new Error("Found nothing to return.");if(e.length>1)throw new Error("Found multiple statements but wanted one");return e[0]});t.statement=l;const u={code:e=>`(\n${e}\n)`,validate:e=>{if(e.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(0===u.unwrap(e).start)throw new Error("Parse result included parens.")},unwrap:({program:e})=>{const[t]=e.body;return i(t),t.expression}};t.expression=u;t.program={code:e=>e,validate:()=>{},unwrap:e=>e.program}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){const l=new WeakMap,u=new WeakMap,c=n||(0,r.validate)(null);return Object.assign((n,...o)=>{if("string"==typeof n){if(o.length>1)throw new Error("Unexpected extra params.");return a((0,i.default)(t,n,(0,r.merge)(c,(0,r.validate)(o[0]))))}if(Array.isArray(n)){let e=l.get(n);return e||(e=(0,s.default)(t,n,c),l.set(n,e)),a(e(o))}if("object"==typeof n&&n){if(o.length>0)throw new Error("Unexpected extra params.");return e(t,(0,r.merge)(c,(0,r.validate)(n)))}throw new Error("Unexpected template param "+typeof n)},{ast:(e,...n)=>{if("string"==typeof e){if(n.length>1)throw new Error("Unexpected extra params.");return(0,i.default)(t,e,(0,r.merge)((0,r.merge)(c,(0,r.validate)(n[0])),o))()}if(Array.isArray(e)){let i=u.get(e);return i||(i=(0,s.default)(t,e,(0,r.merge)(c,o)),u.set(e,i)),i(n)()}throw new Error("Unexpected template param "+typeof e)}})};var r=n(139),i=n(611),s=n(612);const o=(0,r.validate)({placeholderPattern:!1});function a(e){let t="";try{throw new Error}catch(e){e.stack&&(t=e.stack.split("\n").slice(3).join("\n"))}return n=>{try{return e(n)}catch(e){throw e.stack+="\n =============\n"+t,e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let o;return t=e.code(t),a=>{const l=(0,r.normalizeReplacements)(a);return o||(o=(0,i.default)(e,t,n)),e.unwrap((0,s.default)(o,l))}};var r=n(139),i=n(253),s=n(254)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){const{metadata:a,names:l}=function(e,t,n){let r,s,a,l="";do{l+="$";const u=o(t,l);r=u.names,s=new Set(r),a=(0,i.default)(e,e.code(u.code),{parser:n.parser,placeholderWhitelist:new Set(u.names.concat(n.placeholderWhitelist?Array.from(n.placeholderWhitelist):[])),placeholderPattern:n.placeholderPattern,preserveComments:n.preserveComments,syntacticPlaceholders:n.syntacticPlaceholders})}while(a.placeholders.some(e=>e.isDuplicate&&s.has(e.name)));return{metadata:a,names:r}}(e,t,n);return t=>{const n={};return t.forEach((e,t)=>{n[l[t]]=e}),t=>{const i=(0,r.normalizeReplacements)(t);return i&&Object.keys(i).forEach(e=>{if(Object.prototype.hasOwnProperty.call(n,e))throw new Error("Unexpected replacement overlap.")}),e.unwrap((0,s.default)(a,i?Object.assign(i,n):n))}}};var r=n(139),i=n(253),s=n(254);function o(e,t){const n=[];let r=e[0];for(let i=1;i<e.length;i++){const s=`${t}${i-1}`;n.push(s),r+=s+e[i]}return{names:n,code:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._guessExecutionStatusRelativeTo=function(e){const t={this:m(this),target:m(e)};if(t.target.node!==t.this.node)return this._guessExecutionStatusRelativeToDifferentFunctions(t.target);const n={target:e.getAncestry(),this:this.getAncestry()};if(n.target.indexOf(this)>=0)return"after";if(n.this.indexOf(e)>=0)return"before";let r;const i={target:0,this:0};for(;!r&&i.this<n.this.length;){const e=n.this[i.this];i.target=n.target.indexOf(e),i.target>=0?r=e:i.this++}if(!r)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(y(n.this,i.this-1)||y(n.target,i.target-1))return"unknown";const o={this:n.this[i.this-1],target:n.target[i.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";const a=s[r.type],l={this:a.indexOf(o.this.parentKey),target:a.indexOf(o.target.parentKey)};return l.target>l.this?"before":"after"},t._guessExecutionStatusRelativeToDifferentFunctions=function(e){if(!e.isFunctionDeclaration()||e.parentPath.isExportDeclaration())return"unknown";const t=e.scope.getBinding(e.node.id.name);if(!t.references)return"before";const n=t.referencePaths;let r;for(const t of n){if(!!t.find(t=>t.node===e.node))continue;if("callee"!==t.key||!t.parentPath.isCallExpression())return"unknown";if(v.has(t.node))continue;v.add(t.node);const n=this._guessExecutionStatusRelativeTo(t);if(v.delete(t.node),r&&r!==n)return"unknown";r=n}return r},t._resolve=function(e,t){if(t&&t.indexOf(this)>=0)return;if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){const n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){const r=n.path.resolve(e,t);if(this.find(e=>e.node===r.node))return;return r}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){const n=this.toComputedKey();if(!u(n))return;const r=n.value,i=this.get("object").resolve(e,t);if(i.isObjectExpression()){const n=i.get("properties");for(const i of n){if(!i.isProperty())continue;const n=i.get("key");let s=i.isnt("computed")&&n.isIdentifier({name:r});if(s=s||n.isLiteral({value:r}),s)return i.get("value").resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+r)){const n=i.get("elements")[r];if(n)return n.resolve(e,t)}}}},t.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},t.canSwapBetweenExpressionAndStatement=function(e){if("body"!==this.key||!this.parentPath.isArrowFunctionExpression())return!1;if(this.isExpression())return o(e);if(this.isBlockStatement())return a(e);return!1},t.equals=function(e,t){return this.node[e]===t},t.getSource=function(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""},t.has=f,t.is=void 0,t.isCompletionRecord=function(e){let t=this,n=!0;do{const r=t.container;if(t.isFunction()&&!n)return!!e;if(n=!1,Array.isArray(r)&&t.key!==r.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},t.isConstantExpression=function(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);return!!e&&e.constant}if(this.isLiteral())return!this.isRegExpLiteral()&&(!this.isTemplateLiteral()||this.get("expressions").every(e=>e.isConstantExpression()));if(this.isUnaryExpression())return"void"===this.node.operator&&this.get("argument").isConstantExpression();if(this.isBinaryExpression())return this.get("left").isConstantExpression()&&this.get("right").isConstantExpression();return!1},t.isInStrictMode=function(){const e=this.isProgram()?this:this.parentPath;return!!e.find(e=>{if(e.isProgram({sourceType:"module"}))return!0;if(e.isClass())return!0;if(!e.isProgram()&&!e.isFunction())return!1;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement())return!1;const t=e.isFunction()?e.node.body:e.node;for(const e of t.directives)if("use strict"===e.value.value)return!0})},t.isNodeType=function(e){return h(this.type,e)},t.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!o(this.container)&&i.includes(this.key)},t.isStatic=function(){return this.scope.isStatic(this.node)},t.isnt=function(e){return!this.has(e)},t.matchesPattern=function(e,t){return d(this.node,e,t)},t.referencesImport=function(e,t){if(!this.isReferencedIdentifier()){if((this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?c(this.node.property,{value:t}):this.node.property.name===t)){const t=this.get("object");return t.isReferencedIdentifier()&&t.referencesImport(e,"*")}return!1}const n=this.scope.getBinding(this.node.name);if(!n||"module"!==n.kind)return!1;const r=n.path,i=r.parentPath;if(!i.isImportDeclaration())return!1;if(i.node.source.value!==e)return!1;if(!t)return!0;if(r.isImportDefaultSpecifier()&&"default"===t)return!0;if(r.isImportNamespaceSpecifier()&&"*"===t)return!0;if(r.isImportSpecifier()&&l(r.node.imported,{name:t}))return!0;return!1},t.resolve=function(e,t){return this._resolve(e,t)||this},t.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)};var r=n(1);const{STATEMENT_OR_BLOCK_KEYS:i,VISITOR_KEYS:s,isBlockStatement:o,isExpression:a,isIdentifier:l,isLiteral:u,isStringLiteral:c,isType:h,matchesPattern:d}=r;function f(e){const t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}const p=f;function m(e){return(e.scope.getFunctionParent()||e.scope.getProgramParent()).path}function g(e,t){switch(e){case"LogicalExpression":return"right"===t;case"ConditionalExpression":case"IfStatement":return"consequent"===t||"alternate"===t;case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return"body"===t;case"ForStatement":return"body"===t||"update"===t;case"SwitchStatement":return"cases"===t;case"TryStatement":return"handler"===t;case"AssignmentPattern":return"right"===t;case"OptionalMemberExpression":return"property"===t;case"OptionalCallExpression":return"arguments"===t;default:return!1}}function y(e,t){for(let n=0;n<t;n++){const t=e[n];if(g(t.parent.type,t.parentKey))return!0}return!1}t.is=p;const v=new WeakSet},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._call=function(e){if(!e)return!1;for(const t of e){if(!t)continue;const e=this.node;if(!e)return!0;const n=t.call(this.state,this,this.state);if(n&&"object"==typeof n&&"function"==typeof n.then)throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error("Unexpected return value from visitor method "+t);if(this.node!==e)return!0;if(this._traverseFlags>0)return!0}return!1},t._getQueueContexts=function(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,e);)t=e.contexts;return t},t._resyncKey=function(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(const e of Object.keys(this.container))if(this.container[e]===this.node)return this.setKey(e);this.key=null},t._resyncList=function(){if(!this.parent||!this.inList)return;const e=this.parent[this.listKey];if(this.container===e)return;this.container=e||null},t._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},t._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()},t.call=function(e){const t=this.opts;if(this.debug(e),this.node&&this._call(t[e]))return!0;if(this.node)return this._call(t[this.node.type]&&t[this.node.type][e]);return!1},t.isBlacklisted=t.isDenylisted=function(){var e;const t=null!=(e=this.opts.denylist)?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1},t.popContext=function(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)},t.pushContext=function(e){this.contexts.push(e),this.setContext(e)},t.requeue=function(e=this){if(e.removed)return;const t=this.contexts;for(const n of t)n.maybeQueue(e)},t.resync=function(){if(this.removed)return;this._resyncParent(),this._resyncList(),this._resyncKey()},t.setContext=function(e){null!=this.skipKeys&&(this.skipKeys={});this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts);return this.setScope(),this},t.setKey=function(e){var t;this.key=e,this.node=this.container[this.key],this.type=null==(t=this.node)?void 0:t.type},t.setScope=function(){if(this.opts&&this.opts.noScope)return;let e,t=this.parentPath;"key"===this.key&&t.isMethod()&&(t=t.parentPath);for(;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()},t.setup=function(e,t,n,r){this.listKey=n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(r)},t.skip=function(){this.shouldSkip=!0},t.skipKey=function(e){null==this.skipKeys&&(this.skipKeys={});this.skipKeys[e]=!0},t.stop=function(){this._traverseFlags|=i.SHOULD_SKIP|i.SHOULD_STOP},t.visit=function(){if(!this.node)return!1;if(this.isDenylisted())return!1;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return!1;const e=this.context;if(this.shouldSkip||this.call("enter"))return this.debug("Skip..."),this.shouldStop;return s(this,e),this.debug("Recursing into..."),this.shouldStop=(0,r.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),s(this,e),this.call("exit"),this.shouldStop};var r=n(240),i=n(35);function s(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")},t._callRemovalHooks=function(){for(const e of r.hooks)if(e(this,this.parentPath))return!0},t._markRemoved=function(){this._traverseFlags|=s.SHOULD_SKIP|s.REMOVED,this.parent&&i.path.get(this.parent).delete(this.node);this.node=null},t._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},t._removeFromScope=function(){const e=this.getBindingIdentifiers();Object.keys(e).forEach(e=>this.scope.removeBinding(e))},t.remove=function(){var e;this._assertUnremoved(),this.resync(),null!=(e=this.opts)&&e.noScope||this._removeFromScope();if(this._callRemovalHooks())return void this._markRemoved();this.shareCommentsWithSiblings(),this._remove(),this._markRemoved()};var r=n(616),i=n(53),s=n(35)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=void 0;t.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);const n=[];this.container.splice(e,0,...t);for(let r=0;r<t.length;r++){const t=e+r,i=this.getSibling(t);n.push(i),this.context&&this.context.queue&&i.pushContext(this.context)}const r=this._getQueueContexts();for(const e of n){e.setScope(),e.debug("Inserted.");for(const t of r)t.maybeQueue(e,!0)}return n},t._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},t._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},t._verifyNodeList=function(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){const n=e[t];let r;if(n?"object"!=typeof n?r="contains a non-object node":n.type?n instanceof s.default&&(r="has a NodePath when it expected a raw object"):r="without a type":r="has falsy node",r){const e=Array.isArray(n)?"array":typeof n;throw new Error(`Node list ${r} with the index of ${t} and type of ${e}`)}}return e},t.hoist=function(e=this.scope){return new i.default(this,e).run()},t.insertAfter=function(e){if(this._assertUnremoved(),this.isSequenceExpression())return _(this.get("expressions")).insertAfter(e);const t=this._verifyNodeList(e),{parentPath:n}=this;if(n.isExpressionStatement()||n.isLabeledStatement()||n.isExportNamedDeclaration()||n.isExportDefaultDeclaration()&&this.isDeclaration())return n.insertAfter(t.map(e=>g(e)?f(e):e));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!n.isJSXElement()||n.isForStatement()&&"init"===this.key){if(this.node){const e=this.node;let{scope:r}=this;if(r.path.isPattern())return l(e),this.replaceWith(h(a([],e),[])),this.get("callee.body").insertAfter(t),[this];if(function e(t){return v(t.parent)&&(_(t.parent.expressions)!==t.node||e(t.parentPath))}(this))t.unshift(e);else if(m(e)&&b(e.callee))t.unshift(e),t.push(w());else if(function(e,t){if(!p(e)||!y(e.left))return!1;const n=t.getBlockParent();return n.hasOwnBinding(e.left.name)&&n.getOwnBinding(e.left.name).constantViolations.length<=1}(e,r))t.unshift(e),t.push(d(e.left));else if(r.isPure(e,!0))t.push(e);else{n.isMethod({computed:!0,key:e})&&(r=r.parent);const i=r.generateDeclaredUidIdentifier();t.unshift(f(u("=",d(i),e))),t.push(f(d(i)))}}return this.replaceExpressionWithStatements(t)}if(Array.isArray(this.container))return this._containerInsertAfter(t);if(this.isStatementOrBlock()){const e=this.node,n=e&&(!this.isExpressionStatement()||null!=e.expression);return this.replaceWith(c(n?[e]:[])),this.pushContainer("body",t)}throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")},t.insertBefore=function(e){this._assertUnremoved();const t=this._verifyNodeList(e),{parentPath:n}=this;if(n.isExpressionStatement()||n.isLabeledStatement()||n.isExportNamedDeclaration()||n.isExportDefaultDeclaration()&&this.isDeclaration())return n.insertBefore(t);if(this.isNodeType("Expression")&&!this.isJSXElement()||n.isForStatement()&&"init"===this.key)return this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);if(Array.isArray(this.container))return this._containerInsertBefore(t);if(this.isStatementOrBlock()){const e=this.node,n=e&&(!this.isExpressionStatement()||null!=e.expression);return this.replaceWith(c(n?[e]:[])),this.unshiftContainer("body",t)}throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")},t.pushContainer=function(e,t){this._assertUnremoved();const n=this._verifyNodeList(t),r=this.node[e];return s.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).setContext(this.context).replaceWithMultiple(n)},t.unshiftContainer=function(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);return s.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).setContext(this.context)._containerInsertBefore(t)},t.updateSiblingKeys=function(e,t){if(!this.parent)return;const n=r.path.get(this.parent);for(const[,r]of n)r.key>=e&&(r.key+=t)};var r=n(53),i=n(618),s=n(35),o=n(1);const{arrowFunctionExpression:a,assertExpression:l,assignmentExpression:u,blockStatement:c,callExpression:h,cloneNode:d,expressionStatement:f,isAssignmentExpression:p,isCallExpression:m,isExpression:g,isIdentifier:y,isSequenceExpression:v,isSuper:b,thisExpression:w}=o;const _=e=>e[e.length-1]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(1),i=r;const{react:s}=r,{cloneNode:o,jsxExpressionContainer:a,variableDeclaration:l,variableDeclarator:u}=i,c={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&s.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression())return;if("this"===e.node.name){let n=e.scope;do{if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);n&&t.breakOnScopePaths.push(n.path)}const n=e.scope.getBinding(e.node.name);if(n){for(const r of n.constantViolations)if(r.scope!==n.path.scope)return t.mutableBinding=!0,void e.stop();n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}};t.default=class{constructor(e,t){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=t,this.path=e,this.attachAfter=!1}isCompatibleScope(e){for(const t of Object.keys(this.bindings)){const n=this.bindings[t];if(!e.bindingIdentifierEquals(t,n.identifier))return!1}return!0}getCompatibleScopes(){let e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(const n of Object.keys(this.bindings)){if(!t.hasOwnBinding(n))continue;const r=this.bindings[n];if("param"===r.kind||"params"===r.path.parentKey)continue;if(this.getAttachmentParentForPath(r.path).key>=e.key){this.attachAfter=!0,e=r.path;for(const t of r.constantViolations)this.getAttachmentParentForPath(t).key>e.key&&(e=t)}}return e}_getAttachmentPath(){const e=this.scopes.pop();if(e)if(e.path.isFunction()){if(!this.hasOwnParamBindings(e))return this.getNextScopeAttachmentParent();{if(this.scope===e)return;const t=e.path.get("body").get("body");for(let e=0;e<t.length;e++)if(!t[e].node._blockHoist)return t[e]}}else if(e.path.isProgram())return this.getNextScopeAttachmentParent()}getNextScopeAttachmentParent(){const e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)}getAttachmentParentForPath(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())return e}while(e=e.parentPath)}hasOwnParamBindings(e){for(const t of Object.keys(this.bindings)){if(!e.hasOwnBinding(t))continue;const n=this.bindings[t];if("param"===n.kind&&n.constant)return!0}return!1}run(){if(this.path.traverse(c,this),this.mutableBinding)return;this.getCompatibleScopes();const e=this.getAttachmentPath();if(!e)return;if(e.getFunctionParent()===this.path.getFunctionParent())return;let t=e.scope.generateUidIdentifier("ref");const n=u(t,this.path.node),r=this.attachAfter?"insertAfter":"insertBefore",[i]=e[r]([e.isVariableDeclarator()?n:l("var",[n])]),s=this.path.parentPath;return s.isJSXElement()&&this.path.container===s.node.children&&(t=a(t)),this.path.replaceWith(o(t)),e.isVariableDeclarator()?i.get("init"):i.get("declarations.0.init")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getKey=function(e,t){const n=this.node,i=n[e];return Array.isArray(i)?i.map((s,o)=>r.default.get({listKey:e,parentPath:this,parent:n,container:i,key:o}).setContext(t)):r.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)},t._getPattern=function(e,t){let n=this;for(const r of e)n="."===r?n.parentPath:Array.isArray(n)?n[r]:n.get(r,t);return n},t.get=function(e,t=!0){!0===t&&(t=this.context);const n=e.split(".");return 1===n.length?this._getKey(e,t):this._getPattern(n,t)},t.getAllNextSiblings=function(){let e=this.key,t=this.getSibling(++e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(++e);return n},t.getAllPrevSiblings=function(){let e=this.key,t=this.getSibling(--e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(--e);return n},t.getBindingIdentifierPaths=function(e=!1,t=!1){const n=[this],r=Object.create(null);for(;n.length;){const i=n.shift();if(!i)continue;if(!i.node)continue;const o=s.keys[i.node.type];if(i.isIdentifier())if(e){(r[i.node.name]=r[i.node.name]||[]).push(i)}else r[i.node.name]=i;else if(i.isExportDeclaration()){const e=i.get("declaration");a(e)&&n.push(e)}else{if(t){if(i.isFunctionDeclaration()){n.push(i.get("id"));continue}if(i.isFunctionExpression())continue}if(o)for(let e=0;e<o.length;e++){const t=o[e],r=i.get(t);Array.isArray(r)?n.push(...r):r.node&&n.push(r)}}}return r},t.getBindingIdentifiers=function(e){return s(this.node,e)},t.getCompletionRecords=function(){return p(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(e=>e.path)},t.getNextSibling=function(){return this.getSibling(this.key+1)},t.getOpposite=function(){if("left"===this.key)return this.getSibling("right");if("right"===this.key)return this.getSibling("left");return null},t.getOuterBindingIdentifierPaths=function(e){return this.getBindingIdentifierPaths(e,!0)},t.getOuterBindingIdentifiers=function(e){return o(this.node,e)},t.getPrevSibling=function(){return this.getSibling(this.key-1)},t.getSibling=function(e){return r.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)};var r=n(35),i=n(1);const{getBindingIdentifiers:s,getOuterBindingIdentifiers:o,isDeclaration:a,numericLiteral:l,unaryExpression:u}=i;function c(e,t,n){return e&&t.push(...p(e,n)),t}function h(e){e.forEach(e=>{e.type=1})}function d(e,t){e.forEach(e=>{e.path.isBreakStatement({label:null})&&(t?e.path.replaceWith(u("void",l(0))):e.path.remove())})}function f(e,t){const n=[];if(t.canHaveBreak){let r=[];for(let i=0;i<e.length;i++){const s=e[i],o=Object.assign({},t,{inCaseClause:!1});s.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?o.shouldPopulateBreak=!0:o.shouldPopulateBreak=!1;const a=p(s,o);if(a.length>0&&a.every(e=>1===e.type)){r.length>0&&a.every(e=>e.path.isBreakStatement({label:null}))?(h(r),n.push(...r),r.some(e=>e.path.isDeclaration())&&(n.push(...a),d(a,!0)),d(a,!1)):(n.push(...a),t.shouldPopulateBreak||d(a,!0));break}if(i===e.length-1)n.push(...a);else{r=[];for(let e=0;e<a.length;e++){const t=a[e];1===t.type&&n.push(t),0===t.type&&r.push(t)}}}}else if(e.length)for(let r=e.length-1;r>=0;r--){const i=p(e[r],t);if(i.length>1||1===i.length&&!i[0].path.isVariableDeclaration()){n.push(...i);break}}return n}function p(e,t){let n=[];if(e.isIfStatement())n=c(e.get("consequent"),n,t),n=c(e.get("alternate"),n,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return c(e.get("body"),n,t);if(e.isProgram()||e.isBlockStatement())return f(e.get("body"),t);if(e.isFunction())return p(e.get("body"),t);if(e.isTryStatement())n=c(e.get("block"),n,t),n=c(e.get("handler"),n,t);else{if(e.isCatchClause())return c(e.get("body"),n,t);if(e.isSwitchStatement())return function(e,t,n){let r=[];for(let i=0;i<e.length;i++){const s=p(e[i],n),o=[],a=[];for(const e of s)0===e.type&&o.push(e),1===e.type&&a.push(e);o.length&&(r=o),t.push(...a)}return t.push(...r),t}(e.get("cases"),n,t);if(e.isSwitchCase())return f(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});e.isBreakStatement()?n.push(function(e){return{type:1,path:e}}(e)):n.push(function(e){return{type:0,path:e}}(e))}}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addComment=function(e,t,n){i(this.node,e,t,n)},t.addComments=function(e,t){s(this.node,e,t)},t.shareCommentsWithSiblings=function(){if("string"==typeof this.key)return;const e=this.node;if(!e)return;const t=e.trailingComments,n=e.leadingComments;if(!t&&!n)return;const r=this.getSibling(this.key-1),i=this.getSibling(this.key+1),s=Boolean(r.node),o=Boolean(i.node);s&&!o?r.addComments("trailing",t):o&&!s&&i.addComments("leading",n)};var r=n(1);const{addComment:i,addComments:s}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,n=TypeError){return new n(t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(43),i=n(623);const s=Object.assign({__proto__:null},i.default);var o=s;t.default=o;const a=e=>t=>({minVersion:e,ast:()=>r.default.program.ast(t)});s.AwaitValue=a("7.0.0-beta.0")`
70
+ */(function(){var s="Expected a function",o="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",h="[object Date]",d="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Object]",v="[object RegExp]",b="[object Set]",w="[object String]",_="[object Symbol]",S="[object WeakMap]",x="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",T="[object Float64Array]",M="[object Int8Array]",C="[object Int16Array]",P="[object Int32Array]",k="[object Uint8Array]",O="[object Uint16Array]",I="[object Uint32Array]",R=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,L=/[&<>"']/g,B=RegExp(F.source),j=RegExp(L.source),$=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,V=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,q=RegExp(H.source),G=/^\s+/,Y=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,se=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,he=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",me="["+fe+"]",ge="["+de+"]",ye="\\d+",ve="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+fe+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",Se="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Te="(?:"+be+"|"+we+")",Me="(?:"+Ae+"|"+we+")",Ce="(?:"+ge+"|"+_e+")"+"?",Pe="[\\ufe0e\\ufe0f]?"+Ce+("(?:\\u200d(?:"+[Se,xe,Ee].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*"),ke="(?:"+[ve,xe,Ee].join("|")+")"+Pe,Oe="(?:"+[Se+ge+"?",ge,xe,Ee,pe].join("|")+")",Ie=RegExp("['’]","g"),Re=RegExp(ge,"g"),Ne=RegExp(_e+"(?="+_e+")|"+Oe+Pe,"g"),De=RegExp([Ae+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[me,Ae,"$"].join("|")+")",Me+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[me,Ae+Te,"$"].join("|")+")",Ae+"?"+Te+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,ke].join("|"),"g"),Fe=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Be=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],je=-1,$e={};$e[A]=$e[T]=$e[M]=$e[C]=$e[P]=$e[k]=$e["[object Uint8ClampedArray]"]=$e[O]=$e[I]=!0,$e[l]=$e[u]=$e[x]=$e[c]=$e[E]=$e[h]=$e[d]=$e[f]=$e[m]=$e[g]=$e[y]=$e[v]=$e[b]=$e[w]=$e[S]=!1;var Ue={};Ue[l]=Ue[u]=Ue[x]=Ue[E]=Ue[c]=Ue[h]=Ue[A]=Ue[T]=Ue[M]=Ue[C]=Ue[P]=Ue[m]=Ue[g]=Ue[y]=Ue[v]=Ue[b]=Ue[w]=Ue[_]=Ue[k]=Ue["[object Uint8ClampedArray]"]=Ue[O]=Ue[I]=!0,Ue[d]=Ue[f]=Ue[S]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,ze=parseInt,Ke="object"==typeof e&&e&&e.Object===Object&&e,He="object"==typeof self&&self&&self.Object===Object&&self,qe=Ke||He||Function("return this")(),Ge=t&&!t.nodeType&&t,Ye=Ge&&"object"==typeof r&&r&&!r.nodeType&&r,Je=Ye&&Ye.exports===Ge,Xe=Je&&Ke.process,Ze=function(){try{var e=Ye&&Ye.require&&Ye.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(e){}}(),Qe=Ze&&Ze.isArrayBuffer,et=Ze&&Ze.isDate,tt=Ze&&Ze.isMap,nt=Ze&&Ze.isRegExp,rt=Ze&&Ze.isSet,it=Ze&&Ze.isTypedArray;function st(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(r,o,n(o),e)}return r}function at(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function ht(e,t){return!!(null==e?0:e.length)&&_t(e,t,0)>-1}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function mt(e,t,n,r){var i=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function gt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function yt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var vt=At("length");function bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function wt(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function _t(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):wt(e,xt,n)}function St(e,t,n,r){for(var i=n-1,s=e.length;++i<s;)if(r(e[i],t))return i;return-1}function xt(e){return e!=e}function Et(e,t){var n=null==e?0:e.length;return n?Ct(e,t)/n:NaN}function At(e){return function(t){return null==t?void 0:t[e]}}function Tt(e){return function(t){return null==e?void 0:e[t]}}function Mt(e,t,n,r,i){return i(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n}function Ct(e,t){for(var n,r=-1,i=e.length;++r<i;){var s=t(e[r]);void 0!==s&&(n=void 0===n?s:n+s)}return n}function Pt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function kt(e){return e?e.slice(0,Gt(e)+1).replace(G,""):e}function Ot(e){return function(t){return e(t)}}function It(e,t){return ft(t,(function(t){return e[t]}))}function Rt(e,t){return e.has(t)}function Nt(e,t){for(var n=-1,r=e.length;++n<r&&_t(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Ft(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Lt=Tt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Bt=Tt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function jt(e){return"\\"+Ve[e]}function $t(e){return Fe.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Vt(e,t){return function(n){return e(t(n))}}function Wt(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var a=e[n];a!==t&&a!==o||(e[n]=o,s[i++]=n)}return s}function zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Kt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Ht(e){return $t(e)?function(e){var t=Ne.lastIndex=0;for(;Ne.test(e);)++t;return t}(e):vt(e)}function qt(e){return $t(e)?function(e){return e.match(Ne)||[]}(e):function(e){return e.split("")}(e)}function Gt(e){for(var t=e.length;t--&&Y.test(e.charAt(t)););return t}var Yt=Tt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Jt=function e(t){var n,r=(t=null==t?qe:Jt.defaults(qe.Object(),t,Jt.pick(qe,Be))).Array,i=t.Date,Y=t.Error,de=t.Function,fe=t.Math,pe=t.Object,me=t.RegExp,ge=t.String,ye=t.TypeError,ve=r.prototype,be=de.prototype,we=pe.prototype,_e=t["__core-js_shared__"],Se=be.toString,xe=we.hasOwnProperty,Ee=0,Ae=(n=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Te=we.toString,Me=Se.call(pe),Ce=qe._,Pe=me("^"+Se.call(xe).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ke=Je?t.Buffer:void 0,Oe=t.Symbol,Ne=t.Uint8Array,Fe=ke?ke.allocUnsafe:void 0,Ve=Vt(pe.getPrototypeOf,pe),Ke=pe.create,He=we.propertyIsEnumerable,Ge=ve.splice,Ye=Oe?Oe.isConcatSpreadable:void 0,Xe=Oe?Oe.iterator:void 0,Ze=Oe?Oe.toStringTag:void 0,vt=function(){try{var e=es(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Tt=t.clearTimeout!==qe.clearTimeout&&t.clearTimeout,Xt=i&&i.now!==qe.Date.now&&i.now,Zt=t.setTimeout!==qe.setTimeout&&t.setTimeout,Qt=fe.ceil,en=fe.floor,tn=pe.getOwnPropertySymbols,nn=ke?ke.isBuffer:void 0,rn=t.isFinite,sn=ve.join,on=Vt(pe.keys,pe),an=fe.max,ln=fe.min,un=i.now,cn=t.parseInt,hn=fe.random,dn=ve.reverse,fn=es(t,"DataView"),pn=es(t,"Map"),mn=es(t,"Promise"),gn=es(t,"Set"),yn=es(t,"WeakMap"),vn=es(pe,"create"),bn=yn&&new yn,wn={},_n=Ms(fn),Sn=Ms(pn),xn=Ms(mn),En=Ms(gn),An=Ms(yn),Tn=Oe?Oe.prototype:void 0,Mn=Tn?Tn.valueOf:void 0,Cn=Tn?Tn.toString:void 0;function Pn(e){if(Ko(e)&&!No(e)&&!(e instanceof Rn)){if(e instanceof In)return e;if(xe.call(e,"__wrapped__"))return Cs(e)}return new In(e)}var kn=function(){function e(){}return function(t){if(!zo(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function On(){}function In(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Fn;++t<n;)this.add(e[t])}function Bn(e){var t=this.__data__=new Dn(e);this.size=t.size}function jn(e,t){var n=No(e),r=!n&&Ro(e),i=!n&&!r&&Bo(e),s=!n&&!r&&!i&&Qo(e),o=n||r||i||s,a=o?Pt(e.length,ge):[],l=a.length;for(var u in e)!t&&!xe.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||as(u,l))||a.push(u);return a}function $n(e){var t=e.length;return t?e[Lr(0,t-1)]:void 0}function Un(e,t){return Es(vi(e),Jn(t,0,e.length))}function Vn(e){return Es(vi(e))}function Wn(e,t,n){(void 0!==n&&!ko(e[t],n)||void 0===n&&!(t in e))&&Gn(e,t,n)}function zn(e,t,n){var r=e[t];xe.call(e,t)&&ko(r,n)&&(void 0!==n||t in e)||Gn(e,t,n)}function Kn(e,t){for(var n=e.length;n--;)if(ko(e[n][0],t))return n;return-1}function Hn(e,t,n,r){return tr(e,(function(e,i,s){t(r,e,n(e),s)})),r}function qn(e,t){return e&&bi(t,_a(t),e)}function Gn(e,t,n){"__proto__"==t&&vt?vt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Yn(e,t){for(var n=-1,i=t.length,s=r(i),o=null==e;++n<i;)s[n]=o?void 0:ga(e,t[n]);return s}function Jn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,r,i,s){var o,a=1&t,u=2&t,d=4&t;if(n&&(o=i?n(e,r,i,s):n(e)),void 0!==o)return o;if(!zo(e))return e;var S=No(e);if(S){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&xe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!a)return vi(e,o)}else{var R=rs(e),N=R==f||R==p;if(Bo(e))return di(e,a);if(R==y||R==l||N&&!i){if(o=u||N?{}:ss(e),!a)return u?function(e,t){return bi(e,ns(e),t)}(e,function(e,t){return e&&bi(t,Sa(t),e)}(o,e)):function(e,t){return bi(e,ts(e),t)}(e,qn(o,e))}else{if(!Ue[R])return i?e:{};o=function(e,t,n){var r=e.constructor;switch(t){case x:return fi(e);case c:case h:return new r(+e);case E:return function(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case T:case M:case C:case P:case k:case"[object Uint8ClampedArray]":case O:case I:return pi(e,n);case m:return new r;case g:case w:return new r(e);case v:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case _:return i=e,Mn?pe(Mn.call(i)):{}}var i}(e,R,a)}}s||(s=new Bn);var D=s.get(e);if(D)return D;s.set(e,o),Jo(e)?e.forEach((function(r){o.add(Xn(r,t,n,r,e,s))})):Ho(e)&&e.forEach((function(r,i){o.set(i,Xn(r,t,n,i,e,s))}));var F=S?void 0:(d?u?qi:Hi:u?Sa:_a)(e);return at(F||e,(function(r,i){F&&(r=e[i=r]),zn(o,i,Xn(r,t,n,i,e,s))})),o}function Zn(e,t,n){var r=n.length;if(null==e)return!r;for(e=pe(e);r--;){var i=n[r],s=t[i],o=e[i];if(void 0===o&&!(i in e)||!s(o))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new ye(s);return ws((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var i=-1,s=ht,o=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=ft(t,Ot(n))),r?(s=dt,o=!1):t.length>=200&&(s=Rt,o=!1,t=new Ln(t));e:for(;++i<a;){var c=e[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,o&&h==h){for(var d=u;d--;)if(t[d]===h)continue e;l.push(c)}else s(t,h,r)||l.push(c)}return l}Pn.templateSettings={escape:$,evaluate:U,interpolate:V,variable:"",imports:{_:Pn}},Pn.prototype=On.prototype,Pn.prototype.constructor=Pn,In.prototype=kn(On.prototype),In.prototype.constructor=In,Rn.prototype=kn(On.prototype),Rn.prototype.constructor=Rn,Nn.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},Nn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nn.prototype.get=function(e){var t=this.__data__;if(vn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return xe.call(t,e)?t[e]:void 0},Nn.prototype.has=function(e){var t=this.__data__;return vn?void 0!==t[e]:xe.call(t,e)},Nn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=vn&&void 0===t?"__lodash_hash_undefined__":t,this},Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(e){var t=this.__data__,n=Kn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,!0)},Dn.prototype.get=function(e){var t=this.__data__,n=Kn(t,e);return n<0?void 0:t[n][1]},Dn.prototype.has=function(e){return Kn(this.__data__,e)>-1},Dn.prototype.set=function(e,t){var n=this.__data__,r=Kn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Nn,map:new(pn||Dn),string:new Nn}},Fn.prototype.delete=function(e){var t=Zi(this,e).delete(e);return this.size-=t?1:0,t},Fn.prototype.get=function(e){return Zi(this,e).get(e)},Fn.prototype.has=function(e){return Zi(this,e).has(e)},Fn.prototype.set=function(e,t){var n=Zi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},Bn.prototype.clear=function(){this.__data__=new Dn,this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Bn.prototype.get=function(e){return this.__data__.get(e)},Bn.prototype.has=function(e){return this.__data__.has(e)},Bn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Dn){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(e,t),this.size=n.size,this};var tr=Si(ur),nr=Si(cr,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function ir(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],o=t(s);if(null!=o&&(void 0===a?o==o&&!Zo(o):n(o,a)))var a=o,l=s}return l}function sr(e,t){var n=[];return tr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function or(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=os),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?or(a,t-1,n,r,i):pt(i,a):r||(i[i.length]=a)}return i}var ar=xi(),lr=xi(!0);function ur(e,t){return e&&ar(e,t,_a)}function cr(e,t){return e&&lr(e,t,_a)}function hr(e,t){return ct(t,(function(t){return Uo(e[t])}))}function dr(e,t){for(var n=0,r=(t=li(t,e)).length;null!=e&&n<r;)e=e[Ts(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return No(e)?r:pt(r,n(e))}function pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ze&&Ze in pe(e)?function(e){var t=xe.call(e,Ze),n=e[Ze];try{e[Ze]=void 0;var r=!0}catch(e){}var i=Te.call(e);r&&(t?e[Ze]=n:delete e[Ze]);return i}(e):function(e){return Te.call(e)}(e)}function mr(e,t){return e>t}function gr(e,t){return null!=e&&xe.call(e,t)}function yr(e,t){return null!=e&&t in pe(e)}function vr(e,t,n){for(var i=n?dt:ht,s=e[0].length,o=e.length,a=o,l=r(o),u=1/0,c=[];a--;){var h=e[a];a&&t&&(h=ft(h,Ot(t))),u=ln(h.length,u),l[a]=!n&&(t||s>=120&&h.length>=120)?new Ln(a&&h):void 0}h=e[0];var d=-1,f=l[0];e:for(;++d<s&&c.length<u;){var p=h[d],m=t?t(p):p;if(p=n||0!==p?p:0,!(f?Rt(f,m):i(c,m,n))){for(a=o;--a;){var g=l[a];if(!(g?Rt(g,m):i(e[a],m,n)))continue e}f&&f.push(m),c.push(p)}}return c}function br(e,t,n){var r=null==(e=gs(e,t=li(t,e)))?e:e[Ts(js(t))];return null==r?void 0:st(r,e,n)}function wr(e){return Ko(e)&&pr(e)==l}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Ko(e)&&!Ko(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var o=No(e),a=No(t),f=o?u:rs(e),p=a?u:rs(t),S=(f=f==l?y:f)==y,A=(p=p==l?y:p)==y,T=f==p;if(T&&Bo(e)){if(!Bo(t))return!1;o=!0,S=!1}if(T&&!S)return s||(s=new Bn),o||Qo(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,s,o){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!s(new Ne(e),new Ne(t)));case c:case h:case g:return ko(+e,+t);case d:return e.name==t.name&&e.message==t.message;case v:case w:return e==t+"";case m:var a=Ut;case b:var l=1&r;if(a||(a=zt),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=2,o.set(e,t);var f=zi(a(e),a(t),r,i,s,o);return o.delete(e),f;case _:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,f,n,r,i,s);if(!(1&n)){var M=S&&xe.call(e,"__wrapped__"),C=A&&xe.call(t,"__wrapped__");if(M||C){var P=M?e.value():e,k=C?t.value():t;return s||(s=new Bn),i(P,k,n,r,s)}}if(!T)return!1;return s||(s=new Bn),function(e,t,n,r,i,s){var o=1&n,a=Hi(e),l=a.length,u=Hi(t).length;if(l!=u&&!o)return!1;var c=l;for(;c--;){var h=a[c];if(!(o?h in t:xe.call(t,h)))return!1}var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==e;var p=!0;s.set(e,t),s.set(t,e);var m=o;for(;++c<l;){h=a[c];var g=e[h],y=t[h];if(r)var v=o?r(y,g,h,t,e,s):r(g,y,h,e,t,s);if(!(void 0===v?g===y||i(g,y,n,r,s):v)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,i,s)}(e,t,n,r,_r,i))}function Sr(e,t,n,r){var i=n.length,s=i,o=!r;if(null==e)return!s;for(e=pe(e);i--;){var a=n[i];if(o&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){var l=(a=n[i])[0],u=e[l],c=a[1];if(o&&a[2]){if(void 0===u&&!(l in e))return!1}else{var h=new Bn;if(r)var d=r(u,c,l,e,t,h);if(!(void 0===d?_r(c,u,3,r,h):d))return!1}}return!0}function xr(e){return!(!zo(e)||(t=e,Ae&&Ae in t))&&(Uo(e)?Pe:oe).test(Ms(e));var t}function Er(e){return"function"==typeof e?e:null==e?qa:"object"==typeof e?No(e)?kr(e[0],e[1]):Pr(e):nl(e)}function Ar(e){if(!ds(e))return on(e);var t=[];for(var n in pe(e))xe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Tr(e){if(!zo(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=ds(e),n=[];for(var r in e)("constructor"!=r||!t&&xe.call(e,r))&&n.push(r);return n}function Mr(e,t){return e<t}function Cr(e,t){var n=-1,i=Fo(e)?r(e.length):[];return tr(e,(function(e,r,s){i[++n]=t(e,r,s)})),i}function Pr(e){var t=Qi(e);return 1==t.length&&t[0][2]?ps(t[0][0],t[0][1]):function(n){return n===e||Sr(n,e,t)}}function kr(e,t){return us(e)&&fs(t)?ps(Ts(e),t):function(n){var r=ga(n,e);return void 0===r&&r===t?ya(n,e):_r(t,r,3)}}function Or(e,t,n,r,i){e!==t&&ar(t,(function(s,o){if(i||(i=new Bn),zo(s))!function(e,t,n,r,i,s,o){var a=vs(e,n),l=vs(t,n),u=o.get(l);if(u)return void Wn(e,n,u);var c=s?s(a,l,n+"",e,t,o):void 0,h=void 0===c;if(h){var d=No(l),f=!d&&Bo(l),p=!d&&!f&&Qo(l);c=l,d||f||p?No(a)?c=a:Lo(a)?c=vi(a):f?(h=!1,c=di(l,!0)):p?(h=!1,c=pi(l,!0)):c=[]:Go(l)||Ro(l)?(c=a,Ro(a)?c=aa(a):zo(a)&&!Uo(a)||(c=ss(l))):h=!1}h&&(o.set(l,c),i(c,l,r,s,o),o.delete(l));Wn(e,n,c)}(e,t,o,n,Or,r,i);else{var a=r?r(vs(e,o),s,o+"",e,t,i):void 0;void 0===a&&(a=s),Wn(e,o,a)}}),Sa)}function Ir(e,t){var n=e.length;if(n)return as(t+=t<0?n:0,n)?e[t]:void 0}function Rr(e,t,n){t=t.length?ft(t,(function(e){return No(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e})):[qa];var r=-1;return t=ft(t,Ot(Xi())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Cr(e,(function(e,n,i){return{criteria:ft(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,s=t.criteria,o=i.length,a=n.length;for(;++r<o;){var l=mi(i[r],s[r]);if(l){if(r>=a)return l;var u=n[r];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Nr(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=dr(e,o);n(a,o)&&Vr(s,li(o,e),a)}return s}function Dr(e,t,n,r){var i=r?St:_t,s=-1,o=t.length,a=e;for(e===t&&(t=vi(t)),n&&(a=ft(e,Ot(n)));++s<o;)for(var l=0,u=t[s],c=n?n(u):u;(l=i(a,c,l,r))>-1;)a!==e&&Ge.call(a,l,1),Ge.call(e,l,1);return e}function Fr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==s){var s=i;as(i)?Ge.call(e,i,1):ei(e,i)}}return e}function Lr(e,t){return e+en(hn()*(t-e+1))}function Br(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function jr(e,t){return _s(ms(e,t,qa),e+"")}function $r(e){return $n(ka(e))}function Ur(e,t){var n=ka(e);return Es(n,Jn(t,0,n.length))}function Vr(e,t,n,r){if(!zo(e))return e;for(var i=-1,s=(t=li(t,e)).length,o=s-1,a=e;null!=a&&++i<s;){var l=Ts(t[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=o){var c=a[l];void 0===(u=r?r(c,l,a):void 0)&&(u=zo(c)?c:as(t[i+1])?[]:{})}zn(a,l,u),a=a[l]}return e}var Wr=bn?function(e,t){return bn.set(e,t),e}:qa,zr=vt?function(e,t){return vt(e,"toString",{configurable:!0,enumerable:!1,value:za(t),writable:!0})}:qa;function Kr(e){return Es(ka(e))}function Hr(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=r(s);++i<s;)o[i]=e[i+t];return o}function qr(e,t){var n;return tr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Gr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var s=r+i>>>1,o=e[s];null!==o&&!Zo(o)&&(n?o<=t:o<t)?r=s+1:i=s}return i}return Yr(e,t,qa,n)}function Yr(e,t,n,r){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=n(t))!=t,a=null===t,l=Zo(t),u=void 0===t;i<s;){var c=en((i+s)/2),h=n(e[c]),d=void 0!==h,f=null===h,p=h==h,m=Zo(h);if(o)var g=r||p;else g=u?p&&(r||d):a?p&&d&&(r||!f):l?p&&d&&!f&&(r||!m):!f&&!m&&(r?h<=t:h<t);g?i=c+1:s=c}return ln(s,4294967294)}function Jr(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!ko(a,l)){var l=a;s[i++]=0===o?0:o}}return s}function Xr(e){return"number"==typeof e?e:Zo(e)?NaN:+e}function Zr(e){if("string"==typeof e)return e;if(No(e))return ft(e,Zr)+"";if(Zo(e))return Cn?Cn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Qr(e,t,n){var r=-1,i=ht,s=e.length,o=!0,a=[],l=a;if(n)o=!1,i=dt;else if(s>=200){var u=t?null:Bi(e);if(u)return zt(u);o=!1,i=Rt,l=new Ln}else l=t?[]:a;e:for(;++r<s;){var c=e[r],h=t?t(c):c;if(c=n||0!==c?c:0,o&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),a.push(c)}else i(l,h,n)||(l!==a&&l.push(h),a.push(c))}return a}function ei(e,t){return null==(e=gs(e,t=li(t,e)))||delete e[Ts(js(t))]}function ti(e,t,n,r){return Vr(e,t,n(dr(e,t)),r)}function ni(e,t,n,r){for(var i=e.length,s=r?i:-1;(r?s--:++s<i)&&t(e[s],s,e););return n?Hr(e,r?0:s,r?s+1:i):Hr(e,r?s+1:0,r?i:s)}function ri(e,t){var n=e;return n instanceof Rn&&(n=n.value()),mt(t,(function(e,t){return t.func.apply(t.thisArg,pt([e],t.args))}),n)}function ii(e,t,n){var i=e.length;if(i<2)return i?Qr(e[0]):[];for(var s=-1,o=r(i);++s<i;)for(var a=e[s],l=-1;++l<i;)l!=s&&(o[s]=er(o[s]||a,e[l],t,n));return Qr(or(o,1),t,n)}function si(e,t,n){for(var r=-1,i=e.length,s=t.length,o={};++r<i;){var a=r<s?t[r]:void 0;n(o,e[r],a)}return o}function oi(e){return Lo(e)?e:[]}function ai(e){return"function"==typeof e?e:qa}function li(e,t){return No(e)?e:us(e,t)?[e]:As(la(e))}var ui=jr;function ci(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var hi=Tt||function(e){return qe.clearTimeout(e)};function di(e,t){if(t)return e.slice();var n=e.length,r=Fe?Fe(n):new e.constructor(n);return e.copy(r),r}function fi(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function pi(e,t){var n=t?fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,s=Zo(e),o=void 0!==t,a=null===t,l=t==t,u=Zo(t);if(!a&&!u&&!s&&e>t||s&&o&&l&&!a&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!s&&!u&&e<t||u&&n&&i&&!r&&!s||a&&n&&i||!o&&i||!l)return-1}return 0}function gi(e,t,n,i){for(var s=-1,o=e.length,a=n.length,l=-1,u=t.length,c=an(o-a,0),h=r(u+c),d=!i;++l<u;)h[l]=t[l];for(;++s<a;)(d||s<o)&&(h[n[s]]=e[s]);for(;c--;)h[l++]=e[s++];return h}function yi(e,t,n,i){for(var s=-1,o=e.length,a=-1,l=n.length,u=-1,c=t.length,h=an(o-l,0),d=r(h+c),f=!i;++s<h;)d[s]=e[s];for(var p=s;++u<c;)d[p+u]=t[u];for(;++a<l;)(f||s<o)&&(d[p+n[a]]=e[s++]);return d}function vi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function bi(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Gn(n,a,l):zn(n,a,l)}return n}function wi(e,t){return function(n,r){var i=No(n)?ot:Hn,s=t?t():{};return i(n,e,Xi(r,2),s)}}function _i(e){return jr((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,o&&ls(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=pe(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t}))}function Si(e,t){return function(n,r){if(null==n)return n;if(!Fo(n))return e(n,r);for(var i=n.length,s=t?i:-1,o=pe(n);(t?s--:++s<i)&&!1!==r(o[s],s,o););return n}}function xi(e){return function(t,n,r){for(var i=-1,s=pe(t),o=r(t),a=o.length;a--;){var l=o[e?a:++i];if(!1===n(s[l],l,s))break}return t}}function Ei(e){return function(t){var n=$t(t=la(t))?qt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ci(n,1).join(""):t.slice(1);return r[e]()+i}}function Ai(e){return function(t){return mt(Ua(Ra(t).replace(Ie,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=kn(e.prototype),r=e.apply(n,t);return zo(r)?r:n}}function Mi(e){return function(t,n,r){var i=pe(t);if(!Fo(t)){var s=Xi(n,3);t=_a(t),n=function(e){return s(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[s?t[o]:o]:void 0}}function Ci(e){return Ki((function(t){var n=t.length,r=n,i=In.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ye(s);if(i&&!a&&"wrapper"==Yi(o))var a=new In([],!0)}for(r=a?r:n;++r<n;){var l=Yi(o=t[r]),u="wrapper"==l?Gi(o):void 0;a=u&&cs(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?a[Yi(u[0])].apply(a,u[3]):1==o.length&&cs(o)?a[l]():a.thru(o)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&No(r))return a.plant(r).value();for(var i=0,s=n?t[i].apply(this,e):r;++i<n;)s=t[i].call(this,s);return s}}))}function Pi(e,t,n,i,s,o,a,l,u,c){var h=128&t,d=1&t,f=2&t,p=24&t,m=512&t,g=f?void 0:Ti(e);return function y(){for(var v=arguments.length,b=r(v),w=v;w--;)b[w]=arguments[w];if(p)var _=Ji(y),S=Ft(b,_);if(i&&(b=gi(b,i,s,p)),o&&(b=yi(b,o,a,p)),v-=S,p&&v<c){var x=Wt(b,_);return Fi(e,t,Pi,y.placeholder,n,b,x,l,u,c-v)}var E=d?n:this,A=f?E[e]:e;return v=b.length,l?b=ys(b,l):m&&v>1&&b.reverse(),h&&u<v&&(b.length=u),this&&this!==qe&&this instanceof y&&(A=g||Ti(A)),A.apply(E,b)}}function ki(e,t){return function(n,r){return function(e,t,n,r){return ur(e,(function(e,i,s){t(r,n(e),i,s)})),r}(n,e,t(r),{})}}function Oi(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Zr(n),r=Zr(r)):(n=Xr(n),r=Xr(r)),i=e(n,r)}return i}}function Ii(e){return Ki((function(t){return t=ft(t,Ot(Xi())),jr((function(n){var r=this;return e(t,(function(e){return st(e,r,n)}))}))}))}function Ri(e,t){var n=(t=void 0===t?" ":Zr(t)).length;if(n<2)return n?Br(t,e):t;var r=Br(t,Qt(e/Ht(t)));return $t(t)?ci(qt(r),0,e).join(""):r.slice(0,e)}function Ni(e){return function(t,n,i){return i&&"number"!=typeof i&&ls(t,n,i)&&(n=i=void 0),t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n,i){for(var s=-1,o=an(Qt((t-e)/(n||1)),0),a=r(o);o--;)a[i?o:++s]=e,e+=n;return a}(t,n,i=void 0===i?t<n?1:-1:ra(i),e)}}function Di(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=oa(t),n=oa(n)),e(t,n)}}function Fi(e,t,n,r,i,s,o,a,l,u){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var h=[e,t,i,c?s:void 0,c?o:void 0,c?void 0:s,c?void 0:o,a,l,u],d=n.apply(void 0,h);return cs(e)&&bs(d,h),d.placeholder=r,Ss(d,e,t)}function Li(e){var t=fe[e];return function(e,n){if(e=oa(e),(n=null==n?0:ln(ia(n),292))&&rn(e)){var r=(la(e)+"e").split("e");return+((r=(la(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Bi=gn&&1/zt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Za;function ji(e){return function(t){var n=rs(t);return n==m?Ut(t):n==b?Kt(t):function(e,t){return ft(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function $i(e,t,n,i,a,l,u,c){var h=2&t;if(!h&&"function"!=typeof e)throw new ye(s);var d=i?i.length:0;if(d||(t&=-97,i=a=void 0),u=void 0===u?u:an(ia(u),0),c=void 0===c?c:ia(c),d-=a?a.length:0,64&t){var f=i,p=a;i=a=void 0}var m=h?void 0:Gi(e),g=[e,t,n,i,a,f,p,l,u,c];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,s=i<131,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!s&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?gi(u,l,t[4]):l,e[4]=u?Wt(e[3],o):t[4]}(l=t[5])&&(u=e[5],e[5]=u?yi(u,l,t[6]):l,e[6]=u?Wt(e[5],o):t[6]);(l=t[7])&&(e[7]=l);128&r&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(g,m),e=g[0],t=g[1],n=g[2],i=g[3],a=g[4],!(c=g[9]=void 0===g[9]?h?0:e.length:an(g[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||16==t?function(e,t,n){var i=Ti(e);return function s(){for(var o=arguments.length,a=r(o),l=o,u=Ji(s);l--;)a[l]=arguments[l];var c=o<3&&a[0]!==u&&a[o-1]!==u?[]:Wt(a,u);if((o-=c.length)<n)return Fi(e,t,Pi,s.placeholder,void 0,a,c,void 0,void 0,n-o);var h=this&&this!==qe&&this instanceof s?i:e;return st(h,this,a)}}(e,t,c):32!=t&&33!=t||a.length?Pi.apply(void 0,g):function(e,t,n,i){var s=1&t,o=Ti(e);return function t(){for(var a=-1,l=arguments.length,u=-1,c=i.length,h=r(c+l),d=this&&this!==qe&&this instanceof t?o:e;++u<c;)h[u]=i[u];for(;l--;)h[u++]=arguments[++a];return st(d,s?n:this,h)}}(e,t,n,i);else var y=function(e,t,n){var r=1&t,i=Ti(e);return function t(){var s=this&&this!==qe&&this instanceof t?i:e;return s.apply(r?n:this,arguments)}}(e,t,n);return Ss((m?Wr:bs)(y,g),e,t)}function Ui(e,t,n,r){return void 0===e||ko(e,we[n])&&!xe.call(r,n)?t:e}function Vi(e,t,n,r,i,s){return zo(e)&&zo(t)&&(s.set(t,e),Or(e,t,void 0,Vi,s),s.delete(t)),e}function Wi(e){return Go(e)?void 0:e}function zi(e,t,n,r,i,s){var o=1&n,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=2&n?new Ln:void 0;for(s.set(e,t),s.set(t,e);++h<a;){var p=e[h],m=t[h];if(r)var g=o?r(m,p,h,t,e,s):r(p,m,h,e,t,s);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!yt(t,(function(e,t){if(!Rt(f,t)&&(p===e||i(p,e,n,r,s)))return f.push(t)}))){d=!1;break}}else if(p!==m&&!i(p,m,n,r,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Ki(e){return _s(ms(e,void 0,Ns),e+"")}function Hi(e){return fr(e,_a,ts)}function qi(e){return fr(e,Sa,ns)}var Gi=bn?function(e){return bn.get(e)}:Za;function Yi(e){for(var t=e.name+"",n=wn[t],r=xe.call(wn,t)?n.length:0;r--;){var i=n[r],s=i.func;if(null==s||s==e)return i.name}return t}function Ji(e){return(xe.call(Pn,"placeholder")?Pn:e).placeholder}function Xi(){var e=Pn.iteratee||Ga;return e=e===Ga?Er:e,arguments.length?e(arguments[0],arguments[1]):e}function Zi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Qi(e){for(var t=_a(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fs(i)]}return t}function es(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return xr(n)?n:void 0}var ts=tn?function(e){return null==e?[]:(e=pe(e),ct(tn(e),(function(t){return He.call(e,t)})))}:sl,ns=tn?function(e){for(var t=[];e;)pt(t,ts(e)),e=Ve(e);return t}:sl,rs=pr;function is(e,t,n){for(var r=-1,i=(t=li(t,e)).length,s=!1;++r<i;){var o=Ts(t[r]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++r!=i?s:!!(i=null==e?0:e.length)&&Wo(i)&&as(o,i)&&(No(e)||Ro(e))}function ss(e){return"function"!=typeof e.constructor||ds(e)?{}:kn(Ve(e))}function os(e){return No(e)||Ro(e)||!!(Ye&&e&&e[Ye])}function as(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function ls(e,t,n){if(!zo(n))return!1;var r=typeof t;return!!("number"==r?Fo(n)&&as(t,n.length):"string"==r&&t in n)&&ko(n[t],e)}function us(e,t){if(No(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Zo(e))||(z.test(e)||!W.test(e)||null!=t&&e in pe(t))}function cs(e){var t=Yi(e),n=Pn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=Gi(n);return!!r&&e===r[0]}(fn&&rs(new fn(new ArrayBuffer(1)))!=E||pn&&rs(new pn)!=m||mn&&"[object Promise]"!=rs(mn.resolve())||gn&&rs(new gn)!=b||yn&&rs(new yn)!=S)&&(rs=function(e){var t=pr(e),n=t==y?e.constructor:void 0,r=n?Ms(n):"";if(r)switch(r){case _n:return E;case Sn:return m;case xn:return"[object Promise]";case En:return b;case An:return S}return t});var hs=_e?Uo:ol;function ds(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||we)}function fs(e){return e==e&&!zo(e)}function ps(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in pe(n)))}}function ms(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=an(i.length-t,0),a=r(o);++s<o;)a[s]=i[t+s];s=-1;for(var l=r(t+1);++s<t;)l[s]=i[s];return l[t]=n(a),st(e,this,l)}}function gs(e,t){return t.length<2?e:dr(e,Hr(t,0,-1))}function ys(e,t){for(var n=e.length,r=ln(t.length,n),i=vi(e);r--;){var s=t[r];e[r]=as(s,n)?i[s]:void 0}return e}function vs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bs=xs(Wr),ws=Zt||function(e,t){return qe.setTimeout(e,t)},_s=xs(zr);function Ss(e,t,n){var r=t+"";return _s(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return at(a,(function(n){var r="_."+n[0];t&n[1]&&!ht(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(r),n)))}function xs(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Es(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var s=Lr(n,i),o=e[s];e[s]=e[n],e[n]=o}return e.length=t,e}var As=function(e){var t=Eo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(K,(function(e,n,r,i){t.push(r?i.replace(te,"$1"):n||e)})),t}));function Ts(e){if("string"==typeof e||Zo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ms(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Cs(e){if(e instanceof Rn)return e.clone();var t=new In(e.__wrapped__,e.__chain__);return t.__actions__=vi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ps=jr((function(e,t){return Lo(e)?er(e,or(t,1,Lo,!0)):[]})),ks=jr((function(e,t){var n=js(t);return Lo(n)&&(n=void 0),Lo(e)?er(e,or(t,1,Lo,!0),Xi(n,2)):[]})),Os=jr((function(e,t){var n=js(t);return Lo(n)&&(n=void 0),Lo(e)?er(e,or(t,1,Lo,!0),void 0,n):[]}));function Is(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),wt(e,Xi(t,3),i)}function Rs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ia(n),i=n<0?an(r+i,0):ln(i,r-1)),wt(e,Xi(t,3),i,!0)}function Ns(e){return(null==e?0:e.length)?or(e,1):[]}function Ds(e){return e&&e.length?e[0]:void 0}var Fs=jr((function(e){var t=ft(e,oi);return t.length&&t[0]===e[0]?vr(t):[]})),Ls=jr((function(e){var t=js(e),n=ft(e,oi);return t===js(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?vr(n,Xi(t,2)):[]})),Bs=jr((function(e){var t=js(e),n=ft(e,oi);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?vr(n,void 0,t):[]}));function js(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var $s=jr(Us);function Us(e,t){return e&&e.length&&t&&t.length?Dr(e,t):e}var Vs=Ki((function(e,t){var n=null==e?0:e.length,r=Yn(e,t);return Fr(e,ft(t,(function(e){return as(e,n)?+e:e})).sort(mi)),r}));function Ws(e){return null==e?e:dn.call(e)}var zs=jr((function(e){return Qr(or(e,1,Lo,!0))})),Ks=jr((function(e){var t=js(e);return Lo(t)&&(t=void 0),Qr(or(e,1,Lo,!0),Xi(t,2))})),Hs=jr((function(e){var t=js(e);return t="function"==typeof t?t:void 0,Qr(or(e,1,Lo,!0),void 0,t)}));function qs(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Lo(e))return t=an(e.length,t),!0})),Pt(t,(function(t){return ft(e,At(t))}))}function Gs(e,t){if(!e||!e.length)return[];var n=qs(e);return null==t?n:ft(n,(function(e){return st(t,void 0,e)}))}var Ys=jr((function(e,t){return Lo(e)?er(e,t):[]})),Js=jr((function(e){return ii(ct(e,Lo))})),Xs=jr((function(e){var t=js(e);return Lo(t)&&(t=void 0),ii(ct(e,Lo),Xi(t,2))})),Zs=jr((function(e){var t=js(e);return t="function"==typeof t?t:void 0,ii(ct(e,Lo),void 0,t)})),Qs=jr(qs);var eo=jr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Gs(e,n)}));function to(e){var t=Pn(e);return t.__chain__=!0,t}function no(e,t){return t(e)}var ro=Ki((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Yn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&as(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:no,args:[i],thisArg:void 0}),new In(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var io=wi((function(e,t,n){xe.call(e,n)?++e[n]:Gn(e,n,1)}));var so=Mi(Is),oo=Mi(Rs);function ao(e,t){return(No(e)?at:tr)(e,Xi(t,3))}function lo(e,t){return(No(e)?lt:nr)(e,Xi(t,3))}var uo=wi((function(e,t,n){xe.call(e,n)?e[n].push(t):Gn(e,n,[t])}));var co=jr((function(e,t,n){var i=-1,s="function"==typeof t,o=Fo(e)?r(e.length):[];return tr(e,(function(e){o[++i]=s?st(t,e,n):br(e,t,n)})),o})),ho=wi((function(e,t,n){Gn(e,n,t)}));function fo(e,t){return(No(e)?ft:Cr)(e,Xi(t,3))}var po=wi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var mo=jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ls(e,t[0],t[1])?t=[]:n>2&&ls(t[0],t[1],t[2])&&(t=[t[0]]),Rr(e,or(t,1),[])})),go=Xt||function(){return qe.Date.now()};function yo(e,t,n){return t=n?void 0:t,$i(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function vo(e,t){var n;if("function"!=typeof t)throw new ye(s);return e=ia(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var bo=jr((function(e,t,n){var r=1;if(n.length){var i=Wt(n,Ji(bo));r|=32}return $i(e,r,t,n,i)})),wo=jr((function(e,t,n){var r=3;if(n.length){var i=Wt(n,Ji(wo));r|=32}return $i(t,r,e,n,i)}));function _o(e,t,n){var r,i,o,a,l,u,c=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new ye(s);function p(t){var n=r,s=i;return r=i=void 0,c=t,a=e.apply(s,n)}function m(e){return c=e,l=ws(y,t),h?p(e):a}function g(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-c>=o}function y(){var e=go();if(g(e))return v(e);l=ws(y,function(e){var n=t-(e-u);return d?ln(n,o-(e-c)):n}(e))}function v(e){return l=void 0,f&&r?p(e):(r=i=void 0,a)}function b(){var e=go(),n=g(e);if(r=arguments,i=this,u=e,n){if(void 0===l)return m(u);if(d)return hi(l),l=ws(y,t),p(u)}return void 0===l&&(l=ws(y,t)),a}return t=oa(t)||0,zo(n)&&(h=!!n.leading,o=(d="maxWait"in n)?an(oa(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==l&&hi(l),c=0,r=u=i=l=void 0},b.flush=function(){return void 0===l?a:v(go())},b}var So=jr((function(e,t){return Qn(e,1,t)})),xo=jr((function(e,t,n){return Qn(e,oa(t)||0,n)}));function Eo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ye(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Eo.Cache||Fn),n}function Ao(e){if("function"!=typeof e)throw new ye(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Eo.Cache=Fn;var To=ui((function(e,t){var n=(t=1==t.length&&No(t[0])?ft(t[0],Ot(Xi())):ft(or(t,1),Ot(Xi()))).length;return jr((function(r){for(var i=-1,s=ln(r.length,n);++i<s;)r[i]=t[i].call(this,r[i]);return st(e,this,r)}))})),Mo=jr((function(e,t){return $i(e,32,void 0,t,Wt(t,Ji(Mo)))})),Co=jr((function(e,t){return $i(e,64,void 0,t,Wt(t,Ji(Co)))})),Po=Ki((function(e,t){return $i(e,256,void 0,void 0,void 0,t)}));function ko(e,t){return e===t||e!=e&&t!=t}var Oo=Di(mr),Io=Di((function(e,t){return e>=t})),Ro=wr(function(){return arguments}())?wr:function(e){return Ko(e)&&xe.call(e,"callee")&&!He.call(e,"callee")},No=r.isArray,Do=Qe?Ot(Qe):function(e){return Ko(e)&&pr(e)==x};function Fo(e){return null!=e&&Wo(e.length)&&!Uo(e)}function Lo(e){return Ko(e)&&Fo(e)}var Bo=nn||ol,jo=et?Ot(et):function(e){return Ko(e)&&pr(e)==h};function $o(e){if(!Ko(e))return!1;var t=pr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Go(e)}function Uo(e){if(!zo(e))return!1;var t=pr(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Vo(e){return"number"==typeof e&&e==ia(e)}function Wo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function zo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ko(e){return null!=e&&"object"==typeof e}var Ho=tt?Ot(tt):function(e){return Ko(e)&&rs(e)==m};function qo(e){return"number"==typeof e||Ko(e)&&pr(e)==g}function Go(e){if(!Ko(e)||pr(e)!=y)return!1;var t=Ve(e);if(null===t)return!0;var n=xe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==Me}var Yo=nt?Ot(nt):function(e){return Ko(e)&&pr(e)==v};var Jo=rt?Ot(rt):function(e){return Ko(e)&&rs(e)==b};function Xo(e){return"string"==typeof e||!No(e)&&Ko(e)&&pr(e)==w}function Zo(e){return"symbol"==typeof e||Ko(e)&&pr(e)==_}var Qo=it?Ot(it):function(e){return Ko(e)&&Wo(e.length)&&!!$e[pr(e)]};var ea=Di(Mr),ta=Di((function(e,t){return e<=t}));function na(e){if(!e)return[];if(Fo(e))return Xo(e)?qt(e):vi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=rs(e);return(t==m?Ut:t==b?zt:ka)(e)}function ra(e){return e?(e=oa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ia(e){var t=ra(e),n=t%1;return t==t?n?t-n:t:0}function sa(e){return e?Jn(ia(e),0,4294967295):0}function oa(e){if("number"==typeof e)return e;if(Zo(e))return NaN;if(zo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=kt(e);var n=se.test(e);return n||ae.test(e)?ze(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function aa(e){return bi(e,Sa(e))}function la(e){return null==e?"":Zr(e)}var ua=_i((function(e,t){if(ds(t)||Fo(t))bi(t,_a(t),e);else for(var n in t)xe.call(t,n)&&zn(e,n,t[n])})),ca=_i((function(e,t){bi(t,Sa(t),e)})),ha=_i((function(e,t,n,r){bi(t,Sa(t),e,r)})),da=_i((function(e,t,n,r){bi(t,_a(t),e,r)})),fa=Ki(Yn);var pa=jr((function(e,t){e=pe(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ls(t[0],t[1],i)&&(r=1);++n<r;)for(var s=t[n],o=Sa(s),a=-1,l=o.length;++a<l;){var u=o[a],c=e[u];(void 0===c||ko(c,we[u])&&!xe.call(e,u))&&(e[u]=s[u])}return e})),ma=jr((function(e){return e.push(void 0,Vi),st(Ea,void 0,e)}));function ga(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function ya(e,t){return null!=e&&is(e,t,yr)}var va=ki((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),e[t]=n}),za(qa)),ba=ki((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),xe.call(e,t)?e[t].push(n):e[t]=[n]}),Xi),wa=jr(br);function _a(e){return Fo(e)?jn(e):Ar(e)}function Sa(e){return Fo(e)?jn(e,!0):Tr(e)}var xa=_i((function(e,t,n){Or(e,t,n)})),Ea=_i((function(e,t,n,r){Or(e,t,n,r)})),Aa=Ki((function(e,t){var n={};if(null==e)return n;var r=!1;t=ft(t,(function(t){return t=li(t,e),r||(r=t.length>1),t})),bi(e,qi(e),n),r&&(n=Xn(n,7,Wi));for(var i=t.length;i--;)ei(n,t[i]);return n}));var Ta=Ki((function(e,t){return null==e?{}:function(e,t){return Nr(e,t,(function(t,n){return ya(e,n)}))}(e,t)}));function Ma(e,t){if(null==e)return{};var n=ft(qi(e),(function(e){return[e]}));return t=Xi(t),Nr(e,n,(function(e,n){return t(e,n[0])}))}var Ca=ji(_a),Pa=ji(Sa);function ka(e){return null==e?[]:It(e,_a(e))}var Oa=Ai((function(e,t,n){return t=t.toLowerCase(),e+(n?Ia(t):t)}));function Ia(e){return $a(la(e).toLowerCase())}function Ra(e){return(e=la(e))&&e.replace(ue,Lt).replace(Re,"")}var Na=Ai((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Da=Ai((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Fa=Ei("toLowerCase");var La=Ai((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ba=Ai((function(e,t,n){return e+(n?" ":"")+$a(t)}));var ja=Ai((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),$a=Ei("toUpperCase");function Ua(e,t,n){return e=la(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var Va=jr((function(e,t){try{return st(e,void 0,t)}catch(e){return $o(e)?e:new Y(e)}})),Wa=Ki((function(e,t){return at(t,(function(t){t=Ts(t),Gn(e,t,bo(e[t],e))})),e}));function za(e){return function(){return e}}var Ka=Ci(),Ha=Ci(!0);function qa(e){return e}function Ga(e){return Er("function"==typeof e?e:Xn(e,1))}var Ya=jr((function(e,t){return function(n){return br(n,e,t)}})),Ja=jr((function(e,t){return function(n){return br(e,n,t)}}));function Xa(e,t,n){var r=_a(t),i=hr(t,r);null!=n||zo(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=hr(t,_a(t)));var s=!(zo(n)&&"chain"in n&&!n.chain),o=Uo(e);return at(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),i=n.__actions__=vi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Za(){}var Qa=Ii(ft),el=Ii(ut),tl=Ii(yt);function nl(e){return us(e)?At(Ts(e)):function(e){return function(t){return dr(t,e)}}(e)}var rl=Ni(),il=Ni(!0);function sl(){return[]}function ol(){return!1}var al=Oi((function(e,t){return e+t}),0),ll=Li("ceil"),ul=Oi((function(e,t){return e/t}),1),cl=Li("floor");var hl,dl=Oi((function(e,t){return e*t}),1),fl=Li("round"),pl=Oi((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new ye(s);return e=ia(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=yo,Pn.assign=ua,Pn.assignIn=ca,Pn.assignInWith=ha,Pn.assignWith=da,Pn.at=fa,Pn.before=vo,Pn.bind=bo,Pn.bindAll=Wa,Pn.bindKey=wo,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return No(e)?e:[e]},Pn.chain=to,Pn.chunk=function(e,t,n){t=(n?ls(e,t,n):void 0===t)?1:an(ia(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,a=r(Qt(i/t));s<i;)a[o++]=Hr(e,s,s+=t);return a},Pn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var s=e[t];s&&(i[r++]=s)}return i},Pn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pt(No(n)?vi(n):[n],or(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=Xi();return e=t?ft(e,(function(e){if("function"!=typeof e[1])throw new ye(s);return[n(e[0]),e[1]]})):[],jr((function(n){for(var r=-1;++r<t;){var i=e[r];if(st(i[0],this,n))return st(i[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=_a(e);return function(n){return Zn(n,e,t)}}(Xn(e,1))},Pn.constant=za,Pn.countBy=io,Pn.create=function(e,t){var n=kn(e);return null==t?n:qn(n,t)},Pn.curry=function e(t,n,r){var i=$i(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Pn.curryRight=function e(t,n,r){var i=$i(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Pn.debounce=_o,Pn.defaults=pa,Pn.defaultsDeep=ma,Pn.defer=So,Pn.delay=xo,Pn.difference=Ps,Pn.differenceBy=ks,Pn.differenceWith=Os,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:ia(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!0):[]},Pn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ls(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ia(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=n>r?0:sa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Pn.filter=function(e,t){return(No(e)?ct:sr)(e,Xi(t,3))},Pn.flatMap=function(e,t){return or(fo(e,t),1)},Pn.flatMapDeep=function(e,t){return or(fo(e,t),1/0)},Pn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ia(n),or(fo(e,t),n)},Pn.flatten=Ns,Pn.flattenDeep=function(e){return(null==e?0:e.length)?or(e,1/0):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?or(e,t=void 0===t?1:ia(t)):[]},Pn.flip=function(e){return $i(e,512)},Pn.flow=Ka,Pn.flowRight=Ha,Pn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Pn.functions=function(e){return null==e?[]:hr(e,_a(e))},Pn.functionsIn=function(e){return null==e?[]:hr(e,Sa(e))},Pn.groupBy=uo,Pn.initial=function(e){return(null==e?0:e.length)?Hr(e,0,-1):[]},Pn.intersection=Fs,Pn.intersectionBy=Ls,Pn.intersectionWith=Bs,Pn.invert=va,Pn.invertBy=ba,Pn.invokeMap=co,Pn.iteratee=Ga,Pn.keyBy=ho,Pn.keys=_a,Pn.keysIn=Sa,Pn.map=fo,Pn.mapKeys=function(e,t){var n={};return t=Xi(t,3),ur(e,(function(e,r,i){Gn(n,t(e,r,i),e)})),n},Pn.mapValues=function(e,t){var n={};return t=Xi(t,3),ur(e,(function(e,r,i){Gn(n,r,t(e,r,i))})),n},Pn.matches=function(e){return Pr(Xn(e,1))},Pn.matchesProperty=function(e,t){return kr(e,Xn(t,1))},Pn.memoize=Eo,Pn.merge=xa,Pn.mergeWith=Ea,Pn.method=Ya,Pn.methodOf=Ja,Pn.mixin=Xa,Pn.negate=Ao,Pn.nthArg=function(e){return e=ia(e),jr((function(t){return Ir(t,e)}))},Pn.omit=Aa,Pn.omitBy=function(e,t){return Ma(e,Ao(Xi(t)))},Pn.once=function(e){return vo(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(No(t)||(t=null==t?[]:[t]),No(n=r?void 0:n)||(n=null==n?[]:[n]),Rr(e,t,n))},Pn.over=Qa,Pn.overArgs=To,Pn.overEvery=el,Pn.overSome=tl,Pn.partial=Mo,Pn.partialRight=Co,Pn.partition=po,Pn.pick=Ta,Pn.pickBy=Ma,Pn.property=nl,Pn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Pn.pull=$s,Pn.pullAll=Us,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Dr(e,t,Xi(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Dr(e,t,void 0,n):e},Pn.pullAt=Vs,Pn.range=rl,Pn.rangeRight=il,Pn.rearg=Po,Pn.reject=function(e,t){return(No(e)?ct:sr)(e,Ao(Xi(t,3)))},Pn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],s=e.length;for(t=Xi(t,3);++r<s;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Fr(e,i),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new ye(s);return jr(e,t=void 0===t?t:ia(t))},Pn.reverse=Ws,Pn.sampleSize=function(e,t,n){return t=(n?ls(e,t,n):void 0===t)?1:ia(t),(No(e)?Un:Ur)(e,t)},Pn.set=function(e,t,n){return null==e?e:Vr(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Vr(e,t,n,r)},Pn.shuffle=function(e){return(No(e)?Vn:Kr)(e)},Pn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ls(e,t,n)?(t=0,n=r):(t=null==t?0:ia(t),n=void 0===n?r:ia(n)),Hr(e,t,n)):[]},Pn.sortBy=mo,Pn.sortedUniq=function(e){return e&&e.length?Jr(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?Jr(e,Xi(t,2)):[]},Pn.split=function(e,t,n){return n&&"number"!=typeof n&&ls(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=la(e))&&("string"==typeof t||null!=t&&!Yo(t))&&!(t=Zr(t))&&$t(e)?ci(qt(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new ye(s);return t=null==t?0:an(ia(t),0),jr((function(n){var r=n[t],i=ci(n,0,t);return r&&pt(i,r),st(e,this,i)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:ia(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?ni(e,Xi(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ye(s);return zo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_o(e,t,{leading:r,maxWait:t,trailing:i})},Pn.thru=no,Pn.toArray=na,Pn.toPairs=Ca,Pn.toPairsIn=Pa,Pn.toPath=function(e){return No(e)?ft(e,Ts):Zo(e)?[e]:vi(As(la(e)))},Pn.toPlainObject=aa,Pn.transform=function(e,t,n){var r=No(e),i=r||Bo(e)||Qo(e);if(t=Xi(t,4),null==n){var s=e&&e.constructor;n=i?r?new s:[]:zo(e)&&Uo(s)?kn(Ve(e)):{}}return(i?at:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},Pn.unary=function(e){return yo(e,1)},Pn.union=zs,Pn.unionBy=Ks,Pn.unionWith=Hs,Pn.uniq=function(e){return e&&e.length?Qr(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?Qr(e,Xi(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qr(e,void 0,t):[]},Pn.unset=function(e,t){return null==e||ei(e,t)},Pn.unzip=qs,Pn.unzipWith=Gs,Pn.update=function(e,t,n){return null==e?e:ti(e,t,ai(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ti(e,t,ai(n),r)},Pn.values=ka,Pn.valuesIn=function(e){return null==e?[]:It(e,Sa(e))},Pn.without=Ys,Pn.words=Ua,Pn.wrap=function(e,t){return Mo(ai(t),e)},Pn.xor=Js,Pn.xorBy=Xs,Pn.xorWith=Zs,Pn.zip=Qs,Pn.zipObject=function(e,t){return si(e||[],t||[],zn)},Pn.zipObjectDeep=function(e,t){return si(e||[],t||[],Vr)},Pn.zipWith=eo,Pn.entries=Ca,Pn.entriesIn=Pa,Pn.extend=ca,Pn.extendWith=ha,Xa(Pn,Pn),Pn.add=al,Pn.attempt=Va,Pn.camelCase=Oa,Pn.capitalize=Ia,Pn.ceil=ll,Pn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==t&&(t=(t=oa(t))==t?t:0),Jn(oa(e),t,n)},Pn.clone=function(e){return Xn(e,4)},Pn.cloneDeep=function(e){return Xn(e,5)},Pn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Pn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Pn.conformsTo=function(e,t){return null==t||Zn(e,t,_a(t))},Pn.deburr=Ra,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=ul,Pn.endsWith=function(e,t,n){e=la(e),t=Zr(t);var r=e.length,i=n=void 0===n?r:Jn(ia(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Pn.eq=ko,Pn.escape=function(e){return(e=la(e))&&j.test(e)?e.replace(L,Bt):e},Pn.escapeRegExp=function(e){return(e=la(e))&&q.test(e)?e.replace(H,"\\$&"):e},Pn.every=function(e,t,n){var r=No(e)?ut:rr;return n&&ls(e,t,n)&&(t=void 0),r(e,Xi(t,3))},Pn.find=so,Pn.findIndex=Is,Pn.findKey=function(e,t){return bt(e,Xi(t,3),ur)},Pn.findLast=oo,Pn.findLastIndex=Rs,Pn.findLastKey=function(e,t){return bt(e,Xi(t,3),cr)},Pn.floor=cl,Pn.forEach=ao,Pn.forEachRight=lo,Pn.forIn=function(e,t){return null==e?e:ar(e,Xi(t,3),Sa)},Pn.forInRight=function(e,t){return null==e?e:lr(e,Xi(t,3),Sa)},Pn.forOwn=function(e,t){return e&&ur(e,Xi(t,3))},Pn.forOwnRight=function(e,t){return e&&cr(e,Xi(t,3))},Pn.get=ga,Pn.gt=Oo,Pn.gte=Io,Pn.has=function(e,t){return null!=e&&is(e,t,gr)},Pn.hasIn=ya,Pn.head=Ds,Pn.identity=qa,Pn.includes=function(e,t,n,r){e=Fo(e)?e:ka(e),n=n&&!r?ia(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Xo(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),_t(e,t,i)},Pn.inRange=function(e,t,n){return t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n){return e>=ln(t,n)&&e<an(t,n)}(e=oa(e),t,n)},Pn.invoke=wa,Pn.isArguments=Ro,Pn.isArray=No,Pn.isArrayBuffer=Do,Pn.isArrayLike=Fo,Pn.isArrayLikeObject=Lo,Pn.isBoolean=function(e){return!0===e||!1===e||Ko(e)&&pr(e)==c},Pn.isBuffer=Bo,Pn.isDate=jo,Pn.isElement=function(e){return Ko(e)&&1===e.nodeType&&!Go(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(Fo(e)&&(No(e)||"string"==typeof e||"function"==typeof e.splice||Bo(e)||Qo(e)||Ro(e)))return!e.length;var t=rs(e);if(t==m||t==b)return!e.size;if(ds(e))return!Ar(e).length;for(var n in e)if(xe.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return _r(e,t)},Pn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},Pn.isError=$o,Pn.isFinite=function(e){return"number"==typeof e&&rn(e)},Pn.isFunction=Uo,Pn.isInteger=Vo,Pn.isLength=Wo,Pn.isMap=Ho,Pn.isMatch=function(e,t){return e===t||Sr(e,t,Qi(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sr(e,t,Qi(t),n)},Pn.isNaN=function(e){return qo(e)&&e!=+e},Pn.isNative=function(e){if(hs(e))throw new Y("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=qo,Pn.isObject=zo,Pn.isObjectLike=Ko,Pn.isPlainObject=Go,Pn.isRegExp=Yo,Pn.isSafeInteger=function(e){return Vo(e)&&e>=-9007199254740991&&e<=9007199254740991},Pn.isSet=Jo,Pn.isString=Xo,Pn.isSymbol=Zo,Pn.isTypedArray=Qo,Pn.isUndefined=function(e){return void 0===e},Pn.isWeakMap=function(e){return Ko(e)&&rs(e)==S},Pn.isWeakSet=function(e){return Ko(e)&&"[object WeakSet]"==pr(e)},Pn.join=function(e,t){return null==e?"":sn.call(e,t)},Pn.kebabCase=Na,Pn.last=js,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ia(n))<0?an(r+i,0):ln(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):wt(e,xt,i,!0)},Pn.lowerCase=Da,Pn.lowerFirst=Fa,Pn.lt=ea,Pn.lte=ta,Pn.max=function(e){return e&&e.length?ir(e,qa,mr):void 0},Pn.maxBy=function(e,t){return e&&e.length?ir(e,Xi(t,2),mr):void 0},Pn.mean=function(e){return Et(e,qa)},Pn.meanBy=function(e,t){return Et(e,Xi(t,2))},Pn.min=function(e){return e&&e.length?ir(e,qa,Mr):void 0},Pn.minBy=function(e,t){return e&&e.length?ir(e,Xi(t,2),Mr):void 0},Pn.stubArray=sl,Pn.stubFalse=ol,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=dl,Pn.nth=function(e,t){return e&&e.length?Ir(e,ia(t)):void 0},Pn.noConflict=function(){return qe._===this&&(qe._=Ce),this},Pn.noop=Za,Pn.now=go,Pn.pad=function(e,t,n){e=la(e);var r=(t=ia(t))?Ht(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ri(en(i),n)+e+Ri(Qt(i),n)},Pn.padEnd=function(e,t,n){e=la(e);var r=(t=ia(t))?Ht(e):0;return t&&r<t?e+Ri(t-r,n):e},Pn.padStart=function(e,t,n){e=la(e);var r=(t=ia(t))?Ht(e):0;return t&&r<t?Ri(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(la(e).replace(G,""),t||0)},Pn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ls(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ra(e),void 0===t?(t=e,e=0):t=ra(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=hn();return ln(e+i*(t-e+We("1e-"+((i+"").length-1))),t)}return Lr(e,t)},Pn.reduce=function(e,t,n){var r=No(e)?mt:Mt,i=arguments.length<3;return r(e,Xi(t,4),n,i,tr)},Pn.reduceRight=function(e,t,n){var r=No(e)?gt:Mt,i=arguments.length<3;return r(e,Xi(t,4),n,i,nr)},Pn.repeat=function(e,t,n){return t=(n?ls(e,t,n):void 0===t)?1:ia(t),Br(la(e),t)},Pn.replace=function(){var e=arguments,t=la(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var s=null==e?void 0:e[Ts(t[r])];void 0===s&&(r=i,s=n),e=Uo(s)?s.call(e):s}return e},Pn.round=fl,Pn.runInContext=e,Pn.sample=function(e){return(No(e)?$n:$r)(e)},Pn.size=function(e){if(null==e)return 0;if(Fo(e))return Xo(e)?Ht(e):e.length;var t=rs(e);return t==m||t==b?e.size:Ar(e).length},Pn.snakeCase=La,Pn.some=function(e,t,n){var r=No(e)?yt:qr;return n&&ls(e,t,n)&&(t=void 0),r(e,Xi(t,3))},Pn.sortedIndex=function(e,t){return Gr(e,t)},Pn.sortedIndexBy=function(e,t,n){return Yr(e,t,Xi(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Gr(e,t);if(r<n&&ko(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return Gr(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return Yr(e,t,Xi(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Gr(e,t,!0)-1;if(ko(e[n],t))return n}return-1},Pn.startCase=Ba,Pn.startsWith=function(e,t,n){return e=la(e),n=null==n?0:Jn(ia(n),0,e.length),t=Zr(t),e.slice(n,n+t.length)==t},Pn.subtract=pl,Pn.sum=function(e){return e&&e.length?Ct(e,qa):0},Pn.sumBy=function(e,t){return e&&e.length?Ct(e,Xi(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&ls(e,t,n)&&(t=void 0),e=la(e),t=ha({},t,r,Ui);var i,s,o=ha({},t.imports,r.imports,Ui),a=_a(o),l=It(o,a),u=0,c=t.interpolate||ce,h="__p += '",d=me((t.escape||ce).source+"|"+c.source+"|"+(c===V?ne:ce).source+"|"+(t.evaluate||ce).source+"|$","g"),f="//# sourceURL="+(xe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++je+"]")+"\n";e.replace(d,(function(t,n,r,o,a,l){return r||(r=o),h+=e.slice(u,l).replace(he,jt),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),h+="';\n";var p=xe.call(t,"variable")&&t.variable;if(p){if(ee.test(p))throw new Y("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(R,""):h).replace(N,"$1").replace(D,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Va((function(){return de(a,f+"return "+h).apply(void 0,l)}));if(m.source=h,$o(m))throw m;return m},Pn.times=function(e,t){if((e=ia(e))<1||e>9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=Pt(r,t=Xi(t));++n<e;)t(n);return i},Pn.toFinite=ra,Pn.toInteger=ia,Pn.toLength=sa,Pn.toLower=function(e){return la(e).toLowerCase()},Pn.toNumber=oa,Pn.toSafeInteger=function(e){return e?Jn(ia(e),-9007199254740991,9007199254740991):0===e?e:0},Pn.toString=la,Pn.toUpper=function(e){return la(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=la(e))&&(n||void 0===t))return kt(e);if(!e||!(t=Zr(t)))return e;var r=qt(e),i=qt(t);return ci(r,Nt(r,i),Dt(r,i)+1).join("")},Pn.trimEnd=function(e,t,n){if((e=la(e))&&(n||void 0===t))return e.slice(0,Gt(e)+1);if(!e||!(t=Zr(t)))return e;var r=qt(e);return ci(r,0,Dt(r,qt(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=la(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Zr(t)))return e;var r=qt(e);return ci(r,Nt(r,qt(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(zo(t)){var i="separator"in t?t.separator:i;n="length"in t?ia(t.length):n,r="omission"in t?Zr(t.omission):r}var s=(e=la(e)).length;if($t(e)){var o=qt(e);s=o.length}if(n>=s)return e;var a=n-Ht(r);if(a<1)return r;var l=o?ci(o,0,a).join(""):e.slice(0,a);if(void 0===i)return l+r;if(o&&(a+=l.length-a),Yo(i)){if(e.slice(a).search(i)){var u,c=l;for(i.global||(i=me(i.source,la(re.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var h=u.index;l=l.slice(0,void 0===h?a:h)}}else if(e.indexOf(Zr(i),a)!=a){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Pn.unescape=function(e){return(e=la(e))&&B.test(e)?e.replace(F,Yt):e},Pn.uniqueId=function(e){var t=++Ee;return la(e)+t},Pn.upperCase=ja,Pn.upperFirst=$a,Pn.each=ao,Pn.eachRight=lo,Pn.first=Ds,Xa(Pn,(hl={},ur(Pn,(function(e,t){xe.call(Pn.prototype,t)||(hl[t]=e)})),hl),{chain:!1}),Pn.VERSION="4.17.21",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),at(["drop","take"],(function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:an(ia(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Rn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Rn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(qa)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=jr((function(e,t){return"function"==typeof e?new Rn(this):this.map((function(n){return br(n,e,t)}))})),Rn.prototype.reject=function(e){return this.filter(Ao(Xi(e)))},Rn.prototype.slice=function(e,t){e=ia(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ia(t))<0?n.dropRight(-t):n.take(t-e)),n)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Pn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);i&&(Pn.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,a=t instanceof Rn,l=o[0],u=a||No(t),c=function(e){var t=i.apply(Pn,pt([e],o));return r&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(a=u=!1);var h=this.__chain__,d=!!this.__actions__.length,f=s&&!h,p=a&&!d;if(!s&&u){t=p?t:new Rn(this);var m=e.apply(t,o);return m.__actions__.push({func:no,args:[c],thisArg:void 0}),new In(m,h)}return f&&p?e.apply(this,o):(m=this.thru(c),f?r?m.value()[0]:m.value():m)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ve[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(No(i)?i:[],e)}return this[n]((function(n){return t.apply(No(n)?n:[],e)}))}})),ur(Rn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";xe.call(wn,r)||(wn[r]=[]),wn[r].push({name:t,func:n})}})),wn[Pi(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vi(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=No(e),r=t<0,i=n?e.length:0,s=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var s=n[r],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=ln(t,e+o);break;case"takeRight":e=an(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,l=a-o,u=r?a:o-1,c=this.__iteratees__,h=c.length,d=0,f=ln(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return ri(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var m=-1,g=e[u+=t];++m<h;){var y=c[m],v=y.iteratee,b=y.type,w=v(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}p[d++]=g}return p},Pn.prototype.at=ro,Pn.prototype.chain=function(){return to(this)},Pn.prototype.commit=function(){return new In(this.value(),this.__chain__)},Pn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof On;){var r=Cs(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:no,args:[Ws],thisArg:void 0}),new In(t,this.__chain__)}return this.thru(Ws)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Xe&&(Pn.prototype[Xe]=function(){return this}),Pn}();qe._=Jt,void 0===(i=function(){return Jt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(8),n(14)(e))},function(e,t){e.exports=[[/-----BEGIN CERTIFICATE-----.*-----END CERTIFICATE-----/gm,"<certificate>"],[/-----BEGIN RSA PRIVATE KEY-----.*-----END RSA PRIVATE KEY-----/gm,"<private key>"],[/(file:\/\/)?\S+\/Contents\/Resources\/app\//gm,"$1/<path>/"],[/(file:\/\/)?([a-zA-Z]:)?\\\S+\\resources\\app\\/gm,"$1\\<path>\\"],[/(file:\/\/)?([a-zA-Z]:)?\/\S+\/resources\/app\//gm,"$1/<path>/"],[/\/(Users?)\/[^/]*\//gm,"/$1/<user>/"],[/\/(usr|home|user|users|u01|var\/users|export\/home)\/[^/]*\//gm,"/$1/<user>/"],[/\\(Users|Documents and Settings|Profiles)\\[^/\\]*\\/gm,"\\$1\\<user>\\"],[/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gim,"<email>"],[/((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])/gm,"<ip address>"],[/(http(s)?:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}(\.[a-z]{2,6})?\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/gim,"<url>"],[/(mongodb:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=,]{2,256}(\.[a-z]{2,6})?\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/gim,"<mongodb uri>"],[/#schema\/\w+\.\w+/,"#schema/<namespace>"]]},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InterruptFlag=t.MongoshInterruptedError=void 0;const i=n(7),s=Symbol.for("@@mongosh.uncatchable");class o extends i.MongoshBaseError{constructor(){super("MongoshInterruptedError","execution was interrupted"),this[r]=!0}}t.MongoshInterruptedError=o,r=s;t.InterruptFlag=class{constructor(){this.interrupted=!1,this.onInterruptListeners=[]}isSet(){return this.interrupted}checkpoint(){if(this.interrupted)throw new o}asPromise(){if(this.interrupted)return{destroy:()=>{},promise:Promise.reject(new o)};let e;const t=new Promise((t,n)=>{e=()=>{const e=this.onInterruptListeners.indexOf(n);-1!==e&&this.onInterruptListeners.splice(e,1),n(null)},this.onInterruptListeners.push(n)});return{destroy:e,promise:t}}set(){this.interrupted=!0;const e=new o;for(const t of[...this.onInterruptListeners])t(e)}reset(){this.interrupted=!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformMongoErrorPlugin=t.rephraseMongoError=void 0;const r=[{code:13435,replacement:"not primary and secondaryOk=false - consider using db.getMongo().setReadPref() or readPreference in the connection string"}];function i(e){if(!function(e){var t,n,r;return/^Mongo([A-Z].*)?Error$/.test(null!==(r=null===(n=null===(t=Object.getPrototypeOf(e))||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.name)&&void 0!==r?r:"")}(e))return e;const t=e,n=t.message,i=r.find(e=>e.matchMessage?"string"==typeof e.matchMessage?n.includes(e.matchMessage):e.matchMessage.test(n):void 0!==e.code&&t.code===e.code);return i&&(t.message="function"==typeof i.replacement?i.replacement(n):i.replacement),t}t.rephraseMongoError=i;t.TransformMongoErrorPlugin=class{transformError(e){return i(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7),i=n(39);t.default=class{constructor(){this._mongo=new s;return new Proxy(this,{get:(e,t)=>{if("_mongo"===t)return this._mongo;throw new r.MongoshInvalidInputError("No connected database",i.ShellApiErrors.NotConnected)}})}};class s{constructor(){return new Proxy(this,{get:()=>{throw new r.MongoshInvalidInputError("No connected database",i.ShellApiErrors.NotConnected)}})}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),s=r(n(94)),o=n(23),a=n(7),l=n(13),u=n(153);function c(e){const t=`shell-api.classes.${e}.help`,n={help:t+".description",example:t+".example",docs:t+".link",attr:[]};return new s.default(n)}t.default=function(t,n){void 0===t&&(t=o.bson);const r={};["Binary","Code","DBRef","Decimal128","Double","Int32","Long","MaxKey","MinKey","ObjectId","Timestamp","Map","BSONSymbol","BSONRegExp"].forEach(e=>{if(!(e in t))throw new a.MongoshInternalError(e+" does not exist in provided BSON package.");const n=t[e].prototype;n.serverVersions=i.ALL_SERVER_VERSIONS,n.platforms=i.ALL_PLATFORMS,n.topologies=i.ALL_TOPOLOGIES;const s=c(e);r[e]=s,n.help=()=>s,Object.setPrototypeOf(n.help,s)}),t.BSONSymbol.prototype.serverVersions=[i.ServerVersions.earliest,"1.6.0"],t.BSONSymbol.prototype.deprecated=!0;const s={DBRef:Object.assign((function(e,n,r,i){return(0,l.assertArgsDefinedType)([e,n,r],["string",!0,[void 0,"string"],[void 0,"object"]],"DBRef"),new t.DBRef(e,n,r,i)}),{...t.DBRef,prototype:t.DBRef.prototype}),Map:t.Map,bsonsize:function(e){return(0,l.assertArgsDefinedType)([e],["object"],"bsonsize"),t.calculateObjectSize(e)},MaxKey:Object.assign((function(){return new t.MaxKey}),{...t.MaxKey,toBSON:()=>new t.MaxKey,prototype:t.MaxKey.prototype}),MinKey:Object.assign((function(){return new t.MinKey}),{...t.MinKey,toBSON:()=>new t.MinKey,prototype:t.MinKey.prototype}),ObjectId:Object.assign((function(e){return(0,l.assertArgsDefinedType)([e],[[void 0,"string","number","object"]],"ObjectId"),new t.ObjectId(e)}),{...t.ObjectId,prototype:t.ObjectId.prototype}),Timestamp:Object.assign((function(e,n){return(0,l.assertArgsDefinedType)([e,n],[["number","object",void 0],[void 0,"number"]],"Timestamp"),"object"==typeof e&&null!==e&&"t"in e&&"i"in e?new t.Timestamp(new t.Long(e.i,e.t)):void 0!==n||"number"==typeof e?new t.Timestamp(new t.Long(null!=n?n:0,e)):new t.Timestamp(e)}),{...t.Timestamp,prototype:t.Timestamp.prototype}),Code:Object.assign((function(e="",n){return(0,l.assertArgsDefinedType)([e,n],[[void 0,"string","function"],[void 0,"object"]],"Code"),new t.Code(e,n)}),{...t.Code,prototype:t.Code.prototype}),NumberDecimal:Object.assign((function(e="0"){return(0,l.assertArgsDefinedType)([e],[["string","number","bson:Long","bson:Int32","bson:Decimal128"]],"NumberDecimal"),"number"==typeof e&&n("NumberDecimal: specifying a number as argument is deprecated and may lead to loss of precision, pass a string instead"),t.Decimal128.fromString(""+e)}),{prototype:t.Decimal128.prototype}),NumberInt:Object.assign((function(e="0"){return null!=e||(e="0"),(0,l.assertArgsDefinedType)([e],[["string","number","bson:Long","bson:Int32"]],"NumberInt"),new t.Int32(parseInt(""+e,10))}),{prototype:t.Int32.prototype}),NumberLong:Object.assign((function(e="0"){return null!=e||(e="0"),(0,l.assertArgsDefinedType)([e],[["string","number","bson:Long","bson:Int32"]],"NumberLong"),"number"==typeof e?(n("NumberLong: specifying a number as argument is deprecated and may lead to loss of precision, pass a string instead"),t.Long.fromNumber(e)):t.Long.fromString(""+e)}),{prototype:t.Long.prototype}),ISODate:function(e){e||(e=(new Date).toISOString());const t=e.match(/^(?<Y>\d{4})-?(?<M>\d{2})-?(?<D>\d{2})([T ](?<h>\d{2})(:?(?<m>\d{2})(:?((?<s>\d{2})(\.(?<ms>\d+))?))?)?(?<tz>Z|([+-])(\d{2}):?(\d{2})?)?)?$/);if(null!==t&&void 0!==t.groups){const{Y:e,M:n,D:r,h:i,m:s,s:o,ms:a,tz:l}=t.groups,u=new Date(`${e}-${n}-${r}T${i||"00"}:${s||"00"}:${o||"00"}.${a||"000"}${l||"Z"}`);if(u.getTime()>=-621672192e5&&u.getTime()<=0xe677d21fdbff)return u}throw new a.MongoshInvalidInputError(JSON.stringify(e)+" is not a valid ISODate",a.CommonErrors.InvalidArgument)},BinData:Object.assign((function(n,r){(0,l.assertArgsDefinedType)([n,r],["number","string"],"BinData");const i=e.from(r,"base64");return new t.Binary(i,n)}),{prototype:t.Binary.prototype}),HexData:Object.assign((function(n,r){(0,l.assertArgsDefinedType)([n,r],["number","string"],"HexData");const i=e.from(r,"hex");return new t.Binary(i,n)}),{prototype:t.Binary.prototype}),UUID:Object.assign((function(n){if(void 0===n){const e=(0,u.randomBytes)(16);e[6]=15&e[6]|64,e[8]=63&e[8]|128,n=e.toString("hex")}(0,l.assertArgsDefinedType)([n],["string"],"UUID");const r=e.from(n.replace(/-/g,""),"hex");return new t.Binary(r,t.Binary.SUBTYPE_UUID)}),{prototype:t.Binary.prototype}),MD5:Object.assign((function(n){(0,l.assertArgsDefinedType)([n],["string"],"MD5");const r=e.from(n,"hex");return new t.Binary(r,t.Binary.SUBTYPE_MD5)}),{prototype:t.Binary.prototype}),Decimal128:t.Decimal128,BSONSymbol:t.BSONSymbol,Int32:t.Int32,Long:t.Long,Binary:t.Binary,Double:t.Double,EJSON:t.EJSON,BSONRegExp:t.BSONRegExp};for(const e of Object.keys(s)){const t=r[e]||c(e);s[e].help=()=>t,Object.setPrototypeOf(s[e].help,t)}return s}}).call(this,n(4).Buffer)},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(9),s=n(13),o=n(5),a=n(40),l=n(32);let u=class extends i.ShellApiWithMongoClass{constructor(e){super(),this._database=e}get _mongo(){return this._database._mongo}[o.asPrintable](){return`Shard class connected to ${(0,l.redactURICredentials)(this._database._mongo._uri)} via db ${this._database._name}`}_emitShardApiCall(e,t={}){this._database._mongo._instanceState.emitApiCallWithArgs({method:e,class:"Shard",arguments:t})}async enableSharding(e,t){(0,s.assertArgsDefinedType)([e,t],["string",[void 0,"string"]],"Shard.enableSharding"),this._emitShardApiCall("enableSharding",{database:e,primaryShard:t});const n={enableSharding:e};void 0!==t&&(n.primaryShard=t);try{return await this._database._runAdminCommand(n)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". Are you connected to mongos?"),e}}async commitReshardCollection(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.commitReshardCollection"),this._emitShardApiCall("commitReshardCollection",{namespace:e}),await this._database._runAdminCommand({commitReshardCollection:e})}async abortReshardCollection(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.abortReshardCollection"),this._emitShardApiCall("abortReshardCollection",{namespace:e}),await this._database._runAdminCommand({abortReshardCollection:e})}async shardCollection(e,t,n,r){return await this._runShardCollection("shardCollection",e,t,n,r)}async reshardCollection(e,t,n,r){return await this._runShardCollection("reshardCollection",e,t,n,r)}async _runShardCollection(e,t,n,r,i){(0,s.assertArgsDefinedType)([t,n,r,i],["string","object",[void 0,"boolean","object"],[void 0,"object"]],"Shard."+e),this._emitShardApiCall(e,{namespace:t,key:n,unique:r,options:i}),"object"==typeof r&&null!==r&&(i=r,r=void 0);const o={[e]:t,key:n};void 0!==r&&(o.unique=r);try{return await this._database._runAdminCommand({...o,...i})}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". Are you connected to mongos?"),e}}async status(e=!1,t){const n=await(0,s.getPrintableShardStatus)(null!=t?t:await(0,s.getConfigDB)(this._database),e);return new a.CommandResult("StatsResult",n)}async addShard(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.addShard"),await(0,s.getConfigDB)(this._database),this._emitShardApiCall("addShard",{url:e}),this._database._runAdminCommand({addShard:e})}async addShardToZone(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.addShardToZone"),this._emitShardApiCall("addShardToZone",{shard:e,zone:t}),await(0,s.getConfigDB)(this._database),this._database._runAdminCommand({addShardToZone:e,zone:t})}async addShardTag(e,t){(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.addShardTag"),this._emitShardApiCall("addShardTag",{shard:e,tag:t});try{return await this.addShardToZone(e,t)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to addShardToZone which exists only for server versions > 3.4."),e}}async updateZoneKeyRange(e,t,n,r){return(0,s.assertArgsDefinedType)([e,t,n,r],["string","object","object",!0],"Shard.updateZoneKeyRange"),this._emitShardApiCall("updateZoneKeyRange",{namespace:e,min:t,max:n,zone:r}),await(0,s.getConfigDB)(this._database),await this._database._runAdminCommand({updateZoneKeyRange:e,min:t,max:n,zone:r})}async addTagRange(e,t,n,r){(0,s.assertArgsDefinedType)([e,t,n,r],["string","object","object",!0],"Shard.addTagRange"),this._emitShardApiCall("addTagRange",{namespace:e,min:t,max:n,zone:r});try{return await this.updateZoneKeyRange(e,t,n,r)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to updateZoneKeyRange which exists only for server versions > 3.4."),e}}async removeRangeFromZone(e,t,n){return(0,s.assertArgsDefinedType)([e,t,n],["string","object","object"],"Shard.removeRangeFromZone"),this._emitShardApiCall("removeRangeFromZone",{ns:e,min:t,max:n}),this.updateZoneKeyRange(e,t,n,null)}async removeTagRange(e,t,n){(0,s.assertArgsDefinedType)([e,t,n],["string","object","object"],"Shard.removeTagRange"),this._emitShardApiCall("removeTagRange",{ns:e,min:t,max:n});try{return await this.updateZoneKeyRange(e,t,n,null)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to updateZoneKeyRange which exists only for server versions > 3.4."),e}}async removeShardFromZone(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.removeShardFromZone"),this._emitShardApiCall("removeShardFromZone",{shard:e,zone:t}),await(0,s.getConfigDB)(this._database),await this._database._runAdminCommand({removeShardFromZone:e,zone:t})}async removeShardTag(e,t){(0,s.assertArgsDefinedType)([e,t],["string","string"],"Shard.removeShardTag"),this._emitShardApiCall("removeTagRange",{shard:e,tag:t});try{return await this.removeShardFromZone(e,t)}catch(e){throw"CommandNotFound"===(null==e?void 0:e.codeName)&&(e.message=e.message+". This method aliases to removeShardFromZone which exists only for server versions > 3.4."),e}}async enableAutoSplit(){this._emitShardApiCall("enableAutoSplit",{});const e=await(0,s.getConfigDB)(this._database);return await e.getCollection("settings").updateOne({_id:"autosplit"},{$set:{enabled:!0}},{upsert:!0,writeConcern:{w:"majority",wtimeout:3e4}})}async disableAutoSplit(){this._emitShardApiCall("disableAutoSplit",{});const e=await(0,s.getConfigDB)(this._database);return await e.getCollection("settings").updateOne({_id:"autosplit"},{$set:{enabled:!1}},{upsert:!0,writeConcern:{w:"majority",wtimeout:3e4}})}async splitAt(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","object"],"Shard.splitAt"),this._emitShardApiCall("splitAt",{ns:e,query:t}),this._database._runAdminCommand({split:e,middle:t})}async splitFind(e,t){return(0,s.assertArgsDefinedType)([e,t],["string","object"],"Shard.splitFind"),this._emitShardApiCall("splitFind",{ns:e,query:t}),this._database._runAdminCommand({split:e,find:t})}async moveChunk(e,t,n){return(0,s.assertArgsDefinedType)([e,t,n],["string","object","string"],"Shard.moveChunk"),this._emitShardApiCall("moveChunk",{ns:e,query:t,destination:n}),this._database._runAdminCommand({moveChunk:e,find:t,to:n})}async balancerCollectionStatus(e){return(0,s.assertArgsDefinedType)([e],["string"],"Shard.balancerCollectionStatus"),this._emitShardApiCall("balancerCollectionStatus",{ns:e}),this._database._runAdminCommand({balancerCollectionStatus:e})}async enableBalancing(e){(0,s.assertArgsDefinedType)([e],["string"],"Shard.enableBalancing"),this._emitShardApiCall("enableBalancing",{ns:e});const t=await(0,s.getConfigDB)(this._database);return await t.getCollection("collections").updateOne({_id:e},{$set:{noBalance:!1}},{writeConcern:{w:"majority",wtimeout:6e4}})}async disableBalancing(e){(0,s.assertArgsDefinedType)([e],["string"],"Shard.disableBalancing"),this._emitShardApiCall("disableBalancing",{ns:e});const t=await(0,s.getConfigDB)(this._database);return await t.getCollection("collections").updateOne({_id:e},{$set:{noBalance:!0}},{writeConcern:{w:"majority",wtimeout:6e4}})}async getBalancerState(){this._emitShardApiCall("getBalancerState",{});const e=await(0,s.getConfigDB)(this._database),t=await e.getCollection("settings").findOne({_id:"balancer"});return null==t||!t.stopped}async isBalancerRunning(){return this._emitShardApiCall("isBalancerRunning",{}),await(0,s.getConfigDB)(this._database),this._database._runAdminCommand({balancerStatus:1})}async startBalancer(e=6e4){return(0,s.assertArgsDefinedType)([e],["number"],"Shard.startBalancer"),this._emitShardApiCall("startBalancer",{timeout:e}),this._database._runAdminCommand({balancerStart:1,maxTimeMS:e})}async stopBalancer(e=6e4){return(0,s.assertArgsDefinedType)([e],["number"],"Shard.stopBalancer"),this._emitShardApiCall("stopBalancer",{timeout:e}),this._database._runAdminCommand({balancerStop:1,maxTimeMS:e})}async setBalancerState(e){return(0,s.assertArgsDefinedType)([e],["boolean"],"Shard.setBalancerState"),this._emitShardApiCall("setBalancerState",{state:e}),e?this.startBalancer():this.stopBalancer()}};r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"enableSharding",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["5.0.0",o.ServerVersions.latest])],u.prototype,"commitReshardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["5.0.0",o.ServerVersions.latest])],u.prototype,"abortReshardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"shardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["5.0.0",o.ServerVersions.latest])],u.prototype,"reshardCollection",null),r([i.returnsPromise,(0,i.apiVersions)([1])],u.prototype,"status",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"addShard",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"addShardToZone",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"addShardTag",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"updateZoneKeyRange",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"addTagRange",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeRangeFromZone",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeTagRange",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeShardFromZone",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"removeShardTag",null),r([i.returnsPromise,(0,i.apiVersions)([1]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"enableAutoSplit",null),r([i.returnsPromise,(0,i.apiVersions)([1]),(0,i.serverVersions)(["3.4.0",o.ServerVersions.latest])],u.prototype,"disableAutoSplit",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"splitAt",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"splitFind",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"moveChunk",null),r([i.returnsPromise,(0,i.apiVersions)([]),(0,i.serverVersions)(["4.4.0",o.ServerVersions.latest])],u.prototype,"balancerCollectionStatus",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"enableBalancing",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"disableBalancing",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"getBalancerState",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"isBalancerRunning",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"startBalancer",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"stopBalancer",null),r([i.returnsPromise,(0,i.apiVersions)([])],u.prototype,"setBalancerState",null),u=r([i.shellApiClassDefault],u),t.default=u},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7),s=n(32),o=n(9),a=n(5),l=n(13);let u=class extends o.ShellApiWithMongoClass{constructor(e){super(),this._database=e}get _mongo(){return this._database._mongo}async initiate(e={}){return this._emitReplicaSetApiCall("initiate",{config:e}),this._database._runAdminCommand({replSetInitiate:e})}async _getConfig(){try{const e=await this._database._runAdminCommand({replSetGetConfig:1});if(void 0===e.config)throw new i.MongoshRuntimeError("Documented returned from command replSetGetConfig does not contain 'config'",i.CommonErrors.CommandFailed);return e.config}catch(e){if("CommandNotFound"===(null==e?void 0:e.codeName)||"APIStrictError"===(null==e?void 0:e.codeName)){const e=await this._database.getSiblingDB("local").getCollection("system.replset").findOne();if(null===e)throw new i.MongoshRuntimeError("No documents in local.system.replset",i.CommonErrors.CommandFailed);return e}throw e}}async config(){return this._emitReplicaSetApiCall("config",{}),this._getConfig()}async conf(){return this._emitReplicaSetApiCall("conf",{}),this._getConfig()}async reconfig(e,t={}){(0,l.assertArgsDefinedType)([e,t],["object",[void 0,"object"]],"ReplicaSet.reconfig"),this._emitReplicaSetApiCall("reconfig",{config:e,options:t});const n=async()=>{var n;const r=await this._getConfig();e.version=r.version?r.version+1:1,null!==(n=e.protocolVersion)&&void 0!==n||(e.protocolVersion=r.protocolVersion);const i={replSetReconfig:e,...t};return await this._database._runAdminCommand(i)};let r=["success",{}],i=1e3;for(let e=0;e<12;e++)try{"error"===r[0]&&(await this._instanceState.shellApi.sleep(i),i*=1.3,i>2500&&await this._instanceState.shellApi.print("Reconfig did not succeed yet, starting new attempt...")),r=["success",await n()];break}catch(e){r=["error",e]}if("error"===r[0])throw r[1];return r[1]}async reconfigForPSASet(e,t,n={}){var r;(0,l.assertArgsDefinedType)([e,t,n],["number","object",[void 0,"object"]],"ReplicaSet.reconfigForPSASet"),this._emitReplicaSetApiCall("reconfigForPSASet",{newMemberIndex:e,config:t,options:n});const s=e=>this._instanceState.shellApi.print(e),o=null===(r=t.members)||void 0===r?void 0:r[e];if(!o)throw new i.MongoshInvalidInputError(`Node at index ${e} does not exist in the new config`,i.CommonErrors.InvalidArgument);if(1!==o.votes)throw new i.MongoshInvalidInputError(`Node at index ${e} must have { votes: 1 } in the new config (actual: { votes: ${o.votes} })`,i.CommonErrors.InvalidArgument);const a=await this._getConfig(),u=a.members.find(e=>e._id===o._id);if(u){if(u.votes)throw new i.MongoshInvalidInputError(`Node at index ${e} must have { votes: 0 } in the old config (actual: { votes: ${u.votes} })`,i.CommonErrors.InvalidArgument)}else a.members.find(e=>e.host===o.host)&&await s(`Warning: Node at index ${e} has { host: "${o.host}" }, which is also present in the old config, but with a different _id field.`);const c=o.priority;await s(`Running first reconfig to give member at index ${e} { votes: 1, priority: 0 }`),o.votes=1,o.priority=0;const h=await this.reconfig(t,n);if(0===c)return await s("No second reconfig necessary because .priority = 0"),h;await s(`Running second reconfig to give member at index ${e} { priority: ${c} }`),o.priority=c;try{return await this.reconfig(t,n)}catch(e){throw await s("Second reconfig did not succeed, giving up"),await s(`Attempted command: rs.reconfig(${JSON.stringify(t,null," ")}, ${JSON.stringify(n)})`),e}}async status(){return this._emitReplicaSetApiCall("status",{}),this._database._runAdminCommand({replSetGetStatus:1})}async isMaster(){return this._emitReplicaSetApiCall("isMaster",{}),this._database.getSiblingDB("admin").isMaster()}async hello(){return this._emitReplicaSetApiCall("hello",{}),this._database.getSiblingDB("admin").hello()}async printSecondaryReplicationInfo(){return this._emitReplicaSetApiCall("printSecondaryReplicationInfo",{}),this._database.printSecondaryReplicationInfo()}printSlaveReplicationInfo(){throw new i.MongoshDeprecatedError("printSlaveReplicationInfo has been deprecated. Use printSecondaryReplicationInfo instead")}async printReplicationInfo(){return this._emitReplicaSetApiCall("printReplicationInfo",{}),this._database.printReplicationInfo()}async add(e,t){(0,l.assertArgsDefinedType)([e,t],[["string","object"],[void 0,"boolean"]],"ReplicaSet.add"),this._emitReplicaSetApiCall("add",{hostport:e,arb:t});const n=await this._getConfig();n.version++;const r=Math.max(...n.members.map(e=>e._id));let s;if("string"==typeof e)s={_id:r+1,host:e},t&&(s.arbiterOnly=!0);else{if(!0===t)throw new i.MongoshInvalidInputError("Expected first parameter to be a host-and-port string of arbiter, but got "+JSON.stringify(e),i.CommonErrors.InvalidArgument);s=e,null!==s._id&&void 0!==s._id||(s._id=r+1)}return n.members.push(s),this._database._runAdminCommand({replSetReconfig:n})}async addArb(e){return this._emitReplicaSetApiCall("addArb",{hostname:e}),this.add(e,!0)}async remove(e){(0,l.assertArgsDefinedType)([e],["string"],"ReplicaSet.remove"),this._emitReplicaSetApiCall("remove",{hostname:e});const t=await this._getConfig();t.version++;for(let n=0;n<t.members.length;n++)if(t.members[n].host===e)return t.members.splice(n,1),this._database._runAdminCommand({replSetReconfig:t});throw new i.MongoshInvalidInputError(`Couldn't find ${e} in ${JSON.stringify(t.members)}. Is ${e} a member of this replset?`,i.CommonErrors.InvalidArgument)}async freeze(e){return(0,l.assertArgsDefinedType)([e],["number"],"ReplicaSet.freeze"),this._emitReplicaSetApiCall("freeze",{secs:e}),this._database._runAdminCommand({replSetFreeze:e})}async stepDown(e,t){(0,l.assertArgsDefinedType)([e,t],[[void 0,"number"],[void 0,"number"]],"ReplicaSet.stepDown"),this._emitReplicaSetApiCall("stepDown",{stepdownSecs:e,catchUpSecs:t});const n={replSetStepDown:void 0===e?60:e};return void 0!==t&&(n.secondaryCatchUpPeriodSecs=t),this._database._runAdminCommand(n)}async syncFrom(e){return(0,l.assertArgsDefinedType)([e],["string"],"ReplicaSet.syncFrom"),this._emitReplicaSetApiCall("syncFrom",{host:e}),this._database._runAdminCommand({replSetSyncFrom:e})}async secondaryOk(){await this._mongo.setSecondaryOk()}[a.asPrintable](){return`ReplicaSet class connected to ${(0,s.redactURICredentials)(this._database._mongo._uri)} via db ${this._database._name}`}_emitReplicaSetApiCall(e,t={}){this._database._mongo._instanceState.emitApiCallWithArgs({method:e,class:"ReplicaSet",arguments:t})}};r([o.returnsPromise],u.prototype,"initiate",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"config",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"conf",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"reconfig",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"reconfigForPSASet",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"status",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"isMaster",null),r([o.returnsPromise,(0,o.apiVersions)([1])],u.prototype,"hello",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"printSecondaryReplicationInfo",null),r([o.deprecated,(0,o.apiVersions)([])],u.prototype,"printSlaveReplicationInfo",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"printReplicationInfo",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"add",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"addArb",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"remove",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"freeze",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"stepDown",null),r([o.returnsPromise,(0,o.apiVersions)([])],u.prototype,"syncFrom",null),r([o.deprecated,o.returnsPromise],u.prototype,"secondaryOk",null),u=r([o.shellApiClassDefault],u),t.default=u},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(9),o=n(5),a=i(n(210)),l=n(40),u=n(13),c=n(23),h=n(7),d=n(473),f=n(56),p=n(30),m=n(474),g=i(n(55)),y=Symbol.for("@@mongosh.instanceState"),v=Symbol.for("@@mongosh.loadCallNestingLevel");let b=class extends s.ShellApiClass{constructor(e){super(),this._instanceState=e,this.defaults=Object.freeze(new m.ShellUserConfig)}async set(e,t){var n,r;(0,u.assertArgsDefinedType)([e],["string"],"config.set");const{evaluationListener:i}=this._instanceState,s=(await this._allKeys()).includes(e);if(s){const r=await(null===(n=i.validateConfig)||void 0===n?void 0:n.call(i,e,t));if(r)return`Cannot set option "${e}": ${r}`}return"success"!==(s&&await(null===(r=i.setConfig)||void 0===r?void 0:r.call(i,e,t)))?`Option "${e}" is not available in this environment`:`Setting "${e}" has been changed`}async get(e){var t,n;(0,u.assertArgsDefinedType)([e],["string"],"config.get");const{evaluationListener:r}=this._instanceState;return null!==(n=await(null===(t=r.getConfig)||void 0===t?void 0:t.call(r,e)))&&void 0!==n?n:this.defaults[e]}async reset(e){var t;(0,u.assertArgsDefinedType)([e],["string"],"config.reset");const{evaluationListener:n}=this._instanceState;return"success"!==await(null===(t=n.resetConfig)||void 0===t?void 0:t.call(n,e))?`Option "${e}" cannot be changed in this environment`:`Setting "${e}" has been reset to its default value`}async _allKeys(){var e,t;const{evaluationListener:n}=this._instanceState;return null!==(t=await(null===(e=n.listConfigOptions)||void 0===e?void 0:e.call(n)))&&void 0!==t?t:Object.keys(this.defaults)}async[o.asPrintable](){return new Map(await Promise.all((await this._allKeys()).map(async e=>[e,await this.get(e)])))}};r([s.returnsPromise],b.prototype,"set",null),r([s.returnsPromise],b.prototype,"get",null),r([s.returnsPromise],b.prototype,"reset",null),b=r([s.shellApiClassDefault],b);let w=class extends s.ShellApiClass{constructor(e){super(),this[y]=e,this[v]=0,this.DBQuery=new d.DBQuery(e),this.config=new b(e)}get _instanceState(){return this[y]}get loadCallNestingLevel(){return this[v]}set loadCallNestingLevel(e){this[v]=e}use(e){return this._instanceState.currentDb._mongo.use(e)}async show(e,t){return await this._instanceState.currentDb._mongo.show(e,t)}async exit(e){var t,n;throw(0,u.assertArgsDefinedType)([e],[[void 0,"number"]],"exit"),(0,u.assertCLI)(this._instanceState.initialServiceProvider.platform,"the exit/quit commands"),await this._instanceState.close(!0),await(null===(n=(t=this._instanceState.evaluationListener).onExit)||void 0===n?void 0:n.call(t,e)),new h.MongoshInternalError(".onExit listener returned")}async quit(e){return await this.exit(e)}async Mongo(e,t,n){(0,u.assertCLI)(this._instanceState.initialServiceProvider.platform,"new Mongo connections");const r=new a.default(this._instanceState,e,t,n);return await r.connect(),this._instanceState.mongos.push(r),r}async connect(e,t,n){(0,u.assertArgsDefinedType)([e,t,n],["string",[void 0,"string"],[void 0,"string"]],"connect"),(0,u.assertCLI)(this._instanceState.initialServiceProvider.platform,"new Mongo connections");const r=new a.default(this._instanceState,e);await r.connect(t,n),this._instanceState.mongos.push(r);const i=r._serviceProvider.initialDb||c.DEFAULT_DB;return r.getDB(i)}async it(){return this._instanceState.currentCursor?await this._instanceState.currentCursor._it():new l.CursorIterationResult}version(){return n(475).version}async load(e){if((0,u.assertArgsDefinedType)([e],["string"],"load"),!this._instanceState.evaluationListener.onLoad)throw new h.MongoshUnimplementedError("load is not currently implemented for this platform",h.CommonErrors.NotImplemented);this._instanceState.messageBus.emit("mongosh:api-load-file",{nested:this.loadCallNestingLevel>0,filename:e});const{resolvedFilename:t,evaluate:n}=await this._instanceState.evaluationListener.onLoad(e),r=this._instanceState.context,i=r.__filename;r.__filename=t,r.__dirname=(0,p.dirname)(t),this.loadCallNestingLevel++;try{await n()}finally{this.loadCallNestingLevel--,i?(r.__filename=i,r.__dirname=(0,p.dirname)(i)):(delete r.__filename,delete r.__dirname)}return!0}async enableTelemetry(){var e,t;if("success"===await(null===(t=(e=this._instanceState.evaluationListener).setConfig)||void 0===t?void 0:t.call(e,"enableTelemetry",!0)))return g.default.__("cli-repl.cli-repl.enabledTelemetry")}async disableTelemetry(){var e,t;if("success"===await(null===(t=(e=this._instanceState.evaluationListener).setConfig)||void 0===t?void 0:t.call(e,"enableTelemetry",!1)))return g.default.__("cli-repl.cli-repl.disabledTelemetry")}async passwordPrompt(){const{evaluationListener:e}=this._instanceState;if(!e.onPrompt)throw new h.MongoshUnimplementedError("passwordPrompt() is not available in this shell",h.CommonErrors.NotImplemented);return await e.onPrompt("Enter password","password")}async sleep(e){return await(0,f.promisify)(setTimeout)(e)}async print(...e){var t;const{evaluationListener:n}=this._instanceState,r=await Promise.all(e.map(e=>(0,s.toShellResult)(e)));await(null===(t=n.onPrint)||void 0===t?void 0:t.call(n,r))}async printjson(...e){return this.print(...e)}async cls(){var e;const{evaluationListener:t}=this._instanceState;await(null===(e=t.onClearCommand)||void 0===e?void 0:e.call(t))}isInteractive(){return this._instanceState.isInteractive}};r([s.directShellCommand,(0,s.shellCommandCompleter)((async function(e,t){var n;if(!(t.length>2))return await e.getDatabaseCompletions(null!==(n=t[1])&&void 0!==n?n:"")}))],w.prototype,"use",null),r([s.directShellCommand,s.returnsPromise,(0,s.shellCommandCompleter)((async function(e,t){if(t.length>2)return;return"d"===t[1]?["databases"]:["databases","dbs","collections","tables","profile","users","roles","log","logs","startupWarnings","freeMonitoring","automationNotices"].filter(e=>{var n;return e.startsWith(null!==(n=t[1])&&void 0!==n?n:"")})}))],w.prototype,"show",null),r([s.directShellCommand,s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"exit",null),r([s.directShellCommand,s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"quit",null),r([s.returnsPromise,(0,s.returnType)("Mongo"),(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"Mongo",null),r([s.returnsPromise,(0,s.returnType)("Database"),(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"connect",null),r([s.directShellCommand,s.returnsPromise],w.prototype,"it",null),r([s.returnsPromise],w.prototype,"load",null),r([s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"enableTelemetry",null),r([s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"disableTelemetry",null),r([s.returnsPromise,(0,s.platforms)([c.ReplPlatform.CLI])],w.prototype,"passwordPrompt",null),r([s.returnsPromise],w.prototype,"sleep",null),r([s.returnsPromise],w.prototype,"print",null),r([s.returnsPromise],w.prototype,"printjson",null),r([s.directShellCommand,s.returnsPromise],w.prototype,"cls",null),w=r([s.shellApiClassDefault],w),t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateConnectionInfoFromCliArgs=t.mapCliToDriver=void 0;const r=n(467),i=n(469);Object.defineProperty(t,"mapCliToDriver",{enumerable:!0,get:function(){return i.mapCliToDriver}}),t.generateConnectionInfoFromCliArgs=function(e){const t=(0,r.generateUri)(e);return(0,i.mapCliToDriver)(e,{connectionString:t,driverOptions:{}})}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateUri=void 0;const i=n(7),s=r(n(55)),o=n(120),a="cli-repl.uri-generator.no-host-port";function l(e,t){if(e.host||e.port)throw new i.MongoshInvalidInputError(s.default.__(a),i.CommonErrors.InvalidArgument);if(e.gssapiServiceName&&(null==t?void 0:t.searchParams.has("authMechanismProperties"))){const n=new o.CommaAndColonSeparatedRecord(t.searchParams.get("authMechanismProperties")).get("SERVICE_NAME");if(void 0!==n&&e.gssapiServiceName!==n)throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.diverging-service-name"),i.CommonErrors.InvalidArgument)}if(null==t?void 0:t.searchParams.has("gssapiServiceName"))throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.gssapi-service-name-unsupported"),i.CommonErrors.InvalidArgument)}function u(e){const t=e.match(/[^a-zA-Z0-9.:\[\]_-]/);if(t)throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.invalid-host")+": "+t[0],i.CommonErrors.InvalidArgument)}function c(e,t){const n=e.split(",").map(e=>e.trim()).filter(e=>!!e),r=[];return n.forEach(e=>{const[n,o]=e.split(":");if(t&&void 0!==o&&o!==t)throw new i.MongoshInvalidInputError(s.default.__("cli-repl.uri-generator.host-list-port-mismatch"),i.CommonErrors.InvalidArgument);r.push(`${n}${o||t?":"+(o||t):""}`)}),r}function h(e){return e.host?(u(e.host),e.host.includes(":")?e.host.split(":")[0]:e.host):"127.0.0.1"}function d(e){if(e.host&&e.host.includes(":")){u(e.host);const t=e.host.split(":")[1];if(!e.port||e.port===t)return t;throw new i.MongoshInvalidInputError(s.default.__(a),i.CommonErrors.InvalidArgument)}return e.port?e.port:"27017"}function f(e){const t=(e=e.clone()).searchParams;return t.has("replicaSet")||t.has("directConnection")||t.has("loadBalanced")||1!==e.hosts.length||t.set("directConnection","true"),e}t.generateUri=function(e){if(e.nodb)return"";const t=function(e){var t,n,r;const s=e.connectionSpecifier,a=(null!==(t=e.host)&&void 0!==t?t:"").match(/^(?<replSetName>[^/]+)\/(?<hosts>([A-Za-z0-9._-]+(:\d+)?,?)+)$/);if(a){const{replSetName:t,hosts:n}=a.groups,r=new o.ConnectionString("mongodb://replacemeHost/"+encodeURIComponent(s||""));return r.hosts=c(n,e.port),r.searchParams.set("replicaSet",t),f(r)}const u=(null!==(n=e.host)&&void 0!==n?n:"").match(/^(?<hosts>([A-Za-z0-9._-]+(:\d+)?,?)+)$/);if(u&&(null===(r=e.host)||void 0===r?void 0:r.includes(","))){const{hosts:t}=u.groups,n=new o.ConnectionString("mongodb://replacemeHost/"+encodeURIComponent(s||""));return n.hosts=c(t,e.port),f(n)}if(!s)return new o.ConnectionString(`mongodb://${h(e)}:${d(e)}/?directConnection=true`);if(s.startsWith("mongodb+srv://")){const t=new o.ConnectionString(s);return l(e,t),t}if(s.startsWith("mongodb://")){const t=new o.ConnectionString(s);return l(e,t),f(t)}let p=/^([A-Za-z0-9][A-Za-z0-9._-]+):?(\d+)?(?:\/(\S*))?$/gi.exec(s);if(null===p){if(/[/\\. "$]/.test(s))throw new i.MongoshInvalidInputError("Invalid URI: "+s,i.CommonErrors.InvalidArgument);p=[s,s]}let m=null==p?void 0:p[1];const g=null==p?void 0:p[2];let y=null==p?void 0:p[3];!g&&!y&&m.indexOf(".")<0&&(y=m,m=void 0);(m||g)&&l(e);return f(new o.ConnectionString(`mongodb://${m||h(e)}:${g||d(e)}/${encodeURIComponent(y||"")}`))}(e);if(t.hosts.every(e=>["localhost","127.0.0.1"].includes(e.split(":")[0]))){const e=t.searchParams;e.has("serverSelectionTimeoutMS")||e.set("serverSelectionTimeoutMS","2000")}return t.toString()}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.redactConnectionString=t.redactValidConnectionString=void 0;const o=s(n(120));t.redactValidConnectionString=function(e,t){var n,r;const i=e.clone(),s=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"_credentials_",a=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;if((i.username||i.password)&&a?(i.username=s,i.password=""):i.password&&(i.password=s),i.searchParams.has("authMechanismProperties")){const e=new o.CommaAndColonSeparatedRecord(i.searchParams.get("authMechanismProperties"));e.get("AWS_SESSION_TOKEN")&&(e.set("AWS_SESSION_TOKEN",s),i.searchParams.set("authMechanismProperties",e.toString()))}return i.searchParams.has("tlsCertificateKeyFilePassword")&&i.searchParams.set("tlsCertificateKeyFilePassword",s),i.searchParams.has("proxyUsername")&&a&&i.searchParams.set("proxyUsername",s),i.searchParams.has("proxyPassword")&&i.searchParams.set("proxyPassword",s),i},t.redactConnectionString=function(e,t){var n,r;const i=null!==(n=null==t?void 0:t.replacementString)&&void 0!==n?n:"<credentials>",s=null===(r=null==t?void 0:t.redactUsernames)||void 0===r||r;let a;try{a=new o.default(e)}catch(e){}if(a)return t={...t,replacementString:"___credentials___"},a.redact(t).toString().replace(/___credentials___/g,i);const l=[s?/(?<=\/\/)(.*)(?=@)/g:/(?<=\/\/[^@]+:)(.*)(?=@)/g,/(?<=AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,/(?<=tlsCertificateKeyFilePassword=)([^&]+)/gi,s?/(?<=proxyUsername=)([^&]+)/gi:null,/(?<=proxyPassword=)([^&]+)/gi];for(const t of l)null!==t&&(e=e.replace(t,i));return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapCliToDriver=void 0;const r=n(120);function i(e,t,n){return{...e,driverOptions:{...e.driverOptions,[t]:n}}}function s(e,t,n){var r;const s=e.driverOptions.serverApi,o="string"==typeof s?{version:s}:null!==(r={...s})&&void 0!==r?r:{};return o[t]=n,i(e,"serverApi",o)}function o(e,t,n){var r;const s=null!==(r=e.driverOptions.autoEncryption)&&void 0!==r?r:{};return s[t]=n,i(e,"autoEncryption",s)}function a(e,t,n){var r,i;const s=null!==(i=null===(r=e.driverOptions.autoEncryption)||void 0===r?void 0:r.extraOptions)&&void 0!==i?i:{};return s[t]=n,o(e,"extraOptions",s)}function l(e,t,n){var r,i;const{kmsProviders:s}=null!==(r=e.driverOptions.autoEncryption)&&void 0!==r?r:{},a=null!==(i=null==s?void 0:s.aws)&&void 0!==i?i:{};return a[t]=n,o(e,"kmsProviders",{...s,aws:a})}function u(e,t,n){const i=new r.ConnectionString(e.connectionString,{looseValidation:!0}),s=i.typedSearchParams();return""===n||void 0===n?s.delete(t):s.set(t,n),{...e,connectionString:i.toString()}}function c(e,t,n){const i=new r.ConnectionString(e.connectionString,{looseValidation:!0});return i[t]=n,{...e,connectionString:i.toString()}}function h(e,t,n){const i=new r.ConnectionString(e.connectionString,{looseValidation:!0}),s=new r.CommaAndColonSeparatedRecord(i.typedSearchParams().get("authMechanismProperties"));return""===n||void 0===n?s.delete(t):s.set(t,n),u(e,"authMechanismProperties",s)}const d={apiDeprecationErrors:(e,t)=>s(e,"deprecationErrors",t),apiStrict:(e,t)=>s(e,"strict",t),apiVersion:(e,t)=>s(e,"version",t),awsAccessKeyId:(e,t)=>l(e,"accessKeyId",t),awsSecretAccessKey:(e,t)=>l(e,"secretAccessKey",t),awsSessionToken:(e,t)=>l(e,"sessionToken",t),awsIamSessionToken:(e,t)=>h(e,"AWS_SESSION_TOKEN",t),csfleLibraryPath:(e,t)=>a(e,"cryptSharedLibPath",t),cryptSharedLibPath:(e,t)=>a(e,"cryptSharedLibPath",t),gssapiServiceName:(e,t)=>h(e,"SERVICE_NAME",t),sspiRealmOverride:(e,t)=>h(e,"SERVICE_REALM",t),sspiHostnameCanonicalization:(e,t)=>h(e,"CANONICALIZE_HOST_NAME",function(e){if(""===e)return;if("true"===e||"false"===e)return"true"===e;return e}(t)),authenticationDatabase:(e,t)=>u(e,"authSource",t),authenticationMechanism:(e,t)=>u(e,"authMechanism",t),keyVaultNamespace:(e,t)=>o(e,"keyVaultNamespace",t),password:(e,t)=>c(e,"password",encodeURIComponent(t)),quiet:(e,t)=>t?i(e,"loggerLevel","error"):e,retryWrites:(e,t)=>u(e,"retryWrites",t),tls:(e,t)=>u(e,"tls",t),tlsAllowInvalidCertificates:(e,t)=>u(e,"tlsAllowInvalidCertificates",t),tlsAllowInvalidHostnames:(e,t)=>u(e,"tlsAllowInvalidHostnames",t),tlsCAFile:(e,t)=>u(e,"tlsCAFile",t),tlsCRLFile:(e,t)=>u(e,"sslCRL",t),tlsCertificateKeyFile:(e,t)=>u(e,"tlsCertificateKeyFile",t),tlsCertificateKeyFilePassword:(e,t)=>u(e,"tlsCertificateKeyFilePassword",t),tlsUseSystemCA:(e,t)=>i(e,"useSystemCA",t),username:(e,t)=>c(e,"username",encodeURIComponent(t)),verbose:(e,t)=>t?i(e,"loggerLevel","debug"):e};function f(e,t,n){var r,i;return null!==(i=null===(r=d[t])||void 0===r?void 0:r.call(d,e,n))&&void 0!==i?i:e}function p(e,t){for(const n of Object.keys(e)){const r=e[n];r&&(t=f(t,n,r))}return t}t.mapCliToDriver=p,t.default=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(9),o=n(23),a=n(5),l=i(n(119)),u=n(7),c=n(13);let h=class extends s.ShellApiWithMongoClass{constructor(e,t,n){super(),this._session=n,this._options=t,this._mongo=e,this._databases={},this.id=n.id}[a.asPrintable](){return this._session.id}getDatabase(e){if((0,c.assertArgsDefinedType)([e],["string"],"Session.getDatabase"),!(0,c.isValidDatabaseName)(e))throw new u.MongoshInvalidInputError("Invalid database name: "+e,u.CommonErrors.InvalidArgument);return e in this._databases||(this._databases[e]=new l.default(this._mongo,e,this)),this._databases[e]}advanceOperationTime(e){this._session.advanceOperationTime(e)}advanceClusterTime(e){this._session.advanceClusterTime(e)}async endSession(){return await this._session.endSession()}hasEnded(){return this._session.hasEnded}getClusterTime(){return this._session.clusterTime}getOperationTime(){return this._session.operationTime}getOptions(){return this._options}startTransaction(e={}){return this._session.startTransaction(e)}async commitTransaction(){return await this._session.commitTransaction()}async abortTransaction(){return await this._session.abortTransaction()}async withTransaction(e,t={}){return(0,c.assertArgsDefinedType)([e,t],["function",[void 0,"object"]]),await this._session.withTransaction(async()=>await e(),t)}};r([s.returnsPromise],h.prototype,"endSession",null),r([s.returnsPromise],h.prototype,"commitTransaction",null),r([s.returnsPromise],h.prototype,"abortTransaction",null),r([s.returnsPromise],h.prototype,"withTransaction",null),h=r([s.shellApiClassDefault,(0,s.classPlatforms)([o.ReplPlatform.CLI])],h),t.default=h},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyVault=t.ClientEncryption=void 0;const i=n(9),s=n(23),o=n(13),a=n(5),l=n(32),u=n(7),c=e=>!Array.isArray(e)&&"object"==typeof e&&("masterKey"in e||"keyAltNames"in e||"keyMaterial"in e);let h=class extends i.ShellApiWithMongoClass{constructor(e){super(),this._mongo=e;const t=e._serviceProvider.fle;if(!t)throw new u.MongoshRuntimeError("FLE API is not available");const n={...this._mongo._fleOptions};delete n.schemaMap,delete n.encryptedFieldsMap,this._libmongocrypt=new t.ClientEncryption(e._serviceProvider.getRawClient(),n)}[a.asPrintable](){return"ClientEncryption class for "+(0,l.redactURICredentials)(this._mongo._uri)}async encrypt(e,t,n){let r;return r="object"==typeof n?{keyId:e,...n}:{keyId:e,algorithm:n},(0,o.assertArgsDefinedType)([e,t,r],[!0,!0,!0],"ClientEncryption.encrypt"),await this._libmongocrypt.encrypt(t,r)}async decrypt(e){return(0,o.assertArgsDefinedType)([e],[!0],"ClientEncryption.decrypt"),await this._libmongocrypt.decrypt(e)}};r([i.returnsPromise],h.prototype,"encrypt",null),r([i.returnsPromise],h.prototype,"decrypt",null),h=r([i.shellApiClassDefault,(0,i.classPlatforms)([s.ReplPlatform.CLI])],h),t.ClientEncryption=h;let d=class extends i.ShellApiWithMongoClass{constructor(e){var t,n,r;super(),this._mongo=e._mongo,this._clientEncryption=e;const i=null===(n=null===(t=this._mongo)||void 0===t?void 0:t._fleOptions)||void 0===n?void 0:n.keyVaultNamespace;if(!i)throw new u.MongoshInvalidInputError("FLE options must be passed to the Mongo object");const s=null===(r=i.match(/^(?<db>[^.]+)\.(?<coll>.+)$/))||void 0===r?void 0:r.groups;if(!s)throw new u.MongoshInvalidInputError(`Invalid keyVaultNamespace '${i}'`);const{db:o,coll:a}=s;this._keyColl=this._mongo.getDB(o).getCollection(a)}async _init(){var e;if(!(null===(e=this._mongo._fleOptions)||void 0===e?void 0:e.bypassQueryAnalysis)){try{if((await this._keyColl.getIndexKeys()).some(e=>e.keyAltNames))return}catch(e){}try{await this._keyColl.updateMany({keyAltNames:{$size:0}},{$unset:{keyAltNames:""},$currentDate:{updateDate:!0}}),await this._keyColl.createIndex({keyAltNames:1},{unique:!0,partialFilterExpression:{keyAltNames:{$exists:!0}}})}catch(e){await this._instanceState.printWarning(`Creating 'keyAltNames' index on '${this._keyColl.getFullName()}' failed: ${e.message}`)}}}[a.asPrintable](){return"KeyVault class for "+(0,l.redactURICredentials)(this._mongo._uri)}async createKey(e,t,n){let r,i,s,a;if(c(t)?(r=null==t?void 0:t.masterKey,i=null==t?void 0:t.keyAltNames,s=null==t?void 0:t.keyMaterial):(e=>!Array.isArray(e)&&"object"==typeof e&&!c(e))(t)&&(r=t),n&&(i=n),(0,o.assertArgsDefinedType)([e],[!0],"KeyVault.createKey"),"string"==typeof t){if("local"!==e||""!==t)throw new u.MongoshInvalidInputError('KeyVault.createKey does not support providing masterKey as string anymore. For AWS please use createKey("aws", { region: ..., key: ... })',u.CommonErrors.Deprecated);r=void 0}else if(Array.isArray(t)){if("local"!==e)throw new u.MongoshInvalidInputError("KeyVault.createKey requires masterKey to be given as second argument if KMS is not local",u.CommonErrors.InvalidArgument);if(i)throw new u.MongoshInvalidInputError("KeyVault.createKey was supplied with an array for the masterKey and keyAltNames - either specify keyAltNames as second argument or set undefined for masterKey",u.CommonErrors.InvalidArgument);i=t,r=void 0}return r&&(a={...null!=a?a:{},masterKey:r}),i&&(a={...null!=a?a:{},keyAltNames:i}),s&&(a={...null!=a?a:{},keyMaterial:s}),await this._clientEncryption._libmongocrypt.createDataKey(e,a)}async getKey(e){return(0,o.assertArgsDefinedType)([e],[!0],"KeyVault.getKey"),this._keyColl.find({_id:e})}async getKeyByAltName(e){return(0,o.assertArgsDefinedType)([e],["string"],"KeyVault.getKeyByAltName"),this._keyColl.find({keyAltNames:e})}async getKeys(){return this._keyColl.find({})}async deleteKey(e){return(0,o.assertArgsDefinedType)([e],[!0],"KeyVault.deleteKey"),this._keyColl.deleteOne({_id:e})}async addKeyAlternateName(e,t){return(0,o.assertArgsDefinedType)([e,t],[!0,"string"],"KeyVault.addKeyAlternateName"),this._keyColl.findAndModify({query:{_id:e},update:{$addToSet:{keyAltNames:t},$currentDate:{updateDate:!0}}})}async removeKeyAlternateName(e,t){(0,o.assertArgsDefinedType)([e,t],[!0,"string"],"KeyVault.removeKeyAlternateName");const n=await this._keyColl.findAndModify({query:{_id:e},update:{$pull:{keyAltNames:t},$currentDate:{updateDate:!0}}});return null!==n&&void 0!==n.keyAltNames&&1===n.keyAltNames.length&&n.keyAltNames[0]===t?this._keyColl.findAndModify({query:{_id:e,keyAltNames:{$size:0}},update:{$unset:{keyAltNames:""},$currentDate:{updateDate:!0}}}):n}async rewrapManyDataKey(e,t){return this._clientEncryption._libmongocrypt.rewrapManyDataKey(e,t)}async createDataKey(...e){return await this.createKey(...e)}async removeKeyAltName(...e){return await this.removeKeyAlternateName(...e)}async addKeyAltName(...e){return await this.addKeyAlternateName(...e)}};r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"createKey",null),r([(0,i.returnType)("Cursor"),(0,i.apiVersions)([1]),i.returnsPromise],d.prototype,"getKey",null),r([(0,i.returnType)("Cursor"),(0,i.apiVersions)([1]),i.returnsPromise],d.prototype,"getKeyByAltName",null),r([(0,i.returnType)("Cursor"),(0,i.apiVersions)([1]),i.returnsPromise],d.prototype,"getKeys",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"deleteKey",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"addKeyAlternateName",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"removeKeyAlternateName",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"rewrapManyDataKey",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"createDataKey",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"removeKeyAltName",null),r([i.returnsPromise,(0,i.apiVersions)([1])],d.prototype,"addKeyAltName",null),d=r([i.shellApiClassDefault,(0,i.classPlatforms)([s.ReplPlatform.CLI])],d),t.KeyVault=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseAnyLogEntry=void 0,t.parseAnyLogEntry=function(e){var t;try{const n=JSON.parse(e);return{id:n.id,timestamp:null===(t=n.t)||void 0===t?void 0:t.$date,severity:n.s,component:n.c,context:n.ctx,message:n.msg,attr:n.attr}}catch(t){return function(e){const t=e.trim().match(/^(?<timestamp>\S*) *(?<severity>\S*) *(?<component>\S*) *\[(?<context>[^\]]+)\]\s*(?<message>.*)$/);if(!t)throw new Error("Could not parse line "+JSON.stringify(e));return t.groups}(e)}}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};Object.defineProperty(t,"__esModule",{value:!0}),t.DBQuery=void 0;const i=n(9);let s=class extends i.ShellApiClass{constructor(e){super(),this._instanceState=e}get shellBatchSize(){return this._instanceState.displayBatchSizeFromDBQuery}set shellBatchSize(e){this._instanceState.printDeprecationWarning('DBQuery.shellBatchSize is deprecated, please use config.set("displayBatchSize") instead'),this._instanceState.displayBatchSizeFromDBQuery=e}};s=r([i.shellApiClassDefault,i.classDeprecated],s),t.DBQuery=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CliUserConfigValidator=t.CliUserConfig=t.SnippetShellUserConfigValidator=t.SnippetShellUserConfig=t.ShellUserConfigValidator=t.ShellUserConfig=void 0;class r{constructor(){this.displayBatchSize=20,this.maxTimeMS=null,this.enableTelemetry=!1,this.editor=null}}t.ShellUserConfig=r;class i{static async validate(e,t){switch(e){case"displayBatchSize":return"number"!=typeof t||t<=0?e+" must be a positive integer":null;case"maxTimeMS":return null!==t&&("number"!=typeof t||t<=0)?e+" must be null or a positive integer":null;case"enableTelemetry":return"boolean"!=typeof t?e+" must be a boolean":null;case"editor":return"string"!=typeof t&&null!==t?e+" must be a string or null":null;default:return e+" is not a known config option"}}}t.ShellUserConfigValidator=i;class s extends r{constructor(){super(...arguments),this.snippetIndexSourceURLs="https://compass.mongodb.com/mongosh/snippets-index.bson.br",this.snippetRegistryURL="https://registry.npmjs.org",this.snippetAutoload=!0}}t.SnippetShellUserConfig=s;class o extends i{static async validate(e,t){switch(e){case"snippetIndexSourceURLs":return"string"!=typeof t||t.split(";").some(e=>e&&!a(e))?e+" must be a ;-separated list of valid URLs":null;case"snippetRegistryURL":return"string"==typeof t&&a(t)?null:e+" must be a valid URL";case"snippetAutoload":return"boolean"!=typeof t?e+" must be a boolean":null;default:return super.validate(e,t)}}}t.SnippetShellUserConfigValidator=o;t.CliUserConfig=class extends s{constructor(){super(...arguments),this.userId="",this.telemetryAnonymousId="",this.disableGreetingMessage=!1,this.forceDisableTelemetry=!1,this.inspectCompact=3,this.inspectDepth=6,this.historyLength=1e3,this.showStackTraces=!1,this.redactHistory="remove"}};function a(e){if("function"==typeof URL)try{return new URL(e),!0}catch(e){return!1}return!0}t.CliUserConfigValidator=class extends o{static async validate(e,t){switch(e){case"userId":case"telemetryAnonymousId":case"disableGreetingMessage":return null;case"inspectCompact":return"boolean"!=typeof t&&("number"!=typeof t||t<0)?e+" must be a boolean or a positive integer":null;case"inspectDepth":case"historyLength":return"number"!=typeof t||t<0?e+" must be a positive integer":null;case"forceDisableTelemetry":case"showStackTraces":return"boolean"!=typeof t?e+" must be a boolean":null;case"redactHistory":return"keep"!==t&&"remove"!==t&&"remove-redact"!==t?e+" must be one of 'keep', 'remove', or 'remove-redact'":null;default:return super.validate(e,t)}}}},function(e){e.exports=JSON.parse('{"name":"@mongosh/shell-api","version":"1.5.4","description":"MongoDB Shell API Classes Package","main":"lib/index.js","types":"lib/index.d.ts","config":{"unsafe-perm":true},"repository":{"type":"git","url":"git://github.com/mongodb-js/mongosh.git"},"scripts":{"compile-ts":"tsc -p tsconfig.json","pretest":"npm run compile-ts","lint":"eslint --report-unused-disable-directives \\"./{src,test}/**/*.{js,ts,tsx}\\"","check":"npm run lint && depcheck --skip-missing=true","report-missing-help":"ts-node bin/report-missing-help.ts","report-supported-api":"ts-node bin/report-supported-api.ts","test":"cross-env TS_NODE_PROJECT=../../config/tsconfig.test.json mocha -r \\"../../scripts/import-expansions.js\\" --timeout 60000 -r ts-node/register \\"./src/**/*.spec.ts\\"","test-ci":"node ../../scripts/run-if-package-requested.js npm test","test-apistrict-ci":"cross-env MONGOSH_TEST_FORCE_API_STRICT=1 npm run test-ci","prepublish":"npm run compile-ts"},"license":"Apache-2.0","publishConfig":{"access":"public"},"engines":{"node":">=14.15.1"},"precommit":["build"],"dependencies":{"@mongosh/arg-parser":"1.5.4","@mongosh/errors":"1.5.4","@mongosh/history":"1.5.4","@mongosh/i18n":"1.5.4","@mongosh/service-provider-core":"1.5.4","mongodb-redact":"^0.2.2"},"devDependencies":{"@mongosh/types":"1.5.4"},"gitHead":"92fc4d6ce4b4eed4d8d29bc0d38a9eb50831d14e"}')},function(e,t,n){const r=n(52);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},function(e,t,n){const r=n(52);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},function(e,t,n){const r=n(12);e.exports=(e,t,n,i)=>{"string"==typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(e){return null}}},function(e,t,n){const r=n(52),i=n(123);e.exports=(e,t)=>{if(i(e,t))return null;{const n=r(e),i=r(t),s=n.prerelease.length||i.prerelease.length,o=s?"pre":"",a=s?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==i[e])return o+e;return a}}},function(e,t,n){const r=n(12);e.exports=(e,t)=>new r(e,t).major},function(e,t,n){const r=n(12);e.exports=(e,t)=>new r(e,t).minor},function(e,t,n){const r=n(12);e.exports=(e,t)=>new r(e,t).patch},function(e,t,n){const r=n(52);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},function(e,t,n){const r=n(19);e.exports=(e,t,n)=>r(t,e,n)},function(e,t,n){const r=n(19);e.exports=(e,t)=>r(e,t,!0)},function(e,t,n){const r=n(124);e.exports=(e,t)=>e.sort((e,n)=>r(e,n,t))},function(e,t,n){const r=n(124);e.exports=(e,t)=>e.sort((e,n)=>r(n,e,t))},function(e,t,n){const r=n(12),i=n(52),{re:s,t:o}=n(51);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=s[o.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[o.COERCERTL].lastIndex=-1}else n=e.match(s[o.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},function(e,t,n){"use strict";const r=n(490),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),u=Symbol("dispose"),c=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[a])return}else n&&(e[f]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},y=e=>{if(e[s]>e[i])for(let t=e[h].tail;e[s]>e[i]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[s]-=n.length,e[d].delete(n.key),e[h].removeNode(t)}};class b{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const w=(e,t,n,r)=>{let i=n.value;g(e,i)&&(v(e,n),e[a]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[u]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,y(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,y(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[s]=0,this[h].forEach(e=>{e.length=this[o](e.value,e.key),this[s]+=e.length})),y(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let n=this[h].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[h].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[h].toArray().map(e=>e.key)}values(){return this[h].toArray().map(e=>e.value)}reset(){this[u]&&this[h]&&this[h].length&&this[h].forEach(e=>this[u](e.key,e.value)),this[d]=new Map,this[h]=new r,this[s]=0}dump(){return this[h].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[h]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[o](t,e);if(this[d].has(e)){if(a>this[i])return v(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[u]&&(this[c]||this[u](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[s]+=a-o.length,o.length=a,this.get(e),y(this),!0}const f=new b(e,t,a,r,n);return f.length>this[i]?(this[u]&&this[u](e,t),!1):(this[s]+=f.length,this[h].unshift(f),this[d].set(e,this[h].head),y(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[h].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach((e,t)=>m(this,t,!1))}}},function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function s(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)n.push(s.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)n.push(s.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,s=this.head;null!==s&&r<e;r++)s=s.next;var o=[];for(r=0;s&&r<t;r++)o.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(r=0;r<n.length;r++)s=i(this,s,n[r]);return o},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(491)(r)}catch(e){}},function(e,t,n){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,n){const r=n(20);e.exports=(e,t)=>new r(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,n){const r=n(12),i=n(20);e.exports=(e,t,n)=>{let s=null,o=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new r(s,n)))}),s}},function(e,t,n){const r=n(12),i=n(20);e.exports=(e,t,n)=>{let s=null,o=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new r(s,n)))}),s}},function(e,t,n){const r=n(12),i=n(20),s=n(74);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let o=null;i.forEach(e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!o||n&&!s(n,o)||(n=o)}return n&&e.test(n)?n:null}},function(e,t,n){const r=n(20);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},function(e,t,n){const r=n(128);e.exports=(e,t,n)=>r(e,t,">",n)},function(e,t,n){const r=n(128);e.exports=(e,t,n)=>r(e,t,"<",n)},function(e,t,n){const r=n(20);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},function(e,t,n){const r=n(76),i=n(19);e.exports=(e,t,n)=>{const s=[];let o=null,a=null;const l=e.sort((e,t)=>i(e,t,n));for(const e of l){r(e,t,n)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push("<="+t):u.push(`${e} - ${t}`):u.push(">="+e):u.push("*");const c=u.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return c.length<h.length?c:t}},function(e,t,n){const r=n(20),i=n(75),{ANY:s}=i,o=n(76),a=n(19),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=[new i(">=0.0.0")]}const r=new Set;let l,h,d,f,p,m,g;for(const t of e)">"===t.operator||">="===t.operator?l=u(l,t,n):"<"===t.operator||"<="===t.operator?h=c(h,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&h){if(d=a(l.semver,h.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==h.operator))return null}for(const e of r){if(l&&!o(e,String(l),n))return null;if(h&&!o(e,String(h),n))return null;for(const r of t)if(!o(e,String(r),n))return!1;return!0}let y=!(!h||n.includePrerelease||!h.semver.prerelease.length)&&h.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;y&&1===y.prerelease.length&&"<"===h.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(f=u(l,e,n),f===e&&f!==l)return!1}else if(">="===l.operator&&!o(l.semver,String(e),n))return!1;if(h)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(p=c(h,e,n),p===e&&p!==h)return!1}else if("<="===h.operator&&!o(h.semver,String(e),n))return!1;if(!e.operator&&(h||l)&&0!==d)return!1}return!(l&&m&&!h&&0!==d)&&(!(h&&g&&!l&&0!==d)&&(!v&&!y))},u=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},function(e,t,n){e.exports=n(129),e.exports.QueryAutoCompleter=n(129),e.exports.StageAutoCompleter=n(503),e.exports.ValidationAutoCompleter=n(504),e.exports.ACCUMULATORS=n(215),e.exports.BSON_TYPES=n(77),e.exports.EXPRESSION_OPERATORS=n(214),e.exports.CONVERSION_OPERATORS=n(213),e.exports.QUERY_OPERATORS=n(130),e.exports.STAGE_OPERATORS=n(505),e.exports.JSON_SCHEMA=n(216),e.exports.BSON_TYPE_ALIASES=n(217);const{ATLAS:r,ADL:i,ON_PREM:s,ENVS:o}=n(218);e.exports.ATLAS=r,e.exports.ADL=i,e.exports.ON_PREM=s,e.exports.ENVS=o},function(e,t,n){const r=n(121),i=n(213),s=n(214),o=n(215),a=n(77),l=n(129),u=n(131),c=s.concat(i.concat(a));e.exports=class{accumulators(){if(this.stageOperator){if("$project"===this.stageOperator)return o.filter(e=>e.projectVersion&&r.gte(this.version,e.projectVersion));if("$group"===this.stageOperator)return o}return[]}constructor(e,t,n,r){this.version=e,this.textCompleter=t,this.fields=n,this.variableFields=this.generateVariableFields(n),this.stageOperator=r,this.queryAutoCompleter=new l(e,t,n)}update(e,t){this.fields=e,this.variableFields=this.generateVariableFields(e),this.queryAutoCompleter.fields=e,this.stageOperator=t}generateVariableFields(e){return e.map(e=>({name:"$"+e.name.replace(/"/g,""),value:"$"+e.value.replace(/"/g,""),meta:e.meta,version:e.version,score:1}))}getCompletions(e,t,n,r,i){if(""===r)return i(null,[]);const s=t.getTokenAt(n.row,n.column);if("string"===s.type)return"$"===r?i(null,this.variableFields):this.textCompleter.getCompletions(e,t,n,r,i);if(s.type.includes("comment"))return i(null,[]);if(!this.stageOperator||"$match"!==this.stageOperator){const e=c.concat(this.accumulators()).concat(this.fields);return i(null,u(this.version,e,r))}this.queryAutoCompleter.getCompletions(e,t,n,r,i)}}},function(e,t,n){const r=n(130),i=n(77),s=n(216),o=n(217),a=n(131),l=r.concat(i);e.exports=class{constructor(e,t,n){this.version=e,this.textCompleter=t,this.fields=n}update(e){this.fields=e}getCompletions(e,t,n,r,i){if(""===r)return i(null,[]);if("string"===t.getTokenAt(n.row,n.column).type){const e=o.concat(this.fields);return i(null,a(this.version,e,r))}const u=l.concat(this.fields,s);return i(null,a(this.version,u,r))}}},function(e,t,n){const{ATLAS:r,ADL:i,ON_PREM:s}=n(218),o=[{name:"$addFields",value:"$addFields",label:"$addFields",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value.",comment:"/**\n * newField: The new field name.\n * expression: The new field expression.\n */\n",snippet:"{\n ${1:newField}: ${2:expression}, ${3:...}\n}"},{name:"$bucket",value:"$bucket",label:"$bucket",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Categorizes incoming documents into groups, called buckets, based on specified boundaries.",comment:"/**\n * groupBy: The expression to group by.\n * boundaries: An array of the lower boundaries for each bucket.\n * default: The bucket name for documents that do not fall within the specified boundaries\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n */\n",snippet:"{\n groupBy: ${1:expression},\n boundaries: [ ${2:lowerbound}, ${3:...} ],\n default: ${4:literal},\n output: {\n ${5:outputN}: { ${6:accumulator} }, ${7:...}\n }\n}"},{name:"$bucketAuto",value:"$bucketAuto",label:"$bucketAuto",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible.",comment:"/**\n * groupBy: The expression to group by.\n * buckets: The desired number of buckets\n * output: {\n * outputN: Optional. The output object may contain a single or numerous field names used to accumulate values per bucket.\n * }\n * granularity: Optional number series\n */\n",snippet:"{\n groupBy: ${1:expression},\n buckets: ${2:number},\n output: {\n ${3:outputN}: ${4:accumulator}, ${5:...}\n },\n granularity: '${6:string}'\n}"},{name:"$collStats",value:"$collStats",label:"$collStats",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[],description:"Returns statistics regarding a collection or view.",comment:"/**\n * histograms: Optional latency histograms.\n * storageStats: Optional storage stats.\n*/\n",snippet:"{\n latencyStats: {\n histograms: ${1:boolean}\n },\n storageStats: {${2:}},\n}"},{name:"$count",value:"$count",label:"$count",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Returns a count of the number of documents at this stage of the aggregation pipeline.",comment:"/**\n * Provide the field name for the count.\n */\n",snippet:"'${1:string}'"},{name:"$densify",value:"$densify",label:"$densify",score:1,env:[r,i,s],meta:"stage",version:"5.1.0",apiVersions:[1],description:"Creates new documents to eliminate the gaps in the time or numeric domain at the required granularity level.",comment:"/**\n * field: The required field to densify.\n * partitionByFields: The set of fields that acts as a compound key to define each partition.\n * range: {\n * step: The amount to increment the field value in each document.\n * unit: If specified field must evaluate to a date for every document in the collection, otherwise must evaluate to a numeric.\n * bounds: A string or array of numeric/date bounds, corresponding to the type of the field.\n * }\n */\n",snippet:"{\n field: ${1:string},\n partitionByFields: [${2:string}, ${3:string}, ...],\n range: {\n step: ${4:number},\n unit: ${5:string},\n bounds: [${6:lowerbound}, ${7:upperbound}, ...]\n }\n}"},{name:"$documents",value:"$documents",label:"$documents",score:1,env:[r],meta:"stage",version:"4.4.9",apiVersions:[1],description:"Returns literal results for a full-text search.",comment:"/**\n * expression: Any valid expression.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$facet",value:"$facet",label:"$facet",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Allows for multiple parellel aggregations to be specified.",comment:"/**\n * outputFieldN: The first output field.\n * stageN: The first aggregation stage.\n */\n",snippet:"{\n ${1:outputFieldN}: [ ${2:stageN}, ${3:...} ]\n}"},{name:"$fill",value:"$fill",label:"$fill",score:1,env:[r,i,s],meta:"stage",version:"5.3.0",apiVersions:[1],description:"Populates null and missing field values within documents.",comment:'/**\n * sortBy: Syntax is the same as $sort, required if "method" is used in at least one output spec otherwise optional\n * partitionBy: Optional, default is a single partition. Specification is the same as _id in $group (same as partitionBy in window functions).\n * partitionByFields: Optional, set of fields that acts as a compound key to define each partition.\n * output - Required, object for each field to fill in. For a single field, can be a single object.\n * output.<field> - A field to be filled with value, if missing or null in the current document.\n */\n',snippet:"{\n sortBy: ${1:sortSpec},\n partitionBy: ${2:expression},\n partitionByFields: [${3:string}, ${4:string}, ...],\n output: {\n field1: {value: ${5:expression}},\n field2: {method: ${6:string}},\n ...\n }\n}"},{name:"$geoNear",value:"$geoNear",label:"$geoNear",score:1,env:[r,i,s],meta:"stage",version:"2.4.0",apiVersions:[1],description:"Returns documents based on proximity to a geospatial point.",comment:"/**\n * near: The point to search near.\n * distanceField: The calculated distance.\n * maxDistance: The maximum distance, in meters, documents can be before being excluded from results.\n * query: Limits results that match the query\n * includeLocs: Optional. Labels and includes the point used to match the document.\n * num: Optional. The maximum number of documents to return.\n * spherical: Defaults to false. Specifies whether to use spherical geometry.\n}",snippet:"{\n near: { type: 'Point', coordinates: [ ${1:number}, ${2:number} ] },\n distanceField: '${3:string}',\n maxDistance: ${4:number},\n query: {${5}},\n includeLocs: '${6}',\n num: ${7:number},\n spherical: ${8:boolean}\n}"},{name:"$graphLookup",value:"$graphLookup",label:"$graphLookup",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Performs a recursive search on a collection.",comment:"/**\n * from: The target collection.\n * startWith: Expression to start.\n * connectFromField: Field to connect.\n * connectToField: Field to connect to.\n * as: Name of the array field.\n * maxDepth: Optional max recursion depth.\n * depthField: Optional Name of the depth field.\n * restrictSearchWithMatch: Optional query.\n */\n",snippet:"{\n from: '${1:string}',\n startWith: ${2:expression},\n connectFromField: '${3:string}',\n connectToField: '${4:string}',\n as: '${5:string}',\n maxDepth: ${6:number},\n depthField: '${7:string}',\n restrictSearchWithMatch: {${8}}\n}"},{name:"$group",value:"$group",label:"$group",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Groups documents by a specified expression.",comment:"/**\n * _id: The id of the group.\n * fieldN: The first field name.\n */\n",snippet:"{\n _id: ${1:expression},\n ${2:fieldN}: {\n ${3:accumulatorN}: ${4:expressionN}\n }\n}"},{name:"$indexStats",value:"$indexStats",label:"$indexStats",score:1,env:[r,i,s],meta:"stage",version:"3.2.0",apiVersions:[],description:"Returns statistics regarding the use of each index for the collection.",comment:"/**\n * No parameters.\n */\n",snippet:"{}"},{name:"$limit",value:"$limit",label:"$limit",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Limits the number of documents that flow into subsequent stages.",comment:"/**\n * Provide the number of documents to limit.\n */\n",snippet:"${1:number}"},{name:"$lookup",value:"$lookup",label:"$lookup",score:1,env:[r,i,s],meta:"stage",version:"3.2.0",apiVersions:[1],description:"Performs a join between two collections.",comment:"/**\n * from: The target collection.\n * localField: The local join field.\n * foreignField: The target join field.\n * as: The name for the results.\n * pipeline: The pipeline to run on the joined collection.\n * let: Optional variables to use in the pipeline field stages.\n */\n",snippet:"{\n from: '${1:string}',\n localField: '${2:string}',\n foreignField: '${3:string}',\n as: '${4:string}'\n}"},{name:"$match",value:"$match",label:"$match",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Filters the document stream to allow only matching documents to pass through to subsequent stages.",comment:"/**\n * query: The query in MQL.\n */\n",snippet:"{\n ${1:query}\n}"},{name:"$merge",value:"$merge",label:"$merge",score:1,env:[r,i,s],meta:"stage",version:"4.1.11",apiVersions:[1],description:"Merges the resulting documents into a collection, optionally overriding existing documents.",comment:"/**\n * into: The target collection.\n * on: Fields to identify.\n * let: Defined variables.\n * whenMatched: Action for matching docs.\n * whenNotMatched: Action for non-matching docs.\n */\n",snippet:"{\n into: '${1:string}',\n on: '${2:string}',\n let: '${3:specification(s)}',\n whenMatched: '${4:string}',\n whenNotMatched: '${5:string}'\n}"},{name:"$out",value:"$out",label:"$out",score:1,env:[r,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Writes the result of a pipeline to a new or existing collection.",comment:"/**\n * Provide the name of the output collection.\n */\n",snippet:"'${1:string}'"},{name:"$out",value:"$out",label:"$out",score:1,env:[i],meta:"stage",version:"4.0.0",apiVersions:[1],description:"Writes the result of a pipeline to an Atlas cluster or S3 bucket.",comment:"/**\n * s3Url: A S3 URL to save the data.\n * atlas: Parameters to save to Atlas.\n */\n",snippet:"{\n s3: '${1:s3url}'\n atlas: {\n db: '${2:db}',\n coll: '${3:coll}',\n projectId: '${4:projectId}',\n clusterName: '${5:clusterName}'\n }\n}"},{name:"$project",value:"$project",label:"$project",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields.",comment:"/**\n * specifications: The fields to\n * include or exclude.\n */\n",snippet:"{\n ${1:specification(s)}\n}"},{name:"$redact",value:"$redact",label:"$redact",score:1,env:[r,i,s],meta:"stage",version:"2.6.0",apiVersions:[1],description:"Restricts the content for each document based on information stored in the documents themselves",comment:"/**\n * expression: Any valid expression that\n * evaluates to $$DESCEND, $$PRUNE, or $$KEEP.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$replaceWith",value:"$replaceWith",label:"$replaceWith",score:1,env:[r,i,s],meta:"stage",version:"4.2.0",apiVersions:[1],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newWith: ${1:replacementDocument}\n}"},{name:"$replaceRoot",value:"$replaceRoot",label:"$replaceRoot",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Replaces a document with the specified embedded document.",comment:"/**\n * replacementDocument: A document or string.\n */\n",snippet:"{\n newRoot: ${1:replacementDocument}\n}"},{name:"$sample",value:"$sample",label:"$sample",score:1,env:[r,i,s],meta:"stage",version:"3.2.0",apiVersions:[1],description:"Randomly selects the specified number of documents from its input.",comment:"/**\n * size: The number of documents to sample.\n */\n",snippet:"{\n size: ${1:number}\n}"},{name:"$search",value:"$search",label:"$search",score:1,env:[r],meta:"stage",version:"4.1.11",apiVersions:[],description:"Performs a full-text search on the specified field(s).",comment:"/** \n * index: The name of the Search index.\n * text: Analyzed search, with required fields of query and path, the analyzed field(s) to search.\n * term: Un-analyzed search.\n * compound: Combines ops.\n * span: Find in text field regions.\n * exists: Test for presence of a field.\n * near: Find near number or date.\n * range: Find in numeric or date range.\n */\n",snippet:"{\n index: '${1:string}',\n text: {\n query: '${2:string}',\n path: '${3:string}'\n }\n}"},{name:"$searchMeta",value:"$searchMeta",label:"$searchMeta",score:1,env:[r],meta:"stage",version:"4.4.9",apiVersions:[],description:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.",comment:"/**\n * index: The name of the Search index.\n * count: The count of the results.\n * facet: {\n * operator: Analyzed search, with required fields of query and path, can either be replaced with the name of a valid operator.\n * facets: {\n * stringFacet: Narrows search results based on unique string values, with required fields of type and path.\n * numberFacet: Narrows search results by breaking them up into separate ranges of numbers, with required fields of type, path, and boundaries.\n * dateFacet: Narrows search results by breaking them up into separate ranges of dates, with required fields of type, path, and boundaries.\n * }\n * }\n */\n",snippet:"{\n index: ${1:string},\n facet: {\n operator: {\n text: {\n query: ${2:string},\n path: ${3:string}\n }\n },\n facets: {\n ${4:stringFacet}: {\n type: ${5:string},\n path: ${6:string},\n numBuckets: ${7:integer}\n },\n numberFacet: {\n type: 'number',\n path: ${8:string},\n boundaries: [${9:lowerbound}, ${10:upperbound}, ...],\n default: ${11:string}\n }\n }\n }\n}"},{name:"$set",value:"$set",label:"$set",score:1,env:[r,i,s],meta:"stage",version:"4.2.0",apiVersions:[1],description:"Adds new fields to documents. $set outputs documents that contain all existing fields from the input documents and newly added fields.",comment:"/**\n * field: The field name\n * expression: The expression.\n */\n",snippet:"{\n ${1:field}: ${2:expression}\n}"},{name:"$setWindowFields",value:"$setWindowFields",label:"$setWindowFields",score:1,env:[r,i,s],meta:"stage",version:"5.0.0",description:"Capable of partitioning incoming data, and can apply one or more functions to defined windows within each partition.",comment:"/**\n * partitionBy: partitioning of data.\n * sortBy: fields to sort by.\n * output: {\n * path: {\n * function: The window function to compute over the given window.\n * window: {\n * documents: A number of documents before and after the current document.\n * range: A range of possible values around the value in the current document's sortBy field.\n * unit: Specifies the units for the window bounds.\n * }\n * }\n * }\n */\n",snippet:"{\n partitionBy: ${1:expression},\n sortBy: ${2:sortSpec},\n output: {\n ${3:path}: {\n ${4:function}: ${5:functionArgs},\n window: {\n documents: [${6:lowerbound}, ${7:upperbound}],\n range: [${8:lowerbound}, ${9:upperbound}],\n unit: ${10:string}\n }\n },\n ${11:path2}: ...\n }\n}"},{name:"$skip",value:"$skip",label:"$skip",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Skips a specified number of documents before advancing to the next stage.",comment:"/**\n * Provide the number of documents to skip.\n */\n",snippet:"${1:number}"},{name:"$sort",value:"$sort",label:"$sort",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Reorders the document stream by a specified sort key and direction.",comment:"/**\n * Provide any number of field/order pairs.\n */\n",snippet:"{\n ${1:field1}: ${2:sortOrder}\n}"},{name:"$sortByCount",value:"$sortByCount",label:"$sortByCount",score:1,env:[r,i,s],meta:"stage",version:"3.4.0",apiVersions:[1],description:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.",comment:"/**\n * expression: Grouping expression or string.\n */\n",snippet:"{\n ${1:expression}\n}"},{name:"$unionWith",value:"$unionWith",label:"$unionWith",score:1,env:[r,i,s],meta:"stage",version:"4.4.0",apiVersions:[1],description:"Perform a union with a pipeline on another collection.",comment:"/**\n * coll: The collection name.\n * pipeline: The pipeline on the other collection.\n */\n",snippet:"{\n coll: '${1:coll}',\n pipeline: [${2:pipeline}]\n}"},{name:"$unset",value:"$unset",label:"$unset",score:1,env:[r,i,s],meta:"stage",version:"4.2.0",apiVersions:[1],description:"Excludes fields from the result document.",comment:"/**\n * Provide the field name to exclude.\n * To exclude multiple fields, pass the field names in an array.\n */\n",snippet:"'${1:string}'"},{name:"$unwind",value:"$unwind",label:"$unwind",score:1,env:[r,i,s],meta:"stage",version:"2.2.0",apiVersions:[1],description:"Outputs a new document for each element in a specified array. ",comment:"/**\n * path: Path to the array field.\n * includeArrayIndex: Optional name for index.\n * preserveNullAndEmptyArrays: Optional\n * toggle to unwind null and empty values.\n */\n",snippet:"{\n path: ${1:path},\n includeArrayIndex: '${2:string}',\n preserveNullAndEmptyArrays: ${3:boolean}\n}"}],a=o.map(e=>e.name);e.exports=o,e.exports.STAGE_OPERATOR_NAMES=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShellEvaluator=void 0;const r=n(507);Object.defineProperty(t,"ShellEvaluator",{enumerable:!0,get:function(){return r.ShellEvaluator}}),t.default=r.ShellEvaluator},function(module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ShellEvaluator=void 0;const shell_api_1=__webpack_require__(44),async_rewriter2_1=__importDefault(__webpack_require__(508)),history_1=__webpack_require__(32);class ShellEvaluator{constructor(e,t=shell_api_1.toShellResult){this.hasAppliedAsyncWriterRuntimeSupport=!0,this.instanceState=e,this.resultHandler=t,this.asyncWriter=new async_rewriter2_1.default,this.hasAppliedAsyncWriterRuntimeSupport=!1}async innerEval(originalEval,input,context,filename){var _a,_b,_c,_d,_e;const{shellApi:shellApi}=this.instanceState,trimmedInput=input.trim(),argv=trimmedInput.replace(/;$/,"").split(/\s+/g),cmd=argv.shift();if((null===(_a=shellApi[cmd])||void 0===_a?void 0:_a.isDirectShellCommand)&&(null===(_b=shellApi[cmd])||void 0===_b?void 0:_b.acceptsRawInput)&&!(null!==(_c=argv[0])&&void 0!==_c?_c:"").startsWith("(")){const e=trimmedInput.replace(/^\S+\s*/,"");return shellApi[cmd](e)}if((null===(_d=shellApi[cmd])||void 0===_d?void 0:_d.isDirectShellCommand)&&!(null!==(_e=argv[0])&&void 0!==_e?_e:"").startsWith("("))return shellApi[cmd](...argv);let rewrittenInput=this.asyncWriter.process(input);const hiddenCommands=RegExp(history_1.HIDDEN_COMMANDS,"g");if(hiddenCommands.test(input)||hiddenCommands.test(rewrittenInput)||this.instanceState.messageBus.emit("mongosh:evaluate-input",{input:(0,history_1.redactSensitiveData)(trimmedInput)}),!this.hasAppliedAsyncWriterRuntimeSupport){this.hasAppliedAsyncWriterRuntimeSupport=!0;const supportCode=this.asyncWriter.runtimeSupportCode();eval(supportCode),rewrittenInput=supportCode+";\n"+rewrittenInput}try{return await originalEval(rewrittenInput,context,filename)}catch(e){throw this.instanceState.transformError(e)}}async customEval(e,t,n,r){const i=await this.innerEval(e,t,n,r);return await this.resultHandler(i)}}exports.ShellEvaluator=ShellEvaluator},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(509));t.default=i.default},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(31)),l=o(n(673)),u=o(n(674)),c=o(n(675)),h=o(n(676)),d=n(677);t.default=class{step(e,t,n=[],r={}){return(n=>e?a.transformFromAstSync(e,t,n):a.transformSync(t,n))({plugins:n,code:!1,ast:!0,cloneInputAst:!1,configFile:!1,babelrc:!1,browserslistConfigFile:!1,compact:t.length>1e4,sourceType:"script",...r})}process(e){var t,r,i,s;try{let o=null===(t=this.step(void 0,e,[n(678).default,n(679).default,n(682).default]))||void 0===t?void 0:t.ast;return o=null===(r=this.step(o,e,[u.default]))||void 0===r?void 0:r.ast,o=null===(i=this.step(o,e,[c.default]))||void 0===i?void 0:i.ast,null===(s=this.step(o,e,[[h.default,{customErrorBuilder:a.types.identifier("MongoshAsyncWriterError")}]],{code:!0,ast:!1}))||void 0===s?void 0:s.code}catch(e){const{message:t}=e;throw delete e.message,e.message=t.replace("unknown: ",""),e}}unprocessedRuntimeSupportCode(){return this.process(`\n class MongoshAsyncWriterError extends Error {\n constructor(message, codeIdentifier) {\n const code = (${JSON.stringify(d.AsyncRewriterErrors)})[codeIdentifier];\n super(\`[\${code}] \${message}\`);\n this.code = code;\n }\n }`)}runtimeSupportCode(){return l.default}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(222).default)("React.Component");t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];for(let n=0;n<e.children.length;n++){let s=e.children[n];(0,r.isJSXText)(s)?(0,i.default)(s,t):((0,r.isJSXExpressionContainer)(s)&&(s=s.expression),(0,r.isJSXEmptyExpression)(s)||t.push(s))}return t};var r=n(10),i=n(513)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=e.value.split(/\r\n|\n|\r/);let i=0;for(let e=0;e<n.length;e++)n[e].match(/[^ \t]/)&&(i=e);let s="";for(let e=0;e<n.length;e++){const t=n[e],r=0===e,o=e===n.length-1,a=e===i;let l=t.replace(/\t/g," ");r||(l=l.replace(/^[ ]+/,"")),o||(l=l.replace(/[ ]+$/,"")),l&&(a||(l+=" "),s+=l)}s&&t.push((0,r.stringLiteral)(s))};var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=this,t=r.BUILDER_KEYS[e],n=arguments.length;if(n>t.length)throw new Error(`${e}: Too many arguments passed. Received ${n} but can receive no more than ${t.length}`);const s={type:e};for(let i=0;i<t.length;++i){const o=t[i],a=r.NODE_FIELDS[e][o];let l;i<n&&(l=arguments[i]),void 0===l&&(l=Array.isArray(a.default)?[]:a.default),s[o]=l}for(const e in s)(0,i.default)(s,e,s[e]);return s};var r=n(18),i=n(135)},function(e,t,n){"use strict";let r=null;function i(e){if(null!==r&&(r.property,1)){const e=r;return r=i.prototype=null,e}return r=i.prototype=null==e?Object.create(null):e,new i}i(),e.exports=function(e){return i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentifierChar=h,t.isIdentifierName=function(e){let t=!0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296==(64512&r)&&n+1<e.length){const t=e.charCodeAt(++n);56320==(64512&t)&&(r=65536+((1023&r)<<10)+(1023&t))}if(t){if(t=!1,!c(r))return!1}else if(!h(r))return!1}return!t},t.isIdentifierStart=c;let r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const s=new RegExp("["+r+"]"),o=new RegExp("["+r+i+"]");r=i=null;const a=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],l=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function u(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function c(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):u(e,a)))}function h(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):u(e,a)||u(e,l))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isKeyword=function(e){return s.has(e)},t.isReservedWord=l,t.isStrictBindOnlyReservedWord=c,t.isStrictBindReservedWord=function(e,t){return u(e,t)||c(e)},t.isStrictReservedWord=u;const r=["implements","interface","let","package","private","protected","public","static","yield"],i=["eval","arguments"],s=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),o=new Set(r),a=new Set(i);function l(e,t){return t&&"await"===e||"enum"===e}function u(e,t){return l(e,t)||o.has(e)}function c(e){return a.has(e)}},function(e,t,n){"use strict";var r=n(34);const i=(0,r.defineAliasedType)("Flow"),s=(e,t="TypeParameterDeclaration")=>{i(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)(t),extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),mixins:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),implements:(0,r.validateOptional)((0,r.arrayOfType)("ClassImplements")),body:(0,r.validateType)("ObjectTypeAnnotation")}})};i("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,r.validateType)("FlowType")}}),i("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),s("DeclareClass"),i("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),predicate:(0,r.validateOptionalType)("DeclaredPredicate")}}),s("DeclareInterface"),i("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)("BlockStatement"),kind:(0,r.validateOptional)((0,r.assertOneOf)("CommonJS","ES"))}}),i("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),i("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),i("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType"),impltype:(0,r.validateOptionalType)("FlowType")}}),i("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier")}}),i("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,r.validateOptionalType)("Flow"),specifiers:(0,r.validateOptional)((0,r.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,r.validateOptionalType)("StringLiteral"),default:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),i("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:(0,r.validateType)("StringLiteral"),exportKind:(0,r.validateOptional)((0,r.assertOneOf)("type","value"))}}),i("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,r.validateType)("Flow")}}),i("ExistsTypeAnnotation",{aliases:["FlowType"]}),i("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),params:(0,r.validate)((0,r.arrayOfType)("FunctionTypeParam")),rest:(0,r.validateOptionalType)("FunctionTypeParam"),this:(0,r.validateOptionalType)("FunctionTypeParam"),returnType:(0,r.validateType)("FlowType")}}),i("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,r.validateOptionalType)("Identifier"),typeAnnotation:(0,r.validateType)("FlowType"),optional:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),i("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),i("InferredPredicate",{aliases:["FlowPredicate"]}),i("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,r.validateOptionalType)("TypeParameterInstantiation")}}),s("InterfaceDeclaration"),i("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,r.validateOptional)((0,r.arrayOfType)("InterfaceExtends")),body:(0,r.validateType)("ObjectTypeAnnotation")}}),i("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),i("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("number"))}}),i("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,r.validate)((0,r.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeIndexer")),callProperties:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeCallProperty")),internalSlots:(0,r.validateOptional)((0,r.arrayOfType)("ObjectTypeInternalSlot")),exact:{validate:(0,r.assertValueType)("boolean"),default:!1},inexact:(0,r.validateOptional)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,r.validateType)("Identifier"),value:(0,r.validateType)("FlowType"),optional:(0,r.validate)((0,r.assertValueType)("boolean")),static:(0,r.validate)((0,r.assertValueType)("boolean")),method:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,r.validateOptionalType)("Identifier"),key:(0,r.validateType)("FlowType"),value:(0,r.validateType)("FlowType"),static:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance")}}),i("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,r.validateType)(["Identifier","StringLiteral"]),value:(0,r.validateType)("FlowType"),kind:(0,r.validate)((0,r.assertOneOf)("init","get","set")),static:(0,r.validate)((0,r.assertValueType)("boolean")),proto:(0,r.validate)((0,r.assertValueType)("boolean")),optional:(0,r.validate)((0,r.assertValueType)("boolean")),variance:(0,r.validateOptionalType)("Variance"),method:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,r.validateType)("FlowType")}}),i("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,r.validateOptionalType)("FlowType"),impltype:(0,r.validateType)("FlowType")}}),i("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:(0,r.validateType)("Identifier"),qualification:(0,r.validateType)(["Identifier","QualifiedTypeIdentifier"])}}),i("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,r.validate)((0,r.assertValueType)("string"))}}),i("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,r.validateType)("FlowType")}}),i("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TypeParameterDeclaration"),right:(0,r.validateType)("FlowType")}}),i("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("FlowType")}}),i("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TypeAnnotation")}}),i("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,r.validate)((0,r.assertValueType)("string")),bound:(0,r.validateOptionalType)("TypeAnnotation"),default:(0,r.validateOptionalType)("FlowType"),variance:(0,r.validateOptionalType)("Variance")}}),i("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("TypeParameter"))}}),i("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,r.validate)((0,r.arrayOfType)("FlowType"))}}),i("Variance",{builder:["kind"],fields:{kind:(0,r.validate)((0,r.assertOneOf)("minus","plus"))}}),i("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),i("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,r.validateType)("Identifier"),body:(0,r.validateType)(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),i("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,r.validate)((0,r.assertValueType)("boolean")),members:(0,r.validateArrayOfType)(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,r.validate)((0,r.assertValueType)("boolean"))}}),i("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("BooleanLiteral")}}),i("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("NumericLiteral")}}),i("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,r.validateType)("Identifier"),init:(0,r.validateType)("StringLiteral")}}),i("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),i("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,r.validateType)("FlowType"),indexType:(0,r.validateType)("FlowType")}}),i("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,r.validateType)("FlowType"),indexType:(0,r.validateType)("FlowType"),optional:(0,r.validate)((0,r.assertValueType)("boolean"))}})},function(e,t,n){"use strict";var r=n(34);const i=(0,r.defineAliasedType)("JSX");i("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,r.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),i("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),i("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:{openingElement:{validate:(0,r.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,r.assertNodeType)("JSXClosingElement")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))},selfClosing:{validate:(0,r.assertValueType)("boolean"),optional:!0}}}),i("JSXEmptyExpression",{}),i("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression","JSXEmptyExpression")}}}),i("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),i("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}}),i("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,r.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),i("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,r.assertNodeType)("JSXIdentifier")},name:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),i("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,r.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),i("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),i("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}}}),i("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,r.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,r.assertNodeType)("JSXClosingFragment")},children:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),i("JSXOpeningFragment",{aliases:["Immutable"]}),i("JSXClosingFragment",{aliases:["Immutable"]})},function(e,t,n){"use strict";var r=n(34),i=n(226);const s=(0,r.defineAliasedType)("Miscellaneous");s("Noop",{visitor:[]}),s("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:(0,r.assertNodeType)("Identifier")},expectedNode:{validate:(0,r.assertOneOf)(...i.PLACEHOLDERS)}}}),s("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}})},function(e,t,n){"use strict";(function(e){var t=n(34);(0,t.default)("ArgumentPlaceholder",{}),(0,t.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:e.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,t.assertNodeType)("Expression")},callee:{validate:(0,t.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}}),(0,t.default)("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,t.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,t.assertNodeType)("StringLiteral")}}}),(0,t.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}}}),(0,t.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,t.assertNodeType)("BlockStatement")},async:{validate:(0,t.assertValueType)("boolean"),default:!1}}}),(0,t.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,t.assertNodeType)("Identifier")}}}),(0,t.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,t.chain)((0,t.assertValueType)("array"),(0,t.assertEach)((0,t.assertNodeType)("ObjectProperty","SpreadElement")))}}}),(0,t.default)("TupleExpression",{fields:{elements:{validate:(0,t.chain)((0,t.assertValueType)("array"),(0,t.assertEach)((0,t.assertNodeType)("Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,t.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,t.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,t.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,t.assertNodeType)("Program")}},aliases:["Expression"]}),(0,t.default)("TopicReference",{aliases:["Expression"]}),(0,t.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]})}).call(this,n(3))},function(e,t,n){"use strict";var r=n(34),i=n(224),s=n(62);const o=(0,r.defineAliasedType)("TypeScript"),a=(0,r.assertValueType)("boolean"),l={returnType:{validate:(0,r.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}};o("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,r.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,r.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("Decorator"))),optional:!0}}}),o("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},i.functionDeclarationCommon,l)}),o("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},i.classMethodOrDeclareMethodCommon,l)}),o("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,r.validateType)("TSEntityName"),right:(0,r.validateType)("Identifier")}});const u={typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,r.validateArrayOfType)(["Identifier","RestElement"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")},c={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:u};o("TSCallSignatureDeclaration",c),o("TSConstructSignatureDeclaration",c);const h={key:(0,r.validateType)("Expression"),computed:(0,r.validate)(a),optional:(0,r.validateOptional)(a)};o("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},h,{readonly:(0,r.validateOptional)(a),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),initializer:(0,r.validateOptionalType)("Expression"),kind:{validate:(0,r.assertOneOf)("get","set")}})}),o("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},u,h,{kind:{validate:(0,r.assertOneOf)("method","get","set")}})}),o("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(a),static:(0,r.validateOptional)(a),parameters:(0,r.validateArrayOfType)("Identifier"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")}});const d=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of d)o(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});o("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const f={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};o("TSFunctionType",Object.assign({},f,{fields:u})),o("TSConstructorType",Object.assign({},f,{fields:Object.assign({},u,{abstract:(0,r.validateOptional)(a)})})),o("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,r.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),asserts:(0,r.validateOptional)(a)}}),o("TSTypeQuery",{aliases:["TSType"],visitor:["exprName"],fields:{exprName:(0,r.validateType)(["TSEntityName","TSImportType"])}}),o("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("TSTypeElement")}}),o("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,r.validateType)("TSType")}}),o("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,r.validateArrayOfType)(["TSType","TSNamedTupleMember"])}}),o("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,r.validateType)("Identifier"),optional:{validate:a,default:!1},elementType:(0,r.validateType)("TSType")}});const p={aliases:["TSType"],visitor:["types"],fields:{types:(0,r.validateArrayOfType)("TSType")}};o("TSUnionType",p),o("TSIntersectionType",p),o("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,r.validateType)("TSType"),extendsType:(0,r.validateType)("TSType"),trueType:(0,r.validateType)("TSType"),falseType:(0,r.validateType)("TSType")}}),o("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,r.validateType)("TSTypeParameter")}}),o("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,r.validate)((0,r.assertValueType)("string")),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,r.validateType)("TSType"),indexType:(0,r.validateType)("TSType")}}),o("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation","nameType"],fields:{readonly:(0,r.validateOptional)(a),typeParameter:(0,r.validateType)("TSTypeParameter"),optional:(0,r.validateOptional)(a),typeAnnotation:(0,r.validateOptionalType)("TSType"),nameType:(0,r.validateOptionalType)("TSType")}}),o("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const e=(0,r.assertNodeType)("NumericLiteral","BigIntLiteral"),t=(0,r.assertOneOf)("-"),n=(0,r.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral");function i(r,i,o){(0,s.default)("UnaryExpression",o)?(t(o,"operator",o.operator),e(o,"argument",o.argument)):n(r,i,o)}return i.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","UnaryExpression"],i}()}}}),o("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,r.validateOptional)((0,r.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,r.validateType)("TSInterfaceBody")}}),o("TSInterfaceBody",{visitor:["body"],fields:{body:(0,r.validateArrayOfType)("TSTypeElement")}}),o("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSAsExpression",{aliases:["Expression"],visitor:["expression","typeAnnotation"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSTypeAssertion",{aliases:["Expression"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,r.validateType)("TSType"),expression:(0,r.validateType)("Expression")}}),o("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,r.validateOptional)(a),const:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),members:(0,r.validateArrayOfType)("TSEnumMember"),initializer:(0,r.validateOptionalType)("Expression")}}),o("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,r.validateType)(["Identifier","StringLiteral"]),initializer:(0,r.validateOptionalType)("Expression")}}),o("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,r.validateOptional)(a),global:(0,r.validateOptional)(a),id:(0,r.validateType)(["Identifier","StringLiteral"]),body:(0,r.validateType)(["TSModuleBlock","TSModuleDeclaration"])}}),o("TSModuleBlock",{aliases:["Scopable","Block","BlockParent"],visitor:["body"],fields:{body:(0,r.validateArrayOfType)("Statement")}}),o("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:(0,r.validateType)("StringLiteral"),qualifier:(0,r.validateOptionalType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,r.validate)(a),id:(0,r.validateType)("Identifier"),moduleReference:(0,r.validateType)(["TSEntityName","TSExternalModuleReference"]),importKind:{validate:(0,r.assertOneOf)("type","value"),optional:!0}}}),o("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,r.validateType)("StringLiteral")}}),o("TSNonNullExpression",{aliases:["Expression"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),o("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),o("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),o("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,r.assertNodeType)("TSType")}}}),o("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSType")))}}}),o("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSTypeParameter")))}}}),o("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,r.assertValueType)("string")},constraint:{validate:(0,r.assertNodeType)("TSType"),optional:!0},default:{validate:(0,r.assertNodeType)("TSType"),optional:!0}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,r.default)(e)){var t;const n=null!=(t=null==e?void 0:e.type)?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${n}"`)}};var r=n(227)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertAccessor=function(e,t){i("Accessor",e,t)},t.assertAnyTypeAnnotation=function(e,t){i("AnyTypeAnnotation",e,t)},t.assertArgumentPlaceholder=function(e,t){i("ArgumentPlaceholder",e,t)},t.assertArrayExpression=function(e,t){i("ArrayExpression",e,t)},t.assertArrayPattern=function(e,t){i("ArrayPattern",e,t)},t.assertArrayTypeAnnotation=function(e,t){i("ArrayTypeAnnotation",e,t)},t.assertArrowFunctionExpression=function(e,t){i("ArrowFunctionExpression",e,t)},t.assertAssignmentExpression=function(e,t){i("AssignmentExpression",e,t)},t.assertAssignmentPattern=function(e,t){i("AssignmentPattern",e,t)},t.assertAwaitExpression=function(e,t){i("AwaitExpression",e,t)},t.assertBigIntLiteral=function(e,t){i("BigIntLiteral",e,t)},t.assertBinary=function(e,t){i("Binary",e,t)},t.assertBinaryExpression=function(e,t){i("BinaryExpression",e,t)},t.assertBindExpression=function(e,t){i("BindExpression",e,t)},t.assertBlock=function(e,t){i("Block",e,t)},t.assertBlockParent=function(e,t){i("BlockParent",e,t)},t.assertBlockStatement=function(e,t){i("BlockStatement",e,t)},t.assertBooleanLiteral=function(e,t){i("BooleanLiteral",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t){i("BooleanLiteralTypeAnnotation",e,t)},t.assertBooleanTypeAnnotation=function(e,t){i("BooleanTypeAnnotation",e,t)},t.assertBreakStatement=function(e,t){i("BreakStatement",e,t)},t.assertCallExpression=function(e,t){i("CallExpression",e,t)},t.assertCatchClause=function(e,t){i("CatchClause",e,t)},t.assertClass=function(e,t){i("Class",e,t)},t.assertClassAccessorProperty=function(e,t){i("ClassAccessorProperty",e,t)},t.assertClassBody=function(e,t){i("ClassBody",e,t)},t.assertClassDeclaration=function(e,t){i("ClassDeclaration",e,t)},t.assertClassExpression=function(e,t){i("ClassExpression",e,t)},t.assertClassImplements=function(e,t){i("ClassImplements",e,t)},t.assertClassMethod=function(e,t){i("ClassMethod",e,t)},t.assertClassPrivateMethod=function(e,t){i("ClassPrivateMethod",e,t)},t.assertClassPrivateProperty=function(e,t){i("ClassPrivateProperty",e,t)},t.assertClassProperty=function(e,t){i("ClassProperty",e,t)},t.assertCompletionStatement=function(e,t){i("CompletionStatement",e,t)},t.assertConditional=function(e,t){i("Conditional",e,t)},t.assertConditionalExpression=function(e,t){i("ConditionalExpression",e,t)},t.assertContinueStatement=function(e,t){i("ContinueStatement",e,t)},t.assertDebuggerStatement=function(e,t){i("DebuggerStatement",e,t)},t.assertDecimalLiteral=function(e,t){i("DecimalLiteral",e,t)},t.assertDeclaration=function(e,t){i("Declaration",e,t)},t.assertDeclareClass=function(e,t){i("DeclareClass",e,t)},t.assertDeclareExportAllDeclaration=function(e,t){i("DeclareExportAllDeclaration",e,t)},t.assertDeclareExportDeclaration=function(e,t){i("DeclareExportDeclaration",e,t)},t.assertDeclareFunction=function(e,t){i("DeclareFunction",e,t)},t.assertDeclareInterface=function(e,t){i("DeclareInterface",e,t)},t.assertDeclareModule=function(e,t){i("DeclareModule",e,t)},t.assertDeclareModuleExports=function(e,t){i("DeclareModuleExports",e,t)},t.assertDeclareOpaqueType=function(e,t){i("DeclareOpaqueType",e,t)},t.assertDeclareTypeAlias=function(e,t){i("DeclareTypeAlias",e,t)},t.assertDeclareVariable=function(e,t){i("DeclareVariable",e,t)},t.assertDeclaredPredicate=function(e,t){i("DeclaredPredicate",e,t)},t.assertDecorator=function(e,t){i("Decorator",e,t)},t.assertDirective=function(e,t){i("Directive",e,t)},t.assertDirectiveLiteral=function(e,t){i("DirectiveLiteral",e,t)},t.assertDoExpression=function(e,t){i("DoExpression",e,t)},t.assertDoWhileStatement=function(e,t){i("DoWhileStatement",e,t)},t.assertEmptyStatement=function(e,t){i("EmptyStatement",e,t)},t.assertEmptyTypeAnnotation=function(e,t){i("EmptyTypeAnnotation",e,t)},t.assertEnumBody=function(e,t){i("EnumBody",e,t)},t.assertEnumBooleanBody=function(e,t){i("EnumBooleanBody",e,t)},t.assertEnumBooleanMember=function(e,t){i("EnumBooleanMember",e,t)},t.assertEnumDeclaration=function(e,t){i("EnumDeclaration",e,t)},t.assertEnumDefaultedMember=function(e,t){i("EnumDefaultedMember",e,t)},t.assertEnumMember=function(e,t){i("EnumMember",e,t)},t.assertEnumNumberBody=function(e,t){i("EnumNumberBody",e,t)},t.assertEnumNumberMember=function(e,t){i("EnumNumberMember",e,t)},t.assertEnumStringBody=function(e,t){i("EnumStringBody",e,t)},t.assertEnumStringMember=function(e,t){i("EnumStringMember",e,t)},t.assertEnumSymbolBody=function(e,t){i("EnumSymbolBody",e,t)},t.assertExistsTypeAnnotation=function(e,t){i("ExistsTypeAnnotation",e,t)},t.assertExportAllDeclaration=function(e,t){i("ExportAllDeclaration",e,t)},t.assertExportDeclaration=function(e,t){i("ExportDeclaration",e,t)},t.assertExportDefaultDeclaration=function(e,t){i("ExportDefaultDeclaration",e,t)},t.assertExportDefaultSpecifier=function(e,t){i("ExportDefaultSpecifier",e,t)},t.assertExportNamedDeclaration=function(e,t){i("ExportNamedDeclaration",e,t)},t.assertExportNamespaceSpecifier=function(e,t){i("ExportNamespaceSpecifier",e,t)},t.assertExportSpecifier=function(e,t){i("ExportSpecifier",e,t)},t.assertExpression=function(e,t){i("Expression",e,t)},t.assertExpressionStatement=function(e,t){i("ExpressionStatement",e,t)},t.assertExpressionWrapper=function(e,t){i("ExpressionWrapper",e,t)},t.assertFile=function(e,t){i("File",e,t)},t.assertFlow=function(e,t){i("Flow",e,t)},t.assertFlowBaseAnnotation=function(e,t){i("FlowBaseAnnotation",e,t)},t.assertFlowDeclaration=function(e,t){i("FlowDeclaration",e,t)},t.assertFlowPredicate=function(e,t){i("FlowPredicate",e,t)},t.assertFlowType=function(e,t){i("FlowType",e,t)},t.assertFor=function(e,t){i("For",e,t)},t.assertForInStatement=function(e,t){i("ForInStatement",e,t)},t.assertForOfStatement=function(e,t){i("ForOfStatement",e,t)},t.assertForStatement=function(e,t){i("ForStatement",e,t)},t.assertForXStatement=function(e,t){i("ForXStatement",e,t)},t.assertFunction=function(e,t){i("Function",e,t)},t.assertFunctionDeclaration=function(e,t){i("FunctionDeclaration",e,t)},t.assertFunctionExpression=function(e,t){i("FunctionExpression",e,t)},t.assertFunctionParent=function(e,t){i("FunctionParent",e,t)},t.assertFunctionTypeAnnotation=function(e,t){i("FunctionTypeAnnotation",e,t)},t.assertFunctionTypeParam=function(e,t){i("FunctionTypeParam",e,t)},t.assertGenericTypeAnnotation=function(e,t){i("GenericTypeAnnotation",e,t)},t.assertIdentifier=function(e,t){i("Identifier",e,t)},t.assertIfStatement=function(e,t){i("IfStatement",e,t)},t.assertImmutable=function(e,t){i("Immutable",e,t)},t.assertImport=function(e,t){i("Import",e,t)},t.assertImportAttribute=function(e,t){i("ImportAttribute",e,t)},t.assertImportDeclaration=function(e,t){i("ImportDeclaration",e,t)},t.assertImportDefaultSpecifier=function(e,t){i("ImportDefaultSpecifier",e,t)},t.assertImportNamespaceSpecifier=function(e,t){i("ImportNamespaceSpecifier",e,t)},t.assertImportSpecifier=function(e,t){i("ImportSpecifier",e,t)},t.assertIndexedAccessType=function(e,t){i("IndexedAccessType",e,t)},t.assertInferredPredicate=function(e,t){i("InferredPredicate",e,t)},t.assertInterfaceDeclaration=function(e,t){i("InterfaceDeclaration",e,t)},t.assertInterfaceExtends=function(e,t){i("InterfaceExtends",e,t)},t.assertInterfaceTypeAnnotation=function(e,t){i("InterfaceTypeAnnotation",e,t)},t.assertInterpreterDirective=function(e,t){i("InterpreterDirective",e,t)},t.assertIntersectionTypeAnnotation=function(e,t){i("IntersectionTypeAnnotation",e,t)},t.assertJSX=function(e,t){i("JSX",e,t)},t.assertJSXAttribute=function(e,t){i("JSXAttribute",e,t)},t.assertJSXClosingElement=function(e,t){i("JSXClosingElement",e,t)},t.assertJSXClosingFragment=function(e,t){i("JSXClosingFragment",e,t)},t.assertJSXElement=function(e,t){i("JSXElement",e,t)},t.assertJSXEmptyExpression=function(e,t){i("JSXEmptyExpression",e,t)},t.assertJSXExpressionContainer=function(e,t){i("JSXExpressionContainer",e,t)},t.assertJSXFragment=function(e,t){i("JSXFragment",e,t)},t.assertJSXIdentifier=function(e,t){i("JSXIdentifier",e,t)},t.assertJSXMemberExpression=function(e,t){i("JSXMemberExpression",e,t)},t.assertJSXNamespacedName=function(e,t){i("JSXNamespacedName",e,t)},t.assertJSXOpeningElement=function(e,t){i("JSXOpeningElement",e,t)},t.assertJSXOpeningFragment=function(e,t){i("JSXOpeningFragment",e,t)},t.assertJSXSpreadAttribute=function(e,t){i("JSXSpreadAttribute",e,t)},t.assertJSXSpreadChild=function(e,t){i("JSXSpreadChild",e,t)},t.assertJSXText=function(e,t){i("JSXText",e,t)},t.assertLVal=function(e,t){i("LVal",e,t)},t.assertLabeledStatement=function(e,t){i("LabeledStatement",e,t)},t.assertLiteral=function(e,t){i("Literal",e,t)},t.assertLogicalExpression=function(e,t){i("LogicalExpression",e,t)},t.assertLoop=function(e,t){i("Loop",e,t)},t.assertMemberExpression=function(e,t){i("MemberExpression",e,t)},t.assertMetaProperty=function(e,t){i("MetaProperty",e,t)},t.assertMethod=function(e,t){i("Method",e,t)},t.assertMiscellaneous=function(e,t){i("Miscellaneous",e,t)},t.assertMixedTypeAnnotation=function(e,t){i("MixedTypeAnnotation",e,t)},t.assertModuleDeclaration=function(e,t){i("ModuleDeclaration",e,t)},t.assertModuleExpression=function(e,t){i("ModuleExpression",e,t)},t.assertModuleSpecifier=function(e,t){i("ModuleSpecifier",e,t)},t.assertNewExpression=function(e,t){i("NewExpression",e,t)},t.assertNoop=function(e,t){i("Noop",e,t)},t.assertNullLiteral=function(e,t){i("NullLiteral",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t){i("NullLiteralTypeAnnotation",e,t)},t.assertNullableTypeAnnotation=function(e,t){i("NullableTypeAnnotation",e,t)},t.assertNumberLiteral=function(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral"),i("NumberLiteral",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t){i("NumberLiteralTypeAnnotation",e,t)},t.assertNumberTypeAnnotation=function(e,t){i("NumberTypeAnnotation",e,t)},t.assertNumericLiteral=function(e,t){i("NumericLiteral",e,t)},t.assertObjectExpression=function(e,t){i("ObjectExpression",e,t)},t.assertObjectMember=function(e,t){i("ObjectMember",e,t)},t.assertObjectMethod=function(e,t){i("ObjectMethod",e,t)},t.assertObjectPattern=function(e,t){i("ObjectPattern",e,t)},t.assertObjectProperty=function(e,t){i("ObjectProperty",e,t)},t.assertObjectTypeAnnotation=function(e,t){i("ObjectTypeAnnotation",e,t)},t.assertObjectTypeCallProperty=function(e,t){i("ObjectTypeCallProperty",e,t)},t.assertObjectTypeIndexer=function(e,t){i("ObjectTypeIndexer",e,t)},t.assertObjectTypeInternalSlot=function(e,t){i("ObjectTypeInternalSlot",e,t)},t.assertObjectTypeProperty=function(e,t){i("ObjectTypeProperty",e,t)},t.assertObjectTypeSpreadProperty=function(e,t){i("ObjectTypeSpreadProperty",e,t)},t.assertOpaqueType=function(e,t){i("OpaqueType",e,t)},t.assertOptionalCallExpression=function(e,t){i("OptionalCallExpression",e,t)},t.assertOptionalIndexedAccessType=function(e,t){i("OptionalIndexedAccessType",e,t)},t.assertOptionalMemberExpression=function(e,t){i("OptionalMemberExpression",e,t)},t.assertParenthesizedExpression=function(e,t){i("ParenthesizedExpression",e,t)},t.assertPattern=function(e,t){i("Pattern",e,t)},t.assertPatternLike=function(e,t){i("PatternLike",e,t)},t.assertPipelineBareFunction=function(e,t){i("PipelineBareFunction",e,t)},t.assertPipelinePrimaryTopicReference=function(e,t){i("PipelinePrimaryTopicReference",e,t)},t.assertPipelineTopicExpression=function(e,t){i("PipelineTopicExpression",e,t)},t.assertPlaceholder=function(e,t){i("Placeholder",e,t)},t.assertPrivate=function(e,t){i("Private",e,t)},t.assertPrivateName=function(e,t){i("PrivateName",e,t)},t.assertProgram=function(e,t){i("Program",e,t)},t.assertProperty=function(e,t){i("Property",e,t)},t.assertPureish=function(e,t){i("Pureish",e,t)},t.assertQualifiedTypeIdentifier=function(e,t){i("QualifiedTypeIdentifier",e,t)},t.assertRecordExpression=function(e,t){i("RecordExpression",e,t)},t.assertRegExpLiteral=function(e,t){i("RegExpLiteral",e,t)},t.assertRegexLiteral=function(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"),i("RegexLiteral",e,t)},t.assertRestElement=function(e,t){i("RestElement",e,t)},t.assertRestProperty=function(e,t){console.trace("The node type RestProperty has been renamed to RestElement"),i("RestProperty",e,t)},t.assertReturnStatement=function(e,t){i("ReturnStatement",e,t)},t.assertScopable=function(e,t){i("Scopable",e,t)},t.assertSequenceExpression=function(e,t){i("SequenceExpression",e,t)},t.assertSpreadElement=function(e,t){i("SpreadElement",e,t)},t.assertSpreadProperty=function(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement"),i("SpreadProperty",e,t)},t.assertStandardized=function(e,t){i("Standardized",e,t)},t.assertStatement=function(e,t){i("Statement",e,t)},t.assertStaticBlock=function(e,t){i("StaticBlock",e,t)},t.assertStringLiteral=function(e,t){i("StringLiteral",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t){i("StringLiteralTypeAnnotation",e,t)},t.assertStringTypeAnnotation=function(e,t){i("StringTypeAnnotation",e,t)},t.assertSuper=function(e,t){i("Super",e,t)},t.assertSwitchCase=function(e,t){i("SwitchCase",e,t)},t.assertSwitchStatement=function(e,t){i("SwitchStatement",e,t)},t.assertSymbolTypeAnnotation=function(e,t){i("SymbolTypeAnnotation",e,t)},t.assertTSAnyKeyword=function(e,t){i("TSAnyKeyword",e,t)},t.assertTSArrayType=function(e,t){i("TSArrayType",e,t)},t.assertTSAsExpression=function(e,t){i("TSAsExpression",e,t)},t.assertTSBaseType=function(e,t){i("TSBaseType",e,t)},t.assertTSBigIntKeyword=function(e,t){i("TSBigIntKeyword",e,t)},t.assertTSBooleanKeyword=function(e,t){i("TSBooleanKeyword",e,t)},t.assertTSCallSignatureDeclaration=function(e,t){i("TSCallSignatureDeclaration",e,t)},t.assertTSConditionalType=function(e,t){i("TSConditionalType",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t){i("TSConstructSignatureDeclaration",e,t)},t.assertTSConstructorType=function(e,t){i("TSConstructorType",e,t)},t.assertTSDeclareFunction=function(e,t){i("TSDeclareFunction",e,t)},t.assertTSDeclareMethod=function(e,t){i("TSDeclareMethod",e,t)},t.assertTSEntityName=function(e,t){i("TSEntityName",e,t)},t.assertTSEnumDeclaration=function(e,t){i("TSEnumDeclaration",e,t)},t.assertTSEnumMember=function(e,t){i("TSEnumMember",e,t)},t.assertTSExportAssignment=function(e,t){i("TSExportAssignment",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t){i("TSExpressionWithTypeArguments",e,t)},t.assertTSExternalModuleReference=function(e,t){i("TSExternalModuleReference",e,t)},t.assertTSFunctionType=function(e,t){i("TSFunctionType",e,t)},t.assertTSImportEqualsDeclaration=function(e,t){i("TSImportEqualsDeclaration",e,t)},t.assertTSImportType=function(e,t){i("TSImportType",e,t)},t.assertTSIndexSignature=function(e,t){i("TSIndexSignature",e,t)},t.assertTSIndexedAccessType=function(e,t){i("TSIndexedAccessType",e,t)},t.assertTSInferType=function(e,t){i("TSInferType",e,t)},t.assertTSInterfaceBody=function(e,t){i("TSInterfaceBody",e,t)},t.assertTSInterfaceDeclaration=function(e,t){i("TSInterfaceDeclaration",e,t)},t.assertTSIntersectionType=function(e,t){i("TSIntersectionType",e,t)},t.assertTSIntrinsicKeyword=function(e,t){i("TSIntrinsicKeyword",e,t)},t.assertTSLiteralType=function(e,t){i("TSLiteralType",e,t)},t.assertTSMappedType=function(e,t){i("TSMappedType",e,t)},t.assertTSMethodSignature=function(e,t){i("TSMethodSignature",e,t)},t.assertTSModuleBlock=function(e,t){i("TSModuleBlock",e,t)},t.assertTSModuleDeclaration=function(e,t){i("TSModuleDeclaration",e,t)},t.assertTSNamedTupleMember=function(e,t){i("TSNamedTupleMember",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t){i("TSNamespaceExportDeclaration",e,t)},t.assertTSNeverKeyword=function(e,t){i("TSNeverKeyword",e,t)},t.assertTSNonNullExpression=function(e,t){i("TSNonNullExpression",e,t)},t.assertTSNullKeyword=function(e,t){i("TSNullKeyword",e,t)},t.assertTSNumberKeyword=function(e,t){i("TSNumberKeyword",e,t)},t.assertTSObjectKeyword=function(e,t){i("TSObjectKeyword",e,t)},t.assertTSOptionalType=function(e,t){i("TSOptionalType",e,t)},t.assertTSParameterProperty=function(e,t){i("TSParameterProperty",e,t)},t.assertTSParenthesizedType=function(e,t){i("TSParenthesizedType",e,t)},t.assertTSPropertySignature=function(e,t){i("TSPropertySignature",e,t)},t.assertTSQualifiedName=function(e,t){i("TSQualifiedName",e,t)},t.assertTSRestType=function(e,t){i("TSRestType",e,t)},t.assertTSStringKeyword=function(e,t){i("TSStringKeyword",e,t)},t.assertTSSymbolKeyword=function(e,t){i("TSSymbolKeyword",e,t)},t.assertTSThisType=function(e,t){i("TSThisType",e,t)},t.assertTSTupleType=function(e,t){i("TSTupleType",e,t)},t.assertTSType=function(e,t){i("TSType",e,t)},t.assertTSTypeAliasDeclaration=function(e,t){i("TSTypeAliasDeclaration",e,t)},t.assertTSTypeAnnotation=function(e,t){i("TSTypeAnnotation",e,t)},t.assertTSTypeAssertion=function(e,t){i("TSTypeAssertion",e,t)},t.assertTSTypeElement=function(e,t){i("TSTypeElement",e,t)},t.assertTSTypeLiteral=function(e,t){i("TSTypeLiteral",e,t)},t.assertTSTypeOperator=function(e,t){i("TSTypeOperator",e,t)},t.assertTSTypeParameter=function(e,t){i("TSTypeParameter",e,t)},t.assertTSTypeParameterDeclaration=function(e,t){i("TSTypeParameterDeclaration",e,t)},t.assertTSTypeParameterInstantiation=function(e,t){i("TSTypeParameterInstantiation",e,t)},t.assertTSTypePredicate=function(e,t){i("TSTypePredicate",e,t)},t.assertTSTypeQuery=function(e,t){i("TSTypeQuery",e,t)},t.assertTSTypeReference=function(e,t){i("TSTypeReference",e,t)},t.assertTSUndefinedKeyword=function(e,t){i("TSUndefinedKeyword",e,t)},t.assertTSUnionType=function(e,t){i("TSUnionType",e,t)},t.assertTSUnknownKeyword=function(e,t){i("TSUnknownKeyword",e,t)},t.assertTSVoidKeyword=function(e,t){i("TSVoidKeyword",e,t)},t.assertTaggedTemplateExpression=function(e,t){i("TaggedTemplateExpression",e,t)},t.assertTemplateElement=function(e,t){i("TemplateElement",e,t)},t.assertTemplateLiteral=function(e,t){i("TemplateLiteral",e,t)},t.assertTerminatorless=function(e,t){i("Terminatorless",e,t)},t.assertThisExpression=function(e,t){i("ThisExpression",e,t)},t.assertThisTypeAnnotation=function(e,t){i("ThisTypeAnnotation",e,t)},t.assertThrowStatement=function(e,t){i("ThrowStatement",e,t)},t.assertTopicReference=function(e,t){i("TopicReference",e,t)},t.assertTryStatement=function(e,t){i("TryStatement",e,t)},t.assertTupleExpression=function(e,t){i("TupleExpression",e,t)},t.assertTupleTypeAnnotation=function(e,t){i("TupleTypeAnnotation",e,t)},t.assertTypeAlias=function(e,t){i("TypeAlias",e,t)},t.assertTypeAnnotation=function(e,t){i("TypeAnnotation",e,t)},t.assertTypeCastExpression=function(e,t){i("TypeCastExpression",e,t)},t.assertTypeParameter=function(e,t){i("TypeParameter",e,t)},t.assertTypeParameterDeclaration=function(e,t){i("TypeParameterDeclaration",e,t)},t.assertTypeParameterInstantiation=function(e,t){i("TypeParameterInstantiation",e,t)},t.assertTypeScript=function(e,t){i("TypeScript",e,t)},t.assertTypeofTypeAnnotation=function(e,t){i("TypeofTypeAnnotation",e,t)},t.assertUnaryExpression=function(e,t){i("UnaryExpression",e,t)},t.assertUnaryLike=function(e,t){i("UnaryLike",e,t)},t.assertUnionTypeAnnotation=function(e,t){i("UnionTypeAnnotation",e,t)},t.assertUpdateExpression=function(e,t){i("UpdateExpression",e,t)},t.assertUserWhitespacable=function(e,t){i("UserWhitespacable",e,t)},t.assertV8IntrinsicIdentifier=function(e,t){i("V8IntrinsicIdentifier",e,t)},t.assertVariableDeclaration=function(e,t){i("VariableDeclaration",e,t)},t.assertVariableDeclarator=function(e,t){i("VariableDeclarator",e,t)},t.assertVariance=function(e,t){i("Variance",e,t)},t.assertVoidTypeAnnotation=function(e,t){i("VoidTypeAnnotation",e,t)},t.assertWhile=function(e,t){i("While",e,t)},t.assertWhileStatement=function(e,t){i("WhileStatement",e,t)},t.assertWithStatement=function(e,t){i("WithStatement",e,t)},t.assertYieldExpression=function(e,t){i("YieldExpression",e,t)};var r=n(62);function i(e,t,n){if(!(0,r.default)(e,t,n))throw new Error(`Expected type "${e}" with option ${JSON.stringify(n)}, but instead got "${t.type}".`)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(15),i=function(e){switch(e){case"string":return(0,r.stringTypeAnnotation)();case"number":return(0,r.numberTypeAnnotation)();case"undefined":return(0,r.voidTypeAnnotation)();case"boolean":return(0,r.booleanTypeAnnotation)();case"function":return(0,r.genericTypeAnnotation)((0,r.identifier)("Function"));case"object":return(0,r.genericTypeAnnotation)((0,r.identifier)("Object"));case"symbol":return(0,r.genericTypeAnnotation)((0,r.identifier)("Symbol"));case"bigint":return(0,r.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+e)};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,i.default)(e);return 1===t.length?t[0]:(0,r.unionTypeAnnotation)(t)};var r=n(15),i=n(228)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.map(e=>e.typeAnnotation),n=(0,i.default)(t);return 1===n.length?n[0]:(0,r.tsUnionType)(n)};var r=n(15),i=n(528)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t={},n={},i=new Set,s=[];for(let t=0;t<e.length;t++){const o=e[t];if(o&&!(s.indexOf(o)>=0)){if((0,r.isTSAnyKeyword)(o))return[o];(0,r.isTSBaseType)(o)?n[o.type]=o:(0,r.isTSUnionType)(o)?i.has(o.types)||(e.push(...o.types),i.add(o.types)):s.push(o)}}for(const e of Object.keys(n))s.push(n[e]);for(const e of Object.keys(t))s.push(t[e]);return s};var r=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnyTypeAnnotation",{enumerable:!0,get:function(){return r.anyTypeAnnotation}}),Object.defineProperty(t,"ArgumentPlaceholder",{enumerable:!0,get:function(){return r.argumentPlaceholder}}),Object.defineProperty(t,"ArrayExpression",{enumerable:!0,get:function(){return r.arrayExpression}}),Object.defineProperty(t,"ArrayPattern",{enumerable:!0,get:function(){return r.arrayPattern}}),Object.defineProperty(t,"ArrayTypeAnnotation",{enumerable:!0,get:function(){return r.arrayTypeAnnotation}}),Object.defineProperty(t,"ArrowFunctionExpression",{enumerable:!0,get:function(){return r.arrowFunctionExpression}}),Object.defineProperty(t,"AssignmentExpression",{enumerable:!0,get:function(){return r.assignmentExpression}}),Object.defineProperty(t,"AssignmentPattern",{enumerable:!0,get:function(){return r.assignmentPattern}}),Object.defineProperty(t,"AwaitExpression",{enumerable:!0,get:function(){return r.awaitExpression}}),Object.defineProperty(t,"BigIntLiteral",{enumerable:!0,get:function(){return r.bigIntLiteral}}),Object.defineProperty(t,"BinaryExpression",{enumerable:!0,get:function(){return r.binaryExpression}}),Object.defineProperty(t,"BindExpression",{enumerable:!0,get:function(){return r.bindExpression}}),Object.defineProperty(t,"BlockStatement",{enumerable:!0,get:function(){return r.blockStatement}}),Object.defineProperty(t,"BooleanLiteral",{enumerable:!0,get:function(){return r.booleanLiteral}}),Object.defineProperty(t,"BooleanLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.booleanLiteralTypeAnnotation}}),Object.defineProperty(t,"BooleanTypeAnnotation",{enumerable:!0,get:function(){return r.booleanTypeAnnotation}}),Object.defineProperty(t,"BreakStatement",{enumerable:!0,get:function(){return r.breakStatement}}),Object.defineProperty(t,"CallExpression",{enumerable:!0,get:function(){return r.callExpression}}),Object.defineProperty(t,"CatchClause",{enumerable:!0,get:function(){return r.catchClause}}),Object.defineProperty(t,"ClassAccessorProperty",{enumerable:!0,get:function(){return r.classAccessorProperty}}),Object.defineProperty(t,"ClassBody",{enumerable:!0,get:function(){return r.classBody}}),Object.defineProperty(t,"ClassDeclaration",{enumerable:!0,get:function(){return r.classDeclaration}}),Object.defineProperty(t,"ClassExpression",{enumerable:!0,get:function(){return r.classExpression}}),Object.defineProperty(t,"ClassImplements",{enumerable:!0,get:function(){return r.classImplements}}),Object.defineProperty(t,"ClassMethod",{enumerable:!0,get:function(){return r.classMethod}}),Object.defineProperty(t,"ClassPrivateMethod",{enumerable:!0,get:function(){return r.classPrivateMethod}}),Object.defineProperty(t,"ClassPrivateProperty",{enumerable:!0,get:function(){return r.classPrivateProperty}}),Object.defineProperty(t,"ClassProperty",{enumerable:!0,get:function(){return r.classProperty}}),Object.defineProperty(t,"ConditionalExpression",{enumerable:!0,get:function(){return r.conditionalExpression}}),Object.defineProperty(t,"ContinueStatement",{enumerable:!0,get:function(){return r.continueStatement}}),Object.defineProperty(t,"DebuggerStatement",{enumerable:!0,get:function(){return r.debuggerStatement}}),Object.defineProperty(t,"DecimalLiteral",{enumerable:!0,get:function(){return r.decimalLiteral}}),Object.defineProperty(t,"DeclareClass",{enumerable:!0,get:function(){return r.declareClass}}),Object.defineProperty(t,"DeclareExportAllDeclaration",{enumerable:!0,get:function(){return r.declareExportAllDeclaration}}),Object.defineProperty(t,"DeclareExportDeclaration",{enumerable:!0,get:function(){return r.declareExportDeclaration}}),Object.defineProperty(t,"DeclareFunction",{enumerable:!0,get:function(){return r.declareFunction}}),Object.defineProperty(t,"DeclareInterface",{enumerable:!0,get:function(){return r.declareInterface}}),Object.defineProperty(t,"DeclareModule",{enumerable:!0,get:function(){return r.declareModule}}),Object.defineProperty(t,"DeclareModuleExports",{enumerable:!0,get:function(){return r.declareModuleExports}}),Object.defineProperty(t,"DeclareOpaqueType",{enumerable:!0,get:function(){return r.declareOpaqueType}}),Object.defineProperty(t,"DeclareTypeAlias",{enumerable:!0,get:function(){return r.declareTypeAlias}}),Object.defineProperty(t,"DeclareVariable",{enumerable:!0,get:function(){return r.declareVariable}}),Object.defineProperty(t,"DeclaredPredicate",{enumerable:!0,get:function(){return r.declaredPredicate}}),Object.defineProperty(t,"Decorator",{enumerable:!0,get:function(){return r.decorator}}),Object.defineProperty(t,"Directive",{enumerable:!0,get:function(){return r.directive}}),Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return r.directiveLiteral}}),Object.defineProperty(t,"DoExpression",{enumerable:!0,get:function(){return r.doExpression}}),Object.defineProperty(t,"DoWhileStatement",{enumerable:!0,get:function(){return r.doWhileStatement}}),Object.defineProperty(t,"EmptyStatement",{enumerable:!0,get:function(){return r.emptyStatement}}),Object.defineProperty(t,"EmptyTypeAnnotation",{enumerable:!0,get:function(){return r.emptyTypeAnnotation}}),Object.defineProperty(t,"EnumBooleanBody",{enumerable:!0,get:function(){return r.enumBooleanBody}}),Object.defineProperty(t,"EnumBooleanMember",{enumerable:!0,get:function(){return r.enumBooleanMember}}),Object.defineProperty(t,"EnumDeclaration",{enumerable:!0,get:function(){return r.enumDeclaration}}),Object.defineProperty(t,"EnumDefaultedMember",{enumerable:!0,get:function(){return r.enumDefaultedMember}}),Object.defineProperty(t,"EnumNumberBody",{enumerable:!0,get:function(){return r.enumNumberBody}}),Object.defineProperty(t,"EnumNumberMember",{enumerable:!0,get:function(){return r.enumNumberMember}}),Object.defineProperty(t,"EnumStringBody",{enumerable:!0,get:function(){return r.enumStringBody}}),Object.defineProperty(t,"EnumStringMember",{enumerable:!0,get:function(){return r.enumStringMember}}),Object.defineProperty(t,"EnumSymbolBody",{enumerable:!0,get:function(){return r.enumSymbolBody}}),Object.defineProperty(t,"ExistsTypeAnnotation",{enumerable:!0,get:function(){return r.existsTypeAnnotation}}),Object.defineProperty(t,"ExportAllDeclaration",{enumerable:!0,get:function(){return r.exportAllDeclaration}}),Object.defineProperty(t,"ExportDefaultDeclaration",{enumerable:!0,get:function(){return r.exportDefaultDeclaration}}),Object.defineProperty(t,"ExportDefaultSpecifier",{enumerable:!0,get:function(){return r.exportDefaultSpecifier}}),Object.defineProperty(t,"ExportNamedDeclaration",{enumerable:!0,get:function(){return r.exportNamedDeclaration}}),Object.defineProperty(t,"ExportNamespaceSpecifier",{enumerable:!0,get:function(){return r.exportNamespaceSpecifier}}),Object.defineProperty(t,"ExportSpecifier",{enumerable:!0,get:function(){return r.exportSpecifier}}),Object.defineProperty(t,"ExpressionStatement",{enumerable:!0,get:function(){return r.expressionStatement}}),Object.defineProperty(t,"File",{enumerable:!0,get:function(){return r.file}}),Object.defineProperty(t,"ForInStatement",{enumerable:!0,get:function(){return r.forInStatement}}),Object.defineProperty(t,"ForOfStatement",{enumerable:!0,get:function(){return r.forOfStatement}}),Object.defineProperty(t,"ForStatement",{enumerable:!0,get:function(){return r.forStatement}}),Object.defineProperty(t,"FunctionDeclaration",{enumerable:!0,get:function(){return r.functionDeclaration}}),Object.defineProperty(t,"FunctionExpression",{enumerable:!0,get:function(){return r.functionExpression}}),Object.defineProperty(t,"FunctionTypeAnnotation",{enumerable:!0,get:function(){return r.functionTypeAnnotation}}),Object.defineProperty(t,"FunctionTypeParam",{enumerable:!0,get:function(){return r.functionTypeParam}}),Object.defineProperty(t,"GenericTypeAnnotation",{enumerable:!0,get:function(){return r.genericTypeAnnotation}}),Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return r.identifier}}),Object.defineProperty(t,"IfStatement",{enumerable:!0,get:function(){return r.ifStatement}}),Object.defineProperty(t,"Import",{enumerable:!0,get:function(){return r.import}}),Object.defineProperty(t,"ImportAttribute",{enumerable:!0,get:function(){return r.importAttribute}}),Object.defineProperty(t,"ImportDeclaration",{enumerable:!0,get:function(){return r.importDeclaration}}),Object.defineProperty(t,"ImportDefaultSpecifier",{enumerable:!0,get:function(){return r.importDefaultSpecifier}}),Object.defineProperty(t,"ImportNamespaceSpecifier",{enumerable:!0,get:function(){return r.importNamespaceSpecifier}}),Object.defineProperty(t,"ImportSpecifier",{enumerable:!0,get:function(){return r.importSpecifier}}),Object.defineProperty(t,"IndexedAccessType",{enumerable:!0,get:function(){return r.indexedAccessType}}),Object.defineProperty(t,"InferredPredicate",{enumerable:!0,get:function(){return r.inferredPredicate}}),Object.defineProperty(t,"InterfaceDeclaration",{enumerable:!0,get:function(){return r.interfaceDeclaration}}),Object.defineProperty(t,"InterfaceExtends",{enumerable:!0,get:function(){return r.interfaceExtends}}),Object.defineProperty(t,"InterfaceTypeAnnotation",{enumerable:!0,get:function(){return r.interfaceTypeAnnotation}}),Object.defineProperty(t,"InterpreterDirective",{enumerable:!0,get:function(){return r.interpreterDirective}}),Object.defineProperty(t,"IntersectionTypeAnnotation",{enumerable:!0,get:function(){return r.intersectionTypeAnnotation}}),Object.defineProperty(t,"JSXAttribute",{enumerable:!0,get:function(){return r.jsxAttribute}}),Object.defineProperty(t,"JSXClosingElement",{enumerable:!0,get:function(){return r.jsxClosingElement}}),Object.defineProperty(t,"JSXClosingFragment",{enumerable:!0,get:function(){return r.jsxClosingFragment}}),Object.defineProperty(t,"JSXElement",{enumerable:!0,get:function(){return r.jsxElement}}),Object.defineProperty(t,"JSXEmptyExpression",{enumerable:!0,get:function(){return r.jsxEmptyExpression}}),Object.defineProperty(t,"JSXExpressionContainer",{enumerable:!0,get:function(){return r.jsxExpressionContainer}}),Object.defineProperty(t,"JSXFragment",{enumerable:!0,get:function(){return r.jsxFragment}}),Object.defineProperty(t,"JSXIdentifier",{enumerable:!0,get:function(){return r.jsxIdentifier}}),Object.defineProperty(t,"JSXMemberExpression",{enumerable:!0,get:function(){return r.jsxMemberExpression}}),Object.defineProperty(t,"JSXNamespacedName",{enumerable:!0,get:function(){return r.jsxNamespacedName}}),Object.defineProperty(t,"JSXOpeningElement",{enumerable:!0,get:function(){return r.jsxOpeningElement}}),Object.defineProperty(t,"JSXOpeningFragment",{enumerable:!0,get:function(){return r.jsxOpeningFragment}}),Object.defineProperty(t,"JSXSpreadAttribute",{enumerable:!0,get:function(){return r.jsxSpreadAttribute}}),Object.defineProperty(t,"JSXSpreadChild",{enumerable:!0,get:function(){return r.jsxSpreadChild}}),Object.defineProperty(t,"JSXText",{enumerable:!0,get:function(){return r.jsxText}}),Object.defineProperty(t,"LabeledStatement",{enumerable:!0,get:function(){return r.labeledStatement}}),Object.defineProperty(t,"LogicalExpression",{enumerable:!0,get:function(){return r.logicalExpression}}),Object.defineProperty(t,"MemberExpression",{enumerable:!0,get:function(){return r.memberExpression}}),Object.defineProperty(t,"MetaProperty",{enumerable:!0,get:function(){return r.metaProperty}}),Object.defineProperty(t,"MixedTypeAnnotation",{enumerable:!0,get:function(){return r.mixedTypeAnnotation}}),Object.defineProperty(t,"ModuleExpression",{enumerable:!0,get:function(){return r.moduleExpression}}),Object.defineProperty(t,"NewExpression",{enumerable:!0,get:function(){return r.newExpression}}),Object.defineProperty(t,"Noop",{enumerable:!0,get:function(){return r.noop}}),Object.defineProperty(t,"NullLiteral",{enumerable:!0,get:function(){return r.nullLiteral}}),Object.defineProperty(t,"NullLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.nullLiteralTypeAnnotation}}),Object.defineProperty(t,"NullableTypeAnnotation",{enumerable:!0,get:function(){return r.nullableTypeAnnotation}}),Object.defineProperty(t,"NumberLiteral",{enumerable:!0,get:function(){return r.numberLiteral}}),Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.numberLiteralTypeAnnotation}}),Object.defineProperty(t,"NumberTypeAnnotation",{enumerable:!0,get:function(){return r.numberTypeAnnotation}}),Object.defineProperty(t,"NumericLiteral",{enumerable:!0,get:function(){return r.numericLiteral}}),Object.defineProperty(t,"ObjectExpression",{enumerable:!0,get:function(){return r.objectExpression}}),Object.defineProperty(t,"ObjectMethod",{enumerable:!0,get:function(){return r.objectMethod}}),Object.defineProperty(t,"ObjectPattern",{enumerable:!0,get:function(){return r.objectPattern}}),Object.defineProperty(t,"ObjectProperty",{enumerable:!0,get:function(){return r.objectProperty}}),Object.defineProperty(t,"ObjectTypeAnnotation",{enumerable:!0,get:function(){return r.objectTypeAnnotation}}),Object.defineProperty(t,"ObjectTypeCallProperty",{enumerable:!0,get:function(){return r.objectTypeCallProperty}}),Object.defineProperty(t,"ObjectTypeIndexer",{enumerable:!0,get:function(){return r.objectTypeIndexer}}),Object.defineProperty(t,"ObjectTypeInternalSlot",{enumerable:!0,get:function(){return r.objectTypeInternalSlot}}),Object.defineProperty(t,"ObjectTypeProperty",{enumerable:!0,get:function(){return r.objectTypeProperty}}),Object.defineProperty(t,"ObjectTypeSpreadProperty",{enumerable:!0,get:function(){return r.objectTypeSpreadProperty}}),Object.defineProperty(t,"OpaqueType",{enumerable:!0,get:function(){return r.opaqueType}}),Object.defineProperty(t,"OptionalCallExpression",{enumerable:!0,get:function(){return r.optionalCallExpression}}),Object.defineProperty(t,"OptionalIndexedAccessType",{enumerable:!0,get:function(){return r.optionalIndexedAccessType}}),Object.defineProperty(t,"OptionalMemberExpression",{enumerable:!0,get:function(){return r.optionalMemberExpression}}),Object.defineProperty(t,"ParenthesizedExpression",{enumerable:!0,get:function(){return r.parenthesizedExpression}}),Object.defineProperty(t,"PipelineBareFunction",{enumerable:!0,get:function(){return r.pipelineBareFunction}}),Object.defineProperty(t,"PipelinePrimaryTopicReference",{enumerable:!0,get:function(){return r.pipelinePrimaryTopicReference}}),Object.defineProperty(t,"PipelineTopicExpression",{enumerable:!0,get:function(){return r.pipelineTopicExpression}}),Object.defineProperty(t,"Placeholder",{enumerable:!0,get:function(){return r.placeholder}}),Object.defineProperty(t,"PrivateName",{enumerable:!0,get:function(){return r.privateName}}),Object.defineProperty(t,"Program",{enumerable:!0,get:function(){return r.program}}),Object.defineProperty(t,"QualifiedTypeIdentifier",{enumerable:!0,get:function(){return r.qualifiedTypeIdentifier}}),Object.defineProperty(t,"RecordExpression",{enumerable:!0,get:function(){return r.recordExpression}}),Object.defineProperty(t,"RegExpLiteral",{enumerable:!0,get:function(){return r.regExpLiteral}}),Object.defineProperty(t,"RegexLiteral",{enumerable:!0,get:function(){return r.regexLiteral}}),Object.defineProperty(t,"RestElement",{enumerable:!0,get:function(){return r.restElement}}),Object.defineProperty(t,"RestProperty",{enumerable:!0,get:function(){return r.restProperty}}),Object.defineProperty(t,"ReturnStatement",{enumerable:!0,get:function(){return r.returnStatement}}),Object.defineProperty(t,"SequenceExpression",{enumerable:!0,get:function(){return r.sequenceExpression}}),Object.defineProperty(t,"SpreadElement",{enumerable:!0,get:function(){return r.spreadElement}}),Object.defineProperty(t,"SpreadProperty",{enumerable:!0,get:function(){return r.spreadProperty}}),Object.defineProperty(t,"StaticBlock",{enumerable:!0,get:function(){return r.staticBlock}}),Object.defineProperty(t,"StringLiteral",{enumerable:!0,get:function(){return r.stringLiteral}}),Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return r.stringLiteralTypeAnnotation}}),Object.defineProperty(t,"StringTypeAnnotation",{enumerable:!0,get:function(){return r.stringTypeAnnotation}}),Object.defineProperty(t,"Super",{enumerable:!0,get:function(){return r.super}}),Object.defineProperty(t,"SwitchCase",{enumerable:!0,get:function(){return r.switchCase}}),Object.defineProperty(t,"SwitchStatement",{enumerable:!0,get:function(){return r.switchStatement}}),Object.defineProperty(t,"SymbolTypeAnnotation",{enumerable:!0,get:function(){return r.symbolTypeAnnotation}}),Object.defineProperty(t,"TSAnyKeyword",{enumerable:!0,get:function(){return r.tsAnyKeyword}}),Object.defineProperty(t,"TSArrayType",{enumerable:!0,get:function(){return r.tsArrayType}}),Object.defineProperty(t,"TSAsExpression",{enumerable:!0,get:function(){return r.tsAsExpression}}),Object.defineProperty(t,"TSBigIntKeyword",{enumerable:!0,get:function(){return r.tsBigIntKeyword}}),Object.defineProperty(t,"TSBooleanKeyword",{enumerable:!0,get:function(){return r.tsBooleanKeyword}}),Object.defineProperty(t,"TSCallSignatureDeclaration",{enumerable:!0,get:function(){return r.tsCallSignatureDeclaration}}),Object.defineProperty(t,"TSConditionalType",{enumerable:!0,get:function(){return r.tsConditionalType}}),Object.defineProperty(t,"TSConstructSignatureDeclaration",{enumerable:!0,get:function(){return r.tsConstructSignatureDeclaration}}),Object.defineProperty(t,"TSConstructorType",{enumerable:!0,get:function(){return r.tsConstructorType}}),Object.defineProperty(t,"TSDeclareFunction",{enumerable:!0,get:function(){return r.tsDeclareFunction}}),Object.defineProperty(t,"TSDeclareMethod",{enumerable:!0,get:function(){return r.tsDeclareMethod}}),Object.defineProperty(t,"TSEnumDeclaration",{enumerable:!0,get:function(){return r.tsEnumDeclaration}}),Object.defineProperty(t,"TSEnumMember",{enumerable:!0,get:function(){return r.tsEnumMember}}),Object.defineProperty(t,"TSExportAssignment",{enumerable:!0,get:function(){return r.tsExportAssignment}}),Object.defineProperty(t,"TSExpressionWithTypeArguments",{enumerable:!0,get:function(){return r.tsExpressionWithTypeArguments}}),Object.defineProperty(t,"TSExternalModuleReference",{enumerable:!0,get:function(){return r.tsExternalModuleReference}}),Object.defineProperty(t,"TSFunctionType",{enumerable:!0,get:function(){return r.tsFunctionType}}),Object.defineProperty(t,"TSImportEqualsDeclaration",{enumerable:!0,get:function(){return r.tsImportEqualsDeclaration}}),Object.defineProperty(t,"TSImportType",{enumerable:!0,get:function(){return r.tsImportType}}),Object.defineProperty(t,"TSIndexSignature",{enumerable:!0,get:function(){return r.tsIndexSignature}}),Object.defineProperty(t,"TSIndexedAccessType",{enumerable:!0,get:function(){return r.tsIndexedAccessType}}),Object.defineProperty(t,"TSInferType",{enumerable:!0,get:function(){return r.tsInferType}}),Object.defineProperty(t,"TSInterfaceBody",{enumerable:!0,get:function(){return r.tsInterfaceBody}}),Object.defineProperty(t,"TSInterfaceDeclaration",{enumerable:!0,get:function(){return r.tsInterfaceDeclaration}}),Object.defineProperty(t,"TSIntersectionType",{enumerable:!0,get:function(){return r.tsIntersectionType}}),Object.defineProperty(t,"TSIntrinsicKeyword",{enumerable:!0,get:function(){return r.tsIntrinsicKeyword}}),Object.defineProperty(t,"TSLiteralType",{enumerable:!0,get:function(){return r.tsLiteralType}}),Object.defineProperty(t,"TSMappedType",{enumerable:!0,get:function(){return r.tsMappedType}}),Object.defineProperty(t,"TSMethodSignature",{enumerable:!0,get:function(){return r.tsMethodSignature}}),Object.defineProperty(t,"TSModuleBlock",{enumerable:!0,get:function(){return r.tsModuleBlock}}),Object.defineProperty(t,"TSModuleDeclaration",{enumerable:!0,get:function(){return r.tsModuleDeclaration}}),Object.defineProperty(t,"TSNamedTupleMember",{enumerable:!0,get:function(){return r.tsNamedTupleMember}}),Object.defineProperty(t,"TSNamespaceExportDeclaration",{enumerable:!0,get:function(){return r.tsNamespaceExportDeclaration}}),Object.defineProperty(t,"TSNeverKeyword",{enumerable:!0,get:function(){return r.tsNeverKeyword}}),Object.defineProperty(t,"TSNonNullExpression",{enumerable:!0,get:function(){return r.tsNonNullExpression}}),Object.defineProperty(t,"TSNullKeyword",{enumerable:!0,get:function(){return r.tsNullKeyword}}),Object.defineProperty(t,"TSNumberKeyword",{enumerable:!0,get:function(){return r.tsNumberKeyword}}),Object.defineProperty(t,"TSObjectKeyword",{enumerable:!0,get:function(){return r.tsObjectKeyword}}),Object.defineProperty(t,"TSOptionalType",{enumerable:!0,get:function(){return r.tsOptionalType}}),Object.defineProperty(t,"TSParameterProperty",{enumerable:!0,get:function(){return r.tsParameterProperty}}),Object.defineProperty(t,"TSParenthesizedType",{enumerable:!0,get:function(){return r.tsParenthesizedType}}),Object.defineProperty(t,"TSPropertySignature",{enumerable:!0,get:function(){return r.tsPropertySignature}}),Object.defineProperty(t,"TSQualifiedName",{enumerable:!0,get:function(){return r.tsQualifiedName}}),Object.defineProperty(t,"TSRestType",{enumerable:!0,get:function(){return r.tsRestType}}),Object.defineProperty(t,"TSStringKeyword",{enumerable:!0,get:function(){return r.tsStringKeyword}}),Object.defineProperty(t,"TSSymbolKeyword",{enumerable:!0,get:function(){return r.tsSymbolKeyword}}),Object.defineProperty(t,"TSThisType",{enumerable:!0,get:function(){return r.tsThisType}}),Object.defineProperty(t,"TSTupleType",{enumerable:!0,get:function(){return r.tsTupleType}}),Object.defineProperty(t,"TSTypeAliasDeclaration",{enumerable:!0,get:function(){return r.tsTypeAliasDeclaration}}),Object.defineProperty(t,"TSTypeAnnotation",{enumerable:!0,get:function(){return r.tsTypeAnnotation}}),Object.defineProperty(t,"TSTypeAssertion",{enumerable:!0,get:function(){return r.tsTypeAssertion}}),Object.defineProperty(t,"TSTypeLiteral",{enumerable:!0,get:function(){return r.tsTypeLiteral}}),Object.defineProperty(t,"TSTypeOperator",{enumerable:!0,get:function(){return r.tsTypeOperator}}),Object.defineProperty(t,"TSTypeParameter",{enumerable:!0,get:function(){return r.tsTypeParameter}}),Object.defineProperty(t,"TSTypeParameterDeclaration",{enumerable:!0,get:function(){return r.tsTypeParameterDeclaration}}),Object.defineProperty(t,"TSTypeParameterInstantiation",{enumerable:!0,get:function(){return r.tsTypeParameterInstantiation}}),Object.defineProperty(t,"TSTypePredicate",{enumerable:!0,get:function(){return r.tsTypePredicate}}),Object.defineProperty(t,"TSTypeQuery",{enumerable:!0,get:function(){return r.tsTypeQuery}}),Object.defineProperty(t,"TSTypeReference",{enumerable:!0,get:function(){return r.tsTypeReference}}),Object.defineProperty(t,"TSUndefinedKeyword",{enumerable:!0,get:function(){return r.tsUndefinedKeyword}}),Object.defineProperty(t,"TSUnionType",{enumerable:!0,get:function(){return r.tsUnionType}}),Object.defineProperty(t,"TSUnknownKeyword",{enumerable:!0,get:function(){return r.tsUnknownKeyword}}),Object.defineProperty(t,"TSVoidKeyword",{enumerable:!0,get:function(){return r.tsVoidKeyword}}),Object.defineProperty(t,"TaggedTemplateExpression",{enumerable:!0,get:function(){return r.taggedTemplateExpression}}),Object.defineProperty(t,"TemplateElement",{enumerable:!0,get:function(){return r.templateElement}}),Object.defineProperty(t,"TemplateLiteral",{enumerable:!0,get:function(){return r.templateLiteral}}),Object.defineProperty(t,"ThisExpression",{enumerable:!0,get:function(){return r.thisExpression}}),Object.defineProperty(t,"ThisTypeAnnotation",{enumerable:!0,get:function(){return r.thisTypeAnnotation}}),Object.defineProperty(t,"ThrowStatement",{enumerable:!0,get:function(){return r.throwStatement}}),Object.defineProperty(t,"TopicReference",{enumerable:!0,get:function(){return r.topicReference}}),Object.defineProperty(t,"TryStatement",{enumerable:!0,get:function(){return r.tryStatement}}),Object.defineProperty(t,"TupleExpression",{enumerable:!0,get:function(){return r.tupleExpression}}),Object.defineProperty(t,"TupleTypeAnnotation",{enumerable:!0,get:function(){return r.tupleTypeAnnotation}}),Object.defineProperty(t,"TypeAlias",{enumerable:!0,get:function(){return r.typeAlias}}),Object.defineProperty(t,"TypeAnnotation",{enumerable:!0,get:function(){return r.typeAnnotation}}),Object.defineProperty(t,"TypeCastExpression",{enumerable:!0,get:function(){return r.typeCastExpression}}),Object.defineProperty(t,"TypeParameter",{enumerable:!0,get:function(){return r.typeParameter}}),Object.defineProperty(t,"TypeParameterDeclaration",{enumerable:!0,get:function(){return r.typeParameterDeclaration}}),Object.defineProperty(t,"TypeParameterInstantiation",{enumerable:!0,get:function(){return r.typeParameterInstantiation}}),Object.defineProperty(t,"TypeofTypeAnnotation",{enumerable:!0,get:function(){return r.typeofTypeAnnotation}}),Object.defineProperty(t,"UnaryExpression",{enumerable:!0,get:function(){return r.unaryExpression}}),Object.defineProperty(t,"UnionTypeAnnotation",{enumerable:!0,get:function(){return r.unionTypeAnnotation}}),Object.defineProperty(t,"UpdateExpression",{enumerable:!0,get:function(){return r.updateExpression}}),Object.defineProperty(t,"V8IntrinsicIdentifier",{enumerable:!0,get:function(){return r.v8IntrinsicIdentifier}}),Object.defineProperty(t,"VariableDeclaration",{enumerable:!0,get:function(){return r.variableDeclaration}}),Object.defineProperty(t,"VariableDeclarator",{enumerable:!0,get:function(){return r.variableDeclarator}}),Object.defineProperty(t,"Variance",{enumerable:!0,get:function(){return r.variance}}),Object.defineProperty(t,"VoidTypeAnnotation",{enumerable:!0,get:function(){return r.voidTypeAnnotation}}),Object.defineProperty(t,"WhileStatement",{enumerable:!0,get:function(){return r.whileStatement}}),Object.defineProperty(t,"WithStatement",{enumerable:!0,get:function(){return r.withStatement}}),Object.defineProperty(t,"YieldExpression",{enumerable:!0,get:function(){return r.yieldExpression}});var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!1)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!0,!0)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e,!1,!0)};var r=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){return(0,r.default)(e,t,[{type:i?"CommentLine":"CommentBlock",value:n}])};var r=n(229)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return r.COMMENT_KEYS.forEach(t=>{e[t]=null}),e};var r=n(41)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WHILE_TYPES=t.USERWHITESPACABLE_TYPES=t.UNARYLIKE_TYPES=t.TYPESCRIPT_TYPES=t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.TSENTITYNAME_TYPES=t.TSBASETYPE_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.STANDARDIZED_TYPES=t.SCOPABLE_TYPES=t.PUREISH_TYPES=t.PROPERTY_TYPES=t.PRIVATE_TYPES=t.PATTERN_TYPES=t.PATTERNLIKE_TYPES=t.OBJECTMEMBER_TYPES=t.MODULESPECIFIER_TYPES=t.MODULEDECLARATION_TYPES=t.MISCELLANEOUS_TYPES=t.METHOD_TYPES=t.LVAL_TYPES=t.LOOP_TYPES=t.LITERAL_TYPES=t.JSX_TYPES=t.IMMUTABLE_TYPES=t.FUNCTION_TYPES=t.FUNCTIONPARENT_TYPES=t.FOR_TYPES=t.FORXSTATEMENT_TYPES=t.FLOW_TYPES=t.FLOWTYPE_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.EXPRESSION_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.EXPORTDECLARATION_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.DECLARATION_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.CLASS_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.BINARY_TYPES=t.ACCESSOR_TYPES=void 0;var r=n(18);const i=r.FLIPPED_ALIAS_KEYS.Standardized;t.STANDARDIZED_TYPES=i;const s=r.FLIPPED_ALIAS_KEYS.Expression;t.EXPRESSION_TYPES=s;const o=r.FLIPPED_ALIAS_KEYS.Binary;t.BINARY_TYPES=o;const a=r.FLIPPED_ALIAS_KEYS.Scopable;t.SCOPABLE_TYPES=a;const l=r.FLIPPED_ALIAS_KEYS.BlockParent;t.BLOCKPARENT_TYPES=l;const u=r.FLIPPED_ALIAS_KEYS.Block;t.BLOCK_TYPES=u;const c=r.FLIPPED_ALIAS_KEYS.Statement;t.STATEMENT_TYPES=c;const h=r.FLIPPED_ALIAS_KEYS.Terminatorless;t.TERMINATORLESS_TYPES=h;const d=r.FLIPPED_ALIAS_KEYS.CompletionStatement;t.COMPLETIONSTATEMENT_TYPES=d;const f=r.FLIPPED_ALIAS_KEYS.Conditional;t.CONDITIONAL_TYPES=f;const p=r.FLIPPED_ALIAS_KEYS.Loop;t.LOOP_TYPES=p;const m=r.FLIPPED_ALIAS_KEYS.While;t.WHILE_TYPES=m;const g=r.FLIPPED_ALIAS_KEYS.ExpressionWrapper;t.EXPRESSIONWRAPPER_TYPES=g;const y=r.FLIPPED_ALIAS_KEYS.For;t.FOR_TYPES=y;const v=r.FLIPPED_ALIAS_KEYS.ForXStatement;t.FORXSTATEMENT_TYPES=v;const b=r.FLIPPED_ALIAS_KEYS.Function;t.FUNCTION_TYPES=b;const w=r.FLIPPED_ALIAS_KEYS.FunctionParent;t.FUNCTIONPARENT_TYPES=w;const _=r.FLIPPED_ALIAS_KEYS.Pureish;t.PUREISH_TYPES=_;const S=r.FLIPPED_ALIAS_KEYS.Declaration;t.DECLARATION_TYPES=S;const x=r.FLIPPED_ALIAS_KEYS.PatternLike;t.PATTERNLIKE_TYPES=x;const E=r.FLIPPED_ALIAS_KEYS.LVal;t.LVAL_TYPES=E;const A=r.FLIPPED_ALIAS_KEYS.TSEntityName;t.TSENTITYNAME_TYPES=A;const T=r.FLIPPED_ALIAS_KEYS.Literal;t.LITERAL_TYPES=T;const M=r.FLIPPED_ALIAS_KEYS.Immutable;t.IMMUTABLE_TYPES=M;const C=r.FLIPPED_ALIAS_KEYS.UserWhitespacable;t.USERWHITESPACABLE_TYPES=C;const P=r.FLIPPED_ALIAS_KEYS.Method;t.METHOD_TYPES=P;const k=r.FLIPPED_ALIAS_KEYS.ObjectMember;t.OBJECTMEMBER_TYPES=k;const O=r.FLIPPED_ALIAS_KEYS.Property;t.PROPERTY_TYPES=O;const I=r.FLIPPED_ALIAS_KEYS.UnaryLike;t.UNARYLIKE_TYPES=I;const R=r.FLIPPED_ALIAS_KEYS.Pattern;t.PATTERN_TYPES=R;const N=r.FLIPPED_ALIAS_KEYS.Class;t.CLASS_TYPES=N;const D=r.FLIPPED_ALIAS_KEYS.ModuleDeclaration;t.MODULEDECLARATION_TYPES=D;const F=r.FLIPPED_ALIAS_KEYS.ExportDeclaration;t.EXPORTDECLARATION_TYPES=F;const L=r.FLIPPED_ALIAS_KEYS.ModuleSpecifier;t.MODULESPECIFIER_TYPES=L;const B=r.FLIPPED_ALIAS_KEYS.Accessor;t.ACCESSOR_TYPES=B;const j=r.FLIPPED_ALIAS_KEYS.Private;t.PRIVATE_TYPES=j;const $=r.FLIPPED_ALIAS_KEYS.Flow;t.FLOW_TYPES=$;const U=r.FLIPPED_ALIAS_KEYS.FlowType;t.FLOWTYPE_TYPES=U;const V=r.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation;t.FLOWBASEANNOTATION_TYPES=V;const W=r.FLIPPED_ALIAS_KEYS.FlowDeclaration;t.FLOWDECLARATION_TYPES=W;const z=r.FLIPPED_ALIAS_KEYS.FlowPredicate;t.FLOWPREDICATE_TYPES=z;const K=r.FLIPPED_ALIAS_KEYS.EnumBody;t.ENUMBODY_TYPES=K;const H=r.FLIPPED_ALIAS_KEYS.EnumMember;t.ENUMMEMBER_TYPES=H;const q=r.FLIPPED_ALIAS_KEYS.JSX;t.JSX_TYPES=q;const G=r.FLIPPED_ALIAS_KEYS.Miscellaneous;t.MISCELLANEOUS_TYPES=G;const Y=r.FLIPPED_ALIAS_KEYS.TypeScript;t.TYPESCRIPT_TYPES=Y;const J=r.FLIPPED_ALIAS_KEYS.TSTypeElement;t.TSTYPEELEMENT_TYPES=J;const X=r.FLIPPED_ALIAS_KEYS.TSType;t.TSTYPE_TYPES=X;const Z=r.FLIPPED_ALIAS_KEYS.TSBaseType;t.TSBASETYPE_TYPES=Z},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="body"){return e[t]=(0,r.default)(e[t],e)};var r=n(234)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"eval"!==(e=(0,r.default)(e))&&"arguments"!==e||(e="_"+e);return e};var r=n(235)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.key||e.property){!e.computed&&(0,r.isIdentifier)(t)&&(t=(0,i.stringLiteral)(t.name));return t};var r=n(10),i=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(10),i=function(e){(0,r.isExpressionStatement)(e)&&(e=e.expression);if((0,r.isExpression)(e))return e;(0,r.isClass)(e)?e.type="ClassExpression":(0,r.isFunction)(e)&&(e.type="FunctionExpression");if(!(0,r.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(10),i=n(42),s=n(236);function o(e,t=e.key){let n;return"method"===e.kind?o.increment()+"":(n=(0,r.isIdentifier)(t)?t.name:(0,r.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,s.default)((0,i.default)(t))),e.computed&&(n=`[${n}]`),e.static&&(n="static:"+n),n)}o.uid=0,o.increment=function(){return o.uid>=Number.MAX_SAFE_INTEGER?o.uid=0:o.uid++}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e||!e.length)return;const n=[],i=(0,r.default)(e,t,n);if(!i)return;for(const e of n)t.push(e);return i};var r=n(543)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,a){const l=[];let u=!0;for(const c of t)if((0,i.isEmptyStatement)(c)||(u=!1),(0,i.isExpression)(c))l.push(c);else if((0,i.isExpressionStatement)(c))l.push(c.expression);else if((0,i.isVariableDeclaration)(c)){if("var"!==c.kind)return;for(const e of c.declarations){const t=(0,r.default)(e);for(const e of Object.keys(t))a.push({kind:c.kind,id:(0,o.default)(t[e])});e.init&&l.push((0,s.assignmentExpression)("=",e.id,e.init))}u=!0}else if((0,i.isIfStatement)(c)){const t=c.consequent?e([c.consequent],n,a):n.buildUndefinedNode(),r=c.alternate?e([c.alternate],n,a):n.buildUndefinedNode();if(!t||!r)return;l.push((0,s.conditionalExpression)(c.test,t,r))}else if((0,i.isBlockStatement)(c)){const t=e(c.body,n,a);if(!t)return;l.push(t)}else{if(!(0,i.isEmptyStatement)(c))return;0===t.indexOf(c)&&(u=!0)}u&&l.push(n.buildUndefinedNode());return 1===l.length?l[0]:(0,s.sequenceExpression)(l)};var r=n(78),i=n(10),s=n(15),o=n(42)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(10),i=n(15),s=function(e,t){if((0,r.isStatement)(e))return e;let n,s=!1;if((0,r.isClass)(e))s=!0,n="ClassDeclaration";else if((0,r.isFunction)(e))s=!0,n="FunctionDeclaration";else if((0,r.isAssignmentExpression)(e))return(0,i.expressionStatement)(e);s&&!e.id&&(n=!1);if(!n){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=n,e};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(63),i=n(15),s=function e(t){if(void 0===t)return(0,i.identifier)("undefined");if(!0===t||!1===t)return(0,i.booleanLiteral)(t);if(null===t)return(0,i.nullLiteral)();if("string"==typeof t)return(0,i.stringLiteral)(t);if("number"==typeof t){let e;if(Number.isFinite(t))e=(0,i.numericLiteral)(Math.abs(t));else{let n;n=Number.isNaN(t)?(0,i.numericLiteral)(0):(0,i.numericLiteral)(1),e=(0,i.binaryExpression)("/",n,(0,i.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,i.unaryExpression)("-",e)),e}if(function(e){return"[object RegExp]"===o(e)}(t)){const e=t.source,n=t.toString().match(/\/([a-z]+|)$/)[1];return(0,i.regExpLiteral)(e,n)}if(Array.isArray(t))return(0,i.arrayExpression)(t.map(e));if(function(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(t)){const n=[];for(const s of Object.keys(t)){let o;o=(0,r.default)(s)?(0,i.identifier)(s):(0,i.stringLiteral)(s),n.push((0,i.objectProperty)(o,e(t[s])))}return(0,i.objectExpression)(n)}throw new Error("don't know how to turn this value into a node")};t.default=s;const o=Function.call.bind(Object.prototype.toString)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n=!1){return e.object=(0,r.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e};var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const n of r.INHERIT_KEYS.optional)null==e[n]&&(e[n]=t[n]);for(const n of Object.keys(t))"_"===n[0]&&"__clone"!==n&&(e[n]=t[n]);for(const n of r.INHERIT_KEYS.force)e[n]=t[n];return(0,i.default)(e,t),e};var r=n(41),i=n(232)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.object=(0,r.memberExpression)(t,e.object),e};var r=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(78),i=function(e,t){return(0,r.default)(e,t,!0)};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"function"==typeof t&&(t={enter:t});const{enter:i,exit:s}=t;!function e(t,n,i,s,o){const a=r.VISITOR_KEYS[t.type];if(!a)return;n&&n(t,o,s);for(const r of a){const a=t[r];if(Array.isArray(a))for(let l=0;l<a.length;l++){const u=a[l];u&&(o.push({node:t,key:r,index:l}),e(u,n,i,s,o),o.pop())}else a&&(o.push({node:t,key:r}),e(a,n,i,s,o),o.pop())}i&&i(t,o,s)}(e,i,s,n,[])};var r=n(18)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(n&&"Identifier"===e.type&&"ObjectProperty"===t.type&&"ObjectExpression"===n.type)return!1;const i=r.default.keys[t.type];if(i)for(let n=0;n<i.length;n++){const r=i[n],s=t[r];if(Array.isArray(s)){if(s.indexOf(e)>=0)return!0}else if(s===e)return!0}return!1};var r=n(78)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isFunctionDeclaration)(e)||(0,r.isClassDeclaration)(e)||(0,i.default)(e)};var r=n(10),i=n(239)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(e.type,"Immutable"))return!0;if((0,i.isIdentifier)(e))return"undefined"===e.name;return!1};var r=n(134),i=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){if("object"!=typeof t||"object"!=typeof n||null==t||null==n)return t===n;if(t.type!==n.type)return!1;const i=Object.keys(r.NODE_FIELDS[t.type]||t.type),s=r.VISITOR_KEYS[t.type];for(const r of i){if(typeof t[r]!=typeof n[r])return!1;if(null!=t[r]||null!=n[r]){if(null==t[r]||null==n[r])return!1;if(Array.isArray(t[r])){if(!Array.isArray(n[r]))return!1;if(t[r].length!==n[r].length)return!1;for(let i=0;i<t[r].length;i++)if(!e(t[r][i],n[r][i]))return!1}else if("object"!=typeof t[r]||null!=s&&s.includes(r)){if(!e(t[r],n[r]))return!1}else for(const e of Object.keys(t[r]))if(t[r][e]!==n[r][e])return!1}}return!0};var r=n(18)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":return t.property===e?!!t.computed:t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return t.key===e&&!!t.computed;case"ObjectProperty":return t.key===e?!!t.computed:!n||"ObjectPattern"!==n.type;case"ClassProperty":case"ClassAccessorProperty":return t.key!==e||!!t.computed;case"ClassPrivateProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"LabeledStatement":case"CatchClause":case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return(null==n||!n.source)&&t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportAttribute":case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":case"MetaProperty":return!1;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":return t.key!==e||!!t.computed}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.isBlockStatement)(e)&&((0,r.isFunction)(t)||(0,r.isCatchClause)(t)))return!1;if((0,r.isPattern)(e)&&((0,r.isFunction)(t)||(0,r.isCatchClause)(t)))return!0;return(0,r.isScopable)(e)};var r=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isImportDefaultSpecifier)(e)||(0,r.isIdentifier)(e.imported||e.exported,{name:"default"})};var r=n(10)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e)&&!i.has(e)};var r=n(63);const i=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.isVariableDeclaration)(e,{kind:"var"})&&!e[i.BLOCK_SCOPED_SYMBOL]};var r=n(10),i=n(41)},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(35),i=n(1);const{VISITOR_KEYS:s}=i;t.default=class{constructor(e,t,n,r){this.queue=null,this.priorityQueue=null,this.parentPath=r,this.scope=e,this.state=n,this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;const n=s[e.type];if(null==n||!n.length)return!1;for(const t of n)if(e[t])return!0;return!1}create(e,t,n,i){return r.default.get({parentPath:this.parentPath,parent:e,container:t,key:n,listKey:i})}maybeQueue(e,t){this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))}visitMultiple(e,t,n){if(0===e.length)return!1;const r=[];for(let i=0;i<e.length;i++){const s=e[i];s&&this.shouldVisit(s)&&r.push(this.create(t,e,i,n))}return this.visitQueue(r)}visitSingle(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])}visitQueue(e){this.queue=e,this.priorityQueue=[];const t=new WeakSet;let n=!1;for(const r of e){if(r.resync(),0!==r.contexts.length&&r.contexts[r.contexts.length-1]===this||r.pushContext(this),null===r.key)continue;const{node:i}=r;if(!t.has(i)){if(i&&t.add(i),r.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,n))break}}for(const t of e)t.popContext();return this.queue=null,n}visit(e,t){const n=e[t];return!!n&&(Array.isArray(n)?this.visitMultiple(n,e,t):this.visitSingle(e,t))}}},function(e,t,n){e.exports=function(e){function t(e){let n,i,s,o=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const s=t.formatters[i];if("function"==typeof s){const t=e[o];n=s.call(r,t),e.splice(o,1),o--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(563),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=6e4,i=60*r,s=24*i;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*s;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=s)return o(e,t,s,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=s)return Math.round(e/s)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(242);var r=n(243),i=n(1);const{VISITOR_KEYS:s,assignmentExpression:o,identifier:a,toExpression:l,variableDeclaration:u,variableDeclarator:c}=i,h={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||function(e){if(!e.isMethod()||!e.node.computed)return void e.skip();const t=s[e.type];for(const n of t)"key"!==n&&e.skipKey(n)}(e)},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;const n=e.getOuterBindingIdentifiers();for(const e in n)e===t.oldName&&(n[e].name=t.newName)}};t.default=class{constructor(e,t,n){this.newName=n,this.oldName=t,this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;t.isExportDeclaration()&&(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id||(0,r.default)(t))}maybeConvertFromClassFunctionDeclaration(e){}maybeConvertFromClassFunctionExpression(e){}rename(e){const{binding:t,oldName:n,newName:r}=this,{scope:i,path:s}=t,o=s.find(e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression());if(o){o.getOuterBindingIdentifiers()[n]===t.identifier&&this.maybeConvertFromExportDeclaration(o)}const a=e||i.block;"SwitchStatement"===(null==a?void 0:a.type)?a.cases.forEach(e=>{i.traverse(e,h,this)}):i.traverse(a,h,this),e||(i.removeOwnBinding(n),i.bindings[r]=t,this.binding.identifier.name=r),o&&(this.maybeConvertFromClassFunctionDeclaration(o),this.maybeConvertFromClassFunctionExpression(o))}}},function(e,t,n){"use strict";e.exports=n(566)},function(e){e.exports=JSON.parse('{"builtin":{"Array":false,"ArrayBuffer":false,"Atomics":false,"BigInt":false,"BigInt64Array":false,"BigUint64Array":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"globalThis":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es5":{"Array":false,"Boolean":false,"constructor":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"propertyIsEnumerable":false,"RangeError":false,"ReferenceError":false,"RegExp":false,"String":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false},"es2015":{"Array":false,"ArrayBuffer":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"es2017":{"Array":false,"ArrayBuffer":false,"Atomics":false,"Boolean":false,"constructor":false,"DataView":false,"Date":false,"decodeURI":false,"decodeURIComponent":false,"encodeURI":false,"encodeURIComponent":false,"Error":false,"escape":false,"eval":false,"EvalError":false,"Float32Array":false,"Float64Array":false,"Function":false,"hasOwnProperty":false,"Infinity":false,"Int16Array":false,"Int32Array":false,"Int8Array":false,"isFinite":false,"isNaN":false,"isPrototypeOf":false,"JSON":false,"Map":false,"Math":false,"NaN":false,"Number":false,"Object":false,"parseFloat":false,"parseInt":false,"Promise":false,"propertyIsEnumerable":false,"Proxy":false,"RangeError":false,"ReferenceError":false,"Reflect":false,"RegExp":false,"Set":false,"SharedArrayBuffer":false,"String":false,"Symbol":false,"SyntaxError":false,"toLocaleString":false,"toString":false,"TypeError":false,"Uint16Array":false,"Uint32Array":false,"Uint8Array":false,"Uint8ClampedArray":false,"undefined":false,"unescape":false,"URIError":false,"valueOf":false,"WeakMap":false,"WeakSet":false},"browser":{"AbortController":false,"AbortSignal":false,"addEventListener":false,"alert":false,"AnalyserNode":false,"Animation":false,"AnimationEffectReadOnly":false,"AnimationEffectTiming":false,"AnimationEffectTimingReadOnly":false,"AnimationEvent":false,"AnimationPlaybackEvent":false,"AnimationTimeline":false,"applicationCache":false,"ApplicationCache":false,"ApplicationCacheErrorEvent":false,"atob":false,"Attr":false,"Audio":false,"AudioBuffer":false,"AudioBufferSourceNode":false,"AudioContext":false,"AudioDestinationNode":false,"AudioListener":false,"AudioNode":false,"AudioParam":false,"AudioProcessingEvent":false,"AudioScheduledSourceNode":false,"AudioWorkletGlobalScope ":false,"AudioWorkletNode":false,"AudioWorkletProcessor":false,"BarProp":false,"BaseAudioContext":false,"BatteryManager":false,"BeforeUnloadEvent":false,"BiquadFilterNode":false,"Blob":false,"BlobEvent":false,"blur":false,"BroadcastChannel":false,"btoa":false,"BudgetService":false,"ByteLengthQueuingStrategy":false,"Cache":false,"caches":false,"CacheStorage":false,"cancelAnimationFrame":false,"cancelIdleCallback":false,"CanvasCaptureMediaStreamTrack":false,"CanvasGradient":false,"CanvasPattern":false,"CanvasRenderingContext2D":false,"ChannelMergerNode":false,"ChannelSplitterNode":false,"CharacterData":false,"clearInterval":false,"clearTimeout":false,"clientInformation":false,"ClipboardEvent":false,"close":false,"closed":false,"CloseEvent":false,"Comment":false,"CompositionEvent":false,"confirm":false,"console":false,"ConstantSourceNode":false,"ConvolverNode":false,"CountQueuingStrategy":false,"createImageBitmap":false,"Credential":false,"CredentialsContainer":false,"crypto":false,"Crypto":false,"CryptoKey":false,"CSS":false,"CSSConditionRule":false,"CSSFontFaceRule":false,"CSSGroupingRule":false,"CSSImportRule":false,"CSSKeyframeRule":false,"CSSKeyframesRule":false,"CSSMediaRule":false,"CSSNamespaceRule":false,"CSSPageRule":false,"CSSRule":false,"CSSRuleList":false,"CSSStyleDeclaration":false,"CSSStyleRule":false,"CSSStyleSheet":false,"CSSSupportsRule":false,"CustomElementRegistry":false,"customElements":false,"CustomEvent":false,"DataTransfer":false,"DataTransferItem":false,"DataTransferItemList":false,"defaultstatus":false,"defaultStatus":false,"DelayNode":false,"DeviceMotionEvent":false,"DeviceOrientationEvent":false,"devicePixelRatio":false,"dispatchEvent":false,"document":false,"Document":false,"DocumentFragment":false,"DocumentType":false,"DOMError":false,"DOMException":false,"DOMImplementation":false,"DOMMatrix":false,"DOMMatrixReadOnly":false,"DOMParser":false,"DOMPoint":false,"DOMPointReadOnly":false,"DOMQuad":false,"DOMRect":false,"DOMRectReadOnly":false,"DOMStringList":false,"DOMStringMap":false,"DOMTokenList":false,"DragEvent":false,"DynamicsCompressorNode":false,"Element":false,"ErrorEvent":false,"event":false,"Event":false,"EventSource":false,"EventTarget":false,"external":false,"fetch":false,"File":false,"FileList":false,"FileReader":false,"find":false,"focus":false,"FocusEvent":false,"FontFace":false,"FontFaceSetLoadEvent":false,"FormData":false,"frameElement":false,"frames":false,"GainNode":false,"Gamepad":false,"GamepadButton":false,"GamepadEvent":false,"getComputedStyle":false,"getSelection":false,"HashChangeEvent":false,"Headers":false,"history":false,"History":false,"HTMLAllCollection":false,"HTMLAnchorElement":false,"HTMLAreaElement":false,"HTMLAudioElement":false,"HTMLBaseElement":false,"HTMLBodyElement":false,"HTMLBRElement":false,"HTMLButtonElement":false,"HTMLCanvasElement":false,"HTMLCollection":false,"HTMLContentElement":false,"HTMLDataElement":false,"HTMLDataListElement":false,"HTMLDetailsElement":false,"HTMLDialogElement":false,"HTMLDirectoryElement":false,"HTMLDivElement":false,"HTMLDListElement":false,"HTMLDocument":false,"HTMLElement":false,"HTMLEmbedElement":false,"HTMLFieldSetElement":false,"HTMLFontElement":false,"HTMLFormControlsCollection":false,"HTMLFormElement":false,"HTMLFrameElement":false,"HTMLFrameSetElement":false,"HTMLHeadElement":false,"HTMLHeadingElement":false,"HTMLHRElement":false,"HTMLHtmlElement":false,"HTMLIFrameElement":false,"HTMLImageElement":false,"HTMLInputElement":false,"HTMLLabelElement":false,"HTMLLegendElement":false,"HTMLLIElement":false,"HTMLLinkElement":false,"HTMLMapElement":false,"HTMLMarqueeElement":false,"HTMLMediaElement":false,"HTMLMenuElement":false,"HTMLMetaElement":false,"HTMLMeterElement":false,"HTMLModElement":false,"HTMLObjectElement":false,"HTMLOListElement":false,"HTMLOptGroupElement":false,"HTMLOptionElement":false,"HTMLOptionsCollection":false,"HTMLOutputElement":false,"HTMLParagraphElement":false,"HTMLParamElement":false,"HTMLPictureElement":false,"HTMLPreElement":false,"HTMLProgressElement":false,"HTMLQuoteElement":false,"HTMLScriptElement":false,"HTMLSelectElement":false,"HTMLShadowElement":false,"HTMLSlotElement":false,"HTMLSourceElement":false,"HTMLSpanElement":false,"HTMLStyleElement":false,"HTMLTableCaptionElement":false,"HTMLTableCellElement":false,"HTMLTableColElement":false,"HTMLTableElement":false,"HTMLTableRowElement":false,"HTMLTableSectionElement":false,"HTMLTemplateElement":false,"HTMLTextAreaElement":false,"HTMLTimeElement":false,"HTMLTitleElement":false,"HTMLTrackElement":false,"HTMLUListElement":false,"HTMLUnknownElement":false,"HTMLVideoElement":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"IdleDeadline":false,"IIRFilterNode":false,"Image":false,"ImageBitmap":false,"ImageBitmapRenderingContext":false,"ImageCapture":false,"ImageData":false,"indexedDB":false,"innerHeight":false,"innerWidth":false,"InputEvent":false,"IntersectionObserver":false,"IntersectionObserverEntry":false,"Intl":false,"isSecureContext":false,"KeyboardEvent":false,"KeyframeEffect":false,"KeyframeEffectReadOnly":false,"length":false,"localStorage":false,"location":true,"Location":false,"locationbar":false,"matchMedia":false,"MediaDeviceInfo":false,"MediaDevices":false,"MediaElementAudioSourceNode":false,"MediaEncryptedEvent":false,"MediaError":false,"MediaKeyMessageEvent":false,"MediaKeySession":false,"MediaKeyStatusMap":false,"MediaKeySystemAccess":false,"MediaList":false,"MediaQueryList":false,"MediaQueryListEvent":false,"MediaRecorder":false,"MediaSettingsRange":false,"MediaSource":false,"MediaStream":false,"MediaStreamAudioDestinationNode":false,"MediaStreamAudioSourceNode":false,"MediaStreamEvent":false,"MediaStreamTrack":false,"MediaStreamTrackEvent":false,"menubar":false,"MessageChannel":false,"MessageEvent":false,"MessagePort":false,"MIDIAccess":false,"MIDIConnectionEvent":false,"MIDIInput":false,"MIDIInputMap":false,"MIDIMessageEvent":false,"MIDIOutput":false,"MIDIOutputMap":false,"MIDIPort":false,"MimeType":false,"MimeTypeArray":false,"MouseEvent":false,"moveBy":false,"moveTo":false,"MutationEvent":false,"MutationObserver":false,"MutationRecord":false,"name":false,"NamedNodeMap":false,"NavigationPreloadManager":false,"navigator":false,"Navigator":false,"NetworkInformation":false,"Node":false,"NodeFilter":false,"NodeIterator":false,"NodeList":false,"Notification":false,"OfflineAudioCompletionEvent":false,"OfflineAudioContext":false,"offscreenBuffering":false,"OffscreenCanvas":true,"onabort":true,"onafterprint":true,"onanimationend":true,"onanimationiteration":true,"onanimationstart":true,"onappinstalled":true,"onauxclick":true,"onbeforeinstallprompt":true,"onbeforeprint":true,"onbeforeunload":true,"onblur":true,"oncancel":true,"oncanplay":true,"oncanplaythrough":true,"onchange":true,"onclick":true,"onclose":true,"oncontextmenu":true,"oncuechange":true,"ondblclick":true,"ondevicemotion":true,"ondeviceorientation":true,"ondeviceorientationabsolute":true,"ondrag":true,"ondragend":true,"ondragenter":true,"ondragleave":true,"ondragover":true,"ondragstart":true,"ondrop":true,"ondurationchange":true,"onemptied":true,"onended":true,"onerror":true,"onfocus":true,"ongotpointercapture":true,"onhashchange":true,"oninput":true,"oninvalid":true,"onkeydown":true,"onkeypress":true,"onkeyup":true,"onlanguagechange":true,"onload":true,"onloadeddata":true,"onloadedmetadata":true,"onloadstart":true,"onlostpointercapture":true,"onmessage":true,"onmessageerror":true,"onmousedown":true,"onmouseenter":true,"onmouseleave":true,"onmousemove":true,"onmouseout":true,"onmouseover":true,"onmouseup":true,"onmousewheel":true,"onoffline":true,"ononline":true,"onpagehide":true,"onpageshow":true,"onpause":true,"onplay":true,"onplaying":true,"onpointercancel":true,"onpointerdown":true,"onpointerenter":true,"onpointerleave":true,"onpointermove":true,"onpointerout":true,"onpointerover":true,"onpointerup":true,"onpopstate":true,"onprogress":true,"onratechange":true,"onrejectionhandled":true,"onreset":true,"onresize":true,"onscroll":true,"onsearch":true,"onseeked":true,"onseeking":true,"onselect":true,"onstalled":true,"onstorage":true,"onsubmit":true,"onsuspend":true,"ontimeupdate":true,"ontoggle":true,"ontransitionend":true,"onunhandledrejection":true,"onunload":true,"onvolumechange":true,"onwaiting":true,"onwheel":true,"open":false,"openDatabase":false,"opener":false,"Option":false,"origin":false,"OscillatorNode":false,"outerHeight":false,"outerWidth":false,"PageTransitionEvent":false,"pageXOffset":false,"pageYOffset":false,"PannerNode":false,"parent":false,"Path2D":false,"PaymentAddress":false,"PaymentRequest":false,"PaymentRequestUpdateEvent":false,"PaymentResponse":false,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceLongTaskTiming":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceNavigationTiming":false,"PerformanceObserver":false,"PerformanceObserverEntryList":false,"PerformancePaintTiming":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"PeriodicWave":false,"Permissions":false,"PermissionStatus":false,"personalbar":false,"PhotoCapabilities":false,"Plugin":false,"PluginArray":false,"PointerEvent":false,"PopStateEvent":false,"postMessage":false,"Presentation":false,"PresentationAvailability":false,"PresentationConnection":false,"PresentationConnectionAvailableEvent":false,"PresentationConnectionCloseEvent":false,"PresentationConnectionList":false,"PresentationReceiver":false,"PresentationRequest":false,"print":false,"ProcessingInstruction":false,"ProgressEvent":false,"PromiseRejectionEvent":false,"prompt":false,"PushManager":false,"PushSubscription":false,"PushSubscriptionOptions":false,"queueMicrotask":false,"RadioNodeList":false,"Range":false,"ReadableStream":false,"registerProcessor":false,"RemotePlayback":false,"removeEventListener":false,"Request":false,"requestAnimationFrame":false,"requestIdleCallback":false,"resizeBy":false,"ResizeObserver":false,"ResizeObserverEntry":false,"resizeTo":false,"Response":false,"RTCCertificate":false,"RTCDataChannel":false,"RTCDataChannelEvent":false,"RTCDtlsTransport":false,"RTCIceCandidate":false,"RTCIceGatherer":false,"RTCIceTransport":false,"RTCPeerConnection":false,"RTCPeerConnectionIceEvent":false,"RTCRtpContributingSource":false,"RTCRtpReceiver":false,"RTCRtpSender":false,"RTCSctpTransport":false,"RTCSessionDescription":false,"RTCStatsReport":false,"RTCTrackEvent":false,"screen":false,"Screen":false,"screenLeft":false,"ScreenOrientation":false,"screenTop":false,"screenX":false,"screenY":false,"ScriptProcessorNode":false,"scroll":false,"scrollbars":false,"scrollBy":false,"scrollTo":false,"scrollX":false,"scrollY":false,"SecurityPolicyViolationEvent":false,"Selection":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerRegistration":false,"sessionStorage":false,"setInterval":false,"setTimeout":false,"ShadowRoot":false,"SharedWorker":false,"SourceBuffer":false,"SourceBufferList":false,"speechSynthesis":false,"SpeechSynthesisEvent":false,"SpeechSynthesisUtterance":false,"StaticRange":false,"status":false,"statusbar":false,"StereoPannerNode":false,"stop":false,"Storage":false,"StorageEvent":false,"StorageManager":false,"styleMedia":false,"StyleSheet":false,"StyleSheetList":false,"SubtleCrypto":false,"SVGAElement":false,"SVGAngle":false,"SVGAnimatedAngle":false,"SVGAnimatedBoolean":false,"SVGAnimatedEnumeration":false,"SVGAnimatedInteger":false,"SVGAnimatedLength":false,"SVGAnimatedLengthList":false,"SVGAnimatedNumber":false,"SVGAnimatedNumberList":false,"SVGAnimatedPreserveAspectRatio":false,"SVGAnimatedRect":false,"SVGAnimatedString":false,"SVGAnimatedTransformList":false,"SVGAnimateElement":false,"SVGAnimateMotionElement":false,"SVGAnimateTransformElement":false,"SVGAnimationElement":false,"SVGCircleElement":false,"SVGClipPathElement":false,"SVGComponentTransferFunctionElement":false,"SVGDefsElement":false,"SVGDescElement":false,"SVGDiscardElement":false,"SVGElement":false,"SVGEllipseElement":false,"SVGFEBlendElement":false,"SVGFEColorMatrixElement":false,"SVGFEComponentTransferElement":false,"SVGFECompositeElement":false,"SVGFEConvolveMatrixElement":false,"SVGFEDiffuseLightingElement":false,"SVGFEDisplacementMapElement":false,"SVGFEDistantLightElement":false,"SVGFEDropShadowElement":false,"SVGFEFloodElement":false,"SVGFEFuncAElement":false,"SVGFEFuncBElement":false,"SVGFEFuncGElement":false,"SVGFEFuncRElement":false,"SVGFEGaussianBlurElement":false,"SVGFEImageElement":false,"SVGFEMergeElement":false,"SVGFEMergeNodeElement":false,"SVGFEMorphologyElement":false,"SVGFEOffsetElement":false,"SVGFEPointLightElement":false,"SVGFESpecularLightingElement":false,"SVGFESpotLightElement":false,"SVGFETileElement":false,"SVGFETurbulenceElement":false,"SVGFilterElement":false,"SVGForeignObjectElement":false,"SVGGElement":false,"SVGGeometryElement":false,"SVGGradientElement":false,"SVGGraphicsElement":false,"SVGImageElement":false,"SVGLength":false,"SVGLengthList":false,"SVGLinearGradientElement":false,"SVGLineElement":false,"SVGMarkerElement":false,"SVGMaskElement":false,"SVGMatrix":false,"SVGMetadataElement":false,"SVGMPathElement":false,"SVGNumber":false,"SVGNumberList":false,"SVGPathElement":false,"SVGPatternElement":false,"SVGPoint":false,"SVGPointList":false,"SVGPolygonElement":false,"SVGPolylineElement":false,"SVGPreserveAspectRatio":false,"SVGRadialGradientElement":false,"SVGRect":false,"SVGRectElement":false,"SVGScriptElement":false,"SVGSetElement":false,"SVGStopElement":false,"SVGStringList":false,"SVGStyleElement":false,"SVGSVGElement":false,"SVGSwitchElement":false,"SVGSymbolElement":false,"SVGTextContentElement":false,"SVGTextElement":false,"SVGTextPathElement":false,"SVGTextPositioningElement":false,"SVGTitleElement":false,"SVGTransform":false,"SVGTransformList":false,"SVGTSpanElement":false,"SVGUnitTypes":false,"SVGUseElement":false,"SVGViewElement":false,"TaskAttributionTiming":false,"Text":false,"TextDecoder":false,"TextEncoder":false,"TextEvent":false,"TextMetrics":false,"TextTrack":false,"TextTrackCue":false,"TextTrackCueList":false,"TextTrackList":false,"TimeRanges":false,"toolbar":false,"top":false,"Touch":false,"TouchEvent":false,"TouchList":false,"TrackEvent":false,"TransitionEvent":false,"TreeWalker":false,"UIEvent":false,"URL":false,"URLSearchParams":false,"ValidityState":false,"visualViewport":false,"VisualViewport":false,"VTTCue":false,"WaveShaperNode":false,"WebAssembly":false,"WebGL2RenderingContext":false,"WebGLActiveInfo":false,"WebGLBuffer":false,"WebGLContextEvent":false,"WebGLFramebuffer":false,"WebGLProgram":false,"WebGLQuery":false,"WebGLRenderbuffer":false,"WebGLRenderingContext":false,"WebGLSampler":false,"WebGLShader":false,"WebGLShaderPrecisionFormat":false,"WebGLSync":false,"WebGLTexture":false,"WebGLTransformFeedback":false,"WebGLUniformLocation":false,"WebGLVertexArrayObject":false,"WebSocket":false,"WheelEvent":false,"window":false,"Window":false,"Worker":false,"WritableStream":false,"XMLDocument":false,"XMLHttpRequest":false,"XMLHttpRequestEventTarget":false,"XMLHttpRequestUpload":false,"XMLSerializer":false,"XPathEvaluator":false,"XPathExpression":false,"XPathResult":false,"XSLTProcessor":false},"worker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"clearInterval":false,"clearTimeout":false,"close":true,"console":false,"fetch":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":true,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onlanguagechange":true,"onmessage":true,"onoffline":true,"ononline":true,"onrejectionhandled":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"removeEventListener":false,"Request":false,"Response":false,"self":true,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"node":{"__dirname":false,"__filename":false,"Buffer":false,"clearImmediate":false,"clearInterval":false,"clearTimeout":false,"console":false,"exports":true,"global":false,"Intl":false,"module":false,"process":false,"queueMicrotask":false,"require":false,"setImmediate":false,"setInterval":false,"setTimeout":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false},"commonjs":{"exports":true,"global":false,"module":false,"require":false},"amd":{"define":false,"require":false},"mocha":{"after":false,"afterEach":false,"before":false,"beforeEach":false,"context":false,"describe":false,"it":false,"mocha":false,"run":false,"setup":false,"specify":false,"suite":false,"suiteSetup":false,"suiteTeardown":false,"teardown":false,"test":false,"xcontext":false,"xdescribe":false,"xit":false,"xspecify":false},"jasmine":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fail":false,"fdescribe":false,"fit":false,"it":false,"jasmine":false,"pending":false,"runs":false,"spyOn":false,"spyOnProperty":false,"waits":false,"waitsFor":false,"xdescribe":false,"xit":false},"jest":{"afterAll":false,"afterEach":false,"beforeAll":false,"beforeEach":false,"describe":false,"expect":false,"fdescribe":false,"fit":false,"it":false,"jest":false,"pit":false,"require":false,"test":false,"xdescribe":false,"xit":false,"xtest":false},"qunit":{"asyncTest":false,"deepEqual":false,"equal":false,"expect":false,"module":false,"notDeepEqual":false,"notEqual":false,"notOk":false,"notPropEqual":false,"notStrictEqual":false,"ok":false,"propEqual":false,"QUnit":false,"raises":false,"start":false,"stop":false,"strictEqual":false,"test":false,"throws":false},"phantomjs":{"console":true,"exports":true,"phantom":true,"require":true,"WebPage":true},"couch":{"emit":false,"exports":false,"getRow":false,"log":false,"module":false,"provides":false,"require":false,"respond":false,"send":false,"start":false,"sum":false},"rhino":{"defineClass":false,"deserialize":false,"gc":false,"help":false,"importClass":false,"importPackage":false,"java":false,"load":false,"loadClass":false,"Packages":false,"print":false,"quit":false,"readFile":false,"readUrl":false,"runCommand":false,"seal":false,"serialize":false,"spawn":false,"sync":false,"toint32":false,"version":false},"nashorn":{"__DIR__":false,"__FILE__":false,"__LINE__":false,"com":false,"edu":false,"exit":false,"java":false,"Java":false,"javafx":false,"JavaImporter":false,"javax":false,"JSAdapter":false,"load":false,"loadWithNewGlobal":false,"org":false,"Packages":false,"print":false,"quit":false},"wsh":{"ActiveXObject":true,"Enumerator":true,"GetObject":true,"ScriptEngine":true,"ScriptEngineBuildVersion":true,"ScriptEngineMajorVersion":true,"ScriptEngineMinorVersion":true,"VBArray":true,"WScript":true,"WSH":true,"XDomainRequest":true},"jquery":{"$":false,"jQuery":false},"yui":{"YAHOO":false,"YAHOO_config":false,"YUI":false,"YUI_config":false},"shelljs":{"cat":false,"cd":false,"chmod":false,"config":false,"cp":false,"dirs":false,"echo":false,"env":false,"error":false,"exec":false,"exit":false,"find":false,"grep":false,"ln":false,"ls":false,"mkdir":false,"mv":false,"popd":false,"pushd":false,"pwd":false,"rm":false,"sed":false,"set":false,"target":false,"tempdir":false,"test":false,"touch":false,"which":false},"prototypejs":{"$":false,"$$":false,"$A":false,"$break":false,"$continue":false,"$F":false,"$H":false,"$R":false,"$w":false,"Abstract":false,"Ajax":false,"Autocompleter":false,"Builder":false,"Class":false,"Control":false,"Draggable":false,"Draggables":false,"Droppables":false,"Effect":false,"Element":false,"Enumerable":false,"Event":false,"Field":false,"Form":false,"Hash":false,"Insertion":false,"ObjectRange":false,"PeriodicalExecuter":false,"Position":false,"Prototype":false,"Scriptaculous":false,"Selector":false,"Sortable":false,"SortableObserver":false,"Sound":false,"Template":false,"Toggle":false,"Try":false},"meteor":{"_":false,"$":false,"Accounts":false,"AccountsClient":false,"AccountsCommon":false,"AccountsServer":false,"App":false,"Assets":false,"Blaze":false,"check":false,"Cordova":false,"DDP":false,"DDPRateLimiter":false,"DDPServer":false,"Deps":false,"EJSON":false,"Email":false,"HTTP":false,"Log":false,"Match":false,"Meteor":false,"Mongo":false,"MongoInternals":false,"Npm":false,"Package":false,"Plugin":false,"process":false,"Random":false,"ReactiveDict":false,"ReactiveVar":false,"Router":false,"ServiceConfiguration":false,"Session":false,"share":false,"Spacebars":false,"Template":false,"Tinytest":false,"Tracker":false,"UI":false,"Utils":false,"WebApp":false,"WebAppInternals":false},"mongo":{"_isWindows":false,"_rand":false,"BulkWriteResult":false,"cat":false,"cd":false,"connect":false,"db":false,"getHostName":false,"getMemInfo":false,"hostname":false,"ISODate":false,"listFiles":false,"load":false,"ls":false,"md5sumFile":false,"mkdir":false,"Mongo":false,"NumberInt":false,"NumberLong":false,"ObjectId":false,"PlanCache":false,"print":false,"printjson":false,"pwd":false,"quit":false,"removeFile":false,"rs":false,"sh":false,"UUID":false,"version":false,"WriteResult":false},"applescript":{"$":false,"Application":false,"Automation":false,"console":false,"delay":false,"Library":false,"ObjC":false,"ObjectSpecifier":false,"Path":false,"Progress":false,"Ref":false},"serviceworker":{"addEventListener":false,"applicationCache":false,"atob":false,"Blob":false,"BroadcastChannel":false,"btoa":false,"Cache":false,"caches":false,"CacheStorage":false,"clearInterval":false,"clearTimeout":false,"Client":false,"clients":false,"Clients":false,"close":true,"console":false,"ExtendableEvent":false,"ExtendableMessageEvent":false,"fetch":false,"FetchEvent":false,"FileReaderSync":false,"FormData":false,"Headers":false,"IDBCursor":false,"IDBCursorWithValue":false,"IDBDatabase":false,"IDBFactory":false,"IDBIndex":false,"IDBKeyRange":false,"IDBObjectStore":false,"IDBOpenDBRequest":false,"IDBRequest":false,"IDBTransaction":false,"IDBVersionChangeEvent":false,"ImageData":false,"importScripts":false,"indexedDB":false,"location":false,"MessageChannel":false,"MessagePort":false,"name":false,"navigator":false,"Notification":false,"onclose":true,"onconnect":true,"onerror":true,"onfetch":true,"oninstall":true,"onlanguagechange":true,"onmessage":true,"onmessageerror":true,"onnotificationclick":true,"onnotificationclose":true,"onoffline":true,"ononline":true,"onpush":true,"onpushsubscriptionchange":true,"onrejectionhandled":true,"onsync":true,"onunhandledrejection":true,"performance":false,"Performance":false,"PerformanceEntry":false,"PerformanceMark":false,"PerformanceMeasure":false,"PerformanceNavigation":false,"PerformanceResourceTiming":false,"PerformanceTiming":false,"postMessage":true,"Promise":false,"queueMicrotask":false,"registration":false,"removeEventListener":false,"Request":false,"Response":false,"self":false,"ServiceWorker":false,"ServiceWorkerContainer":false,"ServiceWorkerGlobalScope":false,"ServiceWorkerMessageEvent":false,"ServiceWorkerRegistration":false,"setInterval":false,"setTimeout":false,"skipWaiting":false,"TextDecoder":false,"TextEncoder":false,"URL":false,"URLSearchParams":false,"WebSocket":false,"WindowClient":false,"Worker":false,"WorkerGlobalScope":false,"XMLHttpRequest":false},"atomtest":{"advanceClock":false,"fakeClearInterval":false,"fakeClearTimeout":false,"fakeSetInterval":false,"fakeSetTimeout":false,"resetTimeouts":false,"waitsForPromise":false},"embertest":{"andThen":false,"click":false,"currentPath":false,"currentRouteName":false,"currentURL":false,"fillIn":false,"find":false,"findAll":false,"findWithAssert":false,"keyEvent":false,"pauseTest":false,"resumeTest":false,"triggerEvent":false,"visit":false,"wait":false},"protractor":{"$":false,"$$":false,"browser":false,"by":false,"By":false,"DartObject":false,"element":false,"protractor":false},"shared-node-browser":{"clearInterval":false,"clearTimeout":false,"console":false,"setInterval":false,"setTimeout":false,"URL":false,"URLSearchParams":false},"webextensions":{"browser":false,"chrome":false,"opr":false},"greasemonkey":{"cloneInto":false,"createObjectIn":false,"exportFunction":false,"GM":false,"GM_addStyle":false,"GM_deleteValue":false,"GM_getResourceText":false,"GM_getResourceURL":false,"GM_getValue":false,"GM_info":false,"GM_listValues":false,"GM_log":false,"GM_openInTab":false,"GM_registerMenuCommand":false,"GM_setClipboard":false,"GM_setValue":false,"GM_xmlhttpRequest":false,"unsafeWindow":false},"devtools":{"$":false,"$_":false,"$$":false,"$0":false,"$1":false,"$2":false,"$3":false,"$4":false,"$x":false,"chrome":false,"clear":false,"copy":false,"debug":false,"dir":false,"dirxml":false,"getEventListeners":false,"inspect":false,"keys":false,"monitor":false,"monitorEvents":false,"profile":false,"profileEnd":false,"queryObjects":false,"table":false,"undebug":false,"unmonitor":false,"unmonitorEvents":false,"values":false}}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(244);t.default=class{constructor(e,t){this._cachedMap=void 0,this._code=void 0,this._opts=void 0,this._rawMappings=void 0,this._lastGenLine=void 0,this._lastSourceLine=void 0,this._lastSourceColumn=void 0,this._cachedMap=null,this._code=t,this._opts=e,this._rawMappings=[]}get(){if(!this._cachedMap){const e=this._cachedMap=new r.SourceMapGenerator({sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName.replace(/\\/g,"/"),t):"object"==typeof t&&Object.keys(t).forEach(n=>{e.setSourceContent(n.replace(/\\/g,"/"),t[n])}),this._rawMappings.forEach(t=>e.addMapping(t),e)}return this._cachedMap.toJSON()}getRawMappings(){return this._rawMappings.slice()}mark(e,t,n,r,i,s,o){this._lastGenLine!==e&&null===n||(o||this._lastGenLine!==e||this._lastSourceLine!==n||this._lastSourceColumn!==r)&&(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=n,this._lastSourceColumn=r,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==n?void 0:(s||this._opts.sourceFileName).replace(/\\/g,"/"),original:null==n?void 0:{line:n,column:r}}))}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},function(e,t,n){var r=n(65);function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,n,i,s,o,a;t=this._last,n=e,i=t.generatedLine,s=n.generatedLine,o=t.generatedColumn,a=n.generatedColumn,s>i||s==i&&a>=o||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t,n){var r=n(65),i=n(571),s=n(247).ArraySet,o=n(246),a=n(572).quickSort;function l(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new h(t):new u(t)}function u(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sources"),o=r.getArg(t,"names",[]),a=r.getArg(t,"sourceRoot",null),l=r.getArg(t,"sourcesContent",null),u=r.getArg(t,"mappings"),c=r.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);i=i.map(String).map(r.normalize).map((function(e){return a&&r.isAbsolute(a)&&r.isAbsolute(e)?r.relative(a,e):e})),this._names=s.fromArray(o.map(String),!0),this._sources=s.fromArray(i,!0),this.sourceRoot=a,this.sourcesContent=l,this._mappings=u,this.file=c}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function h(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new s,this._names=new s;var o={line:-1,column:0};this._sections=i.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=r.getArg(e,"offset"),n=r.getArg(t,"line"),i=r.getArg(t,"column");if(n<o.line||n===o.line&&i<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=t,{generatedOffset:{generatedLine:n+1,generatedColumn:i+1},consumer:new l(r.getArg(e,"map"))}}))}l.fromSourceMap=function(e){return u.fromSourceMap(e)},l.prototype._version=3,l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),l.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},l.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.GREATEST_LOWER_BOUND=1,l.LEAST_UPPER_BOUND=2,l.prototype.eachMapping=function(e,t,n){var i,s=t||null;switch(n||l.GENERATED_ORDER){case l.GENERATED_ORDER:i=this._generatedMappings;break;case l.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;i.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=o&&(t=r.join(o,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,s)},l.prototype.allGeneratedPositionsFor=function(e){var t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(null!=this.sourceRoot&&(n.source=r.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var s=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(void 0===e.column)for(var l=a.originalLine;a&&a.originalLine===l;)s.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var u=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==u;)s.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return s},t.SourceMapConsumer=l,u.prototype=Object.create(l.prototype),u.prototype.consumer=l,u.fromSourceMap=function(e){var t=Object.create(u.prototype),n=t._names=s.fromArray(e._names.toArray(),!0),i=t._sources=s.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),l=t.__generatedMappings=[],h=t.__originalMappings=[],d=0,f=o.length;d<f;d++){var p=o[d],m=new c;m.generatedLine=p.generatedLine,m.generatedColumn=p.generatedColumn,p.source&&(m.source=i.indexOf(p.source),m.originalLine=p.originalLine,m.originalColumn=p.originalColumn,p.name&&(m.name=n.indexOf(p.name)),h.push(m)),l.push(m)}return a(t.__originalMappings,r.compareByOriginalPositions),t},u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._sources.toArray().map((function(e){return null!=this.sourceRoot?r.join(this.sourceRoot,e):e}),this)}}),u.prototype._parseMappings=function(e,t){for(var n,i,s,l,u,h=1,d=0,f=0,p=0,m=0,g=0,y=e.length,v=0,b={},w={},_=[],S=[];v<y;)if(";"===e.charAt(v))h++,v++,d=0;else if(","===e.charAt(v))v++;else{for((n=new c).generatedLine=h,l=v;l<y&&!this._charIsMappingSeparator(e,l);l++);if(s=b[i=e.slice(v,l)])v+=i.length;else{for(s=[];v<l;)o.decode(e,v,w),u=w.value,v=w.rest,s.push(u);if(2===s.length)throw new Error("Found a source, but no line and column");if(3===s.length)throw new Error("Found a source and line, but no column");b[i]=s}n.generatedColumn=d+s[0],d=n.generatedColumn,s.length>1&&(n.source=m+s[1],m+=s[1],n.originalLine=f+s[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=p+s[3],p=n.originalColumn,s.length>4&&(n.name=g+s[4],g+=s[4])),S.push(n),"number"==typeof n.originalLine&&_.push(n)}a(S,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,a(_,r.compareByOriginalPositions),this.__originalMappings=_},u.prototype._findMapping=function(e,t,n,r,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,s,o)},u.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},u.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=r.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=r.join(this.sourceRoot,s)));var o=r.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},u.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var i=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if(null!=this.sourceRoot&&(t=r.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=u,h.prototype=Object.create(l.prototype),h.prototype.constructor=l,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),h.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=i.search(t,this._sections,(function(e,t){var n=e.generatedLine-t.generatedOffset.generatedLine;return n||e.generatedColumn-t.generatedOffset.generatedColumn})),s=this._sections[n];return s?s.consumer.originalPositionFor({line:t.generatedLine-(s.generatedOffset.generatedLine-1),column:t.generatedColumn-(s.generatedOffset.generatedLine===t.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},h.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer.sources.indexOf(r.getArg(e,"source"))){var i=n.consumer.generatedPositionFor(e);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var l=s[o],u=i.consumer._sources.at(l.source);null!==i.consumer.sourceRoot&&(u=r.join(i.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var c=i.consumer._names.at(l.name);this._names.add(c),c=this._names.indexOf(c);var h={source:u,generatedLine:l.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(i.generatedOffset.generatedLine===l.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:c};this.__generatedMappings.push(h),"number"==typeof h.originalLine&&this.__originalMappings.push(h)}a(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),a(this.__originalMappings,r.compareByOriginalPositions)},t.IndexedSourceMapConsumer=h},function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,r,i){if(0===n.length)return-1;var s=function e(n,r,i,s,o,a){var l=Math.floor((r-n)/2)+n,u=o(i,s[l],!0);return 0===u?l:u>0?r-l>1?e(l,r,i,s,o,a):a==t.LEAST_UPPER_BOUND?r<s.length?r:-1:l:l-n>1?e(n,l,i,s,o,a):a==t.LEAST_UPPER_BOUND?l:n<0?-1:n}(-1,n.length,e,n,r,i||t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===r(n[s],n[s-1],!0);)--s;return s}},function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,i,s){if(i<s){var o=i-1;n(e,(c=i,h=s,Math.round(c+Math.random()*(h-c))),s);for(var a=e[s],l=i;l<s;l++)t(e[l],a)<=0&&n(e,o+=1,l);n(e,o+1,l);var u=o+1;r(e,t,i,u-1),r(e,t,u+1,s)}var c,h}t.quickSort=function(e,t){r(e,t,0,e.length-1)}},function(e,t,n){var r=n(245).SourceMapGenerator,i=n(65),s=/(\r?\n)/,o="$$$isSourceNode$$$";function a(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[o]=!0,null!=r&&this.add(r)}a.fromStringWithSourceMap=function(e,t,n){var r=new a,o=e.split(s),l=0,u=function(){return e()+(e()||"");function e(){return l<o.length?o[l++]:void 0}},c=1,h=0,d=null;return t.eachMapping((function(e){if(null!==d){if(!(c<e.generatedLine)){var t=(n=o[l]).substr(0,e.generatedColumn-h);return o[l]=n.substr(e.generatedColumn-h),h=e.generatedColumn,f(d,t),void(d=e)}f(d,u()),c++,h=0}for(;c<e.generatedLine;)r.add(u()),c++;if(h<e.generatedColumn){var n=o[l];r.add(n.substr(0,e.generatedColumn)),o[l]=n.substr(e.generatedColumn),h=e.generatedColumn}d=e}),this),l<o.length&&(d&&f(d,u()),r.add(o.splice(l).join(""))),t.sources.forEach((function(e){var s=t.sourceContentFor(e);null!=s&&(null!=n&&(e=i.join(n,e)),r.setSourceContent(e,s))})),r;function f(e,t){if(null===e||void 0===e.source)r.add(t);else{var s=n?i.join(n,e.source):e.source;r.add(new a(e.originalLine,e.originalColumn,s,t,e.name))}}},a.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},a.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},a.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},a.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[o]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},a.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},a.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(t=0,n=r.length;t<n;t++)e(i.fromSetString(r[t]),this.sourceContents[r[t]])},a.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},a.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),i=!1,s=null,o=null,a=null,l=null;return this.walk((function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?(s===r.source&&o===r.line&&a===r.column&&l===r.name||n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),s=r.source,o=r.line,a=r.column,l=r.name,i=!0):i&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,i=!1);for(var u=0,c=e.length;u<c;u++)10===e.charCodeAt(u)?(t.line++,t.column=0,u+1===c?(s=null,i=!1):i&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:t.code,map:n}},t.SourceNode=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(575),i=n(248),s=n(1),o=n(578);const{isProgram:a,isFile:l,isEmptyStatement:u}=s,c=/e/i,h=/\.0+$/,d=/^0[box]/,f=/^\s*[@#]__PURE__\s*$/,{needsParens:p,needsWhitespaceAfter:m,needsWhitespaceBefore:g}=i;class y{constructor(e,t){this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._parenPushNewlineState=null,this._noLineTerminator=!1,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new WeakSet,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=e,this._buf=new r.default(t)}generate(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(){this.format.compact||this.format.concise||this._indent++}dedent(){this.format.compact||this.format.concise||this._indent--}semicolon(e=!1){this._maybeAddAuxComment(),this._append(";",!e)}rightBrace(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")}space(e=!1){if(!this.format.compact)if(e)this._space();else if(this._buf.hasContent()){const e=this.getLastChar();32!==e&&10!==e&&this._space()}}word(e){(this._endsWithWord||this.endsWith(47)&&47===e.charCodeAt(0))&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0}number(e){this.word(e),this._endsWithInteger=Number.isInteger(+e)&&!d.test(e)&&!c.test(e)&&!h.test(e)&&46!==e.charCodeAt(e.length-1)}token(e){const t=this.getLastChar(),n=e.charCodeAt(0);("--"===e&&33===t||43===n&&43===t||45===n&&45===t||46===n&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)}newline(e=1){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();const t=this.endsWithCharAndNewline();if(10!==t&&(123!==t&&58!==t||e--,!(e<=0)))for(let t=0;t<e;t++)this._newline()}endsWith(e){return this.getLastChar()===e}getLastChar(){return this._buf.getLastChar()}endsWithCharAndNewline(){return this._buf.endsWithCharAndNewline()}removeTrailingNewline(){this._buf.removeTrailingNewline()}exactSource(e,t){this._catchUp("start",e),this._buf.exactSource(e,t)}source(e,t){this._catchUp(e,t),this._buf.source(e,t)}withSource(e,t,n){this._catchUp(e,t),this._buf.withSource(e,t,n)}_space(){this._append(" ",!0)}_newline(){this._append("\n",!0)}_append(e,t=!1){this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1}_maybeIndent(e){this._indent&&this.endsWith(10)&&10!==e.charCodeAt(0)&&this._buf.queue(this._getIndent())}_maybeAddParen(e){const t=this._parenPushNewlineState;if(!t)return;let n;for(n=0;n<e.length&&" "===e[n];n++)continue;if(n===e.length)return;const r=e[n];if("\n"!==r){if("/"!==r||n+1===e.length)return void(this._parenPushNewlineState=null);const t=e[n+1];if("*"===t){if(f.test(e.slice(n+2,e.length-2)))return}else if("/"!==t)return void(this._parenPushNewlineState=null)}this.token("("),this.indent(),t.printed=!0}_catchUp(e,t){if(!this.format.retainLines)return;const n=t?t[e]:null;if(null!=(null==n?void 0:n.line)){const e=n.line-this._buf.getCurrentLine();for(let t=0;t<e;t++)this._newline()}}_getIndent(){return this.format.indent.style.repeat(this._indent)}startTerminatorless(e=!1){return e?(this._noLineTerminator=!0,null):this._parenPushNewlineState={printed:!1}}endTerminatorless(e){this._noLineTerminator=!1,null!=e&&e.printed&&(this.dedent(),this.newline(),this.token(")"))}print(e,t){if(!e)return;const n=this.format.concise;e._compact&&(this.format.concise=!0);const r=this[e.type];if(!r)throw new ReferenceError(`unknown node of type ${JSON.stringify(e.type)} with constructor ${JSON.stringify(null==e?void 0:e.constructor.name)}`);this._printStack.push(e);const i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);let s=p(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e);const o=a(e)||l(e)?null:e.loc;this.withSource("start",o,()=>{r.call(this,e,t)}),this._printTrailingComments(e),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}getPossibleRaw(e){const t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,n={}){if(null==e||!e.length)return;n.indent&&this.indent();const r={addNewlines:n.addNewlines};for(let i=0;i<e.length;i++){const s=e[i];s&&(n.statement&&this._printNewline(!0,s,t,r),this.print(s,t),n.iterator&&n.iterator(s,i),n.separator&&i<e.length-1&&n.separator.call(this),n.statement&&this._printNewline(!1,s,t,r))}n.indent&&this.dedent()}printAndIndentOnComments(e,t){const n=e.leadingComments&&e.leadingComments.length>0;n&&this.indent(),this.print(e,t),n&&this.dedent()}printBlock(e){const t=e.body;u(t)||this.space(),this.print(t,e)}_printTrailingComments(e){this._printComments(this._getComments(!1,e))}_printLeadingComments(e){this._printComments(this._getComments(!0,e),!0)}printInnerComments(e,t=!0){var n;null!=(n=e.innerComments)&&n.length&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())}printSequence(e,t,n={}){return n.statement=!0,this.printJoin(e,t,n)}printList(e,t,n={}){return null==n.separator&&(n.separator=b),this.printJoin(e,t,n)}_printNewline(e,t,n,r){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space();let i=0;if(this._buf.hasContent()){e||i++,r.addNewlines&&(i+=r.addNewlines(e,t)||0);(e?g:m)(t,n)&&i++}this.newline(Math.min(2,i))}_getComments(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]}_printComment(e,t){if(!this.format.shouldPrintComment(e.value))return;if(e.ignore)return;if(this._printedComments.has(e))return;this._printedComments.add(e);const n="CommentBlock"===e.type,r=n&&!t&&!this._noLineTerminator;r&&this._buf.hasContent()&&this.newline(1);const i=this.getLastChar();91!==i&&123!==i&&this.space();let s=n||this._noLineTerminator?`/*${e.value}*/`:`//${e.value}\n`;if(n&&this.format.indent.adjustMultilineComment){var o;const t=null==(o=e.loc)?void 0:o.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");s=s.replace(e,"\n")}const n=Math.max(this._getIndent().length,this.format.retainLines?0:this._buf.getCurrentColumn());s=s.replace(/\n(?!$)/g,"\n"+" ".repeat(n))}this.endsWith(47)&&this._space(),this.withSource("start",e.loc,()=>{this._append(s)}),r&&this.newline(1)}_printComments(e,t){if(null!=e&&e.length)if(t&&1===e.length&&f.test(e[0].value))this._printComment(e[0],this._buf.hasContent()&&!this.endsWith(10));else for(const t of e)this._printComment(t)}printAssertions(e){var t;null!=(t=e.assertions)&&t.length&&(this.space(),this.word("assert"),this.space(),this.token("{"),this.space(),this.printList(e.assertions,e),this.space(),this.token("}"))}}Object.assign(y.prototype,o),y.prototype.Noop=function(){};var v=y;function b(){this.token(","),this.space()}t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=/^[ \t]+$/;t.default=class{constructor(e){this._map=null,this._buf="",this._last=0,this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._disallowedPop=null,this._map=e}get(){this._flush();const e=this._map,t={code:this._buf.trimRight(),map:null,rawMappings:null==e?void 0:e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get(){return this.map=e.get()},set(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t}append(e){this._flush();const{line:t,column:n,filename:r,identifierName:i,force:s}=this._sourcePosition;this._append(e,t,n,i,r,s)}queue(e){if("\n"===e)for(;this._queue.length>0&&r.test(this._queue[0][0]);)this._queue.shift();const{line:t,column:n,filename:i,identifierName:s,force:o}=this._sourcePosition;this._queue.unshift([e,t,n,s,i,o])}_flush(){let e;for(;e=this._queue.pop();)this._append(...e)}_append(e,t,n,r,i,s){this._buf+=e,this._last=e.charCodeAt(e.length-1);let o=e.indexOf("\n"),a=0;for(0!==o&&this._mark(t,n,r,i,s);-1!==o;)this._position.line++,this._position.column=0,a=o+1,a<e.length&&this._mark(++t,0,r,i,s),o=e.indexOf("\n",a);this._position.column+=e.length-a}_mark(e,t,n,r,i){var s;null==(s=this._map)||s.mark(this._position.line,this._position.column,e,t,n,r,i)}removeTrailingNewline(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()}removeLastSemicolon(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()}getLastChar(){let e;if(this._queue.length>0){e=this._queue[0][0].charCodeAt(0)}else e=this._last;return e}endsWithCharAndNewline(){const e=this._queue;if(e.length>0){if(10!==e[0][0].charCodeAt(0))return;if(e.length>1){return e[1][0].charCodeAt(0)}return this._last}}hasContent(){return this._queue.length>0||!!this._last}exactSource(e,t){this.source("start",e,!0),t(),this.source("end",e),this._disallowPop("start",e)}source(e,t,n){e&&!t||this._normalizePosition(e,t,this._sourcePosition,n)}withSource(e,t,n){if(!this._map)return n();const r=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,o=this._sourcePosition.identifierName;this.source(e,t),n(),this._sourcePosition.force&&this._sourcePosition.line===r&&this._sourcePosition.column===i&&this._sourcePosition.filename===s||this._disallowedPop&&this._disallowedPop.line===r&&this._disallowedPop.column===i&&this._disallowedPop.filename===s||(this._sourcePosition.line=r,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=o,this._sourcePosition.force=!1,this._disallowedPop=null)}_disallowPop(e,t){e&&!t||(this._disallowedPop=this._normalizePosition(e,t))}_normalizePosition(e,t,n,r){const i=t?t[e]:null;void 0===n&&(n={identifierName:null,line:null,column:null,filename:null,force:!1});const s=n.line,o=n.column,a=n.filename;return n.identifierName="start"===e&&(null==t?void 0:t.identifierName)||null,n.line=null==i?void 0:i.line,n.column=null==i?void 0:i.column,n.filename=null==t?void 0:t.filename,(r||n.line!==s||n.column!==o||n.filename!==a)&&(n.force=r),n}getCurrentColumn(){const e=this._queue.reduce((e,t)=>t[0]+e,""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t}getCurrentLine(){const e=this._queue.reduce((e,t)=>t[0]+e,"");let t=0;for(let n=0;n<e.length;n++)"\n"===e[n]&&t++;return this._position.line+t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nodes=t.list=void 0;var r=n(1);const{FLIPPED_ALIAS_KEYS:i,isArrayExpression:s,isAssignmentExpression:o,isBinary:a,isBlockStatement:l,isCallExpression:u,isFunction:c,isIdentifier:h,isLiteral:d,isMemberExpression:f,isObjectExpression:p,isOptionalCallExpression:m,isOptionalMemberExpression:g,isStringLiteral:y}=r;function v(e,t={}){return f(e)||g(e)?(v(e.object,t),e.computed&&v(e.property,t)):a(e)||o(e)?(v(e.left,t),v(e.right,t)):u(e)||m(e)?(t.hasCall=!0,v(e.callee,t)):c(e)?t.hasFunction=!0:h(e)&&(t.hasHelper=t.hasHelper||b(e.callee)),t}function b(e){return f(e)?b(e.object)||b(e.property):h(e)?"require"===e.name||"_"===e.name[0]:u(e)?b(e.callee):!(!a(e)&&!o(e))&&(h(e.left)&&b(e.left)||b(e.right))}function w(e){return d(e)||p(e)||s(e)||h(e)||f(e)}const _={AssignmentExpression(e){const t=v(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:(e,t)=>({before:!!e.consequent.length||t.cases[0]===e,after:!e.consequent.length&&t.cases[t.cases.length-1]===e}),LogicalExpression(e){if(c(e.left)||c(e.right))return{after:!0}},Literal(e){if(y(e)&&"use strict"===e.value)return{after:!0}},CallExpression(e){if(c(e.callee)||b(e))return{before:!0,after:!0}},OptionalCallExpression(e){if(c(e.callee))return{before:!0,after:!0}},VariableDeclaration(e){for(let t=0;t<e.declarations.length;t++){const n=e.declarations[t];let r=b(n.id)&&!w(n.init);if(!r){const e=v(n.init);r=b(n.init)&&e.hasCall||e.hasFunction}if(r)return{before:!0,after:!0}}},IfStatement(e){if(l(e.consequent))return{before:!0,after:!0}}};t.nodes=_,_.ObjectProperty=_.ObjectTypeProperty=_.ObjectMethod=function(e,t){if(t.properties[0]===e)return{before:!0}},_.ObjectTypeCallProperty=function(e,t){var n;if(t.callProperties[0]===e&&(null==(n=t.properties)||!n.length))return{before:!0}},_.ObjectTypeIndexer=function(e,t){var n,r;if(!(t.indexers[0]!==e||null!=(n=t.properties)&&n.length||null!=(r=t.callProperties)&&r.length))return{before:!0}},_.ObjectTypeInternalSlot=function(e,t){var n,r,i;if(!(t.internalSlots[0]!==e||null!=(n=t.properties)&&n.length||null!=(r=t.callProperties)&&r.length||null!=(i=t.indexers)&&i.length))return{before:!0}};const S={VariableDeclaration:e=>e.declarations.map(e=>e.init),ArrayExpression:e=>e.elements,ObjectExpression:e=>e.properties};t.list=S,[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach((function([e,t]){"boolean"==typeof t&&(t={after:t,before:t}),[e].concat(i[e]||[]).forEach((function(e){_[e]=function(){return t}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowFunctionExpression=function(e,t){return m(t)||te(e,t)},t.AssignmentExpression=function(e,t){return!!P(e.left)||te(e,t)},t.Binary=function(e,t){if("**"===e.operator&&u(t,{operator:"**"}))return t.left===e;if(Z(e,t))return!0;if(Q(e,t)||H(t)||a(t))return!0;if(l(t)){const n=t.operator,r=X[n],i=e.operator,s=X[i];if(r===s&&t.right===e&&!A(t)||r>s)return!0}},t.BinaryExpression=function(e,t){return"in"===e.operator&&(G(t)||v(t))},t.ClassExpression=function(e,t,n){return ne(n,{expressionStatement:!0,exportDefault:!0})},t.ConditionalExpression=te,t.DoExpression=function(e,t,n){return!e.async&&ne(n,{expressionStatement:!0})},t.FunctionExpression=function(e,t,n){return ne(n,{expressionStatement:!0,exportDefault:!0})},t.FunctionTypeAnnotation=function(e,t,n){return q(t)||E(t)||i(t)||K(t)&&s(n[n.length-3])},t.Identifier=function(e,t,n){if("let"===e.name){const r=T(t,{object:e,computed:!0})||O(t,{object:e,computed:!0,optional:!1});return ne(n,{expressionStatement:r,forHead:r,forInHead:r,forOfHead:!0})}return"async"===e.name&&w(t)&&e===t.left},t.LogicalExpression=function(e,t){switch(e.operator){case"||":return!!A(t)&&("??"===t.operator||"&&"===t.operator);case"&&":return A(t,{operator:"??"});case"??":return A(t)&&"??"!==t.operator}},t.NullableTypeAnnotation=function(e,t){return i(t)},t.ObjectExpression=function(e,t,n){return ne(n,{expressionStatement:!0,arrowBody:!0})},t.OptionalIndexedAccessType=function(e,t){return x(t,{objectType:e})},t.OptionalCallExpression=t.OptionalMemberExpression=function(e,t){return c(t,{callee:e})||T(t,{object:e})},t.SequenceExpression=function(e,t){if(_(t)||z(t)||I(t)||S(t)&&t.test===e||Y(t)&&t.test===e||b(t)&&t.right===e||N(t)&&t.discriminant===e||y(t)&&t.expression===e)return!1;return!0},t.TSAsExpression=function(){return!0},t.TSInferType=function(e,t){return D(t)||j(t)},t.TSTypeAssertion=function(){return!0},t.TSIntersectionType=t.TSUnionType=function(e,t){return D(t)||j(t)||L(t)||V(t)||$(t)},t.UnaryLike=ee,t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t){return i(t)||C(t)||E(t)||q(t)},t.UpdateExpression=function(e,t){return Q(e,t)||Z(e,t)},t.AwaitExpression=t.YieldExpression=function(e,t){return l(t)||H(t)||Q(e,t)||a(t)&&J(e)||p(t)&&e===t.test||Z(e,t)};var r=n(1);const{isArrayTypeAnnotation:i,isArrowFunctionExpression:s,isAssignmentExpression:o,isAwaitExpression:a,isBinary:l,isBinaryExpression:u,isCallExpression:c,isClassDeclaration:h,isClassExpression:d,isConditional:f,isConditionalExpression:p,isExportDeclaration:m,isExportDefaultDeclaration:g,isExpressionStatement:y,isFor:v,isForInStatement:b,isForOfStatement:w,isForStatement:_,isIfStatement:S,isIndexedAccessType:x,isIntersectionTypeAnnotation:E,isLogicalExpression:A,isMemberExpression:T,isNewExpression:M,isNullableTypeAnnotation:C,isObjectPattern:P,isOptionalCallExpression:k,isOptionalMemberExpression:O,isReturnStatement:I,isSequenceExpression:R,isSwitchStatement:N,isTSArrayType:D,isTSAsExpression:F,isTSIntersectionType:L,isTSNonNullExpression:B,isTSOptionalType:j,isTSRestType:$,isTSTypeAssertion:U,isTSUnionType:V,isTaggedTemplateExpression:W,isThrowStatement:z,isTypeAnnotation:K,isUnaryLike:H,isUnionTypeAnnotation:q,isVariableDeclarator:G,isWhileStatement:Y,isYieldExpression:J}=r,X={"||":0,"??":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10},Z=(e,t)=>(h(t)||d(t))&&t.superClass===e,Q=(e,t)=>(T(t)||O(t))&&t.object===e||(c(t)||k(t)||M(t))&&t.callee===e||W(t)&&t.tag===e||B(t);function ee(e,t){return Q(e,t)||u(t,{operator:"**",left:e})||Z(e,t)}function te(e,t){return!!(H(t)||l(t)||p(t,{test:e})||a(t)||U(t)||F(t))||ee(e,t)}function ne(e,{expressionStatement:t=!1,arrowBody:n=!1,exportDefault:r=!1,forHead:i=!1,forInHead:a=!1,forOfHead:u=!1}){let c=e.length-1,h=e[c];c--;let d=e[c];for(;c>=0;){if(t&&y(d,{expression:h})||r&&g(d,{declaration:h})||n&&s(d,{body:h})||i&&_(d,{init:h})||a&&b(d,{left:h})||u&&w(d,{left:h}))return!0;if(!(Q(h,d)&&!M(d)||R(d)&&d.expressions[0]===h||f(d,{test:h})||l(d,{left:h})||o(d,{left:h})))return!1;h=d,c--,d=e[c]}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(579);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var i=n(580);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(581);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var o=n(582);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(583);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var l=n(249);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=n(250);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(585);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var h=n(586);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var d=n(587);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=n(588);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.typeParameters,e),this.print(e.quasi,e)},t.TemplateElement=function(e,t){const n=t.quasis[0]===e,r=t.quasis[t.quasis.length-1]===e,i=(n?"`":"}")+e.value.raw+(r?"`":"${");this.token(i)},t.TemplateLiteral=function(e){const t=e.quasis;for(let n=0;n<t.length;n++)this.print(t[n],e),n+1<t.length&&this.print(e.expressions[n],e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogicalExpression=t.BinaryExpression=t.AssignmentExpression=function(e,t){const n=this.inForStatementInitCounter&&"in"===e.operator&&!i.needsParens(e,t);n&&this.token("(");this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator);this.space(),this.print(e.right,e),n&&this.token(")")},t.AssignmentPattern=function(e){this.print(e.left,e),e.left.optional&&this.token("?");this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)},t.AwaitExpression=void 0,t.BindExpression=function(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)},t.CallExpression=function(e){this.print(e.callee,e),this.print(e.typeArguments,e),this.print(e.typeParameters,e),this.token("("),this.printList(e.arguments,e),this.token(")")},t.ConditionalExpression=function(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)},t.Decorator=function(e){this.token("@"),this.print(e.expression,e),this.newline()},t.DoExpression=function(e){e.async&&(this.word("async"),this.space());this.word("do"),this.space(),this.print(e.body,e)},t.EmptyStatement=function(){this.semicolon(!0)},t.ExpressionStatement=function(e){this.print(e.expression,e),this.semicolon()},t.Import=function(){this.word("import")},t.MemberExpression=function(e){if(this.print(e.object,e),!e.computed&&a(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;o(e.property)&&"number"==typeof e.property.value&&(t=!0);t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))},t.MetaProperty=function(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)},t.ModuleExpression=function(e){this.word("module"),this.space(),this.token("{"),0===e.body.body.length?this.token("}"):(this.newline(),this.printSequence(e.body.body,e,{indent:!0}),this.rightBrace())},t.NewExpression=function(e,t){if(this.word("new"),this.space(),this.print(e.callee,e),this.format.minified&&0===e.arguments.length&&!e.optional&&!s(t,{callee:e})&&!a(t)&&!l(t))return;this.print(e.typeArguments,e),this.print(e.typeParameters,e),e.optional&&this.token("?.");this.token("("),this.printList(e.arguments,e),this.token(")")},t.OptionalCallExpression=function(e){this.print(e.callee,e),this.print(e.typeArguments,e),this.print(e.typeParameters,e),e.optional&&this.token("?.");this.token("("),this.printList(e.arguments,e),this.token(")")},t.OptionalMemberExpression=function(e){if(this.print(e.object,e),!e.computed&&a(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;o(e.property)&&"number"==typeof e.property.value&&(t=!0);e.optional&&this.token("?.");t?(this.token("["),this.print(e.property,e),this.token("]")):(e.optional||this.token("."),this.print(e.property,e))},t.ParenthesizedExpression=function(e){this.token("("),this.print(e.expression,e),this.token(")")},t.PrivateName=function(e){this.token("#"),this.print(e.id,e)},t.SequenceExpression=function(e){this.printList(e.expressions,e)},t.Super=function(){this.word("super")},t.ThisExpression=function(){this.word("this")},t.UnaryExpression=function(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator||"throw"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator);this.print(e.argument,e)},t.UpdateExpression=function(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.startTerminatorless(!0),this.print(e.argument,e),this.endTerminatorless(),this.token(e.operator))},t.V8IntrinsicIdentifier=function(e){this.token("%"),this.word(e.name)},t.YieldExpression=void 0;var r=n(1),i=n(248);const{isCallExpression:s,isLiteral:o,isMemberExpression:a,isNewExpression:l}=r;function u(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();const e=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(e)}}}const c=u("yield");t.YieldExpression=c;const h=u("await");t.AwaitExpression=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakStatement=void 0,t.CatchClause=function(e){this.word("catch"),this.space(),e.param&&(this.token("("),this.print(e.param,e),this.print(e.param.typeAnnotation,e),this.token(")"),this.space());this.print(e.body,e)},t.ContinueStatement=void 0,t.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},t.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()},t.ForOfStatement=t.ForInStatement=void 0,t.ForStatement=function(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e));this.token(";"),e.update&&(this.space(),this.print(e.update,e));this.token(")"),this.printBlock(e)},t.IfStatement=function(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();const t=e.alternate&&o(function e(t){return a(t.body)?e(t.body):t}(e.consequent));t&&(this.token("{"),this.newline(),this.indent());this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}"));e.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))},t.LabeledStatement=function(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)},t.ReturnStatement=void 0,t.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":"));e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},t.SwitchStatement=function(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines(t,n){if(!t&&e.cases[e.cases.length-1]===n)return-1}}),this.token("}")},t.ThrowStatement=void 0,t.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e);e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))},t.VariableDeclaration=function(e,t){e.declare&&(this.word("declare"),this.space());this.word(e.kind),this.space();let n,r=!1;if(!i(t))for(const t of e.declarations)t.init&&(r=!0);r&&(n="const"===e.kind?y:g);if(this.printList(e.declarations,e,{separator:n}),i(t))if(s(t)){if(t.init===e)return}else if(t.left===e)return;this.semicolon()},t.VariableDeclarator=function(e){this.print(e.id,e),e.definite&&this.token("!");this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))},t.WhileStatement=function(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)},t.WithStatement=function(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)};var r=n(1);const{isFor:i,isForStatement:s,isIfStatement:o,isStatement:a}=r;const l=function(e){return function(t){this.word("for"),this.space(),"of"===e&&t.await&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word(e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}},u=l("in");t.ForInStatement=u;const c=l("of");function h(e,t="label"){return function(n){this.word(e);const r=n[t];if(r){this.space();const e="label"==t,i=this.startTerminatorless(e);this.print(r,n),this.endTerminatorless(i)}this.semicolon()}}t.ForOfStatement=c;const d=h("continue");t.ContinueStatement=d;const f=h("return","argument");t.ReturnStatement=f;const p=h("break");t.BreakStatement=p;const m=h("throw","argument");function g(){if(this.token(","),this.newline(),this.endsWith(10))for(let e=0;e<4;e++)this.space(!0)}function y(){if(this.token(","),this.newline(),this.endsWith(10))for(let e=0;e<6;e++)this.space(!0)}t.ThrowStatement=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClassAccessorProperty=function(e){this.printJoin(e.decorators,e),this.source("end",e.key.loc),this.tsPrintClassMemberModifiers(e,!0),this.word("accessor"),this.printInnerComments(e),this.space(),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e));e.optional&&this.token("?");e.definite&&this.token("!");this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e));this.semicolon()},t.ClassBody=function(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith(10)||this.newline(),this.rightBrace())},t.ClassExpression=t.ClassDeclaration=function(e,t){this.format.decoratorsBeforeExport&&(i(t)||s(t))||this.printJoin(e.decorators,e);e.declare&&(this.word("declare"),this.space());e.abstract&&(this.word("abstract"),this.space());this.word("class"),this.printInnerComments(e),e.id&&(this.space(),this.print(e.id,e));this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e));e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e));this.space(),this.print(e.body,e)},t.ClassMethod=function(e){this._classMethodHead(e),this.space(),this.print(e.body,e)},t.ClassPrivateMethod=function(e){this._classMethodHead(e),this.space(),this.print(e.body,e)},t.ClassPrivateProperty=function(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space());this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e));this.semicolon()},t.ClassProperty=function(e){this.printJoin(e.decorators,e),this.source("end",e.key.loc),this.tsPrintClassMemberModifiers(e,!0),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e));e.optional&&this.token("?");e.definite&&this.token("!");this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e));this.semicolon()},t.StaticBlock=function(e){this.word("static"),this.space(),this.token("{"),0===e.body.length?this.token("}"):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.rightBrace())},t._classMethodHead=function(e){this.printJoin(e.decorators,e),this.source("end",e.key.loc),this.tsPrintClassMemberModifiers(e,!1),this._methodHead(e)};var r=n(1);const{isExportDefaultDeclaration:i,isExportNamedDeclaration:s}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowFunctionExpression=function(e){e.async&&(this.word("async"),this.space());const t=e.params[0];this.format.retainLines||this.format.auxiliaryCommentBefore||this.format.auxiliaryCommentAfter||1!==e.params.length||!i(t)||function(e,t){var n,r;return!!(e.typeParameters||e.returnType||e.predicate||t.typeAnnotation||t.optional||null!=(n=t.leadingComments)&&n.length||null!=(r=t.trailingComments)&&r.length)}(e,t)?this._params(e):this.print(t,e);this._predicate(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)},t.FunctionDeclaration=t.FunctionExpression=function(e){this._functionHead(e),this.space(),this.print(e.body,e)},t._functionHead=function(e){e.async&&(this.word("async"),this.space());this.word("function"),e.generator&&this.token("*");this.printInnerComments(e),this.space(),e.id&&this.print(e.id,e);this._params(e),this._predicate(e)},t._methodHead=function(e){const t=e.kind,n=e.key;"get"!==t&&"set"!==t||(this.word(t),this.space());e.async&&(this._catchUp("start",n.loc),this.word("async"),this.space());"method"!==t&&"init"!==t||e.generator&&this.token("*");e.computed?(this.token("["),this.print(n,e),this.token("]")):this.print(n,e);e.optional&&this.token("?");this._params(e)},t._param=function(e,t){this.printJoin(e.decorators,e),this.print(e,t),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t._parameters=function(e,t){for(let n=0;n<e.length;n++)this._param(e[n],t),n<e.length-1&&(this.token(","),this.space())},t._params=function(e){this.print(e.typeParameters,e),this.token("("),this._parameters(e.params,e),this.token(")"),this.print(e.returnType,e)},t._predicate=function(e){e.predicate&&(e.returnType||this.token(":"),this.space(),this.print(e.predicate,e))};var r=n(1);const{isIdentifier:i}=r},function(e,t,n){"use strict";(function(t){const n={},r=n.hasOwnProperty,i=(e,t)=>{for(const n in e)r.call(e,n)&&t(n,e[n])},s=n.toString,o=Array.isArray,a=t.isBuffer,l={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},u=/["'\\\b\f\n\r\t]/,c=/[0-9]/,h=/[ !#-&\(-\[\]-_a-~]/,d=(e,t)=>{const n=()=>{w=b,++t.indentLevel,b=t.indent.repeat(t.indentLevel)},r={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},f=t&&t.json;var p,m;f&&(r.quotes="double",r.wrap=!0),p=r,"single"!=(t=(m=t)?(i(m,(e,t)=>{p[e]=t}),p):p).quotes&&"double"!=t.quotes&&"backtick"!=t.quotes&&(t.quotes="single");const g="double"==t.quotes?'"':"backtick"==t.quotes?"`":"'",y=t.compact,v=t.lowercaseHex;let b=t.indent.repeat(t.indentLevel),w="";const _=t.__inline1__,S=t.__inline2__,x=y?"":"\n";let E,A=!0;const T="binary"==t.numbers,M="octal"==t.numbers,C="decimal"==t.numbers,P="hexadecimal"==t.numbers;if(f&&e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!(e=>"string"==typeof e||"[object String]"==s.call(e))(e)){if((e=>"[object Map]"==s.call(e))(e))return 0==e.size?"new Map()":(y||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+d(Array.from(e),t)+")");if((e=>"[object Set]"==s.call(e))(e))return 0==e.size?"new Set()":"new Set("+d(Array.from(e),t)+")";if(a(e))return 0==e.length?"Buffer.from([])":"Buffer.from("+d(Array.from(e),t)+")";if(o(e))return E=[],t.wrap=!0,_&&(t.__inline1__=!1,t.__inline2__=!0),S||n(),((e,t)=>{const n=e.length;let r=-1;for(;++r<n;)t(e[r])})(e,e=>{A=!1,S&&(t.__inline2__=!1),E.push((y||S?"":b)+d(e,t))}),A?"[]":S?"["+E.join(", ")+"]":"["+x+E.join(","+x)+x+(y?"":w)+"]";if(!(e=>"number"==typeof e||"[object Number]"==s.call(e))(e))return(e=>"[object Object]"==s.call(e))(e)?(E=[],t.wrap=!0,n(),i(e,(e,n)=>{A=!1,E.push((y?"":b)+d(e,t)+":"+(y?"":" ")+d(n,t))}),A?"{}":"{"+x+E.join(","+x)+x+(y?"":w)+"}"):f?JSON.stringify(e)||"null":String(e);if(f)return JSON.stringify(e);if(C)return String(e);if(P){let t=e.toString(16);return v||(t=t.toUpperCase()),"0x"+t}if(T)return"0b"+e.toString(2);if(M)return"0o"+e.toString(8)}const k=e;let O=-1;const I=k.length;for(E="";++O<I;){const e=k.charAt(O);if(t.es6){const e=k.charCodeAt(O);if(e>=55296&&e<=56319&&I>O+1){const t=k.charCodeAt(O+1);if(t>=56320&&t<=57343){let n=(1024*(e-55296)+t-56320+65536).toString(16);v||(n=n.toUpperCase()),E+="\\u{"+n+"}",++O;continue}}}if(!t.escapeEverything){if(h.test(e)){E+=e;continue}if('"'==e){E+=g==e?'\\"':e;continue}if("`"==e){E+=g==e?"\\`":e;continue}if("'"==e){E+=g==e?"\\'":e;continue}}if("\0"==e&&!f&&!c.test(k.charAt(O+1))){E+="\\0";continue}if(u.test(e)){E+=l[e];continue}const n=e.charCodeAt(0);if(t.minimal&&8232!=n&&8233!=n){E+=e;continue}let r=n.toString(16);v||(r=r.toUpperCase());const i=r.length>2||f,s="\\"+(i?"u":"x")+("0000"+r).slice(i?-4:-2);E+=s}return t.wrap&&(E=g+E+g),"`"==g&&(E=E.replace(/\$\{/g,"\\${")),t.isScriptContext?E.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,f?"\\u003C!--":"\\x3C!--"):E};d.version="2.5.2",e.exports=d}).call(this,n(4).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnyTypeAnnotation=function(){this.word("any")},t.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},t.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},t.BooleanTypeAnnotation=function(){this.word("boolean")},t.DeclareClass=function(e,t){o(t)||(this.word("declare"),this.space());this.word("class"),this.space(),this._interfaceish(e)},t.DeclareExportAllDeclaration=function(){this.word("declare"),this.space(),i.ExportAllDeclaration.apply(this,arguments)},t.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space());h.apply(this,arguments)},t.DeclareFunction=function(e,t){o(t)||(this.word("declare"),this.space());this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),e.predicate&&(this.space(),this.print(e.predicate,e));this.semicolon()},t.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},t.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},t.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},t.DeclareOpaqueType=function(e,t){o(t)||(this.word("declare"),this.space());this.OpaqueType(e)},t.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},t.DeclareVariable=function(e,t){o(t)||(this.word("declare"),this.space());this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},t.DeclaredPredicate=function(e){this.token("%"),this.word("checks"),this.token("("),this.print(e.value,e),this.token(")")},t.EmptyTypeAnnotation=function(){this.word("empty")},t.EnumBooleanBody=function(e){const{explicitType:t}=e;l(this,"boolean",t),u(this,e)},t.EnumBooleanMember=function(e){c(this,e)},t.EnumDeclaration=function(e){const{id:t,body:n}=e;this.word("enum"),this.space(),this.print(t,e),this.print(n,e)},t.EnumDefaultedMember=function(e){const{id:t}=e;this.print(t,e),this.token(",")},t.EnumNumberBody=function(e){const{explicitType:t}=e;l(this,"number",t),u(this,e)},t.EnumNumberMember=function(e){c(this,e)},t.EnumStringBody=function(e){const{explicitType:t}=e;l(this,"string",t),u(this,e)},t.EnumStringMember=function(e){c(this,e)},t.EnumSymbolBody=function(e){l(this,"symbol",!0),u(this,e)},t.ExistsTypeAnnotation=function(){this.token("*")},t.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),e.this&&(this.word("this"),this.token(":"),this.space(),this.print(e.this.typeAnnotation,e),(e.params.length||e.rest)&&(this.token(","),this.space()));this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e));this.token(")"),t&&("ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type||"ObjectTypeProperty"===t.type&&t.method)?this.token(":"):(this.space(),this.token("=>"));this.space(),this.print(e.returnType,e)},t.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?");e.name&&(this.token(":"),this.space());this.print(e.typeAnnotation,e)},t.IndexedAccessType=function(e){this.print(e.objectType,e),this.token("["),this.print(e.indexType,e),this.token("]")},t.InferredPredicate=function(){this.token("%"),this.word("checks")},t.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},t.GenericTypeAnnotation=t.ClassImplements=t.InterfaceExtends=function(e){this.print(e.id,e),this.print(e.typeParameters,e)},t.InterfaceTypeAnnotation=function(e){this.word("interface"),e.extends&&e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e));this.space(),this.print(e.body,e)},t.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:d})},t.MixedTypeAnnotation=function(){this.word("mixed")},t.NullLiteralTypeAnnotation=function(){this.word("null")},t.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)},Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return s.NumericLiteral}}),t.NumberTypeAnnotation=function(){this.word("number")},t.ObjectTypeAnnotation=function(e){e.exact?this.token("{|"):this.token("{");const t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.space(),this.printJoin(t,e,{addNewlines(e){if(e&&!t[0])return 1},indent:!0,statement:!0,iterator:()=>{(1!==t.length||e.inexact)&&(this.token(","),this.space())}}),this.space());e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent());e.exact?this.token("|}"):this.token("}")},t.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space());this.print(e.value,e)},t.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space());this._variance(e),this.token("["),e.id&&(this.print(e.id,e),this.token(":"),this.space());this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},t.ObjectTypeInternalSlot=function(e){e.static&&(this.word("static"),this.space());this.token("["),this.token("["),this.print(e.id,e),this.token("]"),this.token("]"),e.optional&&this.token("?");e.method||(this.token(":"),this.space());this.print(e.value,e)},t.ObjectTypeProperty=function(e){e.proto&&(this.word("proto"),this.space());e.static&&(this.word("static"),this.space());"get"!==e.kind&&"set"!==e.kind||(this.word(e.kind),this.space());this._variance(e),this.print(e.key,e),e.optional&&this.token("?");e.method||(this.token(":"),this.space());this.print(e.value,e)},t.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},t.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e));e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e));this.semicolon()},t.OptionalIndexedAccessType=function(e){this.print(e.objectType,e),e.optional&&this.token("?.");this.token("["),this.print(e.indexType,e),this.token("]")},t.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return s.StringLiteral}}),t.StringTypeAnnotation=function(){this.word("string")},t.SymbolTypeAnnotation=function(){this.word("symbol")},t.ThisTypeAnnotation=function(){this.word("this")},t.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},t.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},t.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},t.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e);e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},t.TypeParameterDeclaration=t.TypeParameterInstantiation=function(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")},t.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},t.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:f})},t.Variance=function(e){"plus"===e.kind?this.token("+"):this.token("-")},t.VoidTypeAnnotation=function(){this.word("void")},t._interfaceish=function(e){var t;this.print(e.id,e),this.print(e.typeParameters,e),null!=(t=e.extends)&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e));e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e));e.implements&&e.implements.length&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e));this.space(),this.print(e.body,e)},t._variance=function(e){e.variance&&("plus"===e.variance.kind?this.token("+"):"minus"===e.variance.kind&&this.token("-"))};var r=n(1),i=n(249),s=n(250);const{isDeclareExportDeclaration:o,isStatement:a}=r;function l(e,t,n){n&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function u(e,t){const{members:n}=t;e.token("{"),e.indent(),e.newline();for(const r of n)e.print(r,t),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function c(e,t){const{id:n,init:r}=t;e.print(n,t),e.space(),e.token("="),e.space(),e.print(r,t),e.token(",")}function h(e){if(e.declaration){const t=e.declaration;this.print(t,e),a(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}function d(){this.space(),this.token("&"),this.space()}function f(){this.space(),this.token("|"),this.space()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockStatement=function(e){var t;this.token("{"),this.printInnerComments(e);const n=null==(t=e.directives)?void 0:t.length;e.body.length||n?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),n&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith(10)||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))},t.Directive=function(e){this.print(e.value,e),this.semicolon()},t.DirectiveLiteral=function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&null!=t)return void this.token(t);const{value:n}=e;if(i.test(n)){if(r.test(n))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${n}'`)}else this.token(`"${n}"`)},t.File=function(e){e.program&&this.print(e.program.interpreter,e);this.print(e.program,e)},t.InterpreterDirective=function(e){this.token(`#!${e.value}\n`)},t.Placeholder=function(e){this.token("%%"),this.print(e.name),this.token("%%"),"Statement"===e.expectedNode&&this.semicolon()},t.Program=function(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline();this.printSequence(e.body,e)};const r=/(?:^|[^\\])(?:\\\\)*'/,i=/(?:^|[^\\])(?:\\\\)*"/},function(e,t,n){"use strict";function r(){this.space()}Object.defineProperty(t,"__esModule",{value:!0}),t.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},t.JSXClosingElement=function(e){this.token("</"),this.print(e.name,e),this.token(">")},t.JSXClosingFragment=function(){this.token("</"),this.token(">")},t.JSXElement=function(e){const t=e.openingElement;if(this.print(t,e),t.selfClosing)return;this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingElement,e)},t.JSXEmptyExpression=function(e){this.printInnerComments(e)},t.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},t.JSXFragment=function(e){this.print(e.openingFragment,e),this.indent();for(const t of e.children)this.print(t,e);this.dedent(),this.print(e.closingFragment,e)},t.JSXIdentifier=function(e){this.word(e.name)},t.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},t.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},t.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),this.print(e.typeParameters,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:r}));e.selfClosing?(this.space(),this.token("/>")):this.token(">")},t.JSXOpeningFragment=function(){this.token("<"),this.token(">")},t.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},t.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},t.JSXText=function(e){const t=this.getPossibleRaw(e);null!=t?this.token(t):this.token(e.value)}},function(e,t,n){"use strict";function r(e,t){!0!==t&&e.token(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TSAnyKeyword=function(){this.word("any")},t.TSArrayType=function(e){this.print(e.elementType,e),this.token("[]")},t.TSAsExpression=function(e){const{expression:t,typeAnnotation:n}=e;this.print(t,e),this.space(),this.word("as"),this.space(),this.print(n,e)},t.TSBigIntKeyword=function(){this.word("bigint")},t.TSBooleanKeyword=function(){this.word("boolean")},t.TSCallSignatureDeclaration=function(e){this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSConditionalType=function(e){this.print(e.checkType),this.space(),this.word("extends"),this.space(),this.print(e.extendsType),this.space(),this.token("?"),this.space(),this.print(e.trueType),this.space(),this.token(":"),this.space(),this.print(e.falseType)},t.TSConstructSignatureDeclaration=function(e){this.word("new"),this.space(),this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSConstructorType=function(e){e.abstract&&(this.word("abstract"),this.space());this.word("new"),this.space(),this.tsPrintFunctionOrConstructorType(e)},t.TSDeclareFunction=function(e){e.declare&&(this.word("declare"),this.space());this._functionHead(e),this.token(";")},t.TSDeclareMethod=function(e){this._classMethodHead(e),this.token(";")},t.TSEnumDeclaration=function(e){const{declare:t,const:n,id:r,members:i}=e;t&&(this.word("declare"),this.space());n&&(this.word("const"),this.space());this.word("enum"),this.space(),this.print(r,e),this.space(),this.tsPrintBraced(i,e)},t.TSEnumMember=function(e){const{id:t,initializer:n}=e;this.print(t,e),n&&(this.space(),this.token("="),this.space(),this.print(n,e));this.token(",")},t.TSExportAssignment=function(e){this.word("export"),this.space(),this.token("="),this.space(),this.print(e.expression,e),this.token(";")},t.TSExpressionWithTypeArguments=function(e){this.print(e.expression,e),this.print(e.typeParameters,e)},t.TSExternalModuleReference=function(e){this.token("require("),this.print(e.expression,e),this.token(")")},t.TSFunctionType=function(e){this.tsPrintFunctionOrConstructorType(e)},t.TSImportEqualsDeclaration=function(e){const{isExport:t,id:n,moduleReference:r}=e;t&&(this.word("export"),this.space());this.word("import"),this.space(),this.print(n,e),this.space(),this.token("="),this.space(),this.print(r,e),this.token(";")},t.TSImportType=function(e){const{argument:t,qualifier:n,typeParameters:r}=e;this.word("import"),this.token("("),this.print(t,e),this.token(")"),n&&(this.token("."),this.print(n,e));r&&this.print(r,e)},t.TSIndexSignature=function(e){const{readonly:t,static:n}=e;n&&(this.word("static"),this.space());t&&(this.word("readonly"),this.space());this.token("["),this._parameters(e.parameters,e),this.token("]"),this.print(e.typeAnnotation,e),this.token(";")},t.TSIndexedAccessType=function(e){this.print(e.objectType,e),this.token("["),this.print(e.indexType,e),this.token("]")},t.TSInferType=function(e){this.token("infer"),this.space(),this.print(e.typeParameter)},t.TSInterfaceBody=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.body,e)},t.TSInterfaceDeclaration=function(e){const{declare:t,id:n,typeParameters:r,extends:i,body:s}=e;t&&(this.word("declare"),this.space());this.word("interface"),this.space(),this.print(n,e),this.print(r,e),null!=i&&i.length&&(this.space(),this.word("extends"),this.space(),this.printList(i,e));this.space(),this.print(s,e)},t.TSIntersectionType=function(e){this.tsPrintUnionOrIntersectionType(e,"&")},t.TSIntrinsicKeyword=function(){this.word("intrinsic")},t.TSLiteralType=function(e){this.print(e.literal,e)},t.TSMappedType=function(e){const{nameType:t,optional:n,readonly:i,typeParameter:s}=e;this.token("{"),this.space(),i&&(r(this,i),this.word("readonly"),this.space());this.token("["),this.word(s.name),this.space(),this.word("in"),this.space(),this.print(s.constraint,s),t&&(this.space(),this.word("as"),this.space(),this.print(t,e));this.token("]"),n&&(r(this,n),this.token("?"));this.token(":"),this.space(),this.print(e.typeAnnotation,e),this.space(),this.token("}")},t.TSMethodSignature=function(e){const{kind:t}=e;"set"!==t&&"get"!==t||(this.word(t),this.space());this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),this.token(";")},t.TSModuleBlock=function(e){this.tsPrintBraced(e.body,e)},t.TSModuleDeclaration=function(e){const{declare:t,id:n}=e;t&&(this.word("declare"),this.space());e.global||(this.word("Identifier"===n.type?"namespace":"module"),this.space());if(this.print(n,e),!e.body)return void this.token(";");let r=e.body;for(;"TSModuleDeclaration"===r.type;)this.token("."),this.print(r.id,r),r=r.body;this.space(),this.print(r,e)},t.TSNamedTupleMember=function(e){this.print(e.label,e),e.optional&&this.token("?");this.token(":"),this.space(),this.print(e.elementType,e)},t.TSNamespaceExportDeclaration=function(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id,e)},t.TSNeverKeyword=function(){this.word("never")},t.TSNonNullExpression=function(e){this.print(e.expression,e),this.token("!")},t.TSNullKeyword=function(){this.word("null")},t.TSNumberKeyword=function(){this.word("number")},t.TSObjectKeyword=function(){this.word("object")},t.TSOptionalType=function(e){this.print(e.typeAnnotation,e),this.token("?")},t.TSParameterProperty=function(e){e.accessibility&&(this.word(e.accessibility),this.space());e.readonly&&(this.word("readonly"),this.space());this._param(e.parameter)},t.TSParenthesizedType=function(e){this.token("("),this.print(e.typeAnnotation,e),this.token(")")},t.TSPropertySignature=function(e){const{readonly:t,initializer:n}=e;t&&(this.word("readonly"),this.space());this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation,e),n&&(this.space(),this.token("="),this.space(),this.print(n,e));this.token(";")},t.TSQualifiedName=function(e){this.print(e.left,e),this.token("."),this.print(e.right,e)},t.TSRestType=function(e){this.token("..."),this.print(e.typeAnnotation,e)},t.TSStringKeyword=function(){this.word("string")},t.TSSymbolKeyword=function(){this.word("symbol")},t.TSThisType=function(){this.word("this")},t.TSTupleType=function(e){this.token("["),this.printList(e.elementTypes,e),this.token("]")},t.TSTypeAliasDeclaration=function(e){const{declare:t,id:n,typeParameters:r,typeAnnotation:i}=e;t&&(this.word("declare"),this.space());this.word("type"),this.space(),this.print(n,e),this.print(r,e),this.space(),this.token("="),this.space(),this.print(i,e),this.token(";")},t.TSTypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?");this.print(e.typeAnnotation,e)},t.TSTypeAssertion=function(e){const{typeAnnotation:t,expression:n}=e;this.token("<"),this.print(t,e),this.token(">"),this.space(),this.print(n,e)},t.TSTypeLiteral=function(e){this.tsPrintTypeLiteralOrInterfaceBody(e.members,e)},t.TSTypeOperator=function(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation,e)},t.TSTypeParameter=function(e){this.word(e.name),e.constraint&&(this.space(),this.word("extends"),this.space(),this.print(e.constraint,e));e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},t.TSTypeParameterDeclaration=t.TSTypeParameterInstantiation=function(e,t){this.token("<"),this.printList(e.params,e,{}),"ArrowFunctionExpression"===t.type&&1===e.params.length&&this.token(",");this.token(">")},t.TSTypePredicate=function(e){e.asserts&&(this.word("asserts"),this.space());this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(e.typeAnnotation.typeAnnotation))},t.TSTypeQuery=function(e){this.word("typeof"),this.space(),this.print(e.exprName)},t.TSTypeReference=function(e){this.print(e.typeName,e),this.print(e.typeParameters,e)},t.TSUndefinedKeyword=function(){this.word("undefined")},t.TSUnionType=function(e){this.tsPrintUnionOrIntersectionType(e,"|")},t.TSUnknownKeyword=function(){this.word("unknown")},t.TSVoidKeyword=function(){this.word("void")},t.tsPrintBraced=function(e,t){if(this.token("{"),e.length){this.indent(),this.newline();for(const n of e)this.print(n,t),this.newline();this.dedent(),this.rightBrace()}else this.token("}")},t.tsPrintClassMemberModifiers=function(e,t){t&&e.declare&&(this.word("declare"),this.space());e.accessibility&&(this.word(e.accessibility),this.space());e.static&&(this.word("static"),this.space());e.override&&(this.word("override"),this.space());e.abstract&&(this.word("abstract"),this.space());t&&e.readonly&&(this.word("readonly"),this.space())},t.tsPrintFunctionOrConstructorType=function(e){const{typeParameters:t}=e,n=e.parameters;this.print(t,e),this.token("("),this._parameters(n,e),this.token(")"),this.space(),this.token("=>"),this.space();const r=e.typeAnnotation;this.print(r.typeAnnotation,e)},t.tsPrintPropertyOrMethodName=function(e){e.computed&&this.token("[");this.print(e.key,e),e.computed&&this.token("]");e.optional&&this.token("?")},t.tsPrintSignatureDeclarationBase=function(e){const{typeParameters:t}=e,n=e.parameters;this.print(t,e),this.token("("),this._parameters(n,e),this.token(")");const r=e.typeAnnotation;this.print(r,e)},t.tsPrintTypeLiteralOrInterfaceBody=function(e,t){this.tsPrintBraced(e,t)},t.tsPrintUnionOrIntersectionType=function(e,t){this.printJoin(e.types,e,{separator(){this.space(),this.token(t),this.space()}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.find=function(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null},t.findParent=function(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null},t.getAncestry=function(){let e=this;const t=[];do{t.push(e)}while(e=e.parentPath);return t},t.getDeepestCommonAncestorFrom=function(e,t){if(!e.length)return this;if(1===e.length)return e[0];let n,r,i=1/0;const s=e.map(e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);return t.length<i&&(i=t.length),t}),o=s[0];e:for(let e=0;e<i;e++){const t=o[e];for(const n of s)if(n[e]!==t)break e;n=e,r=t}if(r)return t?t(r,n,s):r;throw new Error("Couldn't find intersection")},t.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,(function(e,t,n){let r;const s=i[e.type];for(const e of n){const n=e[t+1];if(!r){r=n;continue}if(n.listKey&&r.listKey===n.listKey&&n.key<r.key){r=n;continue}s.indexOf(r.parentKey)>s.indexOf(n.parentKey)&&(r=n)}return r}))},t.getFunctionParent=function(){return this.findParent(e=>e.isFunction())},t.getStatementParent=function(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},t.inType=function(...e){let t=this;for(;t;){for(const n of e)if(t.node.type===n)return!0;t=t.parentPath}return!1},t.isAncestor=function(e){return e.isDescendant(this)},t.isDescendant=function(e){return!!this.findParent(t=>t===e)};var r=n(1);n(35);const{VISITOR_KEYS:i}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getTypeAnnotation=function(){const e=this.node;if(!e){if("init"===this.key&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath,t=e.parentPath;return"left"===e.key&&t.isForInStatement()?v():"left"===e.key&&t.isForOfStatement()?s():b()}return}if(e.typeAnnotation)return e.typeAnnotation;if(w.has(e))return;w.add(e);try{var t;let n=r[e.type];if(n)return n.call(this,e);if(n=r[this.parentPath.type],null!=(t=n)&&t.validParent)return this.parentPath.getTypeAnnotation()}finally{w.delete(e)}},t.baseTypeStrictlyMatches=function(e){const t=this.getTypeAnnotation(),n=e.getTypeAnnotation();if(!o(t)&&u(t))return n.type===t.type;return!1},t.couldBeBaseType=function(e){const t=this.getTypeAnnotation();if(o(t))return!0;if(g(t)){for(const n of t.types)if(o(n)||_(e,n,!0))return!0;return!1}return _(e,t,!0)},t.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;let e=this._getTypeAnnotation()||s();m(e)&&(e=e.typeAnnotation);return this.typeAnnotation=e},t.isBaseType=function(e,t){return _(e,this.getTypeAnnotation(),t)},t.isGenericType=function(e){const t=this.getTypeAnnotation();return c(t)&&h(t.id,{name:e})};var r=n(591),i=n(1);const{anyTypeAnnotation:s,isAnyTypeAnnotation:o,isBooleanTypeAnnotation:a,isEmptyTypeAnnotation:l,isFlowBaseAnnotation:u,isGenericTypeAnnotation:c,isIdentifier:h,isMixedTypeAnnotation:d,isNumberTypeAnnotation:f,isStringTypeAnnotation:p,isTypeAnnotation:m,isUnionTypeAnnotation:g,isVoidTypeAnnotation:y,stringTypeAnnotation:v,voidTypeAnnotation:b}=i;const w=new WeakSet;function _(e,t,n){if("string"===e)return p(t);if("number"===e)return f(t);if("boolean"===e)return a(t);if("any"===e)return o(t);if("mixed"===e)return d(t);if("empty"===e)return l(t);if("void"===e)return y(t);if(n)return!1;throw new Error("Unknown base type "+e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayExpression=M,t.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},t.BinaryExpression=function(e){const t=e.operator;if(a.indexOf(t)>=0)return _();if(s.indexOf(t)>=0)return d();if("+"===t){const e=this.get("right"),t=this.get("left");return t.isBaseType("number")&&e.isBaseType("number")?_():t.isBaseType("string")||e.isBaseType("string")?S():E([S(),_()])}},t.BooleanLiteral=function(){return d()},t.CallExpression=function(){const{callee:e}=this.node;if(k(e))return h(S());if(P(e)||O(e))return h(c());if(I(e))return h(x([S(),c()]));return R(this.get("callee"))},t.ConditionalExpression=function(){const e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];if(b(e[0])&&m)return m(e);if(p)return p(e);return g(e)},t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=function(){return y(v("Function"))},Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return i.default}}),t.LogicalExpression=function(){const e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];if(b(e[0])&&m)return m(e);if(p)return p(e);return g(e)},t.NewExpression=function(e){if(this.get("callee").isIdentifier())return y(e.callee)},t.NullLiteral=function(){return w()},t.NumericLiteral=function(){return _()},t.ObjectExpression=function(){return y(v("Object"))},t.ParenthesizedExpression=function(){return this.get("expression").getTypeAnnotation()},t.RegExpLiteral=function(){return y(v("RegExp"))},t.RestElement=C,t.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},t.StringLiteral=function(){return S()},t.TaggedTemplateExpression=function(){return R(this.get("tag"))},t.TemplateLiteral=function(){return S()},t.TypeCastExpression=T,t.UnaryExpression=function(e){const t=e.operator;if("void"===t)return A();if(l.indexOf(t)>=0)return _();if(u.indexOf(t)>=0)return S();if(o.indexOf(t)>=0)return d()},t.UpdateExpression=function(e){const t=e.operator;if("++"===t||"--"===t)return _()},t.VariableDeclarator=function(){var e;if(!this.get("id").isIdentifier())return;const t=this.get("init");let n=t.getTypeAnnotation();"AnyTypeAnnotation"===(null==(e=n)?void 0:e.type)&&t.isCallExpression()&&t.get("callee").isIdentifier({name:"Array"})&&!t.scope.hasBinding("Array",!0)&&(n=M());return n};var r=n(1),i=n(592);const{BOOLEAN_BINARY_OPERATORS:s,BOOLEAN_UNARY_OPERATORS:o,NUMBER_BINARY_OPERATORS:a,NUMBER_UNARY_OPERATORS:l,STRING_UNARY_OPERATORS:u,anyTypeAnnotation:c,arrayTypeAnnotation:h,booleanTypeAnnotation:d,buildMatchMemberExpression:f,createFlowUnionType:p,createTSUnionType:m,createUnionTypeAnnotation:g,genericTypeAnnotation:y,identifier:v,isTSTypeAnnotation:b,nullLiteralTypeAnnotation:w,numberTypeAnnotation:_,stringTypeAnnotation:S,tupleTypeAnnotation:x,unionTypeAnnotation:E,voidTypeAnnotation:A}=r;function T(e){return e.typeAnnotation}function M(){return y(v("Array"))}function C(){return M()}T.validParent=!0,C.validParent=!0;const P=f("Array.from"),k=f("Object.keys"),O=f("Object.values"),I=f("Object.entries");function R(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?y(v("AsyncIterator")):y(v("Promise"));if(e.node.returnType)return e.node.returnType}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!this.isReferenced())return;const t=this.scope.getBinding(e.name);if(t)return t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t,n){const r=[],i=[];let a=d(e,t,i);const c=function e(t,n,r){const i=function(e,t,n){let r;for(;r=t.parentPath;){if(r.isIfStatement()||r.isConditionalExpression()){if("test"===t.key)return;return r}if(r.isFunction()&&r.parentPath.scope.getBinding(n)!==e)return;t=r}}(t,n,r);if(!i)return;const a=[i.get("test")],c=[];for(let e=0;e<a.length;e++){const t=a[e];if(t.isLogicalExpression())"&&"===t.node.operator&&(a.push(t.get("left")),a.push(t.get("right")));else if(t.isBinaryExpression()){const e=f(r,t);e&&c.push(e)}}if(c.length)return u(c[0])&&o?{typeAnnotation:o(c),ifStatement:i}:s?{typeAnnotation:s(c),ifStatement:i}:{typeAnnotation:l(c),ifStatement:i};return e(i,r)}(e,t,n);if(c){const t=d(e,c.ifStatement);a=a.filter(e=>t.indexOf(e)<0),r.push(c.typeAnnotation)}if(a.length){a.push(...i);for(const e of a)r.push(e.getTypeAnnotation())}if(!r.length)return;if(u(r[0])&&o)return o(r);if(s)return s(r);return l(r)}(t,this,e.name);if("undefined"===e.name)return h();if("NaN"===e.name||"Infinity"===e.name)return c();e.name};var r=n(1);const{BOOLEAN_NUMBER_BINARY_OPERATORS:i,createFlowUnionType:s,createTSUnionType:o,createTypeAnnotationBasedOnTypeof:a,createUnionTypeAnnotation:l,isTSTypeAnnotation:u,numberTypeAnnotation:c,voidTypeAnnotation:h}=r;function d(e,t,n){const r=e.constantViolations.slice();return r.unshift(e.path),r.filter(e=>{const r=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return n&&"unknown"===r&&n.push(e),"before"===r})}function f(e,t){const n=t.node.operator,r=t.get("right").resolve(),s=t.get("left").resolve();let o,l,u;if(s.isIdentifier({name:e})?o=r:r.isIdentifier({name:e})&&(o=s),o)return"==="===n?o.getTypeAnnotation():i.indexOf(n)>=0?c():void 0;if("==="!==n&&"=="!==n)return;if(s.isUnaryExpression({operator:"typeof"})?(l=s,u=r):r.isUnaryExpression({operator:"typeof"})&&(l=r,u=s),!l)return;if(!l.get("argument").isIdentifier({name:e}))return;if(u=u.resolve(),!u.isLiteral())return;const h=u.node.value;return"string"==typeof h?a(h):void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._replaceWith=function(e){var t;if(!this.container)throw new ReferenceError("Container is falsy");this.inList?C(this.parent,this.key,[e]):C(this.parent,this.key,e);this.debug("Replace with "+(null==e?void 0:e.type)),null==(t=o.path.get(this.parent))||t.set(e,this).delete(this.node),this.node=this.container[this.key]=e},t.replaceExpressionWithStatements=function(e){this.resync();const t=M(e,this.scope);if(t)return this.replaceWith(t)[0].get("expressions");const n=this.getFunctionParent(),r=null==n?void 0:n.is("async"),s=null==n?void 0:n.is("generator"),o=h([],p(e));this.replaceWith(m(o,[]));const a=this.get("callee");(0,u.default)(a.get("body"),e=>{this.scope.push({id:e})},"var");const l=this.get("callee").getCompletionRecords();for(const e of l){if(!e.isExpressionStatement())continue;const t=e.findParent(e=>e.isLoop());if(t){let n=t.getData("expressionReplacementReturnUid");n?n=v(n.name):(n=a.scope.generateDeclaredUidIdentifier("ret"),a.get("body").pushContainer("body",T(g(n))),t.setData("expressionReplacementReturnUid",n)),e.get("expression").replaceWith(d("=",g(n),e.node.expression))}else e.replaceWith(T(e.node.expression))}a.arrowFunctionToExpression();const y=a,b=r&&i.default.hasType(this.get("callee.body").node,"AwaitExpression",c),w=s&&i.default.hasType(this.get("callee.body").node,"YieldExpression",c);b&&(y.set("async",!0),w||this.replaceWith(f(this.node)));w&&(y.set("generator",!0),this.replaceWith(P(this.node,!0)));return y.get("body.body")},t.replaceInline=function(e){if(this.resync(),Array.isArray(e)){if(Array.isArray(this.container)){e=this._verifyNodeList(e);const t=this._containerInsertAfter(e);return this.remove(),t}return this.replaceWithMultiple(e)}return this.replaceWith(e)},t.replaceWith=function(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");e instanceof s.default&&(e=e.node);if(!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===e)return[this];if(this.isProgram()&&!x(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let t="";this.isNodeType("Statement")&&S(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=y(e),t="expression"));if(this.isNodeType("Expression")&&E(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);const n=this.node;n&&(_(e,n),A(n));return this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue(),[t?this.get(t):this]},t.replaceWithMultiple=function(e){var t;this.resync(),e=this._verifyNodeList(e),b(e[0],this.node),w(e[e.length-1],this.node),null==(t=o.path.get(this.parent))||t.delete(this.node),this.node=this.container[this.key]=null;const n=this.insertAfter(e);this.node?this.requeue():this.remove();return n},t.replaceWithSourceString=function(e){this.resync();try{e=`(${e})`,e=(0,a.parse)(e)}catch(t){const n=t.loc;throw n&&(t.message+=" - make sure this is an expression.\n"+(0,r.codeFrameColumns)(e,{start:{line:n.line,column:n.column+1}}),t.code="BABEL_REPLACE_SOURCE_ERROR"),t}return e=e.program.body[0].expression,i.default.removeProperties(e),this.replaceWith(e)};var r=n(79),i=n(25),s=n(35),o=n(53),a=n(80),l=n(1),u=n(604);const{FUNCTION_TYPES:c,arrowFunctionExpression:h,assignmentExpression:d,awaitExpression:f,blockStatement:p,callExpression:m,cloneNode:g,expressionStatement:y,identifier:v,inheritLeadingComments:b,inheritTrailingComments:w,inheritsComments:_,isExpression:S,isProgram:x,isStatement:E,removeComments:A,returnStatement:T,toSequenceExpression:M,validate:C,yieldExpression:P}=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={}){if(""!==e&&c(t)){const n=h(t);return function(e,t){let n="";for(const{type:r,value:i}of u(t)){const t=e[r];n+=t?i.split(a).map(e=>t(e)).join("\n"):i}return n}(function(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}(n),e)}return e},t.getChalk=h,t.shouldHighlight=c;var r=n(595),i=n(64),s=n(596);const o=new Set(["as","async","from","get","of","set"]);const a=/\r\n|[\n\r\u2028\u2029]/,l=/^[()[\]{}]$/;let u;{const e=/^[a-z][\w-]*$/i,t=function(t,n,r){if("name"===t.type){if((0,i.isKeyword)(t.value)||(0,i.isStrictReservedWord)(t.value,!0)||o.has(t.value))return"keyword";if(e.test(t.value)&&("<"===r[n-1]||"</"==r.substr(n-2,2)))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return"punctuator"===t.type&&l.test(t.value)?"bracket":"invalid"!==t.type||"@"!==t.value&&"#"!==t.value?t.type:"punctuator"};u=function*(e){let n;for(;n=r.default.exec(e);){const i=r.matchToToken(n);yield{type:t(i,n.index,e),value:i.value}}}}function c(e){return!!s.supportsColor||e.forceColor}function h(e){return e.forceColor?new s.constructor({enabled:!0,level:1}):s}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t,n){"use strict";(function(t){const r=n(597),i=n(598),s=n(602).stdout,o=n(603),a="win32"===t.platform&&!(t.env.TERM||"").toLowerCase().startsWith("xterm"),l=["ansi","ansi","ansi256","ansi16m"],u=new Set(["gray"]),c=Object.create(null);function h(e,t){t=t||{};const n=s?s.level:0;e.level=void 0===t.level?n:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function d(e){if(!this||!(this instanceof d)||this.template){const t={};return h(t,e),t.template=function(){const e=[].slice.call(arguments);return g.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,d.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=d,t.template}h(this,e)}a&&(i.blue.open="");for(const e of Object.keys(i))i[e].closeRe=new RegExp(r(i[e].close),"g"),c[e]={get(){const t=i[e];return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};c.visible={get(){return p.call(this,this._styles||[],!0,"visible")}},i.color.closeRe=new RegExp(r(i.color.close),"g");for(const e of Object.keys(i.color.ansi))u.has(e)||(c[e]={get(){const t=this.level;return function(){const n=i.color[l[t]][e].apply(null,arguments),r={open:n,close:i.color.close,closeRe:i.color.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}});i.bgColor.closeRe=new RegExp(r(i.bgColor.close),"g");for(const e of Object.keys(i.bgColor.ansi)){if(u.has(e))continue;c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=i.bgColor[l[t]][e].apply(null,arguments),r={open:n,close:i.bgColor.close,closeRe:i.bgColor.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}}}const f=Object.defineProperties(()=>{},c);function p(e,t,n){const r=function(){return m.apply(r,arguments)};r._styles=e,r._empty=t;const i=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>i.enabled,set(e){i.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===n||"grey"===n,r.__proto__=f,r}function m(){const e=arguments,t=e.length;let n=String(arguments[0]);if(0===t)return"";if(t>1)for(let r=1;r<t;r++)n+=" "+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const r=i.dim.open;a&&this.hasGrey&&(i.dim.open="");for(const e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return i.dim.open=r,n}function g(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const n=[].slice.call(arguments,2),r=[t.raw[0]];for(let e=1;e<t.length;e++)r.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&")),r.push(String(t.raw[e]));return o(e,r.join(""))}Object.defineProperties(d.prototype,c),e.exports=d(),e.exports.supportsColor=s,e.exports.default=e.exports}).call(this,n(3))},function(e,t,n){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},function(e,t,n){"use strict";(function(e){const t=n(599),r=(e,n)=>function(){const r=e.apply(t,arguments);return`[${r+n}m`},i=(e,n)=>function(){const r=e.apply(t,arguments);return`[${38+n};5;${r}m`},s=(e,n)=>function(){const r=e.apply(t,arguments);return`[${38+n};2;${r[0]};${r[1]};${r[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,n={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};n.color.grey=n.color.gray;for(const t of Object.keys(n)){const r=n[t];for(const t of Object.keys(r)){const i=r[t];n[t]={open:`[${i[0]}m`,close:`[${i[1]}m`},r[t]=n[t],e.set(i[0],i[1])}Object.defineProperty(n,t,{value:r,enumerable:!1}),Object.defineProperty(n,"codes",{value:e,enumerable:!1})}const o=e=>e,a=(e,t,n)=>[e,t,n];n.color.close="",n.bgColor.close="",n.color.ansi={ansi:r(o,0)},n.color.ansi256={ansi256:i(o,0)},n.color.ansi16m={rgb:s(a,0)},n.bgColor.ansi={ansi:r(o,10)},n.bgColor.ansi256={ansi256:i(o,10)},n.bgColor.ansi16m={rgb:s(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const o=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in o&&(n.color.ansi[e]=r(o.ansi16,0),n.bgColor.ansi[e]=r(o.ansi16,10)),"ansi256"in o&&(n.color.ansi256[e]=i(o.ansi256,0),n.bgColor.ansi256[e]=i(o.ansi256,10)),"rgb"in o&&(n.color.ansi16m[e]=s(o.rgb,0),n.bgColor.ansi16m[e]=s(o.rgb,10))}return n}})}).call(this,n(14)(e))},function(e,t,n){var r=n(251),i=n(601),s={};Object.keys(r).forEach((function(e){s[e]={},Object.defineProperty(s[e],"channels",{value:r[e].channels}),Object.defineProperty(s[e],"labels",{value:r[e].labels});var t=i(e);Object.keys(t).forEach((function(n){var r=t[n];s[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),s[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=s},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(251);function i(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),s=Object.keys(r[i]),o=s.length,a=0;a<o;a++){var l=s[a],u=t[l];-1===u.distance&&(u.distance=t[i].distance+1,u.parent=i,n.unshift(l))}return t}function s(e,t){return function(n){return t(e(n))}}function o(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),i=s(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){for(var t=i(e),n={},r=Object.keys(t),s=r.length,a=0;a<s;a++){var l=r[a];null!==t[l].parent&&(n[l]=o(l,t))}return n}},function(e,t,n){"use strict";e.exports={stdout:!1,stderr:!1}},function(e,t,n){"use strict";const r=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,i=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,s=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,o=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,a=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function l(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):a.get(e)||e}function u(e,t){const n=[],r=t.trim().split(/\s*,\s*/g);let i;for(const t of r)if(isNaN(t)){if(!(i=t.match(s)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(i[2].replace(o,(e,t,n)=>t?l(t):n))}else n.push(Number(t));return n}function c(e){i.lastIndex=0;const t=[];let n;for(;null!==(n=i.exec(e));){const e=n[1];if(n[2]){const r=u(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function h(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw new Error("Unknown Chalk style: "+e);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}e.exports=(e,t)=>{const n=[],i=[];let s=[];if(t.replace(r,(t,r,o,a,u,d)=>{if(r)s.push(l(r));else if(a){const t=s.join("");s=[],i.push(0===n.length?t:h(e,n)(t)),n.push({inverse:o,styles:c(a)})}else if(u){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");i.push(h(e,n)(s.join(""))),s=[],n.pop()}else s.push(d)}),i.push(s.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n="var"){e.traverse(a,{kind:n,emit:t})};var r=n(1);const{assignmentExpression:i,expressionStatement:s,identifier:o}=r,a={Scope(e,t){"let"===t.kind&&e.skip()},FunctionParent(e){e.skip()},VariableDeclaration(e,t){if(t.kind&&e.node.kind!==t.kind)return;const n=[],r=e.get("declarations");let a;for(const e of r){a=e.node.id,e.node.init&&n.push(s(i("=",e.node.id,e.node.init)));for(const n of Object.keys(e.getBindingIdentifiers()))t.emit(o(n),n,null!==e.node.init)}e.parentPath.isFor({left:e.node})?e.replaceWith(a):e.replaceWithMultiple(n)}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.evaluate=function(){const e={confident:!0,deoptPath:null,seen:new Map};let t=s(this,e);e.confident||(t=void 0);return{confident:e.confident,deopt:e.deoptPath,value:t}},t.evaluateTruthy=function(){const e=this.evaluate();if(e.confident)return!!e.value};const n=["String","Number","Math"],r=["random"];function i(e,t){t.confident&&(t.deoptPath=e,t.confident=!1)}function s(t,a){const{node:l}=t,{seen:u}=a;if(u.has(l)){const e=u.get(l);return e.resolved?e.value:void i(t,a)}{const c={resolved:!1};u.set(l,c);const h=function(t,a){if(!a.confident)return;if(t.isSequenceExpression()){const e=t.get("expressions");return s(e[e.length-1],a)}if(t.isStringLiteral()||t.isNumericLiteral()||t.isBooleanLiteral())return t.node.value;if(t.isNullLiteral())return null;if(t.isTemplateLiteral())return o(t,t.node.quasis,a);if(t.isTaggedTemplateExpression()&&t.get("tag").isMemberExpression()){const e=t.get("tag.object"),{node:{name:n}}=e,r=t.get("tag.property");if(e.isIdentifier()&&"String"===n&&!t.scope.getBinding(n)&&r.isIdentifier()&&"raw"===r.node.name)return o(t,t.node.quasi.quasis,a,!0)}if(t.isConditionalExpression()){const e=s(t.get("test"),a);if(!a.confident)return;return s(e?t.get("consequent"):t.get("alternate"),a)}if(t.isExpressionWrapper())return s(t.get("expression"),a);if(t.isMemberExpression()&&!t.parentPath.isCallExpression({callee:t.node})){const e=t.get("property"),n=t.get("object");if(n.isLiteral()&&e.isIdentifier()){const t=n.node.value,r=typeof t;if("number"===r||"string"===r)return t[e.node.name]}}if(t.isReferencedIdentifier()){const e=t.scope.getBinding(t.node.name);if(e&&e.constantViolations.length>0)return i(e.path,a);if(e&&t.node.start<e.path.node.end)return i(e.path,a);if(null!=e&&e.hasValue)return e.value;{if("undefined"===t.node.name)return e?i(e.path,a):void 0;if("Infinity"===t.node.name)return e?i(e.path,a):1/0;if("NaN"===t.node.name)return e?i(e.path,a):NaN;const n=t.resolve();return n===t?i(t,a):s(n,a)}}if(t.isUnaryExpression({prefix:!0})){if("void"===t.node.operator)return;const e=t.get("argument");if("typeof"===t.node.operator&&(e.isFunction()||e.isClass()))return"function";const n=s(e,a);if(!a.confident)return;switch(t.node.operator){case"!":return!n;case"+":return+n;case"-":return-n;case"~":return~n;case"typeof":return typeof n}}if(t.isArrayExpression()){const e=[],n=t.get("elements");for(const t of n){const n=t.evaluate();if(!n.confident)return i(n.deopt,a);e.push(n.value)}return e}if(t.isObjectExpression()){const e={},n=t.get("properties");for(const t of n){if(t.isObjectMethod()||t.isSpreadElement())return i(t,a);let n=t.get("key");if(t.node.computed){if(n=n.evaluate(),!n.confident)return i(n.deopt,a);n=n.value}else n=n.isIdentifier()?n.node.name:n.node.value;let r=t.get("value").evaluate();if(!r.confident)return i(r.deopt,a);r=r.value,e[n]=r}return e}if(t.isLogicalExpression()){const e=a.confident,n=s(t.get("left"),a),r=a.confident;a.confident=e;const i=s(t.get("right"),a),o=a.confident;switch(t.node.operator){case"||":if(a.confident=r&&(!!n||o),!a.confident)return;return n||i;case"&&":if(a.confident=r&&(!n||o),!a.confident)return;return n&&i}}if(t.isBinaryExpression()){const e=s(t.get("left"),a);if(!a.confident)return;const n=s(t.get("right"),a);if(!a.confident)return;switch(t.node.operator){case"-":return e-n;case"+":return e+n;case"/":return e/n;case"*":return e*n;case"%":return e%n;case"**":return Math.pow(e,n);case"<":return e<n;case">":return e>n;case"<=":return e<=n;case">=":return e>=n;case"==":return e==n;case"!=":return e!=n;case"===":return e===n;case"!==":return e!==n;case"|":return e|n;case"&":return e&n;case"^":return e^n;case"<<":return e<<n;case">>":return e>>n;case">>>":return e>>>n}}if(t.isCallExpression()){const i=t.get("callee");let o,l;if(i.isIdentifier()&&!t.scope.getBinding(i.node.name)&&n.indexOf(i.node.name)>=0&&(l=e[i.node.name]),i.isMemberExpression()){const t=i.get("object"),s=i.get("property");if(t.isIdentifier()&&s.isIdentifier()&&n.indexOf(t.node.name)>=0&&r.indexOf(s.node.name)<0&&(o=e[t.node.name],l=o[s.node.name]),t.isLiteral()&&s.isIdentifier()){const e=typeof t.node.value;"string"!==e&&"number"!==e||(o=t.node.value,l=o[s.node.name])}}if(l){const e=t.get("arguments").map(e=>s(e,a));if(!a.confident)return;return l.apply(o,e)}}i(t,a)}(t,a);return a.confident&&(c.resolved=!0,c.value=h),h}}function o(e,t,n,r=!1){let i="",o=0;const a=e.get("expressions");for(const e of t){if(!n.confident)break;i+=r?e.value.raw:e.value.cooked;const t=a[o++];t&&(i+=String(s(t,n)))}if(n.confident)return i}}).call(this,n(8))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrowFunctionToExpression=function({allowInsertArrow:e=!0,specCompliant:t=!1,noNewArrows:n=!t}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");const{thisBinding:r,fnPath:i}=R(this,n,e);if(i.ensureBlock(),i.node.type="FunctionExpression",!n){const e=r?null:i.scope.generateUidIdentifier("arrowCheckId");e&&i.parentPath.scope.push({id:e,init:S([])}),i.get("body").unshiftContainer("body",f(h(this.hub.addHelper("newArrowCheck"),[P(),p(e?e.name:r)]))),i.replaceWith(h(b((0,s.default)(this,!0)||i.node,p("bind")),[e?p(e.name):P()]))}},t.arrowFunctionToShadowed=function(){if(!this.isArrowFunctionExpression())return;this.arrowFunctionToExpression()},t.ensureBlock=function(){const e=this.get("body"),t=e.node;if(Array.isArray(e))throw new Error("Can't convert array path to a block statement");if(!t)throw new Error("Can't convert node without a body");if(e.isBlockStatement())return t;const n=[];let r,i,s="body";e.isStatement()?(i="body",r=0,n.push(e.node)):(s+=".body.0",this.isFunction()?(r="argument",n.push(E(e.node))):(r="expression",n.push(f(e.node))));this.node.body=c(n);const o=this.get(s);return e.setup(o,i?o.node[i]:o.node,i,r),this.node},t.toComputedKey=function(){let e;if(this.isMemberExpression())e=this.node.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");e=this.node.key}this.node.computed||m(e)&&(e=M(e.name));return e},t.unwrapFunctionEnvironment=function(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");R(this)};var r=n(1),i=n(252),s=n(607),o=n(220);const{arrowFunctionExpression:a,assignmentExpression:l,binaryExpression:u,blockStatement:c,callExpression:h,conditionalExpression:d,expressionStatement:f,identifier:p,isIdentifier:m,jsxIdentifier:g,logicalExpression:y,LOGICAL_OPERATORS:v,memberExpression:b,metaProperty:w,numericLiteral:_,objectExpression:S,restElement:x,returnStatement:E,sequenceExpression:A,spreadElement:T,stringLiteral:M,super:C,thisExpression:P,toExpression:k,unaryExpression:O}=r;const I=(0,o.merge)([{CallExpression(e,{allSuperCalls:t}){e.get("callee").isSuper()&&t.push(e)}},i.default]);function R(e,t=!0,n=!0){let r,i=e.findParent(e=>e.isArrowFunctionExpression()?(null!=r||(r=e),!1):e.isFunction()||e.isProgram()||e.isClassProperty({static:!1})||e.isClassPrivateProperty({static:!1}));const s=i.isClassMethod({kind:"constructor"});if(i.isClassProperty()||i.isClassPrivateProperty())if(r)i=r;else{if(!n)throw e.buildCodeFrameError("Unable to transform arrow inside class property");e.replaceWith(h(a([],k(e.node)),[])),i=e.get("callee"),e=i.get("body")}const{thisPaths:o,argumentsPaths:c,newTargetPaths:f,superProps:m,superCalls:S}=function(e){const t=[],n=[],r=[],i=[],s=[];return e.traverse(L,{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}),{thisPaths:t,argumentsPaths:n,newTargetPaths:r,superProps:i,superCalls:s}}(e);if(s&&S.length>0){if(!n)throw S[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");const e=[];i.traverse(I,{allSuperCalls:e});const t=function(e){return F(e,"supercall",()=>{const t=e.scope.generateUidIdentifier("args");return a([x(t)],h(C(),[T(p(t.name))]))})}(i);e.forEach(e=>{const n=p(t);n.loc=e.node.callee.loc,e.get("callee").replaceWith(n)})}if(c.length>0){const e=F(i,"arguments",()=>{const e=()=>p("arguments");return i.scope.path.isProgram()?d(u("===",O("typeof",e()),M("undefined")),i.scope.buildUndefinedNode(),e()):e()});c.forEach(t=>{const n=p(e);n.loc=t.node.loc,t.replaceWith(n)})}if(f.length>0){const e=F(i,"newtarget",()=>w(p("new"),p("target")));f.forEach(t=>{const n=p(e);n.loc=t.node.loc,t.replaceWith(n)})}if(m.length>0){if(!n)throw m[0].buildCodeFrameError("Unable to handle nested super.prop usage");m.reduce((e,t)=>e.concat(function(e){if(e.parentPath.isAssignmentExpression()&&"="!==e.parentPath.node.operator){const n=e.parentPath,r=n.node.operator.slice(0,-1),i=n.node.right,s=function(e){return v.includes(e)}(r);if(e.node.computed){const o=e.scope.generateDeclaredUidIdentifier("tmp"),a=e.node.object,u=e.node.property;n.get("left").replaceWith(b(a,l("=",o,u),!0)),n.get("right").replaceWith(t(s?"=":r,b(a,p(o.name),!0),i))}else{const o=e.node.object,a=e.node.property;n.get("left").replaceWith(b(o,a)),n.get("right").replaceWith(t(s?"=":r,b(o,p(a.name)),i))}return s?n.replaceWith(y(r,n.node.left,n.node.right)):n.node.operator="=",[n.get("left"),n.get("right").get("left")]}if(e.parentPath.isUpdateExpression()){const t=e.parentPath,n=e.scope.generateDeclaredUidIdentifier("tmp"),r=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null,i=[l("=",n,b(e.node.object,r?l("=",r,e.node.property):e.node.property,e.node.computed)),l("=",b(e.node.object,r?p(r.name):e.node.property,e.node.computed),u(e.parentPath.node.operator[0],p(n.name),_(1)))];e.parentPath.node.prefix||i.push(p(n.name)),t.replaceWith(A(i));const s=t.get("expressions.0.right"),o=t.get("expressions.1.left");return[s,o]}return[e];function t(e,t,n){return"="===e?l("=",t,n):u(e,t,n)}}(t)),[]).forEach(e=>{const t=e.node.computed?"":e.get("property").node.name,n=e.parentPath.isAssignmentExpression({left:e.node}),r=e.parentPath.isCallExpression({callee:e.node}),s=function(e,t,n){return F(e,`superprop_${t?"set":"get"}:${n||""}`,()=>{const r=[];let i;if(n)i=b(C(),p(n));else{const t=e.scope.generateUidIdentifier("prop");r.unshift(t),i=b(C(),p(t.name),!0)}if(t){const t=e.scope.generateUidIdentifier("value");r.push(t),i=l("=",i,p(t.name))}return a(r,i)})}(i,n,t),u=[];if(e.node.computed&&u.push(e.get("property").node),n){const t=e.parentPath.node.right;u.push(t)}const c=h(p(s),u);r?(e.parentPath.unshiftContainer("arguments",P()),e.replaceWith(b(c,p("call"))),o.push(e.parentPath.get("arguments.0"))):n?e.parentPath.replaceWith(c):e.replaceWith(c)})}let E;return(o.length>0||!t)&&(E=function(e,t){return F(e,"this",n=>{if(!t||!N(e))return P();e.traverse(D,{supers:new WeakSet,thisBinding:n})})}(i,s),(t||s&&N(i))&&(o.forEach(e=>{const t=e.isJSX()?g(E):p(E);t.loc=e.node.loc,e.replaceWith(t)}),t||(E=null))),{thisBinding:E,fnPath:e}}function N(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}const D=(0,o.merge)([{CallExpression(e,{supers:t,thisBinding:n}){e.get("callee").isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,l("=",p(n),p("this"))])))}},i.default]);function F(e,t,n){const r="binding:"+t;let i=e.getData(r);if(!i){const s=e.scope.generateUidIdentifier(t);i=s.name,e.setData(r,i),e.scope.push({id:s,init:n(i)})}return i}const L=(0,o.merge)([{ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){"this"===e.node.name&&(e.parentPath.isJSXMemberExpression({object:e.node})||e.parentPath.isJSXOpeningElement({name:e.node}))&&t.push(e)},CallExpression(e,{superCalls:t}){e.get("callee").isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get("object").isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let n=e.scope;do{if(n.hasOwnBinding("arguments"))return void n.rename("arguments");if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get("meta").isIdentifier({name:"new"})&&e.get("property").isIdentifier({name:"target"})&&t.push(e)}},i.default])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({node:e,parent:t,scope:n,id:i},s=!1,x=!1){if(e.id)return;if(!m(t)&&!p(t,{kind:"method"})||t.computed&&!d(t.key)){if(v(t)){if(i=t.id,h(i)&&!s){const t=n.parent.getBinding(i.name);if(t&&t.constant&&n.getBinding(i.name)===t)return e.id=a(i),void(e.id[o]=!0)}}else if(u(t,{operator:"="}))i=t.left;else if(!i)return}else i=t.key;let E;i&&d(i)?E=function(e){if(f(e))return"null";if(g(e))return`_${e.pattern}_${e.flags}`;if(y(e))return e.quasis.map(e=>e.value.raw).join("");if(void 0!==e.value)return e.value+"";return""}(i):i&&h(i)&&(E=i.name);if(void 0===E)return;if(!x&&c(e)&&/[\uD800-\uDFFF]/.test(E))return;E=b(E),(i=l(E))[o]=!0;return function(e,t,n,i){if(e.selfReference){if(!i.hasBinding(n.name)||i.hasGlobal(n.name)){if(!c(t))return;let e=w;t.generator&&(e=_);const s=e({FUNCTION:t,FUNCTION_ID:n,FUNCTION_KEY:i.generateUidIdentifier(n.name)}).expression,o=s.callee.body.body[0].params;for(let e=0,n=(0,r.default)(t);e<n;e++)o.push(i.generateUidIdentifier("x"));return s}i.rename(n.name)}t.id=n,i.getProgramParent().references[n.name]=!0}(function(e,t,n){const r={selfAssignment:!1,selfReference:!1,outerDeclar:n.getBindingIdentifier(t),references:[],name:t},i=n.getOwnBinding(t);i?"param"===i.kind&&(r.selfReference=!0):(r.outerDeclar||n.hasGlobal(t))&&n.traverse(e,S,r);return r}(e,E,n),e,i,n)||e};var r=n(608),i=n(43),s=n(1);const{NOT_LOCAL_BINDING:o,cloneNode:a,identifier:l,isAssignmentExpression:u,isFunction:c,isIdentifier:h,isLiteral:d,isNullLiteral:f,isObjectMethod:p,isObjectProperty:m,isRegExpLiteral:g,isTemplateLiteral:y,isVariableDeclarator:v,toBindingIdentifierName:b}=s,w=(0,i.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),_=(0,i.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),S={"ReferencedIdentifier|BindingIdentifier"(e,t){if(e.node.name!==t.name)return;e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.params;for(let e=0;e<t.length;e++){const n=t[e];if(i(n)||s(n))return e}return t.length};var r=n(1);const{isAssignmentPattern:i,isRestElement:s}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statements=t.statement=t.smart=t.program=t.expression=void 0;var r=n(1);const{assertExpressionStatement:i}=r;function s(e){return{code:e=>"/* @babel/template */;\n"+e,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}const o=s(e=>e.length>1?e:e[0]);t.smart=o;const a=s(e=>e);t.statements=a;const l=s(e=>{if(0===e.length)throw new Error("Found nothing to return.");if(e.length>1)throw new Error("Found multiple statements but wanted one");return e[0]});t.statement=l;const u={code:e=>`(\n${e}\n)`,validate:e=>{if(e.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(0===u.unwrap(e).start)throw new Error("Parse result included parens.")},unwrap:({program:e})=>{const[t]=e.body;return i(t),t.expression}};t.expression=u;t.program={code:e=>e,validate:()=>{},unwrap:e=>e.program}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){const l=new WeakMap,u=new WeakMap,c=n||(0,r.validate)(null);return Object.assign((n,...o)=>{if("string"==typeof n){if(o.length>1)throw new Error("Unexpected extra params.");return a((0,i.default)(t,n,(0,r.merge)(c,(0,r.validate)(o[0]))))}if(Array.isArray(n)){let e=l.get(n);return e||(e=(0,s.default)(t,n,c),l.set(n,e)),a(e(o))}if("object"==typeof n&&n){if(o.length>0)throw new Error("Unexpected extra params.");return e(t,(0,r.merge)(c,(0,r.validate)(n)))}throw new Error("Unexpected template param "+typeof n)},{ast:(e,...n)=>{if("string"==typeof e){if(n.length>1)throw new Error("Unexpected extra params.");return(0,i.default)(t,e,(0,r.merge)((0,r.merge)(c,(0,r.validate)(n[0])),o))()}if(Array.isArray(e)){let i=u.get(e);return i||(i=(0,s.default)(t,e,(0,r.merge)(c,o)),u.set(e,i)),i(n)()}throw new Error("Unexpected template param "+typeof e)}})};var r=n(139),i=n(611),s=n(612);const o=(0,r.validate)({placeholderPattern:!1});function a(e){let t="";try{throw new Error}catch(e){e.stack&&(t=e.stack.split("\n").slice(3).join("\n"))}return n=>{try{return e(n)}catch(e){throw e.stack+="\n =============\n"+t,e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let o;return t=e.code(t),a=>{const l=(0,r.normalizeReplacements)(a);return o||(o=(0,i.default)(e,t,n)),e.unwrap((0,s.default)(o,l))}};var r=n(139),i=n(253),s=n(254)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){const{metadata:a,names:l}=function(e,t,n){let r,s,a,l="";do{l+="$";const u=o(t,l);r=u.names,s=new Set(r),a=(0,i.default)(e,e.code(u.code),{parser:n.parser,placeholderWhitelist:new Set(u.names.concat(n.placeholderWhitelist?Array.from(n.placeholderWhitelist):[])),placeholderPattern:n.placeholderPattern,preserveComments:n.preserveComments,syntacticPlaceholders:n.syntacticPlaceholders})}while(a.placeholders.some(e=>e.isDuplicate&&s.has(e.name)));return{metadata:a,names:r}}(e,t,n);return t=>{const n={};return t.forEach((e,t)=>{n[l[t]]=e}),t=>{const i=(0,r.normalizeReplacements)(t);return i&&Object.keys(i).forEach(e=>{if(Object.prototype.hasOwnProperty.call(n,e))throw new Error("Unexpected replacement overlap.")}),e.unwrap((0,s.default)(a,i?Object.assign(i,n):n))}}};var r=n(139),i=n(253),s=n(254);function o(e,t){const n=[];let r=e[0];for(let i=1;i<e.length;i++){const s=`${t}${i-1}`;n.push(s),r+=s+e[i]}return{names:n,code:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._guessExecutionStatusRelativeTo=function(e){const t={this:m(this),target:m(e)};if(t.target.node!==t.this.node)return this._guessExecutionStatusRelativeToDifferentFunctions(t.target);const n={target:e.getAncestry(),this:this.getAncestry()};if(n.target.indexOf(this)>=0)return"after";if(n.this.indexOf(e)>=0)return"before";let r;const i={target:0,this:0};for(;!r&&i.this<n.this.length;){const e=n.this[i.this];i.target=n.target.indexOf(e),i.target>=0?r=e:i.this++}if(!r)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(y(n.this,i.this-1)||y(n.target,i.target-1))return"unknown";const o={this:n.this[i.this-1],target:n.target[i.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";const a=s[r.type],l={this:a.indexOf(o.this.parentKey),target:a.indexOf(o.target.parentKey)};return l.target>l.this?"before":"after"},t._guessExecutionStatusRelativeToDifferentFunctions=function(e){if(!e.isFunctionDeclaration()||e.parentPath.isExportDeclaration())return"unknown";const t=e.scope.getBinding(e.node.id.name);if(!t.references)return"before";const n=t.referencePaths;let r;for(const t of n){if(!!t.find(t=>t.node===e.node))continue;if("callee"!==t.key||!t.parentPath.isCallExpression())return"unknown";if(v.has(t.node))continue;v.add(t.node);const n=this._guessExecutionStatusRelativeTo(t);if(v.delete(t.node),r&&r!==n)return"unknown";r=n}return r},t._resolve=function(e,t){if(t&&t.indexOf(this)>=0)return;if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){const n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){const r=n.path.resolve(e,t);if(this.find(e=>e.node===r.node))return;return r}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){const n=this.toComputedKey();if(!u(n))return;const r=n.value,i=this.get("object").resolve(e,t);if(i.isObjectExpression()){const n=i.get("properties");for(const i of n){if(!i.isProperty())continue;const n=i.get("key");let s=i.isnt("computed")&&n.isIdentifier({name:r});if(s=s||n.isLiteral({value:r}),s)return i.get("value").resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+r)){const n=i.get("elements")[r];if(n)return n.resolve(e,t)}}}},t.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},t.canSwapBetweenExpressionAndStatement=function(e){if("body"!==this.key||!this.parentPath.isArrowFunctionExpression())return!1;if(this.isExpression())return o(e);if(this.isBlockStatement())return a(e);return!1},t.equals=function(e,t){return this.node[e]===t},t.getSource=function(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""},t.has=f,t.is=void 0,t.isCompletionRecord=function(e){let t=this,n=!0;do{const r=t.container;if(t.isFunction()&&!n)return!!e;if(n=!1,Array.isArray(r)&&t.key!==r.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},t.isConstantExpression=function(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);return!!e&&e.constant}if(this.isLiteral())return!this.isRegExpLiteral()&&(!this.isTemplateLiteral()||this.get("expressions").every(e=>e.isConstantExpression()));if(this.isUnaryExpression())return"void"===this.node.operator&&this.get("argument").isConstantExpression();if(this.isBinaryExpression())return this.get("left").isConstantExpression()&&this.get("right").isConstantExpression();return!1},t.isInStrictMode=function(){const e=this.isProgram()?this:this.parentPath;return!!e.find(e=>{if(e.isProgram({sourceType:"module"}))return!0;if(e.isClass())return!0;if(!e.isProgram()&&!e.isFunction())return!1;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement())return!1;const t=e.isFunction()?e.node.body:e.node;for(const e of t.directives)if("use strict"===e.value.value)return!0})},t.isNodeType=function(e){return h(this.type,e)},t.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!o(this.container)&&i.includes(this.key)},t.isStatic=function(){return this.scope.isStatic(this.node)},t.isnt=function(e){return!this.has(e)},t.matchesPattern=function(e,t){return d(this.node,e,t)},t.referencesImport=function(e,t){if(!this.isReferencedIdentifier()){if((this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?c(this.node.property,{value:t}):this.node.property.name===t)){const t=this.get("object");return t.isReferencedIdentifier()&&t.referencesImport(e,"*")}return!1}const n=this.scope.getBinding(this.node.name);if(!n||"module"!==n.kind)return!1;const r=n.path,i=r.parentPath;if(!i.isImportDeclaration())return!1;if(i.node.source.value!==e)return!1;if(!t)return!0;if(r.isImportDefaultSpecifier()&&"default"===t)return!0;if(r.isImportNamespaceSpecifier()&&"*"===t)return!0;if(r.isImportSpecifier()&&l(r.node.imported,{name:t}))return!0;return!1},t.resolve=function(e,t){return this._resolve(e,t)||this},t.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)};var r=n(1);const{STATEMENT_OR_BLOCK_KEYS:i,VISITOR_KEYS:s,isBlockStatement:o,isExpression:a,isIdentifier:l,isLiteral:u,isStringLiteral:c,isType:h,matchesPattern:d}=r;function f(e){const t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}const p=f;function m(e){return(e.scope.getFunctionParent()||e.scope.getProgramParent()).path}function g(e,t){switch(e){case"LogicalExpression":return"right"===t;case"ConditionalExpression":case"IfStatement":return"consequent"===t||"alternate"===t;case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return"body"===t;case"ForStatement":return"body"===t||"update"===t;case"SwitchStatement":return"cases"===t;case"TryStatement":return"handler"===t;case"AssignmentPattern":return"right"===t;case"OptionalMemberExpression":return"property"===t;case"OptionalCallExpression":return"arguments"===t;default:return!1}}function y(e,t){for(let n=0;n<t;n++){const t=e[n];if(g(t.parent.type,t.parentKey))return!0}return!1}t.is=p;const v=new WeakSet},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._call=function(e){if(!e)return!1;for(const t of e){if(!t)continue;const e=this.node;if(!e)return!0;const n=t.call(this.state,this,this.state);if(n&&"object"==typeof n&&"function"==typeof n.then)throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error("Unexpected return value from visitor method "+t);if(this.node!==e)return!0;if(this._traverseFlags>0)return!0}return!1},t._getQueueContexts=function(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,e);)t=e.contexts;return t},t._resyncKey=function(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(const e of Object.keys(this.container))if(this.container[e]===this.node)return this.setKey(e);this.key=null},t._resyncList=function(){if(!this.parent||!this.inList)return;const e=this.parent[this.listKey];if(this.container===e)return;this.container=e||null},t._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},t._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()},t.call=function(e){const t=this.opts;if(this.debug(e),this.node&&this._call(t[e]))return!0;if(this.node)return this._call(t[this.node.type]&&t[this.node.type][e]);return!1},t.isBlacklisted=t.isDenylisted=function(){var e;const t=null!=(e=this.opts.denylist)?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1},t.popContext=function(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)},t.pushContext=function(e){this.contexts.push(e),this.setContext(e)},t.requeue=function(e=this){if(e.removed)return;const t=this.contexts;for(const n of t)n.maybeQueue(e)},t.resync=function(){if(this.removed)return;this._resyncParent(),this._resyncList(),this._resyncKey()},t.setContext=function(e){null!=this.skipKeys&&(this.skipKeys={});this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts);return this.setScope(),this},t.setKey=function(e){var t;this.key=e,this.node=this.container[this.key],this.type=null==(t=this.node)?void 0:t.type},t.setScope=function(){if(this.opts&&this.opts.noScope)return;let e,t=this.parentPath;"key"===this.key&&t.isMethod()&&(t=t.parentPath);for(;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()},t.setup=function(e,t,n,r){this.listKey=n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(r)},t.skip=function(){this.shouldSkip=!0},t.skipKey=function(e){null==this.skipKeys&&(this.skipKeys={});this.skipKeys[e]=!0},t.stop=function(){this._traverseFlags|=i.SHOULD_SKIP|i.SHOULD_STOP},t.visit=function(){if(!this.node)return!1;if(this.isDenylisted())return!1;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return!1;const e=this.context;if(this.shouldSkip||this.call("enter"))return this.debug("Skip..."),this.shouldStop;return s(this,e),this.debug("Recursing into..."),this.shouldStop=(0,r.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),s(this,e),this.call("exit"),this.shouldStop};var r=n(240),i=n(35);function s(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")},t._callRemovalHooks=function(){for(const e of r.hooks)if(e(this,this.parentPath))return!0},t._markRemoved=function(){this._traverseFlags|=s.SHOULD_SKIP|s.REMOVED,this.parent&&i.path.get(this.parent).delete(this.node);this.node=null},t._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},t._removeFromScope=function(){const e=this.getBindingIdentifiers();Object.keys(e).forEach(e=>this.scope.removeBinding(e))},t.remove=function(){var e;this._assertUnremoved(),this.resync(),null!=(e=this.opts)&&e.noScope||this._removeFromScope();if(this._callRemovalHooks())return void this._markRemoved();this.shareCommentsWithSiblings(),this._remove(),this._markRemoved()};var r=n(616),i=n(53),s=n(35)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=void 0;t.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);const n=[];this.container.splice(e,0,...t);for(let r=0;r<t.length;r++){const t=e+r,i=this.getSibling(t);n.push(i),this.context&&this.context.queue&&i.pushContext(this.context)}const r=this._getQueueContexts();for(const e of n){e.setScope(),e.debug("Inserted.");for(const t of r)t.maybeQueue(e,!0)}return n},t._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},t._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},t._verifyNodeList=function(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){const n=e[t];let r;if(n?"object"!=typeof n?r="contains a non-object node":n.type?n instanceof s.default&&(r="has a NodePath when it expected a raw object"):r="without a type":r="has falsy node",r){const e=Array.isArray(n)?"array":typeof n;throw new Error(`Node list ${r} with the index of ${t} and type of ${e}`)}}return e},t.hoist=function(e=this.scope){return new i.default(this,e).run()},t.insertAfter=function(e){if(this._assertUnremoved(),this.isSequenceExpression())return _(this.get("expressions")).insertAfter(e);const t=this._verifyNodeList(e),{parentPath:n}=this;if(n.isExpressionStatement()||n.isLabeledStatement()||n.isExportNamedDeclaration()||n.isExportDefaultDeclaration()&&this.isDeclaration())return n.insertAfter(t.map(e=>g(e)?f(e):e));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!n.isJSXElement()||n.isForStatement()&&"init"===this.key){if(this.node){const e=this.node;let{scope:r}=this;if(r.path.isPattern())return l(e),this.replaceWith(h(a([],e),[])),this.get("callee.body").insertAfter(t),[this];if(function e(t){return v(t.parent)&&(_(t.parent.expressions)!==t.node||e(t.parentPath))}(this))t.unshift(e);else if(m(e)&&b(e.callee))t.unshift(e),t.push(w());else if(function(e,t){if(!p(e)||!y(e.left))return!1;const n=t.getBlockParent();return n.hasOwnBinding(e.left.name)&&n.getOwnBinding(e.left.name).constantViolations.length<=1}(e,r))t.unshift(e),t.push(d(e.left));else if(r.isPure(e,!0))t.push(e);else{n.isMethod({computed:!0,key:e})&&(r=r.parent);const i=r.generateDeclaredUidIdentifier();t.unshift(f(u("=",d(i),e))),t.push(f(d(i)))}}return this.replaceExpressionWithStatements(t)}if(Array.isArray(this.container))return this._containerInsertAfter(t);if(this.isStatementOrBlock()){const e=this.node,n=e&&(!this.isExpressionStatement()||null!=e.expression);return this.replaceWith(c(n?[e]:[])),this.pushContainer("body",t)}throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")},t.insertBefore=function(e){this._assertUnremoved();const t=this._verifyNodeList(e),{parentPath:n}=this;if(n.isExpressionStatement()||n.isLabeledStatement()||n.isExportNamedDeclaration()||n.isExportDefaultDeclaration()&&this.isDeclaration())return n.insertBefore(t);if(this.isNodeType("Expression")&&!this.isJSXElement()||n.isForStatement()&&"init"===this.key)return this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);if(Array.isArray(this.container))return this._containerInsertBefore(t);if(this.isStatementOrBlock()){const e=this.node,n=e&&(!this.isExpressionStatement()||null!=e.expression);return this.replaceWith(c(n?[e]:[])),this.unshiftContainer("body",t)}throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")},t.pushContainer=function(e,t){this._assertUnremoved();const n=this._verifyNodeList(t),r=this.node[e];return s.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).setContext(this.context).replaceWithMultiple(n)},t.unshiftContainer=function(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);return s.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).setContext(this.context)._containerInsertBefore(t)},t.updateSiblingKeys=function(e,t){if(!this.parent)return;const n=r.path.get(this.parent);for(const[,r]of n)r.key>=e&&(r.key+=t)};var r=n(53),i=n(618),s=n(35),o=n(1);const{arrowFunctionExpression:a,assertExpression:l,assignmentExpression:u,blockStatement:c,callExpression:h,cloneNode:d,expressionStatement:f,isAssignmentExpression:p,isCallExpression:m,isExpression:g,isIdentifier:y,isSequenceExpression:v,isSuper:b,thisExpression:w}=o;const _=e=>e[e.length-1]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(1),i=r;const{react:s}=r,{cloneNode:o,jsxExpressionContainer:a,variableDeclaration:l,variableDeclarator:u}=i,c={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&s.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression())return;if("this"===e.node.name){let n=e.scope;do{if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break}while(n=n.parent);n&&t.breakOnScopePaths.push(n.path)}const n=e.scope.getBinding(e.node.name);if(n){for(const r of n.constantViolations)if(r.scope!==n.path.scope)return t.mutableBinding=!0,void e.stop();n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}};t.default=class{constructor(e,t){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=t,this.path=e,this.attachAfter=!1}isCompatibleScope(e){for(const t of Object.keys(this.bindings)){const n=this.bindings[t];if(!e.bindingIdentifierEquals(t,n.identifier))return!1}return!0}getCompatibleScopes(){let e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(const n of Object.keys(this.bindings)){if(!t.hasOwnBinding(n))continue;const r=this.bindings[n];if("param"===r.kind||"params"===r.path.parentKey)continue;if(this.getAttachmentParentForPath(r.path).key>=e.key){this.attachAfter=!0,e=r.path;for(const t of r.constantViolations)this.getAttachmentParentForPath(t).key>e.key&&(e=t)}}return e}_getAttachmentPath(){const e=this.scopes.pop();if(e)if(e.path.isFunction()){if(!this.hasOwnParamBindings(e))return this.getNextScopeAttachmentParent();{if(this.scope===e)return;const t=e.path.get("body").get("body");for(let e=0;e<t.length;e++)if(!t[e].node._blockHoist)return t[e]}}else if(e.path.isProgram())return this.getNextScopeAttachmentParent()}getNextScopeAttachmentParent(){const e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)}getAttachmentParentForPath(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())return e}while(e=e.parentPath)}hasOwnParamBindings(e){for(const t of Object.keys(this.bindings)){if(!e.hasOwnBinding(t))continue;const n=this.bindings[t];if("param"===n.kind&&n.constant)return!0}return!1}run(){if(this.path.traverse(c,this),this.mutableBinding)return;this.getCompatibleScopes();const e=this.getAttachmentPath();if(!e)return;if(e.getFunctionParent()===this.path.getFunctionParent())return;let t=e.scope.generateUidIdentifier("ref");const n=u(t,this.path.node),r=this.attachAfter?"insertAfter":"insertBefore",[i]=e[r]([e.isVariableDeclarator()?n:l("var",[n])]),s=this.path.parentPath;return s.isJSXElement()&&this.path.container===s.node.children&&(t=a(t)),this.path.replaceWith(o(t)),e.isVariableDeclarator()?i.get("init"):i.get("declarations.0.init")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getKey=function(e,t){const n=this.node,i=n[e];return Array.isArray(i)?i.map((s,o)=>r.default.get({listKey:e,parentPath:this,parent:n,container:i,key:o}).setContext(t)):r.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)},t._getPattern=function(e,t){let n=this;for(const r of e)n="."===r?n.parentPath:Array.isArray(n)?n[r]:n.get(r,t);return n},t.get=function(e,t=!0){!0===t&&(t=this.context);const n=e.split(".");return 1===n.length?this._getKey(e,t):this._getPattern(n,t)},t.getAllNextSiblings=function(){let e=this.key,t=this.getSibling(++e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(++e);return n},t.getAllPrevSiblings=function(){let e=this.key,t=this.getSibling(--e);const n=[];for(;t.node;)n.push(t),t=this.getSibling(--e);return n},t.getBindingIdentifierPaths=function(e=!1,t=!1){const n=[this],r=Object.create(null);for(;n.length;){const i=n.shift();if(!i)continue;if(!i.node)continue;const o=s.keys[i.node.type];if(i.isIdentifier())if(e){(r[i.node.name]=r[i.node.name]||[]).push(i)}else r[i.node.name]=i;else if(i.isExportDeclaration()){const e=i.get("declaration");a(e)&&n.push(e)}else{if(t){if(i.isFunctionDeclaration()){n.push(i.get("id"));continue}if(i.isFunctionExpression())continue}if(o)for(let e=0;e<o.length;e++){const t=o[e],r=i.get(t);Array.isArray(r)?n.push(...r):r.node&&n.push(r)}}}return r},t.getBindingIdentifiers=function(e){return s(this.node,e)},t.getCompletionRecords=function(){return p(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(e=>e.path)},t.getNextSibling=function(){return this.getSibling(this.key+1)},t.getOpposite=function(){if("left"===this.key)return this.getSibling("right");if("right"===this.key)return this.getSibling("left");return null},t.getOuterBindingIdentifierPaths=function(e){return this.getBindingIdentifierPaths(e,!0)},t.getOuterBindingIdentifiers=function(e){return o(this.node,e)},t.getPrevSibling=function(){return this.getSibling(this.key-1)},t.getSibling=function(e){return r.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)};var r=n(35),i=n(1);const{getBindingIdentifiers:s,getOuterBindingIdentifiers:o,isDeclaration:a,numericLiteral:l,unaryExpression:u}=i;function c(e,t,n){return e&&t.push(...p(e,n)),t}function h(e){e.forEach(e=>{e.type=1})}function d(e,t){e.forEach(e=>{e.path.isBreakStatement({label:null})&&(t?e.path.replaceWith(u("void",l(0))):e.path.remove())})}function f(e,t){const n=[];if(t.canHaveBreak){let r=[];for(let i=0;i<e.length;i++){const s=e[i],o=Object.assign({},t,{inCaseClause:!1});s.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?o.shouldPopulateBreak=!0:o.shouldPopulateBreak=!1;const a=p(s,o);if(a.length>0&&a.every(e=>1===e.type)){r.length>0&&a.every(e=>e.path.isBreakStatement({label:null}))?(h(r),n.push(...r),r.some(e=>e.path.isDeclaration())&&(n.push(...a),d(a,!0)),d(a,!1)):(n.push(...a),t.shouldPopulateBreak||d(a,!0));break}if(i===e.length-1)n.push(...a);else{r=[];for(let e=0;e<a.length;e++){const t=a[e];1===t.type&&n.push(t),0===t.type&&r.push(t)}}}}else if(e.length)for(let r=e.length-1;r>=0;r--){const i=p(e[r],t);if(i.length>1||1===i.length&&!i[0].path.isVariableDeclaration()){n.push(...i);break}}return n}function p(e,t){let n=[];if(e.isIfStatement())n=c(e.get("consequent"),n,t),n=c(e.get("alternate"),n,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return c(e.get("body"),n,t);if(e.isProgram()||e.isBlockStatement())return f(e.get("body"),t);if(e.isFunction())return p(e.get("body"),t);if(e.isTryStatement())n=c(e.get("block"),n,t),n=c(e.get("handler"),n,t);else{if(e.isCatchClause())return c(e.get("body"),n,t);if(e.isSwitchStatement())return function(e,t,n){let r=[];for(let i=0;i<e.length;i++){const s=p(e[i],n),o=[],a=[];for(const e of s)0===e.type&&o.push(e),1===e.type&&a.push(e);o.length&&(r=o),t.push(...a)}return t.push(...r),t}(e.get("cases"),n,t);if(e.isSwitchCase())return f(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});e.isBreakStatement()?n.push(function(e){return{type:1,path:e}}(e)):n.push(function(e){return{type:0,path:e}}(e))}}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addComment=function(e,t,n){i(this.node,e,t,n)},t.addComments=function(e,t){s(this.node,e,t)},t.shareCommentsWithSiblings=function(){if("string"==typeof this.key)return;const e=this.node;if(!e)return;const t=e.trailingComments,n=e.leadingComments;if(!t&&!n)return;const r=this.getSibling(this.key-1),i=this.getSibling(this.key+1),s=Boolean(r.node),o=Boolean(i.node);s&&!o?r.addComments("trailing",t):o&&!s&&i.addComments("leading",n)};var r=n(1);const{addComment:i,addComments:s}=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,n=TypeError){return new n(t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(43),i=n(623);const s=Object.assign({__proto__:null},i.default);var o=s;t.default=o;const a=e=>t=>({minVersion:e,ast:()=>r.default.program.ast(t)});s.AwaitValue=a("7.0.0-beta.0")`
71
71
  export default function _AwaitValue(value) {
72
72
  this.wrapped = value;
73
73
  }