fable 3.1.21 → 3.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fable.min.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @description Process text streams, parsing out meta-template expressions.
|
|
10
10
|
*/
|
|
11
|
-
var n=e("./WordTree.js"),s=e("./StringParser.js");t.exports=class{constructor(){this.WordTree=new n,this.StringParser=new s,this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r){return this.WordTree.addPattern(e,t,r)}parseString(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}},{"./StringParser.js":89,"./WordTree.js":90}],89:[function(e,t,r){t.exports=class{constructor(){}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&t.Pattern.hasOwnProperty(e))t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(t.Pattern.PatternEnd.hasOwnProperty(e)){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),t.Pattern.hasOwnProperty("Parse"))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else t.PatternStartNode.PatternEnd.hasOwnProperty(e)?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if(t.Pattern.hasOwnProperty("PatternEnd")){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),t.Pattern.PatternEnd.hasOwnProperty(e)&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],t.Pattern.hasOwnProperty("Parse")))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(t.ParseTree.hasOwnProperty(e))return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}parseString(e,t,r){let n=this.newParserState(t);for(var s=0;s<e.length;s++)this.parseCharacter(e[s],n,r);return this.flushOutputBuffer(n),n.Output}}},{}],90:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}addEndChild(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPattern(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let n=this.ParseTree;for(var s=0;s<e.length;s++)n=this.addChild(n,e[s],s);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});let i="string"==typeof t?t:e;for(let e=0;e<i.length;e++)n=this.addEndChild(n,i[e],e);return n.PatternStartString=e,n.PatternEndString=i,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:e=>e,!0}}},{}],91:[function(e,t,r){var n,s,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{s="function"==typeof clearTimeout?clearTimeout:a}catch(e){s=a}}();var u,c=[],h=!1,f=-1;function p(){h&&u&&(h=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!h){var e=l(p);h=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,h=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===a||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new g(e,t)),1!==c.length||h||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],92:[function(e,t,r){(function(e){(function(){!function(n){var s="object"==typeof r&&r&&!r.nodeType&&r,i="object"==typeof t&&t&&!t.nodeType&&t,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var a,l,u=2147483647,c=36,h=1,f=26,p=38,d=700,g=72,y=128,m="-",b=/^xn--/,v=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=c-h,w=Math.floor,x=String.fromCharCode;function E(e){throw new RangeError(P[e])}function k(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+k((e=e.replace(S,".")).split("."),t).join(".")}function O(e){for(var t,r,n=[],s=0,i=e.length;s<i;)(t=e.charCodeAt(s++))>=55296&&t<=56319&&s<i?56320==(64512&(r=e.charCodeAt(s++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),s--):n.push(t);return n}function _(e){return k(e,(function(e){var t="";return e>65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)})).join("")}function j(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,r){var n=0;for(e=r?w(e/d):e>>1,e+=w(e/t);e>T*f>>1;n+=c)e=w(e/T);return w(n+(T+1)*e/(e+p))}function R(e){var t,r,n,s,i,o,a,l,p,d,b,v=[],S=e.length,P=0,T=y,x=g;for((r=e.lastIndexOf(m))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&E("not-basic"),v.push(e.charCodeAt(n));for(s=r>0?r+1:0;s<S;){for(i=P,o=1,a=c;s>=S&&E("invalid-input"),((l=(b=e.charCodeAt(s++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:c)>=c||l>w((u-P)/o))&&E("overflow"),P+=l*o,!(l<(p=a<=x?h:a>=x+f?f:a-x));a+=c)o>w(u/(d=c-p))&&E("overflow"),o*=d;x=N(P-i,t=v.length+1,0==i),w(P/t)>u-T&&E("overflow"),T+=w(P/t),P%=t,v.splice(P++,0,T)}return _(v)}function M(e){var t,r,n,s,i,o,a,l,p,d,b,v,S,P,T,k=[];for(v=(e=O(e)).length,t=y,r=0,i=g,o=0;o<v;++o)(b=e[o])<128&&k.push(x(b));for(n=s=k.length,s&&k.push(m);n<v;){for(a=u,o=0;o<v;++o)(b=e[o])>=t&&b<a&&(a=b);for(a-t>w((u-r)/(S=n+1))&&E("overflow"),r+=(a-t)*S,t=a,o=0;o<v;++o)if((b=e[o])<t&&++r>u&&E("overflow"),b==t){for(l=r,p=c;!(l<(d=p<=i?h:p>=i+f?f:p-i));p+=c)T=l-d,P=c-d,k.push(x(j(d+T%P,0))),l=w(T/P);k.push(x(j(l,0))),i=N(r,S,n==s),r=0,++n}++r,++t}return k.join("")}if(a={version:"1.4.1",ucs2:{decode:O,encode:_},decode:R,encode:M,toASCII:function(e){return A(e,(function(e){return v.test(e)?"xn--"+M(e):e}))},toUnicode:function(e){return A(e,(function(e){return b.test(e)?R(e.slice(4).toLowerCase()):e}))}},s&&i)if(t.exports==s)i.exports=a;else for(l in a)a.hasOwnProperty(l)&&(s[l]=a[l]);else n.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],93:[function(e,t,r){var n=String.prototype.replace,s=/%20/g,i="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return n.call(e,s,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:o}},{}],94:[function(e,t,r){var n=e("./stringify"),s=e("./parse"),i=e("./formats");t.exports={formats:i,parse:s,stringify:n}},{"./formats":93,"./parse":95,"./stringify":96}],95:[function(e,t,r){var n=e("./utils"),s=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=a?i.slice(0,a.index):i,c=[];if(u){if(!r.plainObjects&&s.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var h=0;r.depth>0&&null!==(a=o.exec(i))&&h<r.depth;){if(h+=1,!r.plainObjects&&s.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+i.slice(a.index)+"]"),function(e,t,r,n){for(var s=n?t:l(t,r),i=e.length-1;i>=0;--i){var o,a=e[i];if("[]"===a&&r.parseArrays)o=[].concat(s);else{o=r.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(u,10);r.parseArrays||""!==u?!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[])[c]=s:"__proto__"!==u&&(o[u]=s):o={0:s}}s=o}return s}(c,t,r,n)}};t.exports=function(e,t){var r=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var r,u={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,f=c.split(t.delimiter,h),p=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?d="utf-8":"utf8=%26%2310003%3B"===f[r]&&(d="iso-8859-1"),p=r,r=f.length);for(r=0;r<f.length;++r)if(r!==p){var g,y,m=f[r],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;-1===v?(g=t.decoder(m,o.decoder,d,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(m.slice(0,v),o.decoder,d,"key"),y=n.maybeMap(l(m.slice(v+1),t),(function(e){return t.decoder(e,o.decoder,d,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===d&&(y=a(y)),m.indexOf("[]=")>-1&&(y=i(y)?[y]:y),s.call(u,g)?u[g]=n.combine(u[g],y):u[g]=y}return u}(e,r):e,h=r.plainObjects?Object.create(null):{},f=Object.keys(c),p=0;p<f.length;++p){var d=f[p],g=u(d,c[d],r,"string"==typeof e);h=n.merge(h,g,r)}return!0===r.allowSparse?h:n.compact(h)}},{"./utils":97}],96:[function(e,t,r){var n=e("side-channel"),s=e("./utils"),i=e("./formats"),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,l(t)?t:[t])},h=Date.prototype.toISOString,f=i.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:s.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,o,a,u,h,f,g,y,m,b,v,S,P,T){for(var w,x=t,E=T,k=0,A=!1;void 0!==(E=E.get(d))&&!A;){var O=E.get(t);if(k+=1,void 0!==O){if(O===k)throw new RangeError("Cyclic object value");A=!0}void 0===E.get(d)&&(k=0)}if("function"==typeof f?x=f(r,x):x instanceof Date?x=m(x):"comma"===i&&l(x)&&(x=s.maybeMap(x,(function(e){return e instanceof Date?m(e):e}))),null===x){if(a)return h&&!S?h(r,p.encoder,P,"key",b):r;x=""}if("string"==typeof(w=x)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||s.isBuffer(x))return h?[v(S?r:h(r,p.encoder,P,"key",b))+"="+v(h(x,p.encoder,P,"value",b))]:[v(r)+"="+v(String(x))];var _,j=[];if(void 0===x)return j;if("comma"===i&&l(x))S&&h&&(x=s.maybeMap(x,h)),_=[{value:x.length>0?x.join(",")||null:void 0}];else if(l(f))_=f;else{var N=Object.keys(x);_=g?N.sort(g):N}for(var R=o&&l(x)&&1===x.length?r+"[]":r,M=0;M<_.length;++M){var L=_[M],C="object"==typeof L&&void 0!==L.value?L.value:x[L];if(!u||null!==C){var D=l(x)?"function"==typeof i?i(R,L):R:R+(y?"."+L:"["+L+"]");T.set(t,k);var $=n();$.set(d,T),c(j,e(C,D,i,o,a,u,"comma"===i&&S&&l(x)?null:h,f,g,y,m,b,v,S,P,$))}}return j};t.exports=function(e,t){var r,s=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!o.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],s=p.filter;return("function"==typeof e.filter||l(e.filter))&&(s=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:s,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof u.filter?s=(0,u.filter)("",s):l(u.filter)&&(r=u.filter);var h,f=[];if("object"!=typeof s||null===s)return"";h=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=a[h];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===d&&t&&t.commaRoundTrip;r||(r=Object.keys(s)),u.sort&&r.sort(u.sort);for(var m=n(),b=0;b<r.length;++b){var v=r[b];u.skipNulls&&null===s[v]||c(f,g(s[v],v,d,y,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,m))}var S=f.join(u.delimiter),P=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?P+="utf8=%26%2310003%3B&":P+="utf8=%E2%9C%93&"),S.length>0?P+S:""}},{"./formats":93,"./utils":97,"side-channel":103}],97:[function(e,t,r){var n=e("./formats"),s=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var s=t[n],o=s.obj[s.prop],a=Object.keys(o),l=0;l<a.length;++l){var u=a[l],c=o[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:o,prop:u}),r.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],s=0;s<r.length;++s)void 0!==r[s]&&n.push(r[s]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,s,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",u=0;u<a.length;++u){var c=a.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===n.RFC1738&&(40===c||41===c)?l+=a.charAt(u):c<128?l+=o[c]:c<2048?l+=o[192|c>>6]+o[128|63&c]:c<55296||c>=57344?l+=o[224|c>>12]+o[128|c>>6&63]+o[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(u)),l+=o[240|c>>18]+o[128|c>>12&63]+o[128|c>>6&63]+o[128|63&c])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!s.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return i(t)&&!i(r)&&(o=a(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(s.call(t,i)){var o=t[i];o&&"object"==typeof o&&r&&"object"==typeof r?t[i]=e(o,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var o=r[i];return s.call(t,i)?t[i]=e(t[i],o,n):t[i]=o,t}),o)}}},{"./formats":93}],98:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c<u;++c){var h,f,p,d,g=e[c].replace(a,"%20"),y=g.indexOf(r);y>=0?(h=g.substr(0,y),f=g.substr(y+1)):(h=g,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),n(o,p)?s(o[p])?o[p].push(d):o[p]=[o[p],d]:o[p]=d}return o};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],99:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(o(e),(function(o){var a=encodeURIComponent(n(o))+r;return s(e[o])?i(e[o],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[o]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],100:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":98,"./encode":99}],101:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),o.prototype=Object.create(s.prototype),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:20}],102:[function(e,t,r){var n=e("get-intrinsic"),s=e("define-data-property"),i=e("has-property-descriptors")(),o=e("gopd"),a=e("es-errors/type"),l=n("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&o){var c=o(e,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(i?s(e,"length",t,!0,!0):s(e,"length",t)),e}},{"define-data-property":36,"es-errors/type":42,"get-intrinsic":63,gopd:64,"has-property-descriptors":65}],103:[function(e,t,r){var n=e("get-intrinsic"),s=e("call-bind/callBound"),i=e("object-inspect"),o=e("es-errors/type"),a=n("%WeakMap%",!0),l=n("%Map%",!0),u=s("WeakMap.prototype.get",!0),c=s("WeakMap.prototype.set",!0),h=s("WeakMap.prototype.has",!0),f=s("Map.prototype.get",!0),p=s("Map.prototype.set",!0),d=s("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};t.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new o("Side channel does not contain "+i(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(l){if(t)return f(t,n)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return h(e,n)}else if(l){if(t)return d(t,n)}else if(r)return function(e,t){return!!g(e,t)}(r,n);return!1},set:function(n,s){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),c(e,n,s)):l?(t||(t=new l),p(t,n,s)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,s))}};return n}},{"call-bind/callBound":25,"es-errors/type":42,"get-intrinsic":63,"object-inspect":85}],104:[function(e,t,r){(function(e){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=function(t,r){var n=[];t.on("data",(function(e){n.push(e)})),t.once("end",(function(){r&&r(null,e.concat(n)),r=null})),t.once("error",(function(e){r&&r(e),r=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20}],105:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=h;const n=e("simple-concat"),s=e("decompress-response"),i=e("http"),o=e("https"),a=e("once"),l=e("querystring"),u=e("url"),c=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function h(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=a(t),e.url){const{hostname:t,port:r,protocol:n,auth:s,path:i}=u.parse(e.url);delete e.url,t||r||n||s?Object.assign(e,{hostname:t,port:r,protocol:n,auth:s,path:i}):e.path=i}const n={"accept-encoding":"gzip, deflate"};let f;e.headers&&Object.keys(e.headers).forEach((t=>n[t.toLowerCase()]=e.headers[t])),e.headers=n,e.body?f=e.json&&!c(e.body)?JSON.stringify(e.body):e.body:e.form&&(f="string"==typeof e.form?e.form:l.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),f&&(e.method||(e.method="POST"),c(f)||(e.headers["content-length"]=r.byteLength(f)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const p=e.hostname,d=("https:"===e.protocol?o:i).request(e,(r=>{if(!1!==e.followRedirects&&r.statusCode>=300&&r.statusCode<400&&r.headers.location){e.url=r.headers.location,delete e.headers.host,r.resume();const n=u.parse(e.url).hostname;return null!==n&&n!==p&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(r.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):h(e,t)}const n="function"==typeof s&&"HEAD"!==e.method;t(null,n?s(r):r)}));return d.on("timeout",(()=>{d.abort(),t(new Error("Request timed out"))})),d.on("error",t),c(f)?f.on("error",t).pipe(d):d.end(f),d}h.concat=(e,t)=>h(e,((r,s)=>{if(r)return t(r);n(s,((r,n)=>{if(r)return t(r);if(e.json)try{n=JSON.parse(n.toString())}catch(r){return t(r,s,n)}t(null,s,n)}))})),["get","post","put","patch","head","delete"].forEach((e=>{h[e]=(t,r)=>("string"==typeof t&&(t={url:t}),h(Object.assign({method:e.toUpperCase()},t),r))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,"decompress-response":18,http:106,https:70,once:86,querystring:100,"simple-concat":104,url:127}],106:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),s=e("./lib/response"),i=e("xtend"),o=e("builtin-status-codes"),a=e("url"),l=r;l.request=function(e,r){e="string"==typeof e?a.parse(e):i(e);var s=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||s,l=e.hostname||e.host,u=e.port,c=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?o+"//"+l:"")+(u?":"+u:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return r&&h.on("response",r),h},l.get=function(e,t){var r=l.request(e,t);return r.end(),r},l.ClientRequest=n,l.IncomingMessage=s.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":108,"./lib/response":109,"builtin-status-codes":21,url:127,xtend:130}],107:[function(e,t,r){(function(e){(function(){var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function s(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function i(e){return"function"==typeof e}r.fetch=i(e.fetch)&&i(e.ReadableStream),r.writableStream=i(e.WritableStream),r.abortController=i(e.AbortController),r.arraybuffer=r.fetch||s("arraybuffer"),r.msstream=!r.fetch&&s("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&s("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&i(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],108:[function(e,t,r){(function(r,n,s){(function(){var i=e("./capability"),o=e("inherits"),a=e("./response"),l=e("readable-stream"),u=a.IncomingMessage,c=a.readyStates;var h=t.exports=function(e){var t,r=this;l.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+s.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(h,l.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var s=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(s["content-type"]||{}).value||""}));var a=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach((function(e){a.push([t,e])})):a.push([t,r])})),"fetch"===e._mode){var l=null;if(i.abortController){var u=new AbortController;l=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:a,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{h.send(o)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype._resetTimers=function(e){var t=this;n.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),l.Writable.prototype.end.call(this,e,t,r)},h.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":107,"./response":109,_process:91,buffer:20,inherits:72,"readable-stream":124}],109:[function(e,t,r){(function(t,n,s){(function(){var i=e("./capability"),o=e("inherits"),a=e("readable-stream"),l=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=r.IncomingMessage=function(e,r,n,o){var l=this;if(a.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){t.nextTick((function(){l.emit("close")}))})),"fetch"===n){if(l._fetchResponse=r,l.url=r.url,l.statusCode=r.status,l.statusMessage=r.statusText,r.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),i.writableStream){var u=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){l._destroyed?r():l.push(s.from(e))?t():l._resumeFetch=t}))},close:function(){o(!0),l._destroyed||l.push(null)},abort:function(e){o(!0),l._destroyed||l.emit("error",e)}});try{return void r.body.pipeTo(u).catch((function(e){o(!0),l._destroyed||l.emit("error",e)}))}catch(d){}}var c=r.body.getReader();function p(){c.read().then((function(e){l._destroyed||(o(e.done),e.done?l.push(null):(l.push(s.from(e.value)),p()))})).catch((function(e){o(!0),l._destroyed||l.emit("error",e)}))}p()}else{if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===l.headers[r]&&(l.headers[r]=[]),l.headers[r].push(t[2])):void 0!==l.headers[r]?l.headers[r]+=", "+t[2]:l.headers[r]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!i.overrideMimeType){var h=l.rawHeaders["mime-type"];if(h){var f=h.match(/;\s*charset=([^;])(;|$)/);f&&(l._charset=f[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};o(u,a.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,i=null;switch(t._mode){case"text":if((i=r.responseText).length>t._pos){var o=i.substr(t._pos);if("x-user-defined"===t._charset){for(var a=s.alloc(o.length),u=0;u<o.length;u++)a[u]=255&o.charCodeAt(u);t.push(a)}else t.push(o,t._charset);t._pos=i.length}break;case"arraybuffer":if(r.readyState!==l.DONE||!r.response)break;i=r.response,t.push(s.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==l.LOADING||!i)break;t.push(s.from(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==l.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(s.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(i)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":107,_process:91,buffer:20,inherits:72,"readable-stream":124}],110:[function(e,t,r){var n={};function s(e,t,r){r||(r=Error);var s=function(e){var r,n;function s(r,n,s){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,s))||this}return n=e,(r=s).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,s}(r);s.prototype.name=r.name,s.prototype.code=e,n[e]=s}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}s("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,s,o,a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(i(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],111:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var s=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(u,s);for(var o=n(i.prototype),a=0;a<o.length;a++){var l=o[a];u.prototype[l]||(u.prototype[l]=i.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":113,"./_stream_writable":115,_process:91,inherits:72}],112:[function(e,t,r){t.exports=s;var n=e("./_stream_transform");function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}e("inherits")(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":114,inherits:72}],113:[function(e,t,r){(function(r,n){(function(){var s;t.exports=E,E.ReadableState=x;e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),a=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,c=e("util");u=c&&c.debuglog?c.debuglog("stream"):function(){};var h,f,p,d=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,m=e("../errors").codes,b=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,S=m.ERR_METHOD_NOT_IMPLEMENTED,P=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(E,o);var T=g.errorOrDestroy,w=["error","close","destroy","pause","resume"];function x(t,r,n){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof s),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function E(t){if(s=s||e("./_stream_duplex"),!(this instanceof E))return new E(t);var r=this instanceof s;this._readableState=new x(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function k(e,t,r,n,s){u("readableAddChunk",t);var i,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}(e,o);else if(s||(i=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),i)T(e,i);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)o.endEmitted?T(e,new P):A(e,o,t,!0);else if(o.ended)T(e,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?A(e,o,t,!1):R(e,o)):A(e,o,t,!1)}else n||(o.reading=!1,R(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),R(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),k(this,e,t,!1,r)},E.prototype.unshift=function(e){return k(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var r=new h(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,s="";null!==n;)s+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var O=1073741824;function _(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(N,e))}function N(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function R(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function D(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(V,t,e))}function V(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):j(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&I(this),null;var n,s=t.needReadable;return u("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",s=!0),t.ended||t.reading?u("reading or ended",s=!1):s&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=_(r,t))),null===(n=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&I(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){T(this,new S("_read()"))},E.prototype.pipe=function(e,t){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,u("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function a(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",a),n.removeListener("end",l),n.removeListener("end",y),n.removeListener("data",f),h=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}s.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,$(e))}}(n);e.on("drain",c);var h=!1;function f(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==B(s.pipes,e))&&!h&&(u("false write response, pause",s.awaitDrain),s.awaitDrain++),n.pause())}function p(t){u("onerror",t),y(),e.removeListener("error",p),0===i(e,"error")&&T(e,t)}function d(){e.removeListener("finish",g),y()}function g(){u("onfinish"),e.removeListener("close",d),y()}function y(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",g),e.emit("pipe",n),s.flowing||(u("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var o=B(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),s=this._readableState;return"data"===e?(s.readableListening=this.listenerCount("readable")>0,!1!==s.flowing&&this.resume()):"readable"===e&&(s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,u("on readable",s.length,s.reading),s.length?j(this):s.reading||r.nextTick(C,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(L,this),n},E.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(L,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(D,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(u("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s)||(r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause()))})),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<w.length;i++)e.on(w[i],this.emit.bind(this,w[i]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=e("./internal/streams/async_iterator")),f(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=F,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,r){return void 0===p&&(p=e("./internal/streams/from")),p(E,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":110,"./_stream_duplex":111,"./internal/streams/async_iterator":116,"./internal/streams/buffer_list":117,"./internal/streams/destroy":118,"./internal/streams/from":120,"./internal/streams/state":122,"./internal/streams/stream":123,_process:91,buffer:20,events:44,inherits:72,"string_decoder/":125,util:18}],114:[function(e,t,r){t.exports=c;var n=e("../errors").codes,s=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new s("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":110,"./_stream_duplex":111,inherits:72}],115:[function(e,t,r){(function(r,n){(function(){function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=E,E.WritableState=x;var o={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),l=e("buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,h=e("./internal/streams/destroy"),f=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,S=p.ERR_STREAM_WRITE_AFTER_END,P=p.ERR_UNKNOWN_ENCODING,T=h.errorOrDestroy;function w(){}function x(t,n,o){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,s=n.sync,i=n.writecb;if("function"!=typeof i)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,s,i){--t.pendingcb,n?(r.nextTick(i,s),r.nextTick(N,e,t),e._writableState.errorEmitted=!0,T(e,s)):(i(s),e._writableState.errorEmitted=!0,T(e,s),N(e,t))}(e,n,s,t,i);else{var o=_(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),s?r.nextTick(A,e,n,o,i):A(e,n,o,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function E(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!c.call(E,this))return new E(t);this._writableState=new x(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function k(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),N(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,l=!0;r;)i[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;i.allBuffers=l,k(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(k(e,t,!1,t.objectMode?1:u.length,u,c,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&T(e,r),t.prefinished=!0,e.emit("prefinish"),N(e,t)}))}function N(e,t){var n=_(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var s=e._readableState;(!s||s.autoDestroy&&s.endEmitted)&&e.destroy()}return n}e("inherits")(E,a),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===E&&(e&&e._writableState instanceof x)}})):c=function(e){return e instanceof this},E.prototype.pipe=function(){T(this,new m)},E.prototype.write=function(e,t,n){var s,i=this._writableState,o=!1,a=!i.objectMode&&(s=e,l.isBuffer(s)||s instanceof u);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=w),i.ending?function(e,t){var n=new S;T(e,n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,s){var i;return null===n?i=new v:"string"==typeof n||t.objectMode||(i=new d("chunk",["string","Buffer"],n)),!i||(T(e,i),r.nextTick(s,i),!1)}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,a,n,s,i);return u}(this,i,a,e,t,n)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new P(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var s=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||function(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,s,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=h.destroy,E.prototype._undestroy=h.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":110,"./_stream_duplex":111,"./internal/streams/destroy":118,"./internal/streams/state":122,"./internal/streams/stream":123,_process:91,buffer:20,inherits:72,"util-deprecate":128}],116:[function(e,t,r){(function(r){(function(){var n;function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[o];if(null!==t){var r=e[f].read();null!==r&&(e[c]=null,e[o]=null,e[a]=null,t(p(r,!1)))}}function g(e){r.nextTick(d,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((s(n={get stream(){return this[f]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[l]?n(e[l]):t(p(void 0,!0))}))}));var n,s=this[c];if(s)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[u]?r(p(void 0,!0)):t[h](r,n)}),n)}}(s,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(p(i,!1));n=new Promise(this[h])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),s(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);t.exports=function(e){var t,r=Object.create(m,(s(t={},f,{value:e,writable:!0}),s(t,o,{value:null,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,l,{value:null,writable:!0}),s(t,u,{value:e._readableState.endEmitted,writable:!0}),s(t,h,{value:function(e,t){var n=r[f].read();n?(r[c]=null,r[o]=null,r[a]=null,e(p(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[c]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[c]=null,r[o]=null,r[a]=null,t(e)),void(r[l]=e)}var n=r[o];null!==n&&(r[c]=null,r[o]=null,r[a]=null,n(p(void 0,!0))),r[u]=!0})),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":119,_process:91}],117:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=e("buffer").Buffer,u=e("util").inspect,c=u&&u.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,r,n,s=l.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=s,n=o,l.prototype.copy.call(t,r,n),o+=i.data.length,i=i.next;return s}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var s=t.data,i=e>s.length?s.length:e;if(i===s.length?n+=s:n+=s.slice(0,e),0==(e-=i)){i===s.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,i=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,i),0==(e-=i)){i===s.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(i));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return u(this,s(s({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:20,util:18}],118:[function(e,t,r){(function(e){(function(){function r(e,t){s(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}t.exports={destroy:function(t,i){var o=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(s,this,t)):e.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):i?(e.nextTick(n,o),i(t)):e.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:91}],119:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];e.apply(this,n)}}}(i||s);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||c()},u=t._writableState&&t._writableState.finished,c=function(){a=!1,u=!0,o||i.call(t)},h=t._readableState&&t._readableState.endEmitted,f=function(){o=!1,h=!0,a||i.call(t)},p=function(e){i.call(t,e)},d=function(){var e;return o&&!h?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},g=function(){t.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",c),t.on("abort",d),t.req?g():t.on("request",g)),t.on("end",f),t.on("finish",c),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",c),t.removeListener("abort",d),t.removeListener("request",g),t.req&&t.req.removeListener("finish",c),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",c),t.removeListener("end",f),t.removeListener("error",p),t.removeListener("close",d)}}},{"../../../errors":110}],120:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],121:[function(e,t,r){var n;var s=e("../../../errors").codes,i=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];var c,h=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var f=r.map((function(t,s){var i=s<r.length-1;return function(t,r,s,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:s},(function(e){if(e)return i(e);a=!0,i()}));var l=!1;return function(e){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new o("pipe"))}}(t,i,s>0,(function(e){c||(c=e),e&&f.forEach(l),i||(f.forEach(l),h(c))}))}));return r.reduce(u)}},{"../../../errors":110,"./end-of-stream":119}],122:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,s){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,s,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(s?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},{"../../../errors":110}],123:[function(e,t,r){t.exports=e("events").EventEmitter},{events:44}],124:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":111,"./lib/_stream_passthrough.js":112,"./lib/_stream_readable.js":113,"./lib/_stream_transform.js":114,"./lib/_stream_writable.js":115,"./lib/internal/streams/end-of-stream.js":119,"./lib/internal/streams/pipeline.js":121}],125:[function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":101}],126:[function(e,t,r){(function(t,n){(function(){var s=e("process/browser.js").nextTick,i=Function.prototype.apply,o=Array.prototype.slice,a={},l=0;function u(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new u(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new u(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,s((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":91,timers:126}],127:[function(e,t,r){var n=e("punycode");function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),c=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=e("qs");function b(e,t,r){if(e&&"object"==typeof e&&e instanceof s)return e;var n=new s;return n.parse(e,t,r),n}s.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var s=e.indexOf("?"),o=-1!==s&&s<e.indexOf("#")?"?":"#",l=e.split(o);l[0]=l[0].replace(/\\/g,"/");var b=e=l.join(o);if(b=b.trim(),!r&&1===e.split("#").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=i.exec(b);if(S){var P=(S=S[0]).toLowerCase();this.protocol=P,b=b.substr(S.length)}if(r||S||b.match(/^\/\/[^@/]+@[^@/]+/)){var T="//"===b.substr(0,2);!T||S&&g[S]||(b=b.substr(2),this.slashes=!0)}if(!g[S]&&(T||S&&!y[S])){for(var w,x,E=-1,k=0;k<h.length;k++){-1!==(A=b.indexOf(h[k]))&&(-1===E||A<E)&&(E=A)}-1!==(x=-1===E?b.lastIndexOf("@"):b.lastIndexOf("@",E))&&(w=b.slice(0,x),b=b.slice(x+1),this.auth=decodeURIComponent(w)),E=-1;for(k=0;k<c.length;k++){var A;-1!==(A=b.indexOf(c[k]))&&(-1===E||A<E)&&(E=A)}-1===E&&(E=b.length),this.host=b.slice(0,E),b=b.slice(E),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var _=this.hostname.split(/\./),j=(k=0,_.length);k<j;k++){var N=_[k];if(N&&!N.match(f)){for(var R="",M=0,L=N.length;M<L;M++)N.charCodeAt(M)>127?R+="x":R+=N[M];if(!R.match(f)){var C=_.slice(0,k),D=_.slice(k+1),$=N.match(p);$&&(C.push($[1]),D.unshift($[2])),D.length&&(b="/"+D.join(".")+b),this.hostname=C.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+F,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!d[P])for(k=0,j=u.length;k<j;k++){var V=u[k];if(-1!==b.indexOf(V)){var B=encodeURIComponent(V);B===V&&(B=escape(V)),b=b.split(V).join(B)}}var U=b.indexOf("#");-1!==U&&(this.hash=b.substr(U),b=b.slice(0,U));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[P]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}return this.href=this.format(),this},s.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",s=!1,i="";this.host?s=e+this.host:this.hostname&&(s=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==s?(s="//"+(s||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):s||(s=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),t+s+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+n},s.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},s.prototype.resolveObject=function(e){if("string"==typeof e){var t=new s;t.parse(e,!1,!0),e=t}for(var r=new s,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),l=0;l<a.length;l++){var u=a[l];"protocol"!==u&&(r[u]=e[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var c=Object.keys(e),h=0;h<c.length;h++){var f=c[h];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",m=r.search||"";r.path=d+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),S=v||b||r.host&&e.pathname,P=S,T=r.pathname&&r.pathname.split("/")||[],w=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),S=S&&(""===p[0]||""===T[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,T=p;else if(p.length)T||(T=[]),T.pop(),T=T.concat(p),r.search=e.search,r.query=e.query;else if(null!=e.search){if(w)r.host=T.shift(),r.hostname=r.host,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=T.slice(-1)[0],E=(r.host||e.host||T.length>1)&&("."===x||".."===x)||""===x,k=0,A=T.length;A>=0;A--)"."===(x=T[A])?T.splice(A,1):".."===x?(T.splice(A,1),k++):k&&(T.splice(A,1),k--);if(!S&&!P)for(;k--;k)T.unshift("..");!S||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),E&&"/"!==T.join("/").substr(-1)&&T.push("");var O,_=""===T[0]||T[0]&&"/"===T[0].charAt(0);w&&(r.hostname=_?"":T.length?T.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(S=S||r.host&&T.length)&&!_&&T.unshift(""),T.length>0?r.pathname=T.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},s.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},r.parse=b,r.resolve=function(e,t){return b(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},r.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof s?e.format():s.prototype.format.call(e)},r.Url=s},{punycode:92,qs:94}],128:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],129:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),s=e[e.length-1];return"function"==typeof n&&n!==s&&Object.keys(s).forEach((function(e){n[e]=s[e]})),n}}},{}],130:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var s in r)n.call(r,s)&&(e[s]=r[s])}return e};var n=Object.prototype.hasOwnProperty},{}],131:[function(e,t,r){t.exports={name:"fable",version:"3.1.20",description:"A service dependency injection, configuration and logging library.",main:"source/Fable.js",scripts:{start:"node source/Fable.js",coverage:"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",test:"./node_modules/.bin/mocha -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":'docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" fable-image:local',"docker-dev-shell":"docker exec -it fable-dev /bin/bash",tests:"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},browser:{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},repository:{type:"git",url:"https://github.com/stevenvelozo/fable.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable/issues"},homepage:"https://github.com/stevenvelozo/fable",devDependencies:{quackage:"^1.0.42"},dependencies:{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1",cachetrax:"^1.0.4",cookie:"^1.0.2","data-arithmatic":"^1.0.7",dayjs:"^1.11.18","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11",manyfest:"^1.0.42","simple-get":"^4.0.1"}}},{}],132:[function(e,t,r){const n=e("fable-settings"),s=e("fable-uuid"),i=e("fable-log"),o=e("../package.json"),a=e("fable-serviceproviderbase");class l extends a.CoreServiceProviderBase{constructor(t){super(t),this.serviceType="ServiceManager",this._Package=o,this.serviceTypes=[],this.servicesMap={},this.services={},this.serviceClasses={},this.extraServiceInitialization=!1,this.LogNoisiness=0,this.SettingsManager=new n(t),this.SettingsManager=this.SettingsManager,this.UUID=new s(this.SettingsManager.settings),this.Logging=new i(this.SettingsManager.settings),this.Logging.initialize(),this.ServiceManager=this,this.serviceManager=this,this.connectFable(this),this.connectPreinitServiceProviderInstance(this.UUID),this.connectPreinitServiceProviderInstance(this.Logging),this.connectPreinitServiceProviderInstance(this.SettingsManager),this.addAndInstantiateServiceType("EnvironmentData",e("./services/Fable-Service-EnvironmentData.js")),this.addServiceType("Template",e("./services/Fable-Service-Template.js")),this.addServiceType("MetaTemplate",e("./services/Fable-Service-MetaTemplate.js")),this.addServiceType("Anticipate",e("./services/Fable-Service-Anticipate.js")),this.addAndInstantiateServiceType("Dates",e("./services/Fable-Service-DateManipulation.js")),this.addAndInstantiateServiceType("DataFormat",e("./services/Fable-Service-DataFormat.js")),this.addAndInstantiateServiceType("DataGeneration",e("./services/Fable-Service-DataGeneration.js")),this.addAndInstantiateServiceType("Utility",e("./services/Fable-Service-Utility.js")),this.addAndInstantiateServiceType("Logic",e("./services/Fable-Service-Logic.js")),this.addAndInstantiateServiceType("Math",e("./services/Fable-Service-Math.js")),this.addServiceType("ExpressionParser",e("./services/Fable-Service-ExpressionParser.js")),this.addServiceType("RestClient",e("./services/Fable-Service-RestClient.js")),this.addServiceType("Manifest",e("manyfest")),this.addServiceType("ObjectCache",e("cachetrax")),this.addAndInstantiateServiceType("ProgressTime",e("./services/Fable-Service-ProgressTime.js")),this.addServiceType("ProgressTrackerSet",e("./services/Fable-Service-ProgressTrackerSet.js")),this.addServiceType("Operation",e("./services/Fable-Service-Operation.js")),this.addServiceType("CSVParser",e("./services/Fable-Service-CSVParser.js")),this.addServiceType("FilePersistence",e("./services/Fable-Service-FilePersistence.js"))}get isFable(){return!0}get settings(){return this.SettingsManager.settings}get settingsManager(){return this.SettingsManager}getUUID(){return this.UUID.getUUID()}newAnticipate(){return this.instantiateServiceProviderWithoutRegistration("Anticipate")}newManyfest(e){return this.instantiateServiceProviderWithoutRegistration("Manifest",e)}addServiceType(e,t){return e in this.servicesMap?this.log.warn(`Adding a service type [${e}] that already exists. This will change the default class prototype for this service.`):(this.servicesMap[e]={},this.serviceTypes.push(e)),"function"==typeof t&&t.isFableService?this.serviceClasses[e]=t:(this.log.error(`Attempted to add service type [${e}] with an invalid class. Using base service class, which will not crash but won't provide meaningful services.`),this.serviceClasses[e]=a),this.serviceClasses[e]}addServiceTypeIfNotExists(e,t){return e in this.servicesMap?this.serviceClasses[e]:this.addServiceType(e,t)}addAndInstantiateServiceType(e,t){return this.addServiceType(e,t),this.instantiateServiceProvider(e,{},`${e}-Default`)}addAndInstantiateServiceTypeIfNotExists(e,t){return this.addServiceTypeIfNotExists(e,t),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},`${e}-Default`)}addAndInstantiateSingletonService(e,t,r){return this.addServiceTypeIfNotExists(e,r),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},`${e}-Default`)}instantiateServiceProviderFromPrototype(e,t,r,n){let s=new n(this,t,r);return this.extraServiceInitialization&&(s=this.extraServiceInitialization(s)),this.servicesMap[e][s.Hash]=s,e in this.services||this.setDefaultServiceInstantiation(e,s.Hash),s}instantiateServiceProvider(e,t,r){let n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.servicesMap[e][n.Hash]=n,e in this.services||this.setDefaultServiceInstantiation(e,n.Hash),n}instantiateServiceProviderIfNotExists(e,t,r){return e in this.services?this.services[e]:this.instantiateServiceProvider(e,t,r)}instantiateServiceProviderWithoutRegistration(e,t,r){let n=new this.serviceClasses[e](this,t,r);return this.extraServiceInitialization&&(n=this.extraServiceInitialization(n)),n}connectPreinitServiceProviderInstance(e){let t=e.serviceType,r=e.Hash;return e.connectFable(this),t in this.servicesMap||(this.servicesMap[t]={}),this.servicesMap[t][r]=e,t in this.services||this.setDefaultServiceInstantiation(t,r,!1),e}setDefaultServiceInstantiation(e,t,r){let n=void 0===r||r;return t in this.servicesMap[e]&&(e in this&&!n||(this[e]=this.servicesMap[e][t]),e in this.services&&!n||(this.services[e]=this.servicesMap[e][t]),!0)}static generateFileNameDateStamp(e){const t=e||new Date;return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}-${String(t.getHours()).padStart(2,"0")}-${String(t.getMinutes()).padStart(2,"0")}-${String(t.getSeconds()).padStart(2,"0")}`}}t.exports=l,t.exports.new=function(e){return new l(e)},t.exports.LogProviderBase=i.LogProviderBase,t.exports.ServiceProviderBase=a,t.exports.CoreServiceProviderBase=a.CoreServiceProviderBase,t.exports.precedent=n.precedent},{"../package.json":131,"./services/Fable-Service-Anticipate.js":133,"./services/Fable-Service-CSVParser.js":134,"./services/Fable-Service-DataFormat.js":135,"./services/Fable-Service-DataGeneration.js":137,"./services/Fable-Service-DateManipulation.js":138,"./services/Fable-Service-EnvironmentData.js":139,"./services/Fable-Service-ExpressionParser.js":140,"./services/Fable-Service-FilePersistence.js":150,"./services/Fable-Service-Logic.js":151,"./services/Fable-Service-Math.js":152,"./services/Fable-Service-MetaTemplate.js":153,"./services/Fable-Service-Operation.js":157,"./services/Fable-Service-ProgressTime.js":158,"./services/Fable-Service-ProgressTrackerSet.js":160,"./services/Fable-Service-RestClient.js":161,"./services/Fable-Service-Template.js":162,"./services/Fable-Service-Utility.js":163,cachetrax:22,"fable-log":51,"fable-serviceproviderbase":53,"fable-settings":57,"fable-uuid":60,manyfest:84}],133:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="AsyncAnticipate",this.operationQueue=[],this.erroredOperations=[],this.executingOperationCount=0,this.completedOperationCount=0,this.callDepth=0,this.maxOperations=1,this.lastError=void 0,this.waitingFunctions=[]}checkQueue(){if(this.lastError){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}else if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){let e=this.operationQueue.shift();this.executingOperationCount+=1,e(this.buildAnticipatorCallback())}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}}anticipate(e){this.operationQueue.push(e),this.checkQueue()}buildAnticipatorCallback(){let e={Called:!1,Error:void 0,OperationSet:this};return function(t){if(e.Called)throw new Error("Anticipation async callback called twice...");e.Called=!0,this.lastError=t,e.OperationSet.executingOperationCount-=1,e.OperationSet.completedOperationCount+=1,e.OperationSet.callDepth++,e.OperationSet.callDepth>400?(e.OperationSet.callDepth=0,setTimeout(e.OperationSet.checkQueue.bind(this),0)):e.OperationSet.checkQueue()}.bind(this)}wait(e){this.waitingFunctions.push(e),this.checkQueue()}}},{"fable-serviceproviderbase":53}],134:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="CSVParser",this.Header=[],this.HeaderFieldNames=[],this.Delimiter=",",this.QuoteCharacter='"',this.CleanCharacters=["\r"],this.HeaderLineIndex=0,this.HasHeader=!0,this.HasSetHeader=!1,this.EmitHeader=!1,this.EmitJSON=!0,this.EscapedQuoteString=""",this.CurrentLine="",this.CurrentRecord=[],this.InQuote=!1,this.InEscapedQuote=!1,this.LinesParsed=0,this.RowsEmitted=0}marshalRowToJSON(e){if(!Array.isArray(e))return!1;for(let t=this.HeaderFieldNames.length;t<e.length;t++)this.HeaderFieldNames[t]=`${t}`;let t={};for(let r=0;r<e.length;r++)t[this.HeaderFieldNames[r]]=e[r];return t}setHeader(e){this.Header=e;for(let e=0;e<this.Header.length;e++)void 0===this.Header[e]?this.HeaderFieldNames[e]=`${e}`:this.HeaderFieldNames[e]=this.Header[e].toString().trim()}resetRowState(){this.CurrentRecord=[]}pushLine(){for(let e=0;e<this.CleanCharacters.length;e++)this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[e],"");this.CurrentRecord.push(this.CurrentLine),this.CurrentLine=""}emitRow(e){let t=void 0===e?this.EmitJSON:e;this.RowsEmitted++;let r=this.CurrentRecord;return this.CurrentRecord=[],t?this.marshalRowToJSON(r):r}parseCSVLine(e){this.LinesParsed++;for(let t=0;t<e.length;t++)this.InQuote||e[t]!=this.Delimiter?e[t]==this.QuoteCharacter?this.InEscapedQuote?this.InEscapedQuote=!1:this.InQuote?t<e.length&&e[t+1]==this.QuoteCharacter?(this.CurrentLine+=this.EscapedQuoteString,this.InEscapedQuote=!0):this.InQuote=!1:this.InQuote=!0:this.CurrentLine+=e[t]:this.pushLine();return!this.InQuote&&(this.pushLine(),this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex?(this.HasSetHeader=!0,this.setHeader(this.emitRow(!1)),!!this.EmitHeader&&this.Header):this.emitRow())}}},{"fable-serviceproviderbase":53}],135:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"stringPadStart",(function(e,t,r){let n=e.toString();return this.stringGeneratePaddingString(n,t,r)+n})),_defineProperty2(this,"stringPadEnd",(function(e,t,r){let n=e.toString();return n+this.stringGeneratePaddingString(n,t,r)})),this.serviceType="DataArithmatic",this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi,this._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g,this._Regex_matcherHTMLEntities=/&(#?[a-zA-Z0-9]+);/g,this._Value_MoneySign_Currency="$",this._Value_NaN_Currency="--",this._Value_GroupSeparator_Number=",",this._Value_Prefix_StringHash="HSH",this._Value_Clean_formatterCleanNonAlpha="",this._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,this._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith,this._SanitizeObjectKeyRegex=/[^a-zA-Z0-9_]/gi,this._SanitizeObjectKeyReplacement="_",this._SanitizeObjectKeyInvalid="INVALID"}stringReverse(e){return e.split("").reverse().join("")}stringStartsWith(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}stringStartsWith_Polyfill(e,t){return this.slice(t||0,e.length)===e}stringEndsWith(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}stringEndsWith_Polyfill(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}insecureStringHash(e){let t=0,r=e.length,n=0;for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return`${this._Value_Prefix_StringHash}${t}`}capitalizeEachWord(e){return e.replace(this._Regex_formatterCapitalizeEachWord,(e=>e.charAt(0).toUpperCase()+e.substr(1)))}resolveHtmlEntities(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherHTMLEntities,((e,t)=>{switch(t){case"comma":return",";case"amp":return"&";case"lt":return"<";case"gt":return">";case"times":return"×";case"divide":return"÷";case"plus":return"+";case"minus":return"-";case"infin":return"∞";case"ang":return"∠";case"quot":return'"';case"apos":return"'";case"nbsp":return" ";case"copy":return"©";case"reg":return"®";case"trade":return"™";case"euro":return"€";default:if(!t.startsWith("#"))return e}const r=parseInt(t.substring(1),10);return String.fromCharCode(r)}))}concatenateStrings(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStrings("",...t)}concatenateStringsInternal(){const e=[...arguments],t=this.fable.Utility.flattenArrayOfSolverInputs(e);return this.concatenateStrings(...t)}joinStrings(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.filter((e=>"string"==typeof e||"number"==typeof e)).join(e)}joinStringsInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStrings(e,...r)}concatenateStringsRaw(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStringsRaw("",...t)}concatenateStringsRawInternal(e){const t=[...arguments],r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.concatenateStringsRaw(...r)}joinStringsRaw(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.map(String).join(e)}joinStringsRawInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStringsRaw(e,...r)}cleanEnclosureWrapCharacters(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}cleanNonAlphaCharacters(e){return"string"==typeof e&&""!=e?e.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha):""}sanitizeObjectKey(e){return"string"!=typeof e||e.length<1?this._SanitizeObjectKeyInvalid:e.replace(this._SanitizeObjectKeyRegex,this._SanitizeObjectKeyReplacement)}formatterInsertCommas(e){let t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}processAddCommasToNumberRegex(e,t,r,n,s,i){return t+(s?this.formatterInsertCommas(n)+s+i:this.formatterInsertCommas(n+i))}formatterAddCommasToNumber(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(e,t,r){if(isNaN(e))return this._Value_NaN_Currency;if(null==e)return this._Value_NaN_Currency;let n=this.fable.Math.parsePrecise(e),s=void 0===t?2:t,i=this.fable.Math.toFixedPrecise(n,s,r);return`$${this.formatterAddCommasToNumber(i)}`}formatterRoundNumber(e,t){let r=void 0===t?2:t;if(isNaN(e)){return(0).toFixed(r)}if(null==e)return"";let n=this.fable.Utility.bigNumber(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}stringGeneratePaddingString(e,t,r){let n=t|0,s=String(void 0!==r?r:" ");if(e.length>t)return"";{let r=t-e.length;return r>s.length&&(s+=s.repeat(n/s.length)),s.slice(0,r)}}formatTimeSpan(e){if("number"!=typeof e)return"";let t=parseInt(e%1e3),r=parseInt(e/1e3%60),n=parseInt(e/6e4%60),s=parseInt(e/36e5);return`${this.stringPadStart(s,2,"0")}:${this.stringPadStart(n,2,"0")}:${this.stringPadStart(r,2,"0")}.${this.stringPadStart(t,3,"0")}`}formatTimeDelta(e,t){return"number"!=typeof e||"number"!=typeof t?"":this.formatTimeSpan(t-e)}getMonthFromDate(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]}getMonthAbbreviatedFromDate(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]}formatMonthDayYearFromDate(e,t){let r=void 0!==t&&t,n=e.getMonth()+1,s=e.getDate(),i=e.getFullYear();return r&&(n=this.stringPadStart(n,2,"0"),s=this.stringPadStart(s,2,"0"),i=this.stringPadStart(i,4,"0")),`${n}/${s}/${i}`}formatSortableStringFromDate(e){return e.getFullYear()+this.stringPadStart(e.getMonth(),2,"0")+this.stringPadStart(e.getDate(),2,"0")}stringBeforeMatch(e,t){return e.split(t)[0]}stringAfterMatch(e,t){let r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}stringCountSegments(e,t,r,n){let s="string"==typeof e?e:"",i="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},a="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let l=1,u=[];for(let e=0;e<s.length;e++)s[e]==i&&0==u.length?l++:s[e]in o?u.push(o[s[e]]):s[e]in a&&a[s[e]]==u[u.length-1]&&u.pop();return l}stringGetSegments(e,t,r,n){let s="string"==typeof e?e:"",i="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2,'"':3,"'":4},a="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2,'"':3,"'":4},l=0,u=[];if(e.length<1)return u;let c=[];for(let e=0;e<s.length;e++)s[e]==i&&0==c.length?(u.push(s.substring(l,e)),l=e+1):s[e]in o?c.push(o[s[e]]):s[e]in a&&a[s[e]]==c[c.length-1]&&c.pop();return l<s.length&&u.push(s.substring(l)),u}stringGetFirstSegment(e,t,r,n){let s="string"==typeof e?e:"",i="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},a="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let l=[];for(let e=0;e<s.length;e++){if(s[e]==i&&0==l.length)return s.substring(0,e);s[e]in o?l.push(o[s[e]]):s[e]in a&&a[s[e]]==l[l.length-1]&&l.pop()}return s}stringEncodeURIComponent(e){return"string"!=typeof e?e:encodeURIComponent(e)}stringDecodeURIComponent(e){if("string"!=typeof e)return e;try{return decodeURIComponent(e)}catch(t){return this.fable.Log.error(`Failed to decode URI component: ${e}`,t),e}}stringEncodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptEncode,(e=>{switch(e){case'"':return'\\"';case"'":return"\\'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";default:return e}}))}stringDecodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptDecode,(e=>{switch(e){case'\\"':return'"';case"\\'":return"'";case"\\\\":return"\\";case"\\n":return"\n";case"\\r":return"\r";default:return e}}))}stringCountEnclosures(e,t,r){let n="string"==typeof e?e:"",s="string"==typeof t?t:"(",i="string"==typeof r?r:")",o=0,a=0;for(let e=0;e<n.length;e++)n[e]==s?(0==a&&o++,a++):n[e]==i&&a--;return o}stringGetEnclosureValueByIndex(e,t,r,n){let s="string"==typeof e?e:"",i="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,u=0,c=!1,h=0,f=0;for(let e=0;e<s.length;e++)s[e]==o?(u++,1==u&&(l++,i==l-1&&(c=!0,h=e))):s[e]==a&&(u--,0==u&&c&&f<=h&&(f=e,c=!1));return l<=i?"":f>0&&f>h?s.substring(h+1,f):s.substring(h+1)}stringRemoveEnclosureByIndex(e,t,r,n){let s="string"==typeof e?e:"",i="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,u=0,c=!1,h=0,f=0;for(let e=0;e<s.length;e++)s[e]==o?(u++,1==u&&(l++,i==l-1&&(c=!0,h=e))):s[e]==a&&(u--,0==u&&c&&f<=h&&(f=e,c=!1));if(l<=i)return s;let p="";return h>1&&(p=s.substring(0,h)),s.length>f+1&&f>h&&(p+=s.substring(f+1)),p}}},{"fable-serviceproviderbase":53}],136:[function(e,t,r){t.exports={DefaultIntegerMinimum:0,DefaultIntegerMaximum:9999999,DefaultNumericStringLength:10,MonthSet:["January","February","March","April","May","June","July","August","September","October","November","December"],WeekDaySet:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ColorSet:["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],SurNameSet:["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],NameSet:["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]}},{}],137:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.serviceType="DataGeneration",this.defaultData=e("./Fable-Service-DataGeneration-DefaultValues.json")}randomIntegerBetween(e,t){try{let r=parseInt(e,10),n=parseInt(t,10);return Math.floor(Math.random()*(n-r))+r}catch(r){return this.fable.log.error("Error in randomIntegerBetween",r,{Minimum:e,Maximum:t}),NaN}}randomIntegerUpTo(e){return this.randomIntegerBetween(0,e)}randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum)}randomFloatBetween(e,t){try{let r=parseFloat(e),n=parseFloat(t);return this.fable.Math.addPrecise(this.fable.Math.multiplyPrecise(Math.random(),this.fable.Math.subtractPrecise(n,r)),r)}catch(r){return this.fable.log.error("Error in randomFloatBetween",r,{Minimum:e,Maximum:t}),NaN}}randomFloatUpTo(e){return this.randomFloatBetween(0,e)}randomFloat(){return Math.random()}randomNumericString(e,t){let r=void 0===t?9999999999:t;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(r),e,"0")}randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)]}randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)]}randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)]}randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)]}randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)]}}},{"./Fable-Service-DataGeneration-DefaultValues.json":136,"fable-serviceproviderbase":53}],138:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.serviceType="Dates",this.dayJS=e("dayjs"),this.plugin_weekOfYear=e("dayjs/plugin/weekOfYear"),this.dayJS.extend(this.plugin_weekOfYear),this.plugin_weekday=e("dayjs/plugin/weekday"),this.dayJS.extend(this.plugin_weekday),this.plugin_isoWeek=e("dayjs/plugin/isoWeek"),this.dayJS.extend(this.plugin_isoWeek),this.plugin_timezone=e("dayjs/plugin/timezone"),this.dayJS.extend(this.plugin_timezone),this.plugin_relativetime=e("dayjs/plugin/relativeTime"),this.dayJS.extend(this.plugin_relativetime),this.plugin_utc=e("dayjs/plugin/utc"),this.dayJS.extend(this.plugin_utc),this.plugin_advancedFormat=e("dayjs/plugin/advancedFormat"),this.dayJS.extend(this.plugin_advancedFormat)}dateDayDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"day")}dateWeekDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"week")}dateMonthDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"month")}dateYearDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"year")}}},{dayjs:28,"dayjs/plugin/advancedFormat":29,"dayjs/plugin/isoWeek":30,"dayjs/plugin/relativeTime":31,"dayjs/plugin/timezone":32,"dayjs/plugin/utc":33,"dayjs/plugin/weekOfYear":34,"dayjs/plugin/weekday":35,"fable-serviceproviderbase":53}],139:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="EnvironmentData",this.Environment="node.js"}}},{"fable-serviceproviderbase":53}],140:[function(e,t,r){const{PE:n}=e("big.js"),s=e("fable-serviceproviderbase");t.exports=class extends s{constructor(t,r,n){super(t,r,n),this.tokenMap=e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json"),this.tokenMaxPrecedence=4,this.tokenRadix={};let s=Object.keys(this.tokenMap);for(let e=0;e<s.length;e++){let t=s[e],r=this.tokenMap[t];r.Token=t,r.Length=t.length;let n=r.Token[0];n in this.tokenRadix||(this.tokenRadix[n]={TokenCount:0,Literal:!1,TokenKeys:[],TokenMap:{}}),this.tokenRadix[n].TokenCount++,t==n&&(this.tokenRadix[n].Literal=!0),this.tokenRadix[n].TokenMap[r.Token]=r,this.tokenRadix[n].TokenKeys.push(t),this.tokenRadix[n].TokenKeys.sort(((e,t)=>t.length-e.length)),this.tokenMaxPrecedence<r.Precedence&&(this.tokenMaxPrecedence=r.Precedence)}this.functionMap=e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json"),this.serviceType="ExpressionParser",this.fable.addServiceTypeIfNotExists("ExpressionParser-Tokenizer",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Linter",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Postfix",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-ValueMarshal",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Solver",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Messaging",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js")),this.Tokenizer=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Tokenizer"),this.Linter=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Linter"),this.Postfix=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Postfix"),this.ValueMarshal=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-ValueMarshal"),this.Solver=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Solver"),this.Messaging=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Messaging"),this.Tokenizer.connectExpressionParser(this),this.Linter.connectExpressionParser(this),this.Postfix.connectExpressionParser(this),this.ValueMarshal.connectExpressionParser(this),this.Solver.connectExpressionParser(this),this.Messaging.connectExpressionParser(this),this.GenericManifest=this.fable.newManyfest(),this.LogNoisiness="LogNoisiness"in this.fable?this.fable.LogNoisiness:0}tokenize(e,t){return this.Tokenizer.tokenize(e,t)}lintTokenizedExpression(e,t){return this.Linter.lintTokenizedExpression(e,t)}buildPostfixedSolveList(e,t){return this.Postfix.buildPostfixedSolveList(e,t)}substituteValuesInTokenizedObjects(e,t,r,n){return this.ValueMarshal.substituteValuesInTokenizedObjects(e,t,r,n)}solvePostfixedExpression(e,t,r,n){return this.Solver.solvePostfixedExpression(e,t,r,n)}solve(e,t,r,n,s){let i="object"==typeof r?r:{},o="object"==typeof t?t:{},a="object"==typeof s?s:{};return this.tokenize(e,i),this.lintTokenizedExpression(i.RawTokens,i),this.buildPostfixedSolveList(i.RawTokens,i),this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,o,i,n),this.solvePostfixedExpression(i.PostfixSolveList,a,i,n)}}},{"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js":142,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json":143,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js":144,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js":145,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js":146,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js":147,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json":148,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js":149,"big.js":17,"fable-serviceproviderbase":53}],141:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParserOperationBase",this.numberTest=/^-{0,1}\d*\.{0,1}\d+$/,this.ExpressionParser=!1}connectExpressionParser(e){this.ExpressionParser=e}getTokenType(e){return e in this.ExpressionParser.tokenMap?`Token.${this.ExpressionParser.tokenMap[e].Type}`:e.length>2&&"{"===e[0]&&"}"===e[e.length-1]?"Token.StateAddress":e.length>2&&'"'===e[0]&&'"'===e[e.length-1]?"Token.String":this.numberTest.test(e)?"Token.Constant":"Token.Symbol"}getTokenContainerObject(e,t){return{Token:e,Type:void 0===t?this.getTokenType(e):t,Descriptor:e in this.ExpressionParser.tokenMap&&this.ExpressionParser.tokenMap[e]}}}},{"fable-serviceproviderbase":53}],142:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Tokenizer"}tokenize(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.RawExpression=e,r.RawTokens=[],r.ExpressionParserLog=[],"string"!=typeof e)return this.log.warn("ExpressionParser.tokenize was passed a non-string expression."),r.RawTokens;let n=!1,s="";for(let t=0;t<e.length;t++){let i=e[t];if(" "!==i&&"\t"!==i||"StateAddress"===n||"String"===n)if("StateAddress"!==n||"}"===i)if("String"!==n||'"'===i)if("StateAddress"!==n||"}"!==i)if("String"!==n||'"'!==i)if("}"!=i)if("{"!=i)if("String"===n||'"'!=i)if(i in this.ExpressionParser.tokenRadix){let o=this.ExpressionParser.tokenRadix[i];if(1==o.TokenCount&&o.Literal){s.length>0&&r.RawTokens.push(s),s="",n=!1,r.RawTokens.push(i);continue}for(let i=0;i<o.TokenKeys.length;i++){let a=o.TokenKeys[i];if(e.substr(t,a.length)==a){s.length>0&&r.RawTokens.push(a),s="",n=!1,r.RawTokens.push(a),t+=a.length-1;break}}}else n="Value",s+=i;else s.length>0&&r.RawTokens.push(s),s="",n="String",s=i;else s.length>0&&r.RawTokens.push(s),s="",n="StateAddress",s=i;else s.length>0&&r.RawTokens.push(s),s="",n=!1,r.ExpressionParserLog.push(`ExpressionParser.tokenize found a closing brace without an opening brace in the expression: ${e} at character index ${t}`),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]);else s+=i,r.RawTokens.push(s),s="",n=!1;else s+=i,r.RawTokens.push(s),s="",n=!1;else s+=i;else s+=i;else s.length>0&&r.RawTokens.push(s),s="",n=!1}return n&&s.length>0&&r.RawTokens.push(s),r.RawTokens}}},{"./Fable-Service-ExpressionParser-Base.js":141}],143:[function(e,t,r){t.exports={sqrt:{Name:"Square Root",Address:"fable.Math.sqrtPrecise"},percent:{Name:"Compute Percent (in IS over OF format)",Address:"fable.Math.percentagePrecise"},compare:{Name:"Compare",Address:"fable.Math.comparePrecise"},abs:{Name:"Absolute Value",Address:"fable.Math.absPrecise"},floor:{Name:"Floor Value",Address:"fable.Math.floorPrecise"},ceil:{Name:"Ceiling Value",Address:"fable.Math.ceilPrecise"},rad:{Name:"Degrees to Radians",Address:"fable.Math.radPrecise"},pi:{Name:"Pi",Address:"fable.Math.piPrecise"},euler:{Name:"Euler",Address:"fable.Math.eulerPrecise"},log:{Name:"Logarithm",Address:"fable.Math.logPrecise"},exp:{Name:"Eulers Number to the Power Of N",Address:"fable.Math.expPrecise"},sin:{Name:"Sine",Address:"fable.Math.sin"},cos:{Name:"Cosine",Address:"fable.Math.cos"},tan:{Name:"Tangent",Address:"fable.Math.tan"},count:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},countset:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},sortset:{Name:"Sort Set",Address:"fable.Math.sortSetPrecise"},bucketset:{Name:"Bucket Set",Address:"fable.Math.bucketSetPrecise"},sorthistogram:{Name:"Sort Histogram",Address:"fable.Math.sortHistogramPrecise"},max:{Name:"Maximum",Address:"fable.Math.maxPrecise"},min:{Name:"Minimum",Address:"fable.Math.minPrecise"},sum:{Name:"Sum",Address:"fable.Math.sumPrecise"},avg:{Name:"Average",Address:"fable.Math.averagePrecise"},mean:{Name:"Mean",Address:"fable.Math.meanPrecise"},median:{Name:"Median",Address:"fable.Math.medianPrecise"},mode:{Name:"Mode",Address:"fable.Math.modePrecise"},round:{Name:"Round",Address:"fable.Math.roundPrecise"},tofixed:{Name:"To Fixed",Address:"fable.Math.toFixedPrecise"},cumulativesummation:{Name:"Count Set Elements in a Histogram or Value Map",Address:"fable.Math.cumulativeSummation"},countsetelements:{Name:"Count Set Elements in a Histogram or Value Map",Address:"fable.Math.countSetElements"},getvalue:{Name:"Get Value from Application State or Services (AppData, etc.)",Address:"fable.Utility.getInternalValueByHash"},createarrayfromabsolutevalues:{Name:"Create Array from Absolute Values",Address:"fable.Utility.createArrayFromAbsoluteValues"},flatten:{Name:"flatten an array of values",Address:"fable.Utility.flattenArrayOfSolverInputs"},findfirstvaluebyexactmatch:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByExactMatchInternal"},findfirstvaluebystringincludes:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByStringIncludesInternal"},resolvehtmlentities:{Name:"resolve HTML entities",Address:"fable.DataFormat.resolveHtmlEntities"},concat:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsInternal"},concatraw:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsRawInternal"},join:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsInternal"},joinraw:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsRawInternal"},if:{Name:"perform a conditional operator on two values, and choose one of two outcomes based on the result",Address:"fable.Logic.checkIf"},when:{Name:"perform a 'truthy' check on one value, and return one of two outcomes based on the result",Address:"fable.Logic.when"},entryinset:{Name:"Entry in Set",Address:"fable.Math.entryInSet"},smallestinset:{Name:"Smallest in Set",Address:"fable.Math.smallestInSet"},largestinset:{Name:"Largest in Set",Address:"fable.Math.largestInSet"},aggregationhistogram:{Name:"Generate a Histogram by Exact Value Aggregation",Address:"fable.Math.histogramAggregationByExactValueFromInternalState"},distributionhistogram:{Name:"Generate a Histogram Based on Value Distribution",Address:"fable.Math.histogramDistributionByExactValueFromInternalState"},setconcatenate:{Name:"Set Concatenate",Address:"fable.Math.setConcatenate"},getvaluearray:{Name:"Get Value Array from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueArrayByHashParametersFromInternal"},getvalueobject:{Name:"Get Value Object from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueObjectByHashParametersFromInternal"},cleanvaluearray:{Name:"Clean Value Array",Address:"fable.Math.cleanValueArray"},cleanvalueobject:{Name:"Clean Value Object",Address:"fable.Math.cleanValueObject"},randominteger:{Name:"Random Integer",Address:"fable.DataGeneration.randomInteger"},randomintegerbetween:{Name:"Random Integer Between Two Numbers",Address:"fable.DataGeneration.randomIntegerBetween"},randomintegerupto:{Name:"Random Integer",Address:"fable.DataGeneration.randomIntegerUpTo"},randomfloat:{Name:"Random Float",Address:"fable.DataGeneration.randomFloat"},randomfloatbetween:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatBetween"},randomfloatupto:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatUpTo"},datedaydifference:{Name:"Date Difference in Days",Address:"fable.Dates.dateDayDifference"},dateweekdifference:{Name:"Date Difference in Weeks",Address:"fable.Dates.dateWeekDifference"},datemonthdifference:{Name:"Date Difference in Months",Address:"fable.Dates.dateMonthDifference"},dateyeardifference:{Name:"Date Difference in Years",Address:"fable.Dates.dateYearDifference"},createValueObjectByHashes:{Name:"Create Value Object by Hashes",Address:"fable.Utility.createValueObjectByHashes"}}},{}],144:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Linter"}lintTokenizedExpression(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.LinterResults=[],!Array.isArray(e))return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed a non-array tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;if(e.length<1)return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed an empty tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;let n=0,s=!1;for(let t=0;t<e.length;t++)"("!==e[t]||s||n++,")"!==e[t]||s||n--,"{"===e[t]&&(s=!0),"}"===e[t]&&(s=!1),n<0&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression at token index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));n>0&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression (ended without closing last set of parenthesis) -- appropriate closing parenthesis will be added."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),s=!1;for(let t=0;t<e.length;t++)"{"===e[t]&&(s=!0),"}"===e[t]&&s&&(s=!1),"}"!==e[t]||s||(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced closing squiggly brace "}" in the tokenized expression at token index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),s&&(r.ExpressionParserLog.push(`WARNING: ExpressionParser.lintTokenizedExpression found an open squiggly brace in the tokenized expression at index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));let i=0,o=!1;for(let t=0;t<e.length;t++)this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type&&(i++,o=t,i>1&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found multiple equality assignments in the tokenized expression; equality assignment #${i} operator '${e[t]}' at token index ${t}.`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));i<1&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found no equality assignment in the tokenized expression. One called Result will be added automatically."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),1===i&&3===e.length&&("Token.StateAddress"!==this.getTokenType(e[0])&&"Token.Symbol"!==this.getTokenType(e[2])||(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found a single equality assignment in the tokenized expression with no assignable address on the left side of the assignment."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));let a=!1;for(let t=0;t<e.length-1;t++)e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type&&!a?a=!0:e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type?"+"!==e[t]&&"-"!==e[t]&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an ${e[t]} operator adjacent to another operator in the tokenized expression at token index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):a=!1;return r.LinterResults}}},{"./Fable-Service-ExpressionParser-Base.js":141}],145:[function(e,t,r){const{PE:n}=e("big.js"),s=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends s{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Messaging"}getOperationVirtualSymbolName(e){return e&&"VirtualSymbolName"in e?e.VirtualSymbolName:"Token.VirtualSymbol"===e.Type?e.Token:"NO_VIRTUAL_SYMBOL_NAME_FOUND"}getVirtualTokenValue(e,t){let r=this.getOperationVirtualSymbolName(e);if(("Token.Symbol"==e.Type||"Token.Constant"==e.Type)&&e.Value)return e.Value.toString();let n="VirtualSymbols"in t?t.VirtualSymbols:{};if(this.ExpressionParser.GenericManifest.checkAddressExists(n,r)){let e=this.ExpressionParser.GenericManifest.getValueAtAddress(n,r);return"object"==typeof e?`{${Object.keys(e).length} values}`:Array.isArray(e)?`[${Object.keys(e).length} values]`:e}return"NO_VALUE_FOUND"}getTokenAddressString(e){return pExpression.Token}getTokenSymbolString(e){return e.Token}getOperationSymbolMessage(e){if(!e)return"INVALID_OPERATION";let t=this.getOperationVirtualSymbolName(e),r=this.getTokenSymbolString(e.LeftValue),n=this.getTokenSymbolString(e.Operation),s=this.getTokenSymbolString(e.RightValue),i=t.substring(0,3);return"="===n?`${t} = ${r}`:"VFE"===i?`${t} = ${n}(${r})`:`${t} = ${r} ${n} ${s}`}getOperationValueMessage(e,t){if(!e)return"INVALID_OPERATION";let r=this.getOperationVirtualSymbolName(e),n=this.getVirtualTokenValue(e.LeftValue,t),s=this.getTokenSymbolString(e.Operation),i=this.getVirtualTokenValue(e.RightValue,t),o=r.substring(0,3);return"="===s?`${r} = ${n}`:"VFE"===o?`${r} = ${s}(${n})`:`${r} = ${n} ${s} ${i}`}getOperationOutcomeMessage(e,t){if(!e)return"INVALID_TOKEN";return`${this.getOperationVirtualSymbolName(e)} = ${this.getVirtualTokenValue(e,t)}`}logFunctionOutcome(e){if("object"!=typeof e)return void this.log.error("Solver results object was not an object. Cannot log outcome.");let t="PostfixedAssignmentAddress"in e?e.PostfixedAssignmentAddress:"NO_ASSIGNMENT_ADDRESS_FOUND",r="RawExpression"in e?e.RawExpression:"NO_EXPRESSION_FOUND",n="RawResult"in e?e.RawResult:"NO_RESULT_FOUND";this.log.info(`Solved f(${t}) = {${r}}`);for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t],n=this.getOperationSymbolMessage(r);this.log.info(`${t} Symbols: ${n}`);let s=this.getOperationValueMessage(r,e);this.log.info(`${t} Values: ${s}`);let i=this.getOperationOutcomeMessage(r,e);this.log.info(`${t} Outcome: ${i}`)}this.log.info(`{${r}} = ${n}`)}logFunctionSolve(e){if("object"==typeof e)if("PostfixSolveList"in e&&Array.isArray(e.PostfixSolveList)){for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t];console.log(`${t}: ${r.VirtualSymbolName} = (${r.LeftValue.Token}::${r.LeftValue.Value}) ${r.Operation.Token} (${r.RightValue.Token}::${r.RightValue.Value}) `)}this.logFunctionOutcome(e)}else this.log.error("Solver results object did not contain a PostfixSolveList array. Cannot log the solve.");else this.log.error("Solver results object was not an object. Cannot log the solve.")}}},{"./Fable-Service-ExpressionParser-Base.js":141,"big.js":17}],146:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Postfix"}getPosfixSolveListOperation(e,t,r,n,s){let i={VirtualSymbolName:e.VirtualSymbolName,Operation:e,LeftValue:t,RightValue:r};Array.isArray(n);return i.LeftValue.VirtualSymbolName?"LeftVirtualSymbolName"in i.Operation?i.LeftValue=this.getTokenContainerObject(i.Operation.LeftVirtualSymbolName,"Token.VirtualSymbol"):i.LeftValue=this.getTokenContainerObject(i.LeftValue.VirtualSymbolName,"Token.VirtualSymbol"):i.LeftValue.VirtualSymbolName=i.VirtualSymbolName,i.RightValue.VirtualSymbolName?"RightVirtualSymbolName"in i.Operation?i.RightValue=this.getTokenContainerObject(i.Operation.RightVirtualSymbolName,"Token.VirtualSymbol"):i.RightValue=this.getTokenContainerObject(i.RightValue.VirtualSymbolName,"Token.VirtualSymbol"):i.RightValue.VirtualSymbolName=i.VirtualSymbolName,i.Operation.Parsed=!0,i}buildPostfixedSolveList(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.PostfixedAssignmentAddress="Result",r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap["="],r.PostfixTokenObjects=[],r.PostfixSolveList=[],e.length<3)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList was passed a tokenized expression with less than three tokens."),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;let n=-1;for(let t=0;t<e.length;t++)if(this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type){if(!(n<0))return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found multiple assignment operators in the tokenized expression; assignment operator '${e[t]}' #${n} at token index ${t}.`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;n=t,r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap[e[t]]}-1==n?(r.ExpressionParserLog.push("WARNING: ExpressionParser.buildPostfixedSolveList found no equality assignment in the tokenized expression; defaulting to Result"),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):n>1?(r.ExpressionParserLog.push(`WARNING: ExpressionParser.buildPostfixedSolveList found an equality assignment in the tokenized expression at an unexpected location (token index ${n}); the expression cannot be parsed.`),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):0===n||(r.PostfixedAssignmentAddress=e[0]);for(let t=n+1;t<e.length;t++)r.PostfixTokenObjects.push(this.getTokenContainerObject(e[t]));let s=0,i=0,o=[];o.push(`SolveSet_${i}_D_${s}`);for(let e=0;e<r.PostfixTokenObjects.length;e++)"("===r.PostfixTokenObjects[e].Token?(r.PostfixTokenObjects[e].Depth=s,r.PostfixTokenObjects[e].VirtualSymbolName=`Pr_${i}_D_${s}`,e>0&&"Token.Symbol"===r.PostfixTokenObjects[e-1].Type&&(r.PostfixTokenObjects[e-1].Type="Token.Function"),r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1],o.push(r.PostfixTokenObjects[e].VirtualSymbolName),i++,s++):")"===r.PostfixTokenObjects[e].Token?(s--,r.PostfixTokenObjects[e].Depth=s,s<0&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ${e} with no corresponding opening parenthesis.`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),r.PostfixTokenObjects[e].VirtualSymbolName=o.pop(),r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1]):(r.PostfixTokenObjects[e].Depth=s,r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1]);let a={},l=0;for(let e=0;e<r.PostfixTokenObjects.length;e++)r.PostfixTokenObjects[e].SolveLayerStack in a||(a[r.PostfixTokenObjects[e].SolveLayerStack]=[]),a[r.PostfixTokenObjects[e].SolveLayerStack].push(r.PostfixTokenObjects[e]),r.PostfixTokenObjects[e].Depth>l&&(l=r.PostfixTokenObjects[e].Depth);let u=Object.keys(a),c=0;u.sort(((e,t)=>a[e][0].Depth<a[t][0].Depth?1:a[e][0].Depth>a[t][0].Depth?-1:0)),r.PostfixLayerstackMap={};const h=["+","-"],f=["Token.Operator","Token.Assignment"];for(let e=0;e<u.length;e++){let t=a[u[e]];for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let n=0;n<t.length;n++){const s=t[n];if(h.includes(s.Token)&&(0==n||f.includes(t[n-1].Type))&&(s.Descriptor=JSON.parse(JSON.stringify(s.Descriptor)),s.Descriptor.Precedence=1),"Token.Operator"===t[n].Type&&s.Descriptor.Precedence===e){if(1===t.length)return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found a single operator in a solve layer expression at token index ${n}`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(0!=n||"-"!=s.Token&&"+"!=s.Token){if(0==n&&("+"!=s.Token||"-"!=s.Token))return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the beginning of a solve layer expression at token index ${n}`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(n==t.length-1)return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the end of a solve layer expression at token index ${n}`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(n>0&&"-"==s.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))s.VirtualSymbolName=`VNLO_${c}`,c++;else{if(0==n&&"+"==s.Token)continue;if(n>0&&"+"==s.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))continue;if(("Token.Operator"===t[n-1].Type||"Token.Operator"===t[n+1].Type)&&"-"!=t[n+1].Token&&"+"!=t[n+1].Token)return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found an operator at token index ${n} that is not surrounded by two values.`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;s.VirtualSymbolName=`V_${c}`,r.PostfixLayerstackMap[s.SolveLayerStack]=s.VirtualSymbolName,c++}}else s.VirtualSymbolName=`VNLO_${c}`,r.PostfixLayerstackMap[s.SolveLayerStack]=s.VirtualSymbolName,c++}else if("Token.Function"===t[n].Type&&0===e){let e=t[n];e.VirtualSymbolName=`VFE_${c}`,c++,r.PostfixLayerstackMap[e.SolveLayerStack]=e.VirtualSymbolName}}}let p=[];for(let e=0;e<r.PostfixTokenObjects.length;e++){let t=r.PostfixTokenObjects[e];if("Token.Parenthesis"===t.Type)if(t.ParenthesisStack=t.VirtualSymbolName,0==e){t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e=`VP_${c}`,c++),t.VirtualSymbolName=e,p.push(t)}else if("("===t.Token){if("Token.Function"===r.PostfixTokenObjects[e-1].Type){t.IsFunction=!0,t.Function=r.PostfixTokenObjects[e-1];let n=r.PostfixLayerstackMap[t.VirtualSymbolName];n||(n=`VFP_${c}`,c++),t.VirtualSymbolName=n}else{t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e=`VP_${c}`,c++),t.VirtualSymbolName=e}p.push(t)}else if(")"===t.Token){let e=p.pop();e.IsFunction?(t.IsFunction=!0,t.VirtualSymbolName=e.Function.VirtualSymbolName):(t.IsFunction=!1,t.VirtualSymbolName=e.VirtualSymbolName)}}for(let e=0;e<u.length;e++){let t=[],r=!1,n=a[u[e]];for(let e=0;e<n.length;e++){let s=n[e];if("Token.Operator"===s.Type&&(r=s),"Token.Function"===s.Type)s.PreviousOperator=r;else if("Token.Parenthesis"===s.Type&&"("===s.Token&&s.IsFunction)t.push(s),s.Function.PreviousOperator&&(s.PreviousOperator=s.Function.PreviousOperator);else if("Token.Parenthesis"===s.Type&&"("===s.Token)s.PreviousOperator=r,t.push(s);else if("Token.Parenthesis"===s.Type&&")"===s.Token){let r=t.pop();if(e<n.length-1)for(let t=e+1;t<n.length;t++)if("Token.Operator"===n[t].Type){r.NextOperator=n[t];break}r.PreviousOperator&&r.NextOperator&&(r.PreviousOperator.Descriptor.Precedence<=r.NextOperator.Descriptor.Precedence?r.NextOperator.LeftVirtualSymbolName=r.PreviousOperator.VirtualSymbolName:r.PreviousOperator.RightVirtualSymbolName=r.NextOperator.VirtualSymbolName)}else"SolveLayerStack"in s||(t.length>0?s.SolveLayerStack=t[t.length-1].SolveLayerStack:s.SolveLayerStack="Expression_Root")}}for(let e=0;e<u.length;e++){let t=!1,r=!1,n=a[u[e]];for(let e=n.length-1;e>=0;e--){let s=n[e];"Token.Operator"===s.Type&&(r?s.Descriptor.Precedence>t?(s.RightVirtualSymbolName=r.VirtualSymbolName,r=s):s.Descriptor.Precedence<t&&(r=s):r=s,t=s.Descriptor.Precedence)}let s=[],i=!1;for(let e=n.length-1;e>=0;e--){let r=n[e];if("Token.Operator"===r.Type){if(i)if(r.Descriptor.Precedence>t){if(s.length>0)for(let e=s.length-1;e>=0;e--)if(s[e].Descriptor.Precedence>=r.Descriptor.Precedence){s[e].LeftVirtualSymbolName=r.VirtualSymbolName,s.slice(e,1);break}i=r}else r.Descriptor.Precedence<t&&(s.push(i),i=r);else i=r;t=r.Descriptor.Precedence}}}for(let e=0;e<u.length;e++){let t=a[u[e]];if(1!==t.length){for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let n=0;n<t.length;n++)if("Token.Operator"===t[n].Type&&t[n].Descriptor.Precedence===e){let e=t[n];if(0==n&&"-"==e.Token){let s=this.getTokenContainerObject("*");s.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(s,this.getTokenContainerObject("-1.0"),t[n+1]))}else if(n>0&&"-"==e.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token)){let s=this.getTokenContainerObject("*");s.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(s,this.getTokenContainerObject("-1.0"),t[n+1]))}else{if(0==n&&"+"==e.Token)continue;if(n>0&&"+"==e.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))continue;r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[n-1],t[n+1],t,n))}}else if("Token.Function"===t[n].Type&&0===e){let e=t[n];r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[n+1],this.getTokenContainerObject("0.0")))}}else{let e=this.getTokenContainerObject("=");if(e.VirtualSymbolName=r.PostfixLayerstackMap[t[0].SolveLayerStack],!e.VirtualSymbolName)for(let n=0;n<r.PostfixTokenObjects.length;n++)if(r.PostfixTokenObjects[n].ParenthesisStack===t[0].SolveLayerStack){e.VirtualSymbolName=r.PostfixTokenObjects[n].VirtualSymbolName;break}r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[0],this.getTokenContainerObject("0.0")))}}let d="PostfixedAssignmentOperator"in r?this.getTokenContainerObject(r.PostfixedAssignmentOperator.Token):this.getTokenContainerObject("=");d.VirtualSymbolName=r.PostfixedAssignmentAddress;let g=this.getTokenContainerObject("Result","Token.LastResult"),y=this.getPosfixSolveListOperation(d,g,this.getTokenContainerObject("SolverMarshal","Token.SolverMarshal"));return r.PostfixSolveList.push(y),r.PostfixSolveList}}},{"./Fable-Service-ExpressionParser-Base.js":141}],147:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js"),s=e("../Fable-SetConcatArray.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Solver"}solvePostfixedExpression(e,t,r,n){let i="object"==typeof r?r:{ExpressionParserLog:[]},o="object"==typeof n?n:this.fable.newManyfest(),a="object"==typeof t?t:{},l="fable"in i;if(l||(i.fable=this.fable),!Array.isArray(e))return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed a non-array postfixed expression."),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1;if(e.length<1)return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed an empty postfixed expression."),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1;i.VirtualSymbols={};for(let t=0;t<e.length;t++){if("Token.SolverInstruction"===e[t].Operation.Type)continue;let r={ExpressionStep:e[t],ExpressionStepIndex:t,ResultsObject:i,Manifest:o};if("Token.LastResult"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=i.LastResult),"Token.LastResult"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=i.LastResult),"Token.VirtualSymbol"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.LeftValue.Token)),"Token.VirtualSymbol"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.RightValue.Token)),"Token.Parenthesis"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.LeftValue.VirtualSymbolName)),"Token.Parenthesis"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.RightValue.VirtualSymbolName)),"Token.Constant"!==r.ExpressionStep.LeftValue.Type||"Value"in r.ExpressionStep.LeftValue||(r.ExpressionStep.LeftValue.Value=r.ExpressionStep.LeftValue.Token),"Token.Constant"!==r.ExpressionStep.RightValue.Type||"Value"in r.ExpressionStep.RightValue||(r.ExpressionStep.RightValue.Value=r.ExpressionStep.RightValue.Token),r.ExpressionStep.Operation.Type="Operator"){let e,n=!1;if(r.ExpressionStep.Operation.Token in this.ExpressionParser.tokenMap?e=`ResultsObject.${r.ExpressionStep.Operation.Descriptor.Function}`:r.ExpressionStep.Operation.Token.toLowerCase()in this.ExpressionParser.functionMap&&(n=!0,e=`ResultsObject.${this.ExpressionParser.functionMap[r.ExpressionStep.Operation.Token.toLowerCase()].Address}`),n)try{let t;const n=o.getValueAtAddress(r,e);if("function"==typeof n){let i=null;e.includes(".")&&(i=o.getValueAtAddress(r,e.split(".").slice(0,-1).join(".")));let a=r.ExpressionStep.LeftValue.Value;a=a instanceof s?a.values:[a],t=n.apply(i,a)}o.setValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,t),i.LastResult=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return i.ExpressionParserLog.push(`ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ${t} with function ${r.ExpressionStep.Operation.Token}: ${e}`),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1}else try{o.setValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,o.getValueAtAddress(r,`${e}(ExpressionStep.LeftValue.Value,ExpressionStep.RightValue.Value)`)),i.LastResult=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return i.ExpressionParserLog.push(`ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ${t} with function ${r.ExpressionStep.Operation.Token}: ${e}`),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1}i.SolverFinalVirtualSymbol=r.ExpressionStep.VirtualSymbolName}}let u=o.getValueAtAddress(i,`VirtualSymbols.${i.SolverFinalVirtualSymbol}`);for(let t=0;t<e.length;t++)"Token.SolverMarshal"===e[t].RightValue.Type&&(o.setValueAtAddress(i.VirtualSymbols,e[t].VirtualSymbolName,u),e[t].Operation.Descriptor.OnlyEmpty?this.fable.Utility.addressIsNullOrEmpty(a,e[t].VirtualSymbolName)&&o.setValueByHash(a,e[t].VirtualSymbolName,u):o.setValueByHash(a,e[t].VirtualSymbolName,u));return i.RawResult=u,l||delete i.fable,"object"==typeof u?u:void 0!==u?u.toString():u}}},{"../Fable-SetConcatArray.js":164,"./Fable-Service-ExpressionParser-Base.js":141}],148:[function(e,t,r){t.exports={"=":{Name:"Assign Value",Token:"=",Function:"fable.Math.assignValue",Precedence:0,Type:"Assignment"},"?=":{Name:"Null or Empty Coalescing Assign Value",Token:"?=",Function:"fable.Math.assignValue",OnlyEmpty:!0,Precedence:0,Type:"Assignment"},"(":{Name:"Left Parenthesis",Token:"(",Precedence:0,Type:"Parenthesis"},")":{Name:"Right Parenthesis",Token:")",Precedence:0,Type:"Parenthesis"},",":{Name:"Set Concatenate",Token:",",Function:"fable.Math.setConcatenate",Precedence:4,Type:"Operator"},"*":{Name:"Multiply",Token:"*",Function:"fable.Math.multiplyPrecise",Precedence:3,Type:"Operator"},"/":{Name:"Divide",Token:"/",Function:"fable.Math.dividePrecise",Precedence:3,Type:"Operator"},"^":{Name:"Exponent",Token:"^",Function:"fable.Math.powerPrecise",Precedence:2,Type:"Operator"},"%":{Name:"Modulus",Token:"%",Function:"fable.Math.modPrecise",Precedence:3,Type:"Operator"},"+":{Name:"Add",Token:"+",Function:"fable.Math.addPrecise",Precedence:4,Type:"Operator"},"-":{Name:"Subtract",Token:"-",Function:"fable.Math.subtractPrecise",Precedence:4,Type:"Operator"}}},{}],149:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-ValueMarshal"}substituteValuesInTokenizedObjects(e,t,r,n){let s="object"==typeof r?r:{ExpressionParserLog:[]};if(!Array.isArray(e))return s.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects was passed a non-array tokenized object list."),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),e;if("object"!=typeof t)return s.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects either was passed no data source, or was passed a non-object data source."),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),e;let i=t,o="object"==typeof n?n:this.fable.newManyfest(n);for(let t=0;t<e.length;t++){if("object"!=typeof e[t]){s.ExpressionParserLog.push(`WARNING: ExpressionParser.substituteValuesInTokenizedObjects found a non-object tokenized object at index ${t}`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);continue}let r=e[t];if("Token.Symbol"===e[t].Type&&!r.Resolved){let e=o.getValueByHash(i,r.Token);if(!e){r.Value=e,r.Resolve=!0,s.ExpressionParserLog.push(`WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the symbol hash or address ${r.Token} at index ${t}`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);continue}s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${e}] for the state address ${r.Token} at index ${t}`),this.LogNoisiness>1&&this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);try{let t=new this.fable.Utility.bigNumber(e);r.Resolved=!0,r.Value=t.toString()}catch(n){Array.isArray(e)||"object"==typeof e?(r.Resolved=!0,r.Value=e):(r.Resolved=!0,r.Value=e,s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ${r.Token} at index ${t}; using raw value.`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]))}}if("Token.StateAddress"===e[t].Type&&!r.Resolved){let e=o.getValueAtAddress(i,r.Token);if(!e){s.ExpressionParserLog.push(`WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the state address ${r.Token} at index ${t}`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);continue}this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);try{let t=new this.fable.Utility.bigNumber(e);r.Resolved=!0,r.Value=t.toString()}catch(e){s.ExpressionParserLog.push(`ERROR: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ${r.Token} at index ${t}`),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),r.Resolved=!1}}if("Token.String"!==e[t].Type||r.Resolved||(s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${r.Token}] for the string ${r.Token} at index ${t}`),this.LogNoisiness>1&&this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),r.Resolved=!0,r.Value=r.Token.substring(1,r.Token.length-1)),"Token.Constant"===e[t].Type&&!r.Resolved){s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${r.Token}] for the constant ${r.Token} at index ${t}`),this.LogNoisiness>1&&this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);try{let e=new this.fable.Utility.bigNumber(r.Token);r.Resolved=!0,r.Value=e.toString()}catch(e){s.ExpressionParserLog.push(`ERROR: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ${r.Token} at index ${t}`),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),r.Resolved=!1}}}return e}}},{"./Fable-Service-ExpressionParser-Base.js":141}],150:[function(e,t,r){(function(r){(function(){const n=e("fable-serviceproviderbase"),s=e("fs"),i=e("path"),o=e("readline");t.exports=class extends n{constructor(e,t,n){super(e,t,n),this.serviceType="FilePersistence","Mode"in this.options||(this.options.Mode=parseInt("0777",8)&~r.umask()),this.libFS=s,this.libPath=i,this.libReadline=o}joinPath(){return i.resolve(...arguments)}resolvePath(){return i.resolve(...arguments)}existsSync(e){return s.existsSync(e)}exists(e,t){return t(null,this.existsSync(e))}deleteFileSync(e){return s.unlinkSync(e)}deleteFolderSync(e){return s.rmdirSync(e)}readFileSync(e,t){let r=void 0===t?"utf8":t;return s.readFileSync(e,r)}readFile(e,t,r){let n=void 0===t?"utf8":t;return s.readFile(e,n,r)}readFileCSV(e,t,r,n,s){let i=this.fable.instantiateServiceProviderWithoutRegistration("CSVParser",t),o="function"==typeof r?r:e=>{this.fable.log.trace(`CSV Reader received line ${e}`)},a="function"==typeof n?n:()=>{this.fable.log.info(`CSV Read of ${e} complete.`)},l="function"==typeof s?s:t=>{this.fable.log.error(`CSV Read of ${e} Error: ${t}`,t)};return this.lineReaderFactory(e,(e=>{let t=i.parseCSVLine(e);t&&o(t,e)}),a,l)}appendFileSync(e,t,r){let n=void 0===r?"utf8":r;return s.appendFileSync(e,t,n)}writeFileSync(e,t,r){let n=void 0===r?"utf8":r;return s.writeFileSync(e,t,n)}writeFileSyncFromObject(e,t){return this.writeFileSync(e,JSON.stringify(t,null,4))}writeFileSyncFromArray(e,t){if(!Array.isArray(t))return this.log.error(`File Persistence Service attempted to write ${e} from array but the expected array was not an array (it was a ${typeof t}).`),Error("Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).");for(let r=0;r<t.length;r++)return this.appendFileSync(e,`${t[r]}\n`)}writeFile(e,t,r,n){let i=void 0===r?"utf8":r;return s.writeFile(e,t,i,n)}lineReaderFactory(e,t,r,n){let i={};return"string"==typeof e&&(i.filePath=e,i.fileStream=s.createReadStream(i.filePath),i.reader=o.createInterface({input:i.fileStream,crlfDelay:1/0}),"function"==typeof n&&i.reader.on("error",n),i.reader.on("line","function"==typeof t?t:()=>{}),"function"==typeof r&&i.reader.on("close",r),i)}makeFolderRecursive(e,t){let r=e;if("string"==typeof e)r={Path:e};else if("object"!=typeof e)return t(new Error("Parameters object or string not properly passed to recursive folder create.")),!1;return"string"!=typeof r.Path?(t(new Error("Parameters object needs a path to run the folder create operation.")),!1):("Mode"in r||(r.Mode=this.options.Mode),void 0===r.CurrentPathIndex?(r.ActualPath=i.normalize(r.Path),r.ActualPathParts=r.ActualPath.split(i.sep),r.CurrentPathIndex=0,r.CurrentPath=""):(r.CurrentPath==i.sep?r.CurrentPath=r.CurrentPath+r.ActualPathParts[r.CurrentPathIndex]:r.CurrentPath=r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],r.CurrentPathIndex++),r.CurrentPathIndex>=r.ActualPathParts.length?t(null):void s.open(r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],"r",((e,n)=>{if(n&&s.closeSync(n),!e||"ENOENT"!=e.code)return this.makeFolderRecursive(r,t);s.mkdir(r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],r.Mode,(e=>e?"EEXIST"==e.code?this.makeFolderRecursive(r,t):(console.log(e.code),t(e)):this.makeFolderRecursive(r,t)))})))}}}).call(this)}).call(this,e("_process"))},{_process:91,"fable-serviceproviderbase":53,fs:19,path:87,readline:19}],151:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}checkIf(e,t,r,n,s){let i=this.fable.Math.parsePrecise(e,null),o=this.fable.Math.parsePrecise(r,null),a=!1;if(null===i||null===o)switch(void 0===s&&(s=""),t){case"<":case"LT":a=e<r;break;case"<=":case"LTE":a=e<=r;break;case">":case"GT":a=e>r;break;case">=":case"GTE":a=e>=r;break;case"==":a=e==r;break;case"===":a=e===r;break;default:this.fable.log.warn(`[FableServiceLogic.checkIf] Invalid comparison operator: ${t}`),a=e==r}else switch(void 0===s&&(s="0"),t){case"<":case"LT":a=this.fable.Math.ltPrecise(i,o);break;case"<=":case"LTE":a=this.fable.Math.ltePrecise(i,o);break;case">":case"GT":a=this.fable.Math.gtPrecise(i,o);break;case">=":case"GTE":a=this.fable.Math.gtePrecise(i,o);break;case"==":a=0==this.fable.Math.comparePreciseWithin(i,o,"0.000001");break;case"===":a=0==this.fable.Math.comparePrecise(i,o);break;default:this.fable.log.warn(`[FableServiceLogic.checkIf] Invalid comparison operator: ${t}`),a=e==r?n:s}return a?n:s}when(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?Array.isArray(e)&&e.length<1||"object"==typeof e&&Object.keys(e).length<1?r:t:r}}},{"fable-serviceproviderbase":53}],152:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("./Fable-SetConcatArray.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="Math",this.pi="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679",this.euler="2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664",this.bigNumber=this.fable.Utility.bigNumber,this.ln2Cache=new Map}get roundDown(){return this.bigNumber.roundDown}get roundHalfUp(){return this.bigNumber.roundHalfUp}get roundHalfEven(){return this.bigNumber.roundHalfEven}get roundUp(){return this.bigNumber.roundUp}parsePrecise(e,t){let r;try{r=new this.bigNumber(e)}catch(e){r=void 0===t?"0.0":t}return r?r.toString():r}assignValue(e){return e}percentagePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;if(0==n)return"0";let s=new this.bigNumber(r).div(n);return s=s.times(100),s.toString()}setConcatenate(e,t){return new s(e,t)}roundPrecise(e,t,r){let n=isNaN(e)?0:e,s=isNaN(t)?0:parseInt(t,10),i=void 0===r?this.roundHalfUp:parseInt(r,10);return new this.bigNumber(n).round(s,i).toString()}toFixedPrecise(e,t,r){let n=isNaN(e)?0:e,s=isNaN(t)?0:t,i=void 0===r?this.roundHalfUp:r;return new this.bigNumber(n).toFixed(s,i).toString()}addPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).plus(n).toString()}subtractPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).minus(n).toString()}powerPrecise(e,t){let r,n=isNaN(e)?0:e,s=isNaN(t)?0:parseInt(t);if(s==Number(t)){r=new this.bigNumber(n).pow(s)}else r=Math.pow(n,Number(t));return r.toString()}multiplyPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).times(n).toString()}dividePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).div(n).toString()}modPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).mod(n).toString()}sqrtPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).sqrt().toString()}absPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).abs().toString()}floorPrecise(e){let t=isNaN(e)?0:e;return Math.floor(t).toString()}ceilPrecise(e){let t=isNaN(e)?0:e;return Math.ceil(t).toString()}comparePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).cmp(n)}comparePreciseWithin(e,t,r){let n=isNaN(e)?0:e,s=isNaN(t)?0:t,i=new this.bigNumber(n);return i.minus(s).abs().lte(r)?0:i.lt(s)?-1:1}gtPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).gt(n)}gtePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).gte(n)}ltPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).lt(n)}ltePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).lte(n)}radPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).times(Math.PI).div(180).toString()}piPrecise(e){return void 0===e?this.pi:this.roundPrecise(this.pi,e)}eulerPrecise(e){return void 0===e?this.euler:this.roundPrecise(this.euler,e)}sin(e){let t=isNaN(e)?0:e;return Math.sin(t)}cos(e){let t=isNaN(e)?0:e;return Math.cos(t)}tan(e){let t=isNaN(e)?0:e;return Math.tan(t)}countSetElements(e){return Array.isArray(e)?e.length:"object"==typeof e?Object.keys(e).length:e?1:0}sortSetPrecise(e){let t=[];if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push(this.parsePrecise(e[r],NaN));else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)t.push(this.parsePrecise(e[r[n]],NaN))}return t.sort(((e,t)=>this.comparePrecise(e,t))),t}bucketSetPrecise(e,t){let r={},n=this.parsePrecise(t,NaN);if(Array.isArray(e))for(let t=0;t<e.length;t++){let s=this.parsePrecise(e[t],NaN).toString();isNaN(n)||(s=this.dividePrecise(e[t],n)),s in r||(r[s]=0),r[s]=r[s]+1}else if("object"==typeof e){let t=Object.keys(e);for(let s=0;s<t.length;s++){let i=this.parsePrecise(e[t[s]],NaN).toString();isNaN(n)||(i=this.dividePrecise(e[s],n)),i in r||(r[i]=0),r[i]=r[i]+1}}return r}histogramPrecise(e){return this.bucketSetPrecise(e)}sortHistogramPrecise(e){let t={},r=Object.keys(e);r.sort(((t,r)=>e[t]-e[r]));for(let n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}cleanValueArray(e,t){let r=void 0!==t&&t;if(!Array.isArray(e))return[];let n=[];for(let t=0;t<e.length;t++){let s=this.parsePrecise(e[t],NaN);isNaN(s)||r&&"0"==s||n.push(s)}return n}arbitraryNaturalLogOfTwo(e){const t=0|e,r=new this.bigNumber(t);if(this.ln2Cache.has(t))return this.ln2Cache.get(t);const n=new this.bigNumber(2),s=n.minus(1).div(n.plus(1)),i=s.mul(s);let o=new this.bigNumber(0),a=s,l=1;const u=this.powerPrecise(10,-r.add(8));for(let e=0;e<2e5&&(o=o.plus(a.div(l)),a=a.mul(i),l+=2,!a.abs().div(l).lt(u));e++);const c=o.mul(2);return this.ln2Cache.set(t,c),c}arbitraryNaturalLog(e,t){let r=new this.bigNumber(e),n=new this.bigNumber(t);if(r.lte(0))throw new Error("ln undefined for non-positive values.");if(r.eq(1))return new this.bigNumber(0);const s=new this.bigNumber(2);let i=0,o=r;const a=new this.bigNumber("1.5"),l=new this.bigNumber("0.75");for(;o.gt(a);)o=o.div(s),i+=1;for(;o.lt(l);)o=o.mul(s),i-=1;const u=o.minus(1).div(o.plus(1)),c=u.mul(u);let h=new this.bigNumber(0),f=u,p=1;const d=this.powerPrecise(10,-n.add(6));for(let e=0;e<2e5&&(h=h.plus(f.div(p)),f=f.mul(c),p+=2,!f.abs().div(p).lt(d));e++);const g=h.mul(2),y=this.arbitraryNaturalLogOfTwo(n);return g.plus(y.mul(i))}logPrecise(e,t,r){let n=void 0===t?this.bigNumber(10):this.bigNumber(t);const s=void 0===r?9:r,i=s+8,o=this.bigNumber.DP,a=this.bigNumber.RM;this.bigNumber.DP=i,this.bigNumber.RM=1;const l=this.bigNumber(e),u=this.bigNumber(n);if(l.lte(0))return this.log.error(`Fable logPrecise Error: Number must be greater than 0; number was ${e}.`),NaN;if(u.lte(0)||u.eq(1))return this.log.error(`Fable logPrecise Error: Base must be greater than 0 and not equal to 1 -- base ${Base} was passed in.`),NaN;const c=this.arbitraryNaturalLog(l,s),h=this.arbitraryNaturalLog(u,s);let f=c.div(h).toFixed(s);return this.bigNumber.DP=o,this.bigNumber.RM=a,f}expPrecise(e,t){let r=isNaN(e)?this.bigNumber(1):this.bigNumber(e);const n=void 0===t?9:parseInt(t,10),s=this.bigNumber.DP;this.bigNumber.DP=n+10;const i=new this.bigNumber("0.693147180559945309417232121458176568"),o=new this.bigNumber("709.782712893384"),a=new this.bigNumber("-744.4400719213812");if(r.gt(o))return this.bigNumber.DP=s,NaN;if(r.lt(a))return this.bigNumber.DP=s,new this.bigNumber(0);let l;try{l=r.div(i).round(0,0)}catch(t){return this.log.error(`Fable expPrecise Error: Rounding error during range reduction for value of ${e}. Error: ${t}`),this.bigNumber.DP=s,NaN}const u=r.minus(l.times(i)),c=new this.bigNumber(10).pow(-(n+2));let h=new this.bigNumber(1),f=new this.bigNumber(1),p=1;for(;h=h.times(u).div(p),!h.abs().lt(c);)if(f=f.plus(h),p++,p>2e3){this.log.warn(`Fable expPrecise warning: Taylor series failed to converge after 2000 iterations for value of ${e}.`);break}const d=new this.bigNumber(2),g=l.abs().toNumber();let y=0===g?new this.bigNumber(1):d.pow(g);const m=l.gte(0)?f.times(y):f.div(y);return this.bigNumber.DP=s,m.round(n).toString()}cleanValueObject(e){if("object"!=typeof e)return{};let t={},r=Object.keys(e);for(let n=0;n<r.length;n++){let s=this.parsePrecise(e[r[n]],NaN);isNaN(s)||(t[r[n]]=s)}return t}histogramDistributionByExactValue(e,t,r){if(!Array.isArray(e))return e;if(!t)return{};let n={};for(let s=0;s<e.length;s++){let i=this.fable.Utility.getValueByHash(e[s],t,r).toString();i in n||(n[i]=0),n[i]=n[i]+1}return n}histogramDistributionByExactValueFromInternalState(e,t){if(!e)return{};let r=this.fable.Utility.getInternalValueByHash(e);return this.histogramDistributionByExactValue(r,t)}histogramAggregationByExactValue(e,t,r,n){if(!Array.isArray(e))return e;if(!t||!r)return{};let s={};for(let i=0;i<e.length;i++){let o=this.fable.Utility.getValueByHash(e[i],t,n).toString(),a=this.parsePrecise(this.fable.Utility.getValueByHash(e[i],r,n),NaN);o in s||(s[o]=0),isNaN(a)||(s[o]=this.addPrecise(s[o],a))}return s}histogramAggregationByExactValueFromInternalState(e,t,r){if(!e)return{};let n=this.fable.Utility.getInternalValueByHash(e);return this.histogramAggregationByExactValue(n,t,r)}entryInSet(e,t,r){const n="number"==typeof r?r:parseInt(r);if(!Array.isArray(e))return e;if(!t)return!1;if(isNaN(n)||n>=e.length)return!1;let s=e.toSorted(((e,r)=>this.comparePrecise(e[t],r[t])));return s[n<0?s.length+n:n]}smallestInSet(e,t){return this.entryInSet(e,t,0)}largestInSet(e,t){return this.entryInSet(e,t,-1)}cumulativeSummation(e,t,r,n){if(!Array.isArray(e))return e;if(!t||!r)return e;let s="0.0";for(let i=0;i<e.length;i++){let o=this.parsePrecise(this.fable.Utility.getValueByHash(e[i],t,n));isNaN(o)?this.fable.Utility.setValueByHash(e[i],r,s,n):(s=this.addPrecise(o,s),this.fable.Utility.setValueByHash(e[i],r,s,n))}return e}maxPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let n=this.parsePrecise(e[r],NaN);this.gtPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)if(t){let s=this.parsePrecise(e[r[n]],NaN);this.gtPrecise(s,t)&&(t=s)}else t=this.parsePrecise(e[r[n]],NaN)}return t}minPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let n=this.parsePrecise(e[r],NaN);!isNaN(n)&&this.ltPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)if(t){let s=this.parsePrecise(e[r[n]],NaN);!isNaN(s)&&this.ltPrecise(s,t)&&(t=s)}else t=this.parsePrecise(e[r[n]],NaN)}return t}sumPrecise(e){let t="0.0";if(Array.isArray(e))for(let r=0;r<e.length;r++){let n=this.parsePrecise(e[r],NaN);isNaN(n)||(t=this.addPrecise(t,n))}else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++){let s=this.parsePrecise(e[r[n]],NaN);isNaN(s)||(t=this.addPrecise(t,s))}}return t}meanPrecise(e){let t=this.sumPrecise(e),r=this.countSetElements(e);return 0==r?"0.0":this.dividePrecise(t,r)}averagePrecise(e){return this.meanPrecise(e)}medianPrecise(e){let t=this.countSetElements(e);if(0==t)return"0.0";let r=this.sortSetPrecise(e),n=Math.floor(t/2);if(t%2==1)return r[n];{let e=r[n-1],t=r[n];return this.dividePrecise(this.addPrecise(e,t),2)}}modePrecise(e){let t=this.bucketSetPrecise(e),r=0,n=Object.keys(t),s=[];for(let e=0;e<n.length;e++)t[n[e]]>r?(r=t[n[e]],s=[n[e]]):t[n[e]]==r&&s.push(n[e]);return s}}},{"./Fable-SetConcatArray.js":164,"fable-serviceproviderbase":53}],153:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js"),i=e("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="MetaTemplate",this.WordTree=new s,this.StringParser=new i(this.fable),this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r,n){return this.WordTree.addPattern(e,t,r,n)}addPatternBoth(e,t,r,n,s){return this.WordTree.addPatternBoth(e,t,r,n,s)}parseString(e,t,r,n,s,i){return this.LogNoisiness>4&&this.fable.log.trace(`Metatemplate parsing template string [${e}] where the callback is a ${typeof r}`,{TemplateData:t}),this.StringParser.parseString(e,this.ParseTree,t,r,n,s,i)}}},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":154,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":155,"fable-serviceproviderbase":53}],154:[function(e,t,r){t.exports=class{constructor(e){this.fable=e}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r,n,s,i){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan){if(e in t.Pattern.PatternEnd){t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t);let o="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=o?t.Pattern.Parse.call(o,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i),this.resetOutputBuffer(t)}e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t))}else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern)){let e="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=e?t.Pattern.Parse.call(e,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i),this.resetOutputBuffer(t)}}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(e in t.ParseTree)return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}executePatternAsync(e,t,r,n,s,i){if(e.Pattern.isAsync){let o="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return o?e.Pattern.ParseAsync.call(o,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,((t,n)=>(t&&this.fable.log.info(`Precedent ERROR: Async template error happened parsing ${e.Pattern.PatternStart} ... ${e.Pattern.PatternEnd}: ${t}`),e.OutputBuffer=n,this.resetOutputBuffer(e),r())),n,s,i):e.Pattern.ParseAsync(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,((t,n)=>(t&&this.fable.log.info(`Precedent ERROR: Async template error happened parsing ${e.Pattern.PatternStart} ... ${e.Pattern.PatternEnd}: ${t}`),e.OutputBuffer=n,this.resetOutputBuffer(e),r())),n,s,i)}{let o="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return e.OutputBuffer=o?e.Pattern.Parse.call(o,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,n,s,i):e.Pattern.Parse(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,n,s,i),this.resetOutputBuffer(e),r()}}parseCharacterAsync(e,t,r,n,s,i,o){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(e in t.Pattern.PatternEnd){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),"Parse"in t.Pattern)return this.executePatternAsync(t,r,n,s,i,o)}else e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern))return this.executePatternAsync(t,r,n,s,i,o)}else this.resetOutputBuffer(t);else e in t.ParseTree?(this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0):this.appendOutputBuffer(e,t);return n()}parseString(e,t,r,n,s,i,o){let a=Array.isArray(s)?s:[],l=Array.from(a);if(l.push(r),"function"!=typeof n){let n=this.newParserState(t);for(var u=0;u<e.length;u++)this.parseCharacter(e[u],n,r,l,i,o);return this.flushOutputBuffer(n),n.Output}{let s=this.newParserState(t);s.Asynchronous=!0;let a=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");for(let t=0;t<e.length;t++)a.anticipate((n=>{this.parseCharacterAsync(e[t],s,r,n,l,i,o)}));a.wait((e=>(this.flushOutputBuffer(s),n(e,s.Output))))}}}},{}],155:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return t in e||(e[t]={}),e[t]}addEndChild(e,t){return"PatternEnd"in e||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPatternBoth(e,t,r,n,s){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let i=this.ParseTree;for(var o=0;o<e.length;o++)i=this.addChild(i,e[o],o);"PatternEnd"in i||(i.PatternEnd={});let a="string"==typeof t?t:e;for(let e=0;e<a.length;e++)i=this.addEndChild(i,a[e],e);return i.PatternStartString=e,i.PatternEndString=a,i.Parse="function"==typeof r?r:"string"==typeof r?(e,t)=>r:(e,t)=>e,i.ParseAsync="function"==typeof n?n:"string"==typeof n?(e,t,r)=>r(null,n):(e,t,r)=>r(null,i.Parse(e,t)),s&&(i.ParserContext=s),i.isAsync=!0,i}addPattern(e,t,r,n){return this.addPatternBoth(e,t,r,null,n)}}},{}],156:[function(e,t,r){t.exports={Metadata:{UUID:!1,Hash:!1,Name:"",Summary:"",Version:0},Status:{Completed:!1,StepCount:1},Steps:[],Errors:[],Log:[]}},{}],157:[function(e,t,r){const{PE:n}=e("big.js"),s=e("fable-serviceproviderbase"),i=JSON.stringify(e("./Fable-Service-Operation-DefaultSettings.js"));t.exports=class extends s{constructor(e,t,r){super(e,t,r),this.timeStamps={},this.serviceType="PhasedOperation",this.state=JSON.parse(i),this.stepMap={},this.stepFunctions={},this.state.Metadata.Hash=this.Hash,this.state.Metadata.UUID=this.UUID,this.state.Metadata.Name="string"==typeof this.options.Name?this.options.Name:`Unnamed Operation ${this.state.Metadata.UUID}`,this.name=this.state.Metadata.Name,this.progressTrackerSet=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTrackerSet"),this.state.OverallProgressTracker=this.progressTrackerSet.createProgressTracker(`Overall-${this.state.Metadata.UUID}`),this.log=this}execute(e){if(this.state.OverallProgressTracker.StartTimeStamp>0)return e(new Error(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} has already been executed!`));let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");this.progressTrackerSet.setProgressTrackerTotalOperations(this.state.OverallProgressTracker.Hash,this.state.Status.StepCount),this.progressTrackerSet.startProgressTracker(this.state.OverallProgressTracker.Hash),this.info(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} starting...`);for(let e=0;e<this.state.Steps.length;e++)t.anticipate(function(t){return this.fable.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}] ${this.state.Steps[e].Name} starting...`),this.progressTrackerSet.startProgressTracker(this.state.Steps[e].ProgressTracker.Hash),t()}.bind(this)),t.anticipate(this.stepFunctions[this.state.Steps[e].GUIDStep].bind({log:this,fable:this.fable,options:this.state.Steps[e].Metadata,metadata:this.state.Steps[e].Metadata,ProgressTracker:this.progressTrackerSet.getProgressTracker(this.state.Steps[e].ProgressTracker.Hash),logProgressTrackerStatus:function(){return this.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}]: ${this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash)}`)}.bind(this),OperationState:this.state,StepState:this.state.Steps[e]})),t.anticipate(function(t){this.progressTrackerSet.endProgressTracker(this.state.Steps[e].ProgressTracker.Hash);let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash);this.fable.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}] ${this.state.Steps[e].Name} complete.`),this.fable.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}] ${this.state.Steps[e].Name} ${r}.`),this.progressTrackerSet.incrementProgressTracker(this.state.OverallProgressTracker.Hash,1);let n=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.fable.log.info(`Operation [${this.state.Metadata.UUID}] ${n}.`),t()}.bind(this));t.wait((t=>{if(t)return this.fable.log.error(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} had an error: ${t}`,t),e(t);this.info(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} complete.`);let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.progressTrackerSet.endProgressTracker(this.state.OverallProgressTracker.Hash),this.fable.log.info(`Operation [${this.state.Metadata.UUID}] ${r}.`),e()}))}addStep(e,t,r,n,s){let i={};return i.GUIDStep=void 0!==s?s:`STEP-${this.state.Steps.length}-${this.fable.DataGeneration.randomNumericString()}`,i.Name=void 0!==r?r:`Step [${i.GUIDStep}]`,i.Description=void 0!==n?n:`Step execution of ${i.Name}.`,i.ProgressTracker=this.progressTrackerSet.createProgressTracker(i.GUIDStep),i.Metadata="object"==typeof t?t:{},this.state.Steps.push(i),this.stepMap[i.GUIDStep]=i,this.stepFunctions[i.GUIDStep]="function"==typeof e?e:function(e){return e()},this.state.Status.StepCount++,i}setStepTotalOperations(e,t){if(!(e in this.stepMap))return new Error(`Step [${e}] does not exist in operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} when attempting to set total operations to ${t}.`);this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[e].ProgressTracker.Hash,t)}writeOperationLog(e,t,r){this.state.Log.push(`[${(new Date).toUTCString()}]-[${e}]: ${t}`),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(e,t){this.state.Errors.push(`${e}`),"object"==typeof t&&this.state.Errors.push(JSON.stringify(t))}trace(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}debug(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}info(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}warn(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}error(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}fatal(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}},{"./Fable-Service-Operation-DefaultSettings.js":156,"big.js":17,"fable-serviceproviderbase":53}],158:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTime",this.timeStamps={}}formatTimeDuration(e){let t="number"==typeof e?e:0;if(e<0)return"unknown";let r="";return t>36e5&&(r+=Math.floor(t/36e5)+"h ",t%=36e5),t>6e4&&(r+=Math.floor(t/6e4)+"m ",t%=6e4),t>1e3&&(r+=Math.floor(t/1e3)+"s ",t%=1e3),r+=Math.round(t)+"ms",r}createTimeStamp(e){let t="string"==typeof e?e:"Default";return this.timeStamps[t]=+new Date,this.timeStamps[t]}getTimeStampValue(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps?this.timeStamps[t]:-1}updateTimeStampValue(e,t){let r="string"==typeof e?e:"Default",n=!1;return n="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&n?(this.timeStamps[r]=n,this.timeStamps[r]):-1}removeTimeStamp(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps&&(delete this.timeStamps[t],!0)}getTimeStampDelta(e,t){let r="string"==typeof e?e:"Default",n=!1;return n="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&n?n-this.timeStamps[r]:-1}getDurationBetweenTimestamps(e,t){let r="string"==typeof e?e:"Default",n="string"==typeof t?t:"Default";return r in this.timeStamps&&n in this.timeStamps?this.timeStamps[n]-this.timeStamps[r]:-1}getTimeStampDeltaMessage(e,t,r){let n="string"==typeof e?e:"Default",s=void 0!==t?t:`Elapsed for ${n}: `,i=this.getTimeStampDelta(n,r);return`${s} ${this.formatTimeDuration(i)}`}logTimeStampDelta(e,t,r){this.fable.log.info(this.getTimeStampDeltaMessage(e,t,r))}}},{"fable-serviceproviderbase":53}],159:[function(e,t,r){t.exports=class{constructor(e,t){this.progressTrackerSet=e,this.progressTrackerHash=t,this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash)}updateProgressTracker(e){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,e)}incrementProgressTracker(e){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,e)}setProgressTrackerTotalOperations(e){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,e)}getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash)}}},{}],160:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("./Fable-Service-ProgressTracker/ProgressTracker.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTrackerSet",this.progressTrackers={},this.progressTimes=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTime"),this.progressTimes.createTimeStamp("CurrentTime")}getProgressTracker(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn(`ProgressTracker ${t} does not exist! Creating a new tracker...`),this.createProgressTracker(t,100)),new s(this,e)}getProgressTrackerData(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn(`ProgressTracker ${t} does not exist! Creating a new tracker...`),this.createProgressTracker(t,100)),this.progressTrackers[t]}createProgressTracker(e,t){let r="string"==typeof e?e:"Default",n={Hash:r,StartTimeHash:`${r}-Start`,StartTimeStamp:-1,CurrentTimeStamp:-1,EndTimeHash:`${r}-End`,EndTimeStamp:-1,PercentComplete:-1,AllowTruePercentComplete:!1,ElapsedTime:-1,AverageOperationTime:-1,EstimatedCompletionTime:-1,TotalCount:"number"==typeof t?t:100,CurrentCount:-1};return r in this.progressTrackers&&(this.fable.log.warn(`ProgressTracker ${r} already exists! Overwriting with a new tracker...`),this.progressTimes.removeTimeStamp(n.StartTimeHash),this.progressTimes.removeTimeStamp(n.EndTimeHash)),this.progressTrackers[r]=n,n}setProgressTrackerTotalOperations(e,t){let r="string"==typeof e?e:"Default",n="number"==typeof t?t:100;return r in this.progressTrackers||(this.fable.log.warn(`Attempted to set the total operations of ProgressTracker ${r} but it does not exist! Creating a new tracker...`),this.createProgressTracker(r,n)),this.progressTrackers[r].TotalCount=n,this.progressTrackers[r]}startProgressTracker(e){let t="string"==typeof e?e:"Default";t in this.progressTrackers||this.createProgressTracker(t,100);let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].StartTimeHash),r.StartTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].StartTimeHash),r.CurrentCount<0&&(r.CurrentCount=0),this.solveProgressTrackerStatus(t)}endProgressTracker(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error(`Attempted to end ProgressTracker ${t} that does not exist!`),!1;let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].EndTimeHash),r.EndTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].EndTimeHash),this.solveProgressTrackerStatus(t)}solveProgressTrackerStatus(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error(`Attempted to solve ProgressTracker ${t} that does not exist!`),!1;let r=this.progressTrackers[t];return(r.TotalCount<1||isNaN(r.TotalCount))&&(this.fable.log.error(`ProgressTracker ${r.Hash} has an invalid total count of operations (${r.TotalCount}! Setting it to the default of 100...`),r.TotalCount=100),r.CurrentCount<1?r.PercentComplete=0:r.PercentComplete=r.CurrentCount/r.TotalCount*100,!r.AllowTruePercentComplete&&r.PercentComplete>100&&(r.PercentComplete=100),this.progressTimes.updateTimeStampValue("CurrentTime"),r.CurrentTimeStamp=this.progressTimes.getTimeStampValue("CurrentTime"),r.ElapsedTime=r.CurrentTimeStamp-r.StartTimeStamp,r.EndTimeStamp>0&&(r.ElapsedTime=r.EndTimeStamp-r.StartTimeStamp),r.CurrentCount>0?r.AverageOperationTime=(r.CurrentTimeStamp-r.StartTimeStamp)/r.CurrentCount:r.AverageOperationTime=-1,r.AverageOperationTime>0?r.EstimatedCompletionTime=Math.max(r.TotalCount-r.CurrentCount,0)*r.AverageOperationTime:r.EstimatedCompletionTime=-1,r}updateProgressTracker(e,t){let r="string"==typeof e?e:"Default",n=parseInt(t);return isNaN(n)?(this.fable.log.warn(`Attempted to update ProgressTracker ${r} with an invalid number of operations!`),!1):(r in this.progressTrackers||this.createProgressTracker(100,r),this.progressTrackers[r].CurrentCount=n,this.solveProgressTrackerStatus(r))}incrementProgressTracker(e,t){let r="string"==typeof e?e:"Default",n=parseInt(t);return isNaN(n)&&(n=1),r in this.progressTrackers?(this.progressTrackers[r].StartTimeStamp<1&&(this.fable.log.warn(`Attempted to increment ProgressTracker ${r} but it was not started.. starting now.`),this.startProgressTracker(r)),this.progressTrackers[r].CurrentCount=this.progressTrackers[r].CurrentCount+n,this.solveProgressTrackerStatus(r)):(this.fable.log.warn(`Attempted to increment ProgressTracker ${r} but it did not exist.`),!1)}getProgressTrackerCompletedOperationCountString(e){let t="string"==typeof e?e:"Default";const r=this.progressTrackers[t];return r.CurrentCount<0?"none":r.CurrentCount<1?"0":`${r.CurrentCount}`}getProgressTrackerPercentCompleteString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1||e.CurrentCount<1?"0%":(e.EndTimeStamp,`${e.PercentComplete.toFixed(3)}%`)}return`ProgressTracker ${t} does not exist! No stats to display.`}getProgressTrackerStatusString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1?`ProgressTracker ${e.Hash} has not been started yet.`:e.CurrentCount<1&&e.EndTimeStamp<1?`ProgressTracker ${e.Hash} has no completed operations. ${this.progressTimes.formatTimeDuration(e.ElapsedTime)} have elapsed since it was started.`:e.EndTimeStamp<1?`ProgressTracker ${e.Hash} is ${e.PercentComplete.toFixed(3)}% completed - ${e.CurrentCount} / ${e.TotalCount} operations over ${this.progressTimes.formatTimeDuration(e.ElapsedTime)} (median ${this.progressTimes.formatTimeDuration(e.AverageOperationTime)} per). Estimated completion: ${this.progressTimes.formatTimeDuration(e.EstimatedCompletionTime)}`:`ProgressTracker ${e.Hash} is done. ${e.CurrentCount} / ${e.TotalCount} operations were completed in ${this.progressTimes.formatTimeDuration(e.ElapsedTime)} (median ${this.progressTimes.formatTimeDuration(e.AverageOperationTime)} per).`}return`ProgressTracker ${t} does not exist! No stats to display.`}logProgressTrackerStatus(e){this.fable.log.info(this.getProgressTrackerStatusString(e))}}},{"./Fable-Service-ProgressTracker/ProgressTracker.js":159,"fable-serviceproviderbase":53}],161:[function(e,t,r){(function(r){(function(){const n=e("fable-serviceproviderbase"),s=e("simple-get"),i=e("cookie");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.TraceLog=!1,(this.options.TraceLog||this.fable.TraceLog)&&(this.TraceLog=!0),this.dataFormat=this.fable.services.DataFormat,this.serviceType="RestClient",this.cookie=!1,this.prepareRequestOptions=e=>e}get simpleGet(){return s}prepareCookies(e){if(this.cookie){let t=this.cookie;"headers"in e||(e.headers={});let r=Object.keys(t);r.length>0&&(e.headers.cookie=i.serialize(r[0],t[r[0]]))}return e}preRequest(e){let t=this.prepareCookies(e);return"RestClientURLPrefix"in this.fable.settings&&(t.url=this.fable.settings.RestClientURLPrefix+t.url),this.prepareRequestOptions(t)}executeChunkedRequest(e,t){let r=this.preRequest(e);return r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug(`Beginning ${r.method} request to ${r.url} at ${r.RequestStartTime}`),s(r,((e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${r.method} connected in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms code ${n.statusCode}`)}let s="";n.on("data",(e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${r.method} data chunk size ${e.length}b received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,t)}ms`)}s+=e})),n.on("end",(()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`==> ${r.method} completed data size ${s.length}b received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms`)}return t(e,n,s)}))}))}executeChunkedRequestBinary(e,t){let n=this.preRequest(e);return n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug(`Beginning ${n.method} request to ${n.url} at ${n.RequestStartTime}`),n.json=!1,n.encoding=null,s(n,((e,s)=>{if(e)return t(e,s);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${n.method} connected in ${this.dataFormat.formatTimeDelta(n.RequestStartTime,e)}ms code ${s.statusCode}`)}let i=!1;s.on("data",(e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${n.method} data chunk size ${e.length}b received in ${this.dataFormat.formatTimeDelta(n.RequestStartTime,t)}ms`)}i=i?r.concat([i,e]):r.from(e)})),s.on("end",(()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`==> ${n.method} completed data size ${i.length}b received in ${this.dataFormat.formatTimeDelta(n.RequestStartTime,e)}ms`)}return t(e,s,i)}))}))}executeJSONRequest(e,t){e.json=!0;let r=this.preRequest(e);return"headers"in r||(r.headers={}),r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug(`Beginning ${r.method} JSON request to ${r.url} at ${r.RequestStartTime}`),s(r,((e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e JSON ${r.method} connected in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms code ${n.statusCode}`)}let s="";n.on("data",(e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e JSON ${r.method} data chunk size ${e.length}b received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,t)}ms`)}s+=e})),n.on("end",(()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`==> JSON ${r.method} completed - received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms`)}return t(e,n,JSON.parse(s))}))}))}getJSON(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeJSONRequest(r,t)}putJSON(e,t){return"object"!=typeof e.body?t(new Error("PUT JSON Error Invalid options object")):(e.method="PUT",this.executeJSONRequest(e,t))}postJSON(e,t){return"object"!=typeof e.body?t(new Error("POST JSON Error Invalid options object")):(e.method="POST",this.executeJSONRequest(e,t))}patchJSON(e,t){return"object"!=typeof e.body?t(new Error("PATCH JSON Error Invalid options object")):(e.method="PATCH",this.executeJSONRequest(e,t))}headJSON(e,t){return"object"!=typeof e.body?t(new Error("HEAD JSON Error Invalid options object")):(e.method="HEAD",this.executeJSONRequest(e,t))}delJSON(e,t){return e.method="DELETE",this.executeJSONRequest(e,t)}getRawText(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeChunkedRequest(r,t)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,cookie:27,"fable-serviceproviderbase":53,"simple-get":105}],162:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="Template",this.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},this.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},this.renderFunction=!1,this.templateString=!1}renderTemplate(e){return this.renderFunction(e)}templateFunction(){return this.renderTemplate.bind(this)}buildTemplateFunction(e,t){return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,(e=>`\\${this.templateEscapes[e]}`)).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,((e,t)=>`'+\n(${decodeURIComponent(t)})+\n'`)).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,((e,t)=>`';\n${decodeURIComponent(t)}\n;__p+='`))+"';\n",this.TemplateSource=`with(pTemplateDataObject||{}){\n${this.TemplateSource}}\n`,this.TemplateSource=`var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n${this.TemplateSource}return __p;\n`,this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"fable-serviceproviderbase":53}],163:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("async.waterfall"),i=e("async.eachlimit"),o=e("big.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.templates={},this.waterfall=s,this.eachLimit=i,this.bigNumber=o}extend(e){for(let t=0;t<(arguments.length<=1?0:arguments.length-1);t++){let r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if("object"==typeof r){let t=Object.keys(r);for(let n=0;n<t.length;n++)e[t[n]]=r[t[n]]}}return e}template(e,t){return this.fable.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}buildHashedTemplate(e,t,r){let n=this.fable.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}chunk(e,t,r){let n=[...e],s="number"==typeof t?t:0,i=void 0!==r?r:[];if(s<=0)return i;for(;n.length;)i.push(n.splice(0,s));return i}getInternalValueByHash(e){return this.getValueByHash(this.fable,e)}getValueByHash(e,t,r){let n=r;return void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),n.getValueByHash(e,t)}setValueByHash(e,t,r,n){let s=n;return void 0===s&&(this.manifest||(this.manifest=this.fable.newManyfest()),s=this.manifest),s.setValueByHash(e,t,r)}createValueArrayByHashes(e,t,r){let n=r;if(void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),!Array.isArray(t))return[];let s=[];for(let r=0;r<t.length;r++)s.push(n.getValueByHash(e,t[r]));return s}createValueArrayByHashesFromInternal(e,t){return this.createValueArrayByHashes(this.fable,e,t)}createValueArrayByHashParametersFromInternal(){if(arguments.length<2)return[];let e=Array.prototype.slice.call(arguments);return this.createValueArrayByHashes(this.fable,e)}createValueObjectByHashes(e,t,r){let n=r;if(void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),!Array.isArray(t))return{};let s={};for(let r=0;r<t.length;r++)s[t[r]]=n.getValueByHash(e,t[r]);return s}createValueObjectByHashesFromInternal(e,t){return this.createValueObjectByHashes(this.fable,e,t)}createValueObjectByHashParametersFromInternal(){let e=Array.prototype.slice.call(arguments);return this.createValueObjectByHashes(this.fable,e)}addressIsNullOrEmpty(e,t){if(this.manifest||(this.manifest=this.fable.newManyfest()),!this.manifest.checkAddressExists(e,t))return!0;let r=this.manifest.getValueByHash(e,t);return null===r||""===r}isoStringToDate(e){"Dates"in this.fable||this.fable.instantiateServiceProvider("Dates");let t=!1;try{t=this.fable.Dates.dayJS.utc(e)}catch(t){return this.fable.log.error(`Could not parse date string ${e} with dayJS.`),!1}return!!t&&t.toDate()}findFirstValueByStringIncludes(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let s=0;s<e.length;s++){let i=this.manifest.getValueByHash(e[s],t);if(i&&i.includes(r))return this.manifest.getValueByHash(e[s],n)}}findFirstValueByStringIncludesInternal(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let s=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByStringIncludes(s,t,r,n)}findFirstValueByExactMatch(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let s=0;s<e.length;s++){let i=this.manifest.getValueByHash(e[s],t);if(i&&i==r)return this.manifest.getValueByHash(e[s],n)}}findFirstValueByExactMatchInternal(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let s=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByExactMatch(s,t,r,n)}flattenArrayOfSolverInputs(e){if(!Array.isArray(e)&&("object"==typeof e&&(e=Object.values(e)),!e))return[];return e.flatMap((e=>Array.isArray(e)?e:"object"==typeof e?Object.values(e):[e]))}createArrayFromAbsoluteValues(){let e=[];for(let t=0;t<arguments.length;t++)e.push(arguments[t]);return e}}},{"async.eachlimit":1,"async.waterfall":15,"big.js":17,"fable-serviceproviderbase":53}],164:[function(e,t,r){class n{constructor(e,t){this.values=e instanceof n?e.values.concat([t]):t instanceof n?[e].concat(t.values):[e,t]}}t.exports=n},{}]},{},[132])(132)}));
|
|
11
|
+
var n=e("./WordTree.js"),s=e("./StringParser.js");t.exports=class{constructor(){this.WordTree=new n,this.StringParser=new s,this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r){return this.WordTree.addPattern(e,t,r)}parseString(e,t){return this.StringParser.parseString(e,this.ParseTree,t)}}},{"./StringParser.js":89,"./WordTree.js":90}],89:[function(e,t,r){t.exports=class{constructor(){}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&t.Pattern.hasOwnProperty(e))t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(t.Pattern.PatternEnd.hasOwnProperty(e)){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),t.Pattern.hasOwnProperty("Parse"))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else t.PatternStartNode.PatternEnd.hasOwnProperty(e)?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if(t.Pattern.hasOwnProperty("PatternEnd")){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),t.Pattern.PatternEnd.hasOwnProperty(e)&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],t.Pattern.hasOwnProperty("Parse")))return t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r),this.resetOutputBuffer(t)}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(t.ParseTree.hasOwnProperty(e))return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}parseString(e,t,r){let n=this.newParserState(t);for(var s=0;s<e.length;s++)this.parseCharacter(e[s],n,r);return this.flushOutputBuffer(n),n.Output}}},{}],90:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return e.hasOwnProperty(t)||(e[t]={}),e[t]}addEndChild(e,t){return e.hasOwnProperty("PatternEnd")||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPattern(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let n=this.ParseTree;for(var s=0;s<e.length;s++)n=this.addChild(n,e[s],s);n.hasOwnProperty("PatternEnd")||(n.PatternEnd={});let i="string"==typeof t?t:e;for(let e=0;e<i.length;e++)n=this.addEndChild(n,i[e],e);return n.PatternStartString=e,n.PatternEndString=i,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:e=>e,!0}}},{}],91:[function(e,t,r){var n,s,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{s="function"==typeof clearTimeout?clearTimeout:a}catch(e){s=a}}();var u,c=[],h=!1,f=-1;function p(){h&&u&&(h=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!h){var e=l(p);h=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,h=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===a||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new g(e,t)),1!==c.length||h||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],92:[function(e,t,r){(function(e){(function(){!function(n){var s="object"==typeof r&&r&&!r.nodeType&&r,i="object"==typeof t&&t&&!t.nodeType&&t,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var a,l,u=2147483647,c=36,h=1,f=26,p=38,d=700,g=72,y=128,m="-",b=/^xn--/,v=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=c-h,w=Math.floor,x=String.fromCharCode;function E(e){throw new RangeError(P[e])}function k(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function A(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+k((e=e.replace(S,".")).split("."),t).join(".")}function O(e){for(var t,r,n=[],s=0,i=e.length;s<i;)(t=e.charCodeAt(s++))>=55296&&t<=56319&&s<i?56320==(64512&(r=e.charCodeAt(s++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),s--):n.push(t);return n}function _(e){return k(e,(function(e){var t="";return e>65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)})).join("")}function j(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,r){var n=0;for(e=r?w(e/d):e>>1,e+=w(e/t);e>T*f>>1;n+=c)e=w(e/T);return w(n+(T+1)*e/(e+p))}function R(e){var t,r,n,s,i,o,a,l,p,d,b,v=[],S=e.length,P=0,T=y,x=g;for((r=e.lastIndexOf(m))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&E("not-basic"),v.push(e.charCodeAt(n));for(s=r>0?r+1:0;s<S;){for(i=P,o=1,a=c;s>=S&&E("invalid-input"),((l=(b=e.charCodeAt(s++))-48<10?b-22:b-65<26?b-65:b-97<26?b-97:c)>=c||l>w((u-P)/o))&&E("overflow"),P+=l*o,!(l<(p=a<=x?h:a>=x+f?f:a-x));a+=c)o>w(u/(d=c-p))&&E("overflow"),o*=d;x=N(P-i,t=v.length+1,0==i),w(P/t)>u-T&&E("overflow"),T+=w(P/t),P%=t,v.splice(P++,0,T)}return _(v)}function M(e){var t,r,n,s,i,o,a,l,p,d,b,v,S,P,T,k=[];for(v=(e=O(e)).length,t=y,r=0,i=g,o=0;o<v;++o)(b=e[o])<128&&k.push(x(b));for(n=s=k.length,s&&k.push(m);n<v;){for(a=u,o=0;o<v;++o)(b=e[o])>=t&&b<a&&(a=b);for(a-t>w((u-r)/(S=n+1))&&E("overflow"),r+=(a-t)*S,t=a,o=0;o<v;++o)if((b=e[o])<t&&++r>u&&E("overflow"),b==t){for(l=r,p=c;!(l<(d=p<=i?h:p>=i+f?f:p-i));p+=c)T=l-d,P=c-d,k.push(x(j(d+T%P,0))),l=w(T/P);k.push(x(j(l,0))),i=N(r,S,n==s),r=0,++n}++r,++t}return k.join("")}if(a={version:"1.4.1",ucs2:{decode:O,encode:_},decode:R,encode:M,toASCII:function(e){return A(e,(function(e){return v.test(e)?"xn--"+M(e):e}))},toUnicode:function(e){return A(e,(function(e){return b.test(e)?R(e.slice(4).toLowerCase()):e}))}},s&&i)if(t.exports==s)i.exports=a;else for(l in a)a.hasOwnProperty(l)&&(s[l]=a[l]);else n.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],93:[function(e,t,r){var n=String.prototype.replace,s=/%20/g,i="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(e){return n.call(e,s,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:o}},{}],94:[function(e,t,r){var n=e("./stringify"),s=e("./parse"),i=e("./formats");t.exports={formats:i,parse:s,stringify:n}},{"./formats":93,"./parse":95,"./stringify":96}],95:[function(e,t,r){var n=e("./utils"),s=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=a?i.slice(0,a.index):i,c=[];if(u){if(!r.plainObjects&&s.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var h=0;r.depth>0&&null!==(a=o.exec(i))&&h<r.depth;){if(h+=1,!r.plainObjects&&s.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+i.slice(a.index)+"]"),function(e,t,r,n){for(var s=n?t:l(t,r),i=e.length-1;i>=0;--i){var o,a=e[i];if("[]"===a&&r.parseArrays)o=[].concat(s);else{o=r.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(u,10);r.parseArrays||""!==u?!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[])[c]=s:"__proto__"!==u&&(o[u]=s):o={0:s}}s=o}return s}(c,t,r,n)}};t.exports=function(e,t){var r=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var r,u={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,f=c.split(t.delimiter,h),p=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?d="utf-8":"utf8=%26%2310003%3B"===f[r]&&(d="iso-8859-1"),p=r,r=f.length);for(r=0;r<f.length;++r)if(r!==p){var g,y,m=f[r],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;-1===v?(g=t.decoder(m,o.decoder,d,"key"),y=t.strictNullHandling?null:""):(g=t.decoder(m.slice(0,v),o.decoder,d,"key"),y=n.maybeMap(l(m.slice(v+1),t),(function(e){return t.decoder(e,o.decoder,d,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===d&&(y=a(y)),m.indexOf("[]=")>-1&&(y=i(y)?[y]:y),s.call(u,g)?u[g]=n.combine(u[g],y):u[g]=y}return u}(e,r):e,h=r.plainObjects?Object.create(null):{},f=Object.keys(c),p=0;p<f.length;++p){var d=f[p],g=u(d,c[d],r,"string"==typeof e);h=n.merge(h,g,r)}return!0===r.allowSparse?h:n.compact(h)}},{"./utils":97}],96:[function(e,t,r){var n=e("side-channel"),s=e("./utils"),i=e("./formats"),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,l(t)?t:[t])},h=Date.prototype.toISOString,f=i.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:s.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,o,a,u,h,f,g,y,m,b,v,S,P,T){for(var w,x=t,E=T,k=0,A=!1;void 0!==(E=E.get(d))&&!A;){var O=E.get(t);if(k+=1,void 0!==O){if(O===k)throw new RangeError("Cyclic object value");A=!0}void 0===E.get(d)&&(k=0)}if("function"==typeof f?x=f(r,x):x instanceof Date?x=m(x):"comma"===i&&l(x)&&(x=s.maybeMap(x,(function(e){return e instanceof Date?m(e):e}))),null===x){if(a)return h&&!S?h(r,p.encoder,P,"key",b):r;x=""}if("string"==typeof(w=x)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||s.isBuffer(x))return h?[v(S?r:h(r,p.encoder,P,"key",b))+"="+v(h(x,p.encoder,P,"value",b))]:[v(r)+"="+v(String(x))];var _,j=[];if(void 0===x)return j;if("comma"===i&&l(x))S&&h&&(x=s.maybeMap(x,h)),_=[{value:x.length>0?x.join(",")||null:void 0}];else if(l(f))_=f;else{var N=Object.keys(x);_=g?N.sort(g):N}for(var R=o&&l(x)&&1===x.length?r+"[]":r,M=0;M<_.length;++M){var L=_[M],C="object"==typeof L&&void 0!==L.value?L.value:x[L];if(!u||null!==C){var D=l(x)?"function"==typeof i?i(R,L):R:R+(y?"."+L:"["+L+"]");T.set(t,k);var $=n();$.set(d,T),c(j,e(C,D,i,o,a,u,"comma"===i&&S&&l(x)?null:h,f,g,y,m,b,v,S,P,$))}}return j};t.exports=function(e,t){var r,s=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!o.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],s=p.filter;return("function"==typeof e.filter||l(e.filter))&&(s=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:s,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof u.filter?s=(0,u.filter)("",s):l(u.filter)&&(r=u.filter);var h,f=[];if("object"!=typeof s||null===s)return"";h=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=a[h];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===d&&t&&t.commaRoundTrip;r||(r=Object.keys(s)),u.sort&&r.sort(u.sort);for(var m=n(),b=0;b<r.length;++b){var v=r[b];u.skipNulls&&null===s[v]||c(f,g(s[v],v,d,y,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,m))}var S=f.join(u.delimiter),P=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?P+="utf8=%26%2310003%3B&":P+="utf8=%E2%9C%93&"),S.length>0?P+S:""}},{"./formats":93,"./utils":97,"side-channel":103}],97:[function(e,t,r){var n=e("./formats"),s=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var s=t[n],o=s.obj[s.prop],a=Object.keys(o),l=0;l<a.length;++l){var u=a[l],c=o[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:o,prop:u}),r.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],s=0;s<r.length;++s)void 0!==r[s]&&n.push(r[s]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,s,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",u=0;u<a.length;++u){var c=a.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===n.RFC1738&&(40===c||41===c)?l+=a.charAt(u):c<128?l+=o[c]:c<2048?l+=o[192|c>>6]+o[128|63&c]:c<55296||c>=57344?l+=o[224|c>>12]+o[128|c>>6&63]+o[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(u)),l+=o[240|c>>18]+o[128|c>>12&63]+o[128|c>>6&63]+o[128|63&c])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!s.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return i(t)&&!i(r)&&(o=a(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(s.call(t,i)){var o=t[i];o&&"object"==typeof o&&r&&"object"==typeof r?t[i]=e(o,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var o=r[i];return s.call(t,i)?t[i]=e(t[i],o,n):t[i]=o,t}),o)}}},{"./formats":93}],98:[function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c<u;++c){var h,f,p,d,g=e[c].replace(a,"%20"),y=g.indexOf(r);y>=0?(h=g.substr(0,y),f=g.substr(y+1)):(h=g,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),n(o,p)?s(o[p])?o[p].push(d):o[p]=[o[p],d]:o[p]=d}return o};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],99:[function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(o(e),(function(o){var a=encodeURIComponent(n(o))+r;return s(e[o])?i(e[o],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[o]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],100:[function(e,t,r){r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":98,"./encode":99}],101:[function(e,t,r){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),o.prototype=Object.create(s.prototype),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:20}],102:[function(e,t,r){var n=e("get-intrinsic"),s=e("define-data-property"),i=e("has-property-descriptors")(),o=e("gopd"),a=e("es-errors/type"),l=n("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&o){var c=o(e,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(i?s(e,"length",t,!0,!0):s(e,"length",t)),e}},{"define-data-property":36,"es-errors/type":42,"get-intrinsic":63,gopd:64,"has-property-descriptors":65}],103:[function(e,t,r){var n=e("get-intrinsic"),s=e("call-bind/callBound"),i=e("object-inspect"),o=e("es-errors/type"),a=n("%WeakMap%",!0),l=n("%Map%",!0),u=s("WeakMap.prototype.get",!0),c=s("WeakMap.prototype.set",!0),h=s("WeakMap.prototype.has",!0),f=s("Map.prototype.get",!0),p=s("Map.prototype.set",!0),d=s("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};t.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new o("Side channel does not contain "+i(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(l){if(t)return f(t,n)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return h(e,n)}else if(l){if(t)return d(t,n)}else if(r)return function(e,t){return!!g(e,t)}(r,n);return!1},set:function(n,s){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),c(e,n,s)):l?(t||(t=new l),p(t,n,s)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,s))}};return n}},{"call-bind/callBound":25,"es-errors/type":42,"get-intrinsic":63,"object-inspect":85}],104:[function(e,t,r){(function(e){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=function(t,r){var n=[];t.on("data",(function(e){n.push(e)})),t.once("end",(function(){r&&r(null,e.concat(n)),r=null})),t.once("error",(function(e){r&&r(e),r=null}))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20}],105:[function(e,t,r){(function(r){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */t.exports=h;const n=e("simple-concat"),s=e("decompress-response"),i=e("http"),o=e("https"),a=e("once"),l=e("querystring"),u=e("url"),c=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;function h(e,t){if(e=Object.assign({maxRedirects:10},"string"==typeof e?{url:e}:e),t=a(t),e.url){const{hostname:t,port:r,protocol:n,auth:s,path:i}=u.parse(e.url);delete e.url,t||r||n||s?Object.assign(e,{hostname:t,port:r,protocol:n,auth:s,path:i}):e.path=i}const n={"accept-encoding":"gzip, deflate"};let f;e.headers&&Object.keys(e.headers).forEach((t=>n[t.toLowerCase()]=e.headers[t])),e.headers=n,e.body?f=e.json&&!c(e.body)?JSON.stringify(e.body):e.body:e.form&&(f="string"==typeof e.form?e.form:l.stringify(e.form),e.headers["content-type"]="application/x-www-form-urlencoded"),f&&(e.method||(e.method="POST"),c(f)||(e.headers["content-length"]=r.byteLength(f)),e.json&&!e.form&&(e.headers["content-type"]="application/json")),delete e.body,delete e.form,e.json&&(e.headers.accept="application/json"),e.method&&(e.method=e.method.toUpperCase());const p=e.hostname,d=("https:"===e.protocol?o:i).request(e,(r=>{if(!1!==e.followRedirects&&r.statusCode>=300&&r.statusCode<400&&r.headers.location){e.url=r.headers.location,delete e.headers.host,r.resume();const n=u.parse(e.url).hostname;return null!==n&&n!==p&&(delete e.headers.cookie,delete e.headers.authorization),"POST"===e.method&&[301,302].includes(r.statusCode)&&(e.method="GET",delete e.headers["content-length"],delete e.headers["content-type"]),0==e.maxRedirects--?t(new Error("too many redirects")):h(e,t)}const n="function"==typeof s&&"HEAD"!==e.method;t(null,n?s(r):r)}));return d.on("timeout",(()=>{d.abort(),t(new Error("Request timed out"))})),d.on("error",t),c(f)?f.on("error",t).pipe(d):d.end(f),d}h.concat=(e,t)=>h(e,((r,s)=>{if(r)return t(r);n(s,((r,n)=>{if(r)return t(r);if(e.json)try{n=JSON.parse(n.toString())}catch(r){return t(r,s,n)}t(null,s,n)}))})),["get","post","put","patch","head","delete"].forEach((e=>{h[e]=(t,r)=>("string"==typeof t&&(t={url:t}),h(Object.assign({method:e.toUpperCase()},t),r))}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,"decompress-response":18,http:106,https:70,once:86,querystring:100,"simple-concat":104,url:127}],106:[function(e,t,r){(function(t){(function(){var n=e("./lib/request"),s=e("./lib/response"),i=e("xtend"),o=e("builtin-status-codes"),a=e("url"),l=r;l.request=function(e,r){e="string"==typeof e?a.parse(e):i(e);var s=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||s,l=e.hostname||e.host,u=e.port,c=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?o+"//"+l:"")+(u?":"+u:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return r&&h.on("response",r),h},l.get=function(e,t){var r=l.request(e,t);return r.end(),r},l.ClientRequest=n,l.IncomingMessage=s.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":108,"./lib/response":109,"builtin-status-codes":21,url:127,xtend:130}],107:[function(e,t,r){(function(e){(function(){var t;function n(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function s(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function i(e){return"function"==typeof e}r.fetch=i(e.fetch)&&i(e.ReadableStream),r.writableStream=i(e.WritableStream),r.abortController=i(e.AbortController),r.arraybuffer=r.fetch||s("arraybuffer"),r.msstream=!r.fetch&&s("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&s("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&i(n().overrideMimeType),t=null}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],108:[function(e,t,r){(function(r,n,s){(function(){var i=e("./capability"),o=e("inherits"),a=e("./response"),l=e("readable-stream"),u=a.IncomingMessage,c=a.readyStates;var h=t.exports=function(e){var t,r=this;l.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+s.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,n),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};o(h,l.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===f.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var s=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(s["content-type"]||{}).value||""}));var a=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach((function(e){a.push([t,e])})):a.push([t,r])})),"fetch"===e._mode){var l=null;if(i.abortController){var u=new AbortController;l=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:a,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{h.send(o)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype._resetTimers=function(e){var t=this;n.clearTimeout(t._socketTimer),t._socketTimer=null,e?(n.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=n.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),l.Writable.prototype.end.call(this,e,t,r)},h.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":107,"./response":109,_process:91,buffer:20,inherits:72,"readable-stream":124}],109:[function(e,t,r){(function(t,n,s){(function(){var i=e("./capability"),o=e("inherits"),a=e("readable-stream"),l=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=r.IncomingMessage=function(e,r,n,o){var l=this;if(a.Readable.call(l),l._mode=n,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){t.nextTick((function(){l.emit("close")}))})),"fetch"===n){if(l._fetchResponse=r,l.url=r.url,l.statusCode=r.status,l.statusMessage=r.statusText,r.headers.forEach((function(e,t){l.headers[t.toLowerCase()]=e,l.rawHeaders.push(t,e)})),i.writableStream){var u=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){l._destroyed?r():l.push(s.from(e))?t():l._resumeFetch=t}))},close:function(){o(!0),l._destroyed||l.push(null)},abort:function(e){o(!0),l._destroyed||l.emit("error",e)}});try{return void r.body.pipeTo(u).catch((function(e){o(!0),l._destroyed||l.emit("error",e)}))}catch(d){}}var c=r.body.getReader();function p(){c.read().then((function(e){l._destroyed||(o(e.done),e.done?l.push(null):(l.push(s.from(e.value)),p()))})).catch((function(e){o(!0),l._destroyed||l.emit("error",e)}))}p()}else{if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===l.headers[r]&&(l.headers[r]=[]),l.headers[r].push(t[2])):void 0!==l.headers[r]?l.headers[r]+=", "+t[2]:l.headers[r]=t[2],l.rawHeaders.push(t[1],t[2])}})),l._charset="x-user-defined",!i.overrideMimeType){var h=l.rawHeaders["mime-type"];if(h){var f=h.match(/;\s*charset=([^;])(;|$)/);f&&(l._charset=f[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};o(u,a.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,i=null;switch(t._mode){case"text":if((i=r.responseText).length>t._pos){var o=i.substr(t._pos);if("x-user-defined"===t._charset){for(var a=s.alloc(o.length),u=0;u<o.length;u++)a[u]=255&o.charCodeAt(u);t.push(a)}else t.push(o,t._charset);t._pos=i.length}break;case"arraybuffer":if(r.readyState!==l.DONE||!r.response)break;i=r.response,t.push(s.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==l.LOADING||!i)break;t.push(s.from(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==l.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>t._pos&&(t.push(s.from(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){e(!0),t.push(null)},c.readAsArrayBuffer(i)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":107,_process:91,buffer:20,inherits:72,"readable-stream":124}],110:[function(e,t,r){var n={};function s(e,t,r){r||(r=Error);var s=function(e){var r,n;function s(r,n,s){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,s))||this}return n=e,(r=s).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,s}(r);s.prototype.name=r.name,s.prototype.code=e,n[e]=s}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}s("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,s,o,a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(i(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],111:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var s=e("./_stream_readable"),i=e("./_stream_writable");e("inherits")(u,s);for(var o=n(i.prototype),a=0;a<o.length;a++){var l=o[a];u.prototype[l]||(u.prototype[l]=i.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":113,"./_stream_writable":115,_process:91,inherits:72}],112:[function(e,t,r){t.exports=s;var n=e("./_stream_transform");function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}e("inherits")(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":114,inherits:72}],113:[function(e,t,r){(function(r,n){(function(){var s;t.exports=E,E.ReadableState=x;e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),a=e("buffer").Buffer,l=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,c=e("util");u=c&&c.debuglog?c.debuglog("stream"):function(){};var h,f,p,d=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),y=e("./internal/streams/state").getHighWaterMark,m=e("../errors").codes,b=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,S=m.ERR_METHOD_NOT_IMPLEMENTED,P=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(E,o);var T=g.errorOrDestroy,w=["error","close","destroy","pause","resume"];function x(t,r,n){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof s),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function E(t){if(s=s||e("./_stream_duplex"),!(this instanceof E))return new E(t);var r=this instanceof s;this._readableState=new x(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function k(e,t,r,n,s){u("readableAddChunk",t);var i,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}(e,o);else if(s||(i=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(o,t)),i)T(e,i);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)o.endEmitted?T(e,new P):A(e,o,t,!0);else if(o.ended)T(e,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?A(e,o,t,!1):R(e,o)):A(e,o,t,!1)}else n||(o.reading=!1,R(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),R(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=g.destroy,E.prototype._undestroy=g.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),k(this,e,t,!1,r)},E.prototype.unshift=function(e){return k(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var r=new h(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,s="";null!==n;)s+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var O=1073741824;function _(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(N,e))}function N(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function R(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function D(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(V,t,e))}function V(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):j(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&I(this),null;var n,s=t.needReadable;return u("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",s=!0),t.ended||t.reading?u("reading or ended",s=!1):s&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=_(r,t))),null===(n=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&I(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){T(this,new S("_read()"))},E.prototype.pipe=function(e,t){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,u("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function a(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",a),n.removeListener("end",l),n.removeListener("end",y),n.removeListener("data",f),h=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}s.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,$(e))}}(n);e.on("drain",c);var h=!1;function f(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==B(s.pipes,e))&&!h&&(u("false write response, pause",s.awaitDrain),s.awaitDrain++),n.pause())}function p(t){u("onerror",t),y(),e.removeListener("error",p),0===i(e,"error")&&T(e,t)}function d(){e.removeListener("finish",g),y()}function g(){u("onfinish"),e.removeListener("close",d),y()}function y(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",g),e.emit("pipe",n),s.flowing||(u("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var o=B(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),s=this._readableState;return"data"===e?(s.readableListening=this.listenerCount("readable")>0,!1!==s.flowing&&this.resume()):"readable"===e&&(s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,u("on readable",s.length,s.reading),s.length?j(this):s.reading||r.nextTick(C,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(L,this),n},E.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(L,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(D,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(u("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s)||(r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause()))})),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<w.length;i++)e.on(w[i],this.emit.bind(this,w[i]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=e("./internal/streams/async_iterator")),f(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=F,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,r){return void 0===p&&(p=e("./internal/streams/from")),p(E,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":110,"./_stream_duplex":111,"./internal/streams/async_iterator":116,"./internal/streams/buffer_list":117,"./internal/streams/destroy":118,"./internal/streams/from":120,"./internal/streams/state":122,"./internal/streams/stream":123,_process:91,buffer:20,events:44,inherits:72,"string_decoder/":125,util:18}],114:[function(e,t,r){t.exports=c;var n=e("../errors").codes,s=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new s("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":110,"./_stream_duplex":111,inherits:72}],115:[function(e,t,r){(function(r,n){(function(){function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=E,E.WritableState=x;var o={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),l=e("buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,h=e("./internal/streams/destroy"),f=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,S=p.ERR_STREAM_WRITE_AFTER_END,P=p.ERR_UNKNOWN_ENCODING,T=h.errorOrDestroy;function w(){}function x(t,n,o){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=n instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,s=n.sync,i=n.writecb;if("function"!=typeof i)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,s,i){--t.pendingcb,n?(r.nextTick(i,s),r.nextTick(N,e,t),e._writableState.errorEmitted=!0,T(e,s)):(i(s),e._writableState.errorEmitted=!0,T(e,s),N(e,t))}(e,n,s,t,i);else{var o=_(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),s?r.nextTick(A,e,n,o,i):A(e,n,o,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function E(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!c.call(E,this))return new E(t);this._writableState=new x(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function k(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),N(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,l=!0;r;)i[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;i.allBuffers=l,k(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(k(e,t,!1,t.objectMode?1:u.length,u,c,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&T(e,r),t.prefinished=!0,e.emit("prefinish"),N(e,t)}))}function N(e,t){var n=_(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var s=e._readableState;(!s||s.autoDestroy&&s.endEmitted)&&e.destroy()}return n}e("inherits")(E,a),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===E&&(e&&e._writableState instanceof x)}})):c=function(e){return e instanceof this},E.prototype.pipe=function(){T(this,new m)},E.prototype.write=function(e,t,n){var s,i=this._writableState,o=!1,a=!i.objectMode&&(s=e,l.isBuffer(s)||s instanceof u);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=w),i.ending?function(e,t){var n=new S;T(e,n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,s){var i;return null===n?i=new v:"string"==typeof n||t.objectMode||(i=new d("chunk",["string","Buffer"],n)),!i||(T(e,i),r.nextTick(s,i),!1)}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,a,n,s,i);return u}(this,i,a,e,t,n)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new P(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new g("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var s=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||function(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,s,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=h.destroy,E.prototype._undestroy=h.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":110,"./_stream_duplex":111,"./internal/streams/destroy":118,"./internal/streams/state":122,"./internal/streams/stream":123,_process:91,buffer:20,inherits:72,"util-deprecate":128}],116:[function(e,t,r){(function(r){(function(){var n;function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[o];if(null!==t){var r=e[f].read();null!==r&&(e[c]=null,e[o]=null,e[a]=null,t(p(r,!1)))}}function g(e){r.nextTick(d,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((s(n={get stream(){return this[f]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[l]?n(e[l]):t(p(void 0,!0))}))}));var n,s=this[c];if(s)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[u]?r(p(void 0,!0)):t[h](r,n)}),n)}}(s,this));else{var i=this[f].read();if(null!==i)return Promise.resolve(p(i,!1));n=new Promise(this[h])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),s(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);t.exports=function(e){var t,r=Object.create(m,(s(t={},f,{value:e,writable:!0}),s(t,o,{value:null,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,l,{value:null,writable:!0}),s(t,u,{value:e._readableState.endEmitted,writable:!0}),s(t,h,{value:function(e,t){var n=r[f].read();n?(r[c]=null,r[o]=null,r[a]=null,e(p(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[c]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[c]=null,r[o]=null,r[a]=null,t(e)),void(r[l]=e)}var n=r[o];null!==n&&(r[c]=null,r[o]=null,r[a]=null,n(p(void 0,!0))),r[u]=!0})),e.on("readable",g.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":119,_process:91}],117:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var l=e("buffer").Buffer,u=e("util").inspect,c=u&&u.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,r,n,s=l.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=s,n=o,l.prototype.copy.call(t,r,n),o+=i.data.length,i=i.next;return s}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var s=t.data,i=e>s.length?s.length:e;if(i===s.length?n+=s:n+=s.slice(0,e),0==(e-=i)){i===s.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,i=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,i),0==(e-=i)){i===s.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(i));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return u(this,s(s({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:20,util:18}],118:[function(e,t,r){(function(e){(function(){function r(e,t){s(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}t.exports={destroy:function(t,i){var o=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(s,this,t)):e.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):i?(e.nextTick(n,o),i(t)):e.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:91}],119:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];e.apply(this,n)}}}(i||s);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||c()},u=t._writableState&&t._writableState.finished,c=function(){a=!1,u=!0,o||i.call(t)},h=t._readableState&&t._readableState.endEmitted,f=function(){o=!1,h=!0,a||i.call(t)},p=function(e){i.call(t,e)},d=function(){var e;return o&&!h?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},g=function(){t.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",c),t.on("abort",d),t.req?g():t.on("request",g)),t.on("end",f),t.on("finish",c),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",c),t.removeListener("abort",d),t.removeListener("request",g),t.req&&t.req.removeListener("finish",c),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",c),t.removeListener("end",f),t.removeListener("error",p),t.removeListener("close",d)}}},{"../../../errors":110}],120:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],121:[function(e,t,r){var n;var s=e("../../../errors").codes,i=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];var c,h=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new i("streams");var f=r.map((function(t,s){var i=s<r.length-1;return function(t,r,s,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:s},(function(e){if(e)return i(e);a=!0,i()}));var l=!1;return function(e){if(!a&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void i(e||new o("pipe"))}}(t,i,s>0,(function(e){c||(c=e),e&&f.forEach(l),i||(f.forEach(l),h(c))}))}));return r.reduce(u)}},{"../../../errors":110,"./end-of-stream":119}],122:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,s){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,s,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(s?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},{"../../../errors":110}],123:[function(e,t,r){t.exports=e("events").EventEmitter},{events:44}],124:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":111,"./lib/_stream_passthrough.js":112,"./lib/_stream_readable.js":113,"./lib/_stream_transform.js":114,"./lib/_stream_writable.js":115,"./lib/internal/streams/end-of-stream.js":119,"./lib/internal/streams/pipeline.js":121}],125:[function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":101}],126:[function(e,t,r){(function(t,n){(function(){var s=e("process/browser.js").nextTick,i=Function.prototype.apply,o=Array.prototype.slice,a={},l=0;function u(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new u(i.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new u(i.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,s((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":91,timers:126}],127:[function(e,t,r){var n=e("punycode");function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),c=["%","/","?",";","#"].concat(u),h=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=e("qs");function b(e,t,r){if(e&&"object"==typeof e&&e instanceof s)return e;var n=new s;return n.parse(e,t,r),n}s.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var s=e.indexOf("?"),o=-1!==s&&s<e.indexOf("#")?"?":"#",l=e.split(o);l[0]=l[0].replace(/\\/g,"/");var b=e=l.join(o);if(b=b.trim(),!r&&1===e.split("#").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=i.exec(b);if(S){var P=(S=S[0]).toLowerCase();this.protocol=P,b=b.substr(S.length)}if(r||S||b.match(/^\/\/[^@/]+@[^@/]+/)){var T="//"===b.substr(0,2);!T||S&&g[S]||(b=b.substr(2),this.slashes=!0)}if(!g[S]&&(T||S&&!y[S])){for(var w,x,E=-1,k=0;k<h.length;k++){-1!==(A=b.indexOf(h[k]))&&(-1===E||A<E)&&(E=A)}-1!==(x=-1===E?b.lastIndexOf("@"):b.lastIndexOf("@",E))&&(w=b.slice(0,x),b=b.slice(x+1),this.auth=decodeURIComponent(w)),E=-1;for(k=0;k<c.length;k++){var A;-1!==(A=b.indexOf(c[k]))&&(-1===E||A<E)&&(E=A)}-1===E&&(E=b.length),this.host=b.slice(0,E),b=b.slice(E),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var _=this.hostname.split(/\./),j=(k=0,_.length);k<j;k++){var N=_[k];if(N&&!N.match(f)){for(var R="",M=0,L=N.length;M<L;M++)N.charCodeAt(M)>127?R+="x":R+=N[M];if(!R.match(f)){var C=_.slice(0,k),D=_.slice(k+1),$=N.match(p);$&&(C.push($[1]),D.unshift($[2])),D.length&&(b="/"+D.join(".")+b),this.hostname=C.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+F,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!d[P])for(k=0,j=u.length;k<j;k++){var V=u[k];if(-1!==b.indexOf(V)){var B=encodeURIComponent(V);B===V&&(B=escape(V)),b=b.split(V).join(B)}}var U=b.indexOf("#");-1!==U&&(this.hash=b.substr(U),b=b.slice(0,U));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[P]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}return this.href=this.format(),this},s.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",s=!1,i="";this.host?s=e+this.host:this.hostname&&(s=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==s?(s="//"+(s||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):s||(s=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),t+s+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(o=o.replace("#","%23"))+n},s.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},s.prototype.resolveObject=function(e){if("string"==typeof e){var t=new s;t.parse(e,!1,!0),e=t}for(var r=new s,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),l=0;l<a.length;l++){var u=a[l];"protocol"!==u&&(r[u]=e[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var c=Object.keys(e),h=0;h<c.length;h++){var f=c[h];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",m=r.search||"";r.path=d+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),S=v||b||r.host&&e.pathname,P=S,T=r.pathname&&r.pathname.split("/")||[],w=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),S=S&&(""===p[0]||""===T[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,T=p;else if(p.length)T||(T=[]),T.pop(),T=T.concat(p),r.search=e.search,r.query=e.query;else if(null!=e.search){if(w)r.host=T.shift(),r.hostname=r.host,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=T.slice(-1)[0],E=(r.host||e.host||T.length>1)&&("."===x||".."===x)||""===x,k=0,A=T.length;A>=0;A--)"."===(x=T[A])?T.splice(A,1):".."===x?(T.splice(A,1),k++):k&&(T.splice(A,1),k--);if(!S&&!P)for(;k--;k)T.unshift("..");!S||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),E&&"/"!==T.join("/").substr(-1)&&T.push("");var O,_=""===T[0]||T[0]&&"/"===T[0].charAt(0);w&&(r.hostname=_?"":T.length?T.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(S=S||r.host&&T.length)&&!_&&T.unshift(""),T.length>0?r.pathname=T.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},s.prototype.parseHost=function(){var e=this.host,t=o.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},r.parse=b,r.resolve=function(e,t){return b(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},r.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof s?e.format():s.prototype.format.call(e)},r.Url=s},{punycode:92,qs:94}],128:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],129:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),s=e[e.length-1];return"function"==typeof n&&n!==s&&Object.keys(s).forEach((function(e){n[e]=s[e]})),n}}},{}],130:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var s in r)n.call(r,s)&&(e[s]=r[s])}return e};var n=Object.prototype.hasOwnProperty},{}],131:[function(e,t,r){t.exports={name:"fable",version:"3.1.22",description:"A service dependency injection, configuration and logging library.",main:"source/Fable.js",scripts:{start:"node source/Fable.js",coverage:"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",test:"./node_modules/.bin/mocha -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":'docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/fable" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" fable-image:local',"docker-dev-shell":"docker exec -it fable-dev /bin/bash",tests:"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},browser:{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},repository:{type:"git",url:"https://github.com/stevenvelozo/fable.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable/issues"},homepage:"https://github.com/stevenvelozo/fable",devDependencies:{quackage:"^1.0.42"},dependencies:{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1",cachetrax:"^1.0.4",cookie:"^1.0.2","data-arithmatic":"^1.0.7",dayjs:"^1.11.18","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11",manyfest:"^1.0.42","simple-get":"^4.0.1"}}},{}],132:[function(e,t,r){const n=e("fable-settings"),s=e("fable-uuid"),i=e("fable-log"),o=e("../package.json"),a=e("fable-serviceproviderbase");class l extends a.CoreServiceProviderBase{constructor(t){super(t),this.serviceType="ServiceManager",this._Package=o,this.serviceTypes=[],this.servicesMap={},this.services={},this.serviceClasses={},this.extraServiceInitialization=!1,this.LogNoisiness=0,this.SettingsManager=new n(t),this.SettingsManager=this.SettingsManager,this.UUID=new s(this.SettingsManager.settings),this.Logging=new i(this.SettingsManager.settings),this.Logging.initialize(),this.ServiceManager=this,this.serviceManager=this,this.connectFable(this),this.connectPreinitServiceProviderInstance(this.UUID),this.connectPreinitServiceProviderInstance(this.Logging),this.connectPreinitServiceProviderInstance(this.SettingsManager),this.addAndInstantiateServiceType("EnvironmentData",e("./services/Fable-Service-EnvironmentData.js")),this.addServiceType("Template",e("./services/Fable-Service-Template.js")),this.addServiceType("MetaTemplate",e("./services/Fable-Service-MetaTemplate.js")),this.addServiceType("Anticipate",e("./services/Fable-Service-Anticipate.js")),this.addAndInstantiateServiceType("Dates",e("./services/Fable-Service-DateManipulation.js")),this.addAndInstantiateServiceType("DataFormat",e("./services/Fable-Service-DataFormat.js")),this.addAndInstantiateServiceType("DataGeneration",e("./services/Fable-Service-DataGeneration.js")),this.addAndInstantiateServiceType("Utility",e("./services/Fable-Service-Utility.js")),this.addAndInstantiateServiceType("Logic",e("./services/Fable-Service-Logic.js")),this.addAndInstantiateServiceType("Math",e("./services/Fable-Service-Math.js")),this.addServiceType("ExpressionParser",e("./services/Fable-Service-ExpressionParser.js")),this.addServiceType("RestClient",e("./services/Fable-Service-RestClient.js")),this.addServiceType("Manifest",e("manyfest")),this.addServiceType("ObjectCache",e("cachetrax")),this.addAndInstantiateServiceType("ProgressTime",e("./services/Fable-Service-ProgressTime.js")),this.addServiceType("ProgressTrackerSet",e("./services/Fable-Service-ProgressTrackerSet.js")),this.addServiceType("Operation",e("./services/Fable-Service-Operation.js")),this.addServiceType("CSVParser",e("./services/Fable-Service-CSVParser.js")),this.addServiceType("FilePersistence",e("./services/Fable-Service-FilePersistence.js"))}get isFable(){return!0}get settings(){return this.SettingsManager.settings}get settingsManager(){return this.SettingsManager}getUUID(){return this.UUID.getUUID()}newAnticipate(){return this.instantiateServiceProviderWithoutRegistration("Anticipate")}newManyfest(e){return this.instantiateServiceProviderWithoutRegistration("Manifest",e)}addServiceType(e,t){return e in this.servicesMap?this.log.warn(`Adding a service type [${e}] that already exists. This will change the default class prototype for this service.`):(this.servicesMap[e]={},this.serviceTypes.push(e)),"function"==typeof t&&t.isFableService?this.serviceClasses[e]=t:(this.log.error(`Attempted to add service type [${e}] with an invalid class. Using base service class, which will not crash but won't provide meaningful services.`),this.serviceClasses[e]=a),this.serviceClasses[e]}addServiceTypeIfNotExists(e,t){return e in this.servicesMap?this.serviceClasses[e]:this.addServiceType(e,t)}addAndInstantiateServiceType(e,t){return this.addServiceType(e,t),this.instantiateServiceProvider(e,{},`${e}-Default`)}addAndInstantiateServiceTypeIfNotExists(e,t){return this.addServiceTypeIfNotExists(e,t),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},`${e}-Default`)}addAndInstantiateSingletonService(e,t,r){return this.addServiceTypeIfNotExists(e,r),e in this.servicesMap&&e in this.fable?this[e]:this.instantiateServiceProvider(e,{},`${e}-Default`)}instantiateServiceProviderFromPrototype(e,t,r,n){let s=new n(this,t,r);return this.extraServiceInitialization&&(s=this.extraServiceInitialization(s)),this.servicesMap[e][s.Hash]=s,e in this.services||this.setDefaultServiceInstantiation(e,s.Hash),s}instantiateServiceProvider(e,t,r){let n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.servicesMap[e][n.Hash]=n,e in this.services||this.setDefaultServiceInstantiation(e,n.Hash),n}instantiateServiceProviderIfNotExists(e,t,r){return e in this.services?this.services[e]:this.instantiateServiceProvider(e,t,r)}instantiateServiceProviderWithoutRegistration(e,t,r){let n=new this.serviceClasses[e](this,t,r);return this.extraServiceInitialization&&(n=this.extraServiceInitialization(n)),n}connectPreinitServiceProviderInstance(e){let t=e.serviceType,r=e.Hash;return e.connectFable(this),t in this.servicesMap||(this.servicesMap[t]={}),this.servicesMap[t][r]=e,t in this.services||this.setDefaultServiceInstantiation(t,r,!1),e}setDefaultServiceInstantiation(e,t,r){let n=void 0===r||r;return t in this.servicesMap[e]&&(e in this&&!n||(this[e]=this.servicesMap[e][t]),e in this.services&&!n||(this.services[e]=this.servicesMap[e][t]),!0)}static generateFileNameDateStamp(e){const t=e||new Date;return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}-${String(t.getHours()).padStart(2,"0")}-${String(t.getMinutes()).padStart(2,"0")}-${String(t.getSeconds()).padStart(2,"0")}`}}t.exports=l,t.exports.new=function(e){return new l(e)},t.exports.LogProviderBase=i.LogProviderBase,t.exports.ServiceProviderBase=a,t.exports.CoreServiceProviderBase=a.CoreServiceProviderBase,t.exports.precedent=n.precedent},{"../package.json":131,"./services/Fable-Service-Anticipate.js":133,"./services/Fable-Service-CSVParser.js":134,"./services/Fable-Service-DataFormat.js":135,"./services/Fable-Service-DataGeneration.js":137,"./services/Fable-Service-DateManipulation.js":138,"./services/Fable-Service-EnvironmentData.js":139,"./services/Fable-Service-ExpressionParser.js":140,"./services/Fable-Service-FilePersistence.js":150,"./services/Fable-Service-Logic.js":151,"./services/Fable-Service-Math.js":152,"./services/Fable-Service-MetaTemplate.js":153,"./services/Fable-Service-Operation.js":157,"./services/Fable-Service-ProgressTime.js":158,"./services/Fable-Service-ProgressTrackerSet.js":160,"./services/Fable-Service-RestClient.js":161,"./services/Fable-Service-Template.js":162,"./services/Fable-Service-Utility.js":163,cachetrax:22,"fable-log":51,"fable-serviceproviderbase":53,"fable-settings":57,"fable-uuid":60,manyfest:84}],133:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="AsyncAnticipate",this.operationQueue=[],this.erroredOperations=[],this.executingOperationCount=0,this.completedOperationCount=0,this.callDepth=0,this.maxOperations=1,this.lastError=void 0,this.waitingFunctions=[]}checkQueue(){if(this.lastError){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}else if(this.operationQueue.length>0&&this.executingOperationCount<this.maxOperations){let e=this.operationQueue.shift();this.executingOperationCount+=1,e(this.buildAnticipatorCallback())}else if(this.waitingFunctions.length>0&&this.executingOperationCount<1){for(let e=0;e<this.waitingFunctions.length;e++)this.waitingFunctions[e](this.lastError);this.lastError=void 0,this.waitingFunctions=[]}}anticipate(e){this.operationQueue.push(e),this.checkQueue()}buildAnticipatorCallback(){let e={Called:!1,Error:void 0,OperationSet:this};return function(t){if(e.Called)throw new Error("Anticipation async callback called twice...");e.Called=!0,this.lastError=t,e.OperationSet.executingOperationCount-=1,e.OperationSet.completedOperationCount+=1,e.OperationSet.callDepth++,e.OperationSet.callDepth>400?(e.OperationSet.callDepth=0,setTimeout(e.OperationSet.checkQueue.bind(this),0)):e.OperationSet.checkQueue()}.bind(this)}wait(e){this.waitingFunctions.push(e),this.checkQueue()}}},{"fable-serviceproviderbase":53}],134:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="CSVParser",this.Header=[],this.HeaderFieldNames=[],this.Delimiter=",",this.QuoteCharacter='"',this.CleanCharacters=["\r"],this.HeaderLineIndex=0,this.HasHeader=!0,this.HasSetHeader=!1,this.EmitHeader=!1,this.EmitJSON=!0,this.EscapedQuoteString=""",this.CurrentLine="",this.CurrentRecord=[],this.InQuote=!1,this.InEscapedQuote=!1,this.LinesParsed=0,this.RowsEmitted=0}marshalRowToJSON(e){if(!Array.isArray(e))return!1;for(let t=this.HeaderFieldNames.length;t<e.length;t++)this.HeaderFieldNames[t]=`${t}`;let t={};for(let r=0;r<e.length;r++)t[this.HeaderFieldNames[r]]=e[r];return t}setHeader(e){this.Header=e;for(let e=0;e<this.Header.length;e++)void 0===this.Header[e]?this.HeaderFieldNames[e]=`${e}`:this.HeaderFieldNames[e]=this.Header[e].toString().trim()}resetRowState(){this.CurrentRecord=[]}pushLine(){for(let e=0;e<this.CleanCharacters.length;e++)this.CurrentLine=this.CurrentLine.replace(this.CleanCharacters[e],"");this.CurrentRecord.push(this.CurrentLine),this.CurrentLine=""}emitRow(e){let t=void 0===e?this.EmitJSON:e;this.RowsEmitted++;let r=this.CurrentRecord;return this.CurrentRecord=[],t?this.marshalRowToJSON(r):r}parseCSVLine(e){this.LinesParsed++;for(let t=0;t<e.length;t++)this.InQuote||e[t]!=this.Delimiter?e[t]==this.QuoteCharacter?this.InEscapedQuote?this.InEscapedQuote=!1:this.InQuote?t<e.length&&e[t+1]==this.QuoteCharacter?(this.CurrentLine+=this.EscapedQuoteString,this.InEscapedQuote=!0):this.InQuote=!1:this.InQuote=!0:this.CurrentLine+=e[t]:this.pushLine();return!this.InQuote&&(this.pushLine(),this.HasHeader&&!this.HasSetHeader&&this.RowsEmitted==this.HeaderLineIndex?(this.HasSetHeader=!0,this.setHeader(this.emitRow(!1)),!!this.EmitHeader&&this.Header):this.emitRow())}}},{"fable-serviceproviderbase":53}],135:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),_defineProperty2(this,"stringPadStart",(function(e,t,r){let n=e.toString();return this.stringGeneratePaddingString(n,t,r)+n})),_defineProperty2(this,"stringPadEnd",(function(e,t,r){let n=e.toString();return n+this.stringGeneratePaddingString(n,t,r)})),this.serviceType="DataArithmatic",this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlphaChar=/[^a-zA-Z]/gi,this._Regex_formatterCapitalizeEachWord=/([a-zA-Z]+)/g,this._Regex_matcherHTMLEntities=/&(#?[a-zA-Z0-9]+);/g,this._Value_MoneySign_Currency="$",this._Value_NaN_Currency="--",this._Value_GroupSeparator_Number=",",this._Value_Prefix_StringHash="HSH",this._Value_Clean_formatterCleanNonAlpha="",this._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,this._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith,this._SanitizeObjectKeyRegex=/[^a-zA-Z0-9_]/gi,this._SanitizeObjectKeyReplacement="_",this._SanitizeObjectKeyInvalid="INVALID"}stringReverse(e){return e.split("").reverse().join("")}stringStartsWith(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}stringStartsWith_Polyfill(e,t){return this.slice(t||0,e.length)===e}stringEndsWith(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}stringEndsWith_Polyfill(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}insecureStringHash(e){let t=0,r=e.length,n=0;for(;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return`${this._Value_Prefix_StringHash}${t}`}capitalizeEachWord(e){return e.replace(this._Regex_formatterCapitalizeEachWord,(e=>e.charAt(0).toUpperCase()+e.substr(1)))}resolveHtmlEntities(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherHTMLEntities,((e,t)=>{switch(t){case"comma":return",";case"amp":return"&";case"lt":return"<";case"gt":return">";case"times":return"×";case"divide":return"÷";case"plus":return"+";case"minus":return"-";case"infin":return"∞";case"ang":return"∠";case"quot":return'"';case"apos":return"'";case"nbsp":return" ";case"copy":return"©";case"reg":return"®";case"trade":return"™";case"euro":return"€";default:if(!t.startsWith("#"))return e}const r=parseInt(t.substring(1),10);return String.fromCharCode(r)}))}concatenateStrings(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStrings("",...t)}concatenateStringsInternal(){const e=[...arguments],t=this.fable.Utility.flattenArrayOfSolverInputs(e);return this.concatenateStrings(...t)}joinStrings(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.filter((e=>"string"==typeof e||"number"==typeof e)).join(e)}joinStringsInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStrings(e,...r)}concatenateStringsRaw(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.joinStringsRaw("",...t)}concatenateStringsRawInternal(e){const t=[...arguments],r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.concatenateStringsRaw(...r)}joinStringsRaw(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.map(String).join(e)}joinStringsRawInternal(){const[e,...t]=arguments,r=this.fable.Utility.flattenArrayOfSolverInputs(t);return this.joinStringsRaw(e,...r)}cleanEnclosureWrapCharacters(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}cleanNonAlphaCharacters(e){return"string"==typeof e&&""!=e?e.replace(this._Regex_formatterCleanNonAlphaChar,this._Value_Clean_formatterCleanNonAlpha):""}sanitizeObjectKey(e){return"string"!=typeof e||e.length<1?this._SanitizeObjectKeyInvalid:e.replace(this._SanitizeObjectKeyRegex,this._SanitizeObjectKeyReplacement)}formatterInsertCommas(e){let t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}processAddCommasToNumberRegex(e,t,r,n,s,i){return t+(s?this.formatterInsertCommas(n)+s+i:this.formatterInsertCommas(n+i))}formatterAddCommasToNumber(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(e,t,r){if(isNaN(e))return this._Value_NaN_Currency;if(null==e)return this._Value_NaN_Currency;let n=this.fable.Math.parsePrecise(e),s=void 0===t?2:t,i=this.fable.Math.toFixedPrecise(n,s,r);return`$${this.formatterAddCommasToNumber(i)}`}formatterRoundNumber(e,t){let r=void 0===t?2:t;if(isNaN(e)){return(0).toFixed(r)}if(null==e)return"";let n=this.fable.Utility.bigNumber(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}stringGeneratePaddingString(e,t,r){let n=t|0,s=String(void 0!==r?r:" ");if(e.length>t)return"";{let r=t-e.length;return r>s.length&&(s+=s.repeat(n/s.length)),s.slice(0,r)}}formatTimeSpan(e){if("number"!=typeof e)return"";let t=parseInt(e%1e3),r=parseInt(e/1e3%60),n=parseInt(e/6e4%60),s=parseInt(e/36e5);return`${this.stringPadStart(s,2,"0")}:${this.stringPadStart(n,2,"0")}:${this.stringPadStart(r,2,"0")}.${this.stringPadStart(t,3,"0")}`}formatTimeDelta(e,t){return"number"!=typeof e||"number"!=typeof t?"":this.formatTimeSpan(t-e)}getMonthFromDate(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]}getMonthAbbreviatedFromDate(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()]}formatMonthDayYearFromDate(e,t){let r=void 0!==t&&t,n=e.getMonth()+1,s=e.getDate(),i=e.getFullYear();return r&&(n=this.stringPadStart(n,2,"0"),s=this.stringPadStart(s,2,"0"),i=this.stringPadStart(i,4,"0")),`${n}/${s}/${i}`}formatSortableStringFromDate(e){return e.getFullYear()+this.stringPadStart(e.getMonth(),2,"0")+this.stringPadStart(e.getDate(),2,"0")}stringBeforeMatch(e,t){return e.split(t)[0]}stringAfterMatch(e,t){let r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}stringCountSegments(e,t,r,n){let s="string"==typeof e?e:"",i="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},a="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let l=1,u=[];for(let e=0;e<s.length;e++)s[e]==i&&0==u.length?l++:s[e]in o?u.push(o[s[e]]):s[e]in a&&a[s[e]]==u[u.length-1]&&u.pop();return l}stringGetSegments(e,t,r,n){let s="string"==typeof e?e:"",i="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2,'"':3,"'":4},a="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2,'"':3,"'":4},l=0,u=[];if(e.length<1)return u;let c=[];for(let e=0;e<s.length;e++)s[e]==i&&0==c.length?(u.push(s.substring(l,e)),l=e+1):s[e]in o?c.push(o[s[e]]):s[e]in a&&a[s[e]]==c[c.length-1]&&c.pop();return l<s.length&&u.push(s.substring(l)),u}stringGetFirstSegment(e,t,r,n){let s="string"==typeof e?e:"",i="string"==typeof t?t:".",o="object"==typeof r?pEnclosureStart:{"{":0,"[":1,"(":2},a="object"==typeof n?pEnclosureEnd:{"}":0,"]":1,")":2};if(e.length<1)return 0;let l=[];for(let e=0;e<s.length;e++){if(s[e]==i&&0==l.length)return s.substring(0,e);s[e]in o?l.push(o[s[e]]):s[e]in a&&a[s[e]]==l[l.length-1]&&l.pop()}return s}stringEncodeURIComponent(e){return"string"!=typeof e?e:encodeURIComponent(e)}stringDecodeURIComponent(e){if("string"!=typeof e)return e;try{return decodeURIComponent(e)}catch(t){return this.fable.Log.error(`Failed to decode URI component: ${e}`,t),e}}stringEncodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptEncode,(e=>{switch(e){case'"':return'\\"';case"'":return"\\'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";default:return e}}))}stringDecodeForJavascript(e){return"string"!=typeof e?e:e.replace(this._Regex_matcherJavascriptDecode,(e=>{switch(e){case'\\"':return'"';case"\\'":return"'";case"\\\\":return"\\";case"\\n":return"\n";case"\\r":return"\r";default:return e}}))}stringCountEnclosures(e,t,r){let n="string"==typeof e?e:"",s="string"==typeof t?t:"(",i="string"==typeof r?r:")",o=0,a=0;for(let e=0;e<n.length;e++)n[e]==s?(0==a&&o++,a++):n[e]==i&&a--;return o}stringGetEnclosureValueByIndex(e,t,r,n){let s="string"==typeof e?e:"",i="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,u=0,c=!1,h=0,f=0;for(let e=0;e<s.length;e++)s[e]==o?(u++,1==u&&(l++,i==l-1&&(c=!0,h=e))):s[e]==a&&(u--,0==u&&c&&f<=h&&(f=e,c=!1));return l<=i?"":f>0&&f>h?s.substring(h+1,f):s.substring(h+1)}stringRemoveEnclosureByIndex(e,t,r,n){let s="string"==typeof e?e:"",i="number"==typeof t?t:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,u=0,c=!1,h=0,f=0;for(let e=0;e<s.length;e++)s[e]==o?(u++,1==u&&(l++,i==l-1&&(c=!0,h=e))):s[e]==a&&(u--,0==u&&c&&f<=h&&(f=e,c=!1));if(l<=i)return s;let p="";return h>1&&(p=s.substring(0,h)),s.length>f+1&&f>h&&(p+=s.substring(f+1)),p}}},{"fable-serviceproviderbase":53}],136:[function(e,t,r){t.exports={DefaultIntegerMinimum:0,DefaultIntegerMaximum:9999999,DefaultNumericStringLength:10,MonthSet:["January","February","March","April","May","June","July","August","September","October","November","December"],WeekDaySet:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ColorSet:["Red","Orange","Yellow","Green","Blue","Indigo","Violet","Pink","Purple","Turquoise","Gold","Lime","Maroon","Navy","Coral","Teal","Brown","White","Black","Sky","Berry","Grey","Straw","Silver","Sapphire"],SurNameSet:["Smith","Johnson","Williams","Brown","Jones","Miller","Davis","Garcia","Rodriguez","Wilson","Martinez","Anderson","Taylor","Thomas","Hernandez","Moore","Martin","Jackson","Thompson","White","Lopez","Lee","Gonzalez","Harris","Clark","Lewis","Robinson","Walker","Perez","Hall","Young","Allen","Sanchez","Wright","King","Scott","Green","Baker","Adams","Nelson","Hill","Ramirez","Campbell","Mitchell","Roberts","Carter","Phillips","Evans","Turner","Torres","Parker","Collins","Edwards","Stewart","Flores","Morris","Nguyen","Murphy","Rivera","Cook","Rogers","Morgan","Peterson","Cooper","Reed","Bailey","Bell","Gomez","Kelly","Howard","Ward","Cox","Diaz","Richardson","Wood","Watson","Brooks","Bennett","Gray","James","Reyes","Cruz","Hughes","Price","Myers","Long","Foster","Sanders","Ross","Morales","Powell","Sullivan","Russell","Ortiz","Jenkins","Gutierrez","Perry","Butler","Barnes","Fisher"],NameSet:["Mary","Patricia","Jennifer","Linda","Elizabeth","Barbara","Susan","Jessica","Sarah","Karen","Lisa","Nancy","Betty","Sandra","Margaret","Ashley","Kimberly","Emily","Donna","Michelle","Carol","Amanda","Melissa","Deborah","Stephanie","Dorothy","Rebecca","Sharon","Laura","Cynthia","Amy","Kathleen","Angela","Shirley","Brenda","Emma","Anna","Pamela","Nicole","Samantha","Katherine","Christine","Helen","Debra","Rachel","Carolyn","Janet","Maria","Catherine","Heather","Diane","Olivia","Julie","Joyce","Victoria","Ruth","Virginia","Lauren","Kelly","Christina","Joan","Evelyn","Judith","Andrea","Hannah","Megan","Cheryl","Jacqueline","Martha","Madison","Teresa","Gloria","Sara","Janice","Ann","Kathryn","Abigail","Sophia","Frances","Jean","Alice","Judy","Isabella","Julia","Grace","Amber","Denise","Danielle","Marilyn","Beverly","Charlotte","Natalie","Theresa","Diana","Brittany","Doris","Kayla","Alexis","Lori","Marie","James","Robert","John","Michael","David","William","Richard","Joseph","Thomas","Christopher","Charles","Daniel","Matthew","Anthony","Mark","Donald","Steven","Andrew","Paul","Joshua","Kenneth","Kevin","Brian","George","Timothy","Ronald","Jason","Edward","Jeffrey","Ryan","Jacob","Gary","Nicholas","Eric","Jonathan","Stephen","Larry","Justin","Scott","Brandon","Benjamin","Samuel","Gregory","Alexander","Patrick","Frank","Raymond","Jack","Dennis","Jerry","Tyler","Aaron","Jose","Adam","Nathan","Henry","Zachary","Douglas","Peter","Kyle","Noah","Ethan","Jeremy","Walter","Christian","Keith","Roger","Terry","Austin","Sean","Gerald","Carl","Harold","Dylan","Arthur","Lawrence","Jordan","Jesse","Bryan","Billy","Bruce","Gabriel","Joe","Logan","Alan","Juan","Albert","Willie","Elijah","Wayne","Randy","Vincent","Mason","Roy","Ralph","Bobby","Russell","Bradley","Philip","Eugene"]}},{}],137:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.serviceType="DataGeneration",this.defaultData=e("./Fable-Service-DataGeneration-DefaultValues.json")}randomIntegerBetween(e,t){try{let r=parseInt(e,10),n=parseInt(t,10);return Math.floor(Math.random()*(n-r))+r}catch(r){return this.fable.log.error("Error in randomIntegerBetween",r,{Minimum:e,Maximum:t}),NaN}}randomIntegerUpTo(e){return this.randomIntegerBetween(0,e)}randomInteger(){return Math.floor(Math.random()*this.defaultData.DefaultIntegerMaximum)}randomFloatBetween(e,t){try{let r=parseFloat(e),n=parseFloat(t);return this.fable.Math.addPrecise(this.fable.Math.multiplyPrecise(Math.random(),this.fable.Math.subtractPrecise(n,r)),r)}catch(r){return this.fable.log.error("Error in randomFloatBetween",r,{Minimum:e,Maximum:t}),NaN}}randomFloatUpTo(e){return this.randomFloatBetween(0,e)}randomFloat(){return Math.random()}randomNumericString(e,t){let r=void 0===t?9999999999:t;return this.services.DataFormat.stringPadStart(this.randomIntegerUpTo(r),e,"0")}randomMonth(){return this.defaultData.MonthSet[this.randomIntegerUpTo(this.defaultData.MonthSet.length-1)]}randomDayOfWeek(){return this.defaultData.WeekDaySet[this.randomIntegerUpTo(this.defaultData.WeekDaySet.length-1)]}randomColor(){return this.defaultData.ColorSet[this.randomIntegerUpTo(this.defaultData.ColorSet.length-1)]}randomName(){return this.defaultData.NameSet[this.randomIntegerUpTo(this.defaultData.NameSet.length-1)]}randomSurname(){return this.defaultData.SurNameSet[this.randomIntegerUpTo(this.defaultData.SurNameSet.length-1)]}}},{"./Fable-Service-DataGeneration-DefaultValues.json":136,"fable-serviceproviderbase":53}],138:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(t,r,n){super(t,r,n),this.serviceType="Dates",this.dayJS=e("dayjs"),this.plugin_weekOfYear=e("dayjs/plugin/weekOfYear"),this.dayJS.extend(this.plugin_weekOfYear),this.plugin_weekday=e("dayjs/plugin/weekday"),this.dayJS.extend(this.plugin_weekday),this.plugin_isoWeek=e("dayjs/plugin/isoWeek"),this.dayJS.extend(this.plugin_isoWeek),this.plugin_timezone=e("dayjs/plugin/timezone"),this.dayJS.extend(this.plugin_timezone),this.plugin_relativetime=e("dayjs/plugin/relativeTime"),this.dayJS.extend(this.plugin_relativetime),this.plugin_utc=e("dayjs/plugin/utc"),this.dayJS.extend(this.plugin_utc),this.plugin_advancedFormat=e("dayjs/plugin/advancedFormat"),this.dayJS.extend(this.plugin_advancedFormat)}dateDayDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"day")}dateWeekDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"week")}dateMonthDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"month")}dateYearDifference(e,t){if(null==e||""===e)return NaN;let r=this.dayJS(e);return this.dayJS(t).diff(r,"year")}}},{dayjs:28,"dayjs/plugin/advancedFormat":29,"dayjs/plugin/isoWeek":30,"dayjs/plugin/relativeTime":31,"dayjs/plugin/timezone":32,"dayjs/plugin/utc":33,"dayjs/plugin/weekOfYear":34,"dayjs/plugin/weekday":35,"fable-serviceproviderbase":53}],139:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="EnvironmentData",this.Environment="node.js"}}},{"fable-serviceproviderbase":53}],140:[function(e,t,r){const{PE:n}=e("big.js"),s=e("fable-serviceproviderbase");t.exports=class extends s{constructor(t,r,n){super(t,r,n),this.tokenMap=e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json"),this.tokenMaxPrecedence=4,this.tokenRadix={};let s=Object.keys(this.tokenMap);for(let e=0;e<s.length;e++){let t=s[e],r=this.tokenMap[t];r.Token=t,r.Length=t.length;let n=r.Token[0];n in this.tokenRadix||(this.tokenRadix[n]={TokenCount:0,Literal:!1,TokenKeys:[],TokenMap:{}}),this.tokenRadix[n].TokenCount++,t==n&&(this.tokenRadix[n].Literal=!0),this.tokenRadix[n].TokenMap[r.Token]=r,this.tokenRadix[n].TokenKeys.push(t),this.tokenRadix[n].TokenKeys.sort(((e,t)=>t.length-e.length)),this.tokenMaxPrecedence<r.Precedence&&(this.tokenMaxPrecedence=r.Precedence)}this.functionMap=e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json"),this.serviceType="ExpressionParser",this.fable.addServiceTypeIfNotExists("ExpressionParser-Tokenizer",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Linter",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Postfix",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-ValueMarshal",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Solver",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js")),this.fable.addServiceTypeIfNotExists("ExpressionParser-Messaging",e("./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js")),this.Tokenizer=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Tokenizer"),this.Linter=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Linter"),this.Postfix=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Postfix"),this.ValueMarshal=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-ValueMarshal"),this.Solver=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Solver"),this.Messaging=this.fable.instantiateServiceProviderWithoutRegistration("ExpressionParser-Messaging"),this.Tokenizer.connectExpressionParser(this),this.Linter.connectExpressionParser(this),this.Postfix.connectExpressionParser(this),this.ValueMarshal.connectExpressionParser(this),this.Solver.connectExpressionParser(this),this.Messaging.connectExpressionParser(this),this.GenericManifest=this.fable.newManyfest(),this.LogNoisiness="LogNoisiness"in this.fable?this.fable.LogNoisiness:0}tokenize(e,t){return this.Tokenizer.tokenize(e,t)}lintTokenizedExpression(e,t){return this.Linter.lintTokenizedExpression(e,t)}buildPostfixedSolveList(e,t){return this.Postfix.buildPostfixedSolveList(e,t)}substituteValuesInTokenizedObjects(e,t,r,n){return this.ValueMarshal.substituteValuesInTokenizedObjects(e,t,r,n)}solvePostfixedExpression(e,t,r,n){return this.Solver.solvePostfixedExpression(e,t,r,n)}solve(e,t,r,n,s){let i="object"==typeof r?r:{},o="object"==typeof t?t:{},a="object"==typeof s?s:{};return this.tokenize(e,i),this.lintTokenizedExpression(i.RawTokens,i),this.buildPostfixedSolveList(i.RawTokens,i),this.substituteValuesInTokenizedObjects(i.PostfixTokenObjects,o,i,n),this.solvePostfixedExpression(i.PostfixSolveList,a,i,n)}}},{"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ExpressionTokenizer.js":142,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-FunctionMap.json":143,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Linter.js":144,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Messaging.js":145,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-Postfix.js":146,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-SolvePostfixedExpression.js":147,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-TokenMap.json":148,"./Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js":149,"big.js":17,"fable-serviceproviderbase":53}],141:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParserOperationBase",this.numberTest=/^-{0,1}\d*\.{0,1}\d+$/,this.ExpressionParser=!1}connectExpressionParser(e){this.ExpressionParser=e}getTokenType(e){return e in this.ExpressionParser.tokenMap?`Token.${this.ExpressionParser.tokenMap[e].Type}`:e.length>2&&"{"===e[0]&&"}"===e[e.length-1]?"Token.StateAddress":e.length>2&&'"'===e[0]&&'"'===e[e.length-1]?"Token.String":this.numberTest.test(e)?"Token.Constant":"Token.Symbol"}getTokenContainerObject(e,t){return{Token:e,Type:void 0===t?this.getTokenType(e):t,Descriptor:e in this.ExpressionParser.tokenMap&&this.ExpressionParser.tokenMap[e]}}}},{"fable-serviceproviderbase":53}],142:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Tokenizer"}tokenize(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.RawExpression=e,r.RawTokens=[],r.ExpressionParserLog=[],"string"!=typeof e)return this.log.warn("ExpressionParser.tokenize was passed a non-string expression."),r.RawTokens;let n=!1,s="";for(let t=0;t<e.length;t++){let i=e[t];if(" "!==i&&"\t"!==i||"StateAddress"===n||"String"===n)if("StateAddress"!==n||"}"===i)if("String"!==n||'"'===i)if("StateAddress"!==n||"}"!==i)if("String"!==n||'"'!==i)if("}"!=i)if("{"!=i)if("String"===n||'"'!=i)if(i in this.ExpressionParser.tokenRadix){let o=this.ExpressionParser.tokenRadix[i];if(1==o.TokenCount&&o.Literal){s.length>0&&r.RawTokens.push(s),s="",n=!1,r.RawTokens.push(i);continue}for(let i=0;i<o.TokenKeys.length;i++){let a=o.TokenKeys[i];if(e.substr(t,a.length)==a){s.length>0&&r.RawTokens.push(a),s="",n=!1,r.RawTokens.push(a),t+=a.length-1;break}}}else n="Value",s+=i;else s.length>0&&r.RawTokens.push(s),s="",n="String",s=i;else s.length>0&&r.RawTokens.push(s),s="",n="StateAddress",s=i;else s.length>0&&r.RawTokens.push(s),s="",n=!1,r.ExpressionParserLog.push(`ExpressionParser.tokenize found a closing brace without an opening brace in the expression: ${e} at character index ${t}`),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]);else s+=i,r.RawTokens.push(s),s="",n=!1;else s+=i,r.RawTokens.push(s),s="",n=!1;else s+=i;else s+=i;else s.length>0&&r.RawTokens.push(s),s="",n=!1}return n&&s.length>0&&r.RawTokens.push(s),r.RawTokens}}},{"./Fable-Service-ExpressionParser-Base.js":141}],143:[function(e,t,r){t.exports={sqrt:{Name:"Square Root",Address:"fable.Math.sqrtPrecise"},percent:{Name:"Compute Percent (in IS over OF format)",Address:"fable.Math.percentagePrecise"},compare:{Name:"Compare",Address:"fable.Math.comparePrecise"},abs:{Name:"Absolute Value",Address:"fable.Math.absPrecise"},floor:{Name:"Floor Value",Address:"fable.Math.floorPrecise"},ceil:{Name:"Ceiling Value",Address:"fable.Math.ceilPrecise"},rad:{Name:"Degrees to Radians",Address:"fable.Math.radPrecise"},pi:{Name:"Pi",Address:"fable.Math.piPrecise"},euler:{Name:"Euler",Address:"fable.Math.eulerPrecise"},log:{Name:"Logarithm",Address:"fable.Math.logPrecise"},exp:{Name:"Eulers Number to the Power Of N",Address:"fable.Math.expPrecise"},sin:{Name:"Sine",Address:"fable.Math.sin"},cos:{Name:"Cosine",Address:"fable.Math.cos"},tan:{Name:"Tangent",Address:"fable.Math.tan"},count:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},countset:{Name:"Count Set Elements",Address:"fable.Math.countSetElements"},sortset:{Name:"Sort Set",Address:"fable.Math.sortSetPrecise"},bucketset:{Name:"Bucket Set",Address:"fable.Math.bucketSetPrecise"},sorthistogram:{Name:"Sort Histogram",Address:"fable.Math.sortHistogramPrecise"},max:{Name:"Maximum",Address:"fable.Math.maxPrecise"},min:{Name:"Minimum",Address:"fable.Math.minPrecise"},sum:{Name:"Sum",Address:"fable.Math.sumPrecise"},avg:{Name:"Average",Address:"fable.Math.averagePrecise"},mean:{Name:"Mean",Address:"fable.Math.meanPrecise"},median:{Name:"Median",Address:"fable.Math.medianPrecise"},mode:{Name:"Mode",Address:"fable.Math.modePrecise"},round:{Name:"Round",Address:"fable.Math.roundPrecise"},tofixed:{Name:"To Fixed",Address:"fable.Math.toFixedPrecise"},cumulativesummation:{Name:"Count Set Elements in a Histogram or Value Map",Address:"fable.Math.cumulativeSummation"},countsetelements:{Name:"Count Set Elements in a Histogram or Value Map",Address:"fable.Math.countSetElements"},getvalue:{Name:"Get Value from Application State or Services (AppData, etc.)",Address:"fable.Utility.getInternalValueByHash"},createarrayfromabsolutevalues:{Name:"Create Array from Absolute Values",Address:"fable.Utility.createArrayFromAbsoluteValues"},flatten:{Name:"flatten an array of values",Address:"fable.Utility.flattenArrayOfSolverInputs"},findfirstvaluebyexactmatch:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByExactMatchInternal"},findfirstvaluebystringincludes:{Name:"find + map on array of objects",Address:"fable.Utility.findFirstValueByStringIncludesInternal"},resolvehtmlentities:{Name:"resolve HTML entities",Address:"fable.DataFormat.resolveHtmlEntities"},concat:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsInternal"},concatraw:{Name:"concatenate an array of values and output a string",Address:"fable.DataFormat.concatenateStringsRawInternal"},join:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsInternal"},joinraw:{Name:"join an array of values and output a string",Address:"fable.DataFormat.joinStringsRawInternal"},if:{Name:"perform a conditional operator on two values, and choose one of two outcomes based on the result",Address:"fable.Logic.checkIf"},when:{Name:"perform a 'truthy' check on one value, and return one of two outcomes based on the result",Address:"fable.Logic.when"},entryinset:{Name:"Entry in Set",Address:"fable.Math.entryInSet"},smallestinset:{Name:"Smallest in Set",Address:"fable.Math.smallestInSet"},largestinset:{Name:"Largest in Set",Address:"fable.Math.largestInSet"},aggregationhistogram:{Name:"Generate a Histogram by Exact Value Aggregation",Address:"fable.Math.histogramAggregationByExactValueFromInternalState"},distributionhistogram:{Name:"Generate a Histogram Based on Value Distribution",Address:"fable.Math.histogramDistributionByExactValueFromInternalState"},setconcatenate:{Name:"Set Concatenate",Address:"fable.Math.setConcatenate"},getvaluearray:{Name:"Get Value Array from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueArrayByHashParametersFromInternal"},getvalueobject:{Name:"Get Value Object from Application State or Services (AppData, etc.)",Address:"fable.Utility.createValueObjectByHashParametersFromInternal"},cleanvaluearray:{Name:"Clean Value Array",Address:"fable.Math.cleanValueArray"},cleanvalueobject:{Name:"Clean Value Object",Address:"fable.Math.cleanValueObject"},randominteger:{Name:"Random Integer",Address:"fable.DataGeneration.randomInteger"},randomintegerbetween:{Name:"Random Integer Between Two Numbers",Address:"fable.DataGeneration.randomIntegerBetween"},randomintegerupto:{Name:"Random Integer",Address:"fable.DataGeneration.randomIntegerUpTo"},randomfloat:{Name:"Random Float",Address:"fable.DataGeneration.randomFloat"},randomfloatbetween:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatBetween"},randomfloatupto:{Name:"Random Float",Address:"fable.DataGeneration.randomFloatUpTo"},datedaydifference:{Name:"Date Difference in Days",Address:"fable.Dates.dateDayDifference"},dateweekdifference:{Name:"Date Difference in Weeks",Address:"fable.Dates.dateWeekDifference"},datemonthdifference:{Name:"Date Difference in Months",Address:"fable.Dates.dateMonthDifference"},dateyeardifference:{Name:"Date Difference in Years",Address:"fable.Dates.dateYearDifference"},createValueObjectByHashes:{Name:"Create Value Object by Hashes",Address:"fable.Utility.createValueObjectByHashes"}}},{}],144:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Linter"}lintTokenizedExpression(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.LinterResults=[],!Array.isArray(e))return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed a non-array tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;if(e.length<1)return r.ExpressionParserLog.push("ERROR: ExpressionParser.lintTokenizedExpression was passed an empty tokenized expression."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),e;let n=0,s=!1;for(let t=0;t<e.length;t++)"("!==e[t]||s||n++,")"!==e[t]||s||n--,"{"===e[t]&&(s=!0),"}"===e[t]&&(s=!1),n<0&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression at token index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));n>0&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found an unbalanced parenthesis in the tokenized expression (ended without closing last set of parenthesis) -- appropriate closing parenthesis will be added."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),s=!1;for(let t=0;t<e.length;t++)"{"===e[t]&&(s=!0),"}"===e[t]&&s&&(s=!1),"}"!==e[t]||s||(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an unbalanced closing squiggly brace "}" in the tokenized expression at token index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),s&&(r.ExpressionParserLog.push(`WARNING: ExpressionParser.lintTokenizedExpression found an open squiggly brace in the tokenized expression at index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1]));let i=0,o=!1;for(let t=0;t<e.length;t++)this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type&&(i++,o=t,i>1&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found multiple equality assignments in the tokenized expression; equality assignment #${i} operator '${e[t]}' at token index ${t}.`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));i<1&&(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found no equality assignment in the tokenized expression. One called Result will be added automatically."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),1===i&&3===e.length&&("Token.StateAddress"!==this.getTokenType(e[0])&&"Token.Symbol"!==this.getTokenType(e[2])||(r.ExpressionParserLog.push("WARNING: ExpressionParser.lintTokenizedExpression found a single equality assignment in the tokenized expression with no assignable address on the left side of the assignment."),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])));let a=!1;for(let t=0;t<e.length-1;t++)e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type&&!a?a=!0:e[t]in this.ExpressionParser.tokenMap&&"Parenthesis"!=this.ExpressionParser.tokenMap[e[t]].Type?"+"!==e[t]&&"-"!==e[t]&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an ${e[t]} operator adjacent to another operator in the tokenized expression at token index ${t}`),r.LinterResults.push(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):a=!1;return r.LinterResults}}},{"./Fable-Service-ExpressionParser-Base.js":141}],145:[function(e,t,r){const{PE:n}=e("big.js"),s=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends s{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Messaging"}getOperationVirtualSymbolName(e){return e&&"VirtualSymbolName"in e?e.VirtualSymbolName:"Token.VirtualSymbol"===e.Type?e.Token:"NO_VIRTUAL_SYMBOL_NAME_FOUND"}getVirtualTokenValue(e,t){let r=this.getOperationVirtualSymbolName(e);if(("Token.Symbol"==e.Type||"Token.Constant"==e.Type)&&e.Value)return e.Value.toString();let n="VirtualSymbols"in t?t.VirtualSymbols:{};if(this.ExpressionParser.GenericManifest.checkAddressExists(n,r)){let e=this.ExpressionParser.GenericManifest.getValueAtAddress(n,r);return"object"==typeof e?`{${Object.keys(e).length} values}`:Array.isArray(e)?`[${Object.keys(e).length} values]`:e}return"NO_VALUE_FOUND"}getTokenAddressString(e){return pExpression.Token}getTokenSymbolString(e){return e.Token}getOperationSymbolMessage(e){if(!e)return"INVALID_OPERATION";let t=this.getOperationVirtualSymbolName(e),r=this.getTokenSymbolString(e.LeftValue),n=this.getTokenSymbolString(e.Operation),s=this.getTokenSymbolString(e.RightValue),i=t.substring(0,3);return"="===n?`${t} = ${r}`:"VFE"===i?`${t} = ${n}(${r})`:`${t} = ${r} ${n} ${s}`}getOperationValueMessage(e,t){if(!e)return"INVALID_OPERATION";let r=this.getOperationVirtualSymbolName(e),n=this.getVirtualTokenValue(e.LeftValue,t),s=this.getTokenSymbolString(e.Operation),i=this.getVirtualTokenValue(e.RightValue,t),o=r.substring(0,3);return"="===s?`${r} = ${n}`:"VFE"===o?`${r} = ${s}(${n})`:`${r} = ${n} ${s} ${i}`}getOperationOutcomeMessage(e,t){if(!e)return"INVALID_TOKEN";return`${this.getOperationVirtualSymbolName(e)} = ${this.getVirtualTokenValue(e,t)}`}logFunctionOutcome(e){if("object"!=typeof e)return void this.log.error("Solver results object was not an object. Cannot log outcome.");let t="PostfixedAssignmentAddress"in e?e.PostfixedAssignmentAddress:"NO_ASSIGNMENT_ADDRESS_FOUND",r="RawExpression"in e?e.RawExpression:"NO_EXPRESSION_FOUND",n="RawResult"in e?e.RawResult:"NO_RESULT_FOUND";this.log.info(`Solved f(${t}) = {${r}}`);for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t],n=this.getOperationSymbolMessage(r);this.log.info(`${t} Symbols: ${n}`);let s=this.getOperationValueMessage(r,e);this.log.info(`${t} Values: ${s}`);let i=this.getOperationOutcomeMessage(r,e);this.log.info(`${t} Outcome: ${i}`)}this.log.info(`{${r}} = ${n}`)}logFunctionSolve(e){if("object"==typeof e)if("PostfixSolveList"in e&&Array.isArray(e.PostfixSolveList)){for(let t=0;t<e.PostfixSolveList.length;t++){let r=e.PostfixSolveList[t];console.log(`${t}: ${r.VirtualSymbolName} = (${r.LeftValue.Token}::${r.LeftValue.Value}) ${r.Operation.Token} (${r.RightValue.Token}::${r.RightValue.Value}) `)}this.logFunctionOutcome(e)}else this.log.error("Solver results object did not contain a PostfixSolveList array. Cannot log the solve.");else this.log.error("Solver results object was not an object. Cannot log the solve.")}}},{"./Fable-Service-ExpressionParser-Base.js":141,"big.js":17}],146:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Postfix"}getPosfixSolveListOperation(e,t,r,n,s){let i={VirtualSymbolName:e.VirtualSymbolName,Operation:e,LeftValue:t,RightValue:r};Array.isArray(n);return i.LeftValue.VirtualSymbolName?"LeftVirtualSymbolName"in i.Operation?i.LeftValue=this.getTokenContainerObject(i.Operation.LeftVirtualSymbolName,"Token.VirtualSymbol"):i.LeftValue=this.getTokenContainerObject(i.LeftValue.VirtualSymbolName,"Token.VirtualSymbol"):i.LeftValue.VirtualSymbolName=i.VirtualSymbolName,i.RightValue.VirtualSymbolName?"RightVirtualSymbolName"in i.Operation?i.RightValue=this.getTokenContainerObject(i.Operation.RightVirtualSymbolName,"Token.VirtualSymbol"):i.RightValue=this.getTokenContainerObject(i.RightValue.VirtualSymbolName,"Token.VirtualSymbol"):i.RightValue.VirtualSymbolName=i.VirtualSymbolName,i.Operation.Parsed=!0,i}buildPostfixedSolveList(e,t){let r="object"==typeof t?t:{ExpressionParserLog:[]};if(r.PostfixedAssignmentAddress="Result",r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap["="],r.PostfixTokenObjects=[],r.PostfixSolveList=[],e.length<3)return r.ExpressionParserLog.push("ERROR: ExpressionParser.buildPostfixedSolveList was passed a tokenized expression with less than three tokens."),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;let n=-1;for(let t=0;t<e.length;t++)if(this.ExpressionParser.tokenMap[e[t]]&&"Assignment"===this.ExpressionParser.tokenMap[e[t]].Type){if(!(n<0))return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found multiple assignment operators in the tokenized expression; assignment operator '${e[t]}' #${n} at token index ${t}.`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixTokenObjects;n=t,r.PostfixedAssignmentOperator=this.ExpressionParser.tokenMap[e[t]]}-1==n?(r.ExpressionParserLog.push("WARNING: ExpressionParser.buildPostfixedSolveList found no equality assignment in the tokenized expression; defaulting to Result"),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):n>1?(r.ExpressionParserLog.push(`WARNING: ExpressionParser.buildPostfixedSolveList found an equality assignment in the tokenized expression at an unexpected location (token index ${n}); the expression cannot be parsed.`),this.log.warn(r.ExpressionParserLog[r.ExpressionParserLog.length-1])):0===n||(r.PostfixedAssignmentAddress=e[0]);for(let t=n+1;t<e.length;t++)r.PostfixTokenObjects.push(this.getTokenContainerObject(e[t]));let s=0,i=0,o=[];o.push(`SolveSet_${i}_D_${s}`);for(let e=0;e<r.PostfixTokenObjects.length;e++)"("===r.PostfixTokenObjects[e].Token?(r.PostfixTokenObjects[e].Depth=s,r.PostfixTokenObjects[e].VirtualSymbolName=`Pr_${i}_D_${s}`,e>0&&"Token.Symbol"===r.PostfixTokenObjects[e-1].Type&&(r.PostfixTokenObjects[e-1].Type="Token.Function"),r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1],o.push(r.PostfixTokenObjects[e].VirtualSymbolName),i++,s++):")"===r.PostfixTokenObjects[e].Token?(s--,r.PostfixTokenObjects[e].Depth=s,s<0&&(r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found a closing parenthesis at token index ${e} with no corresponding opening parenthesis.`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1])),r.PostfixTokenObjects[e].VirtualSymbolName=o.pop(),r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1]):(r.PostfixTokenObjects[e].Depth=s,r.PostfixTokenObjects[e].SolveLayerStack=o[o.length-1]);let a={},l=0;for(let e=0;e<r.PostfixTokenObjects.length;e++)r.PostfixTokenObjects[e].SolveLayerStack in a||(a[r.PostfixTokenObjects[e].SolveLayerStack]=[]),a[r.PostfixTokenObjects[e].SolveLayerStack].push(r.PostfixTokenObjects[e]),r.PostfixTokenObjects[e].Depth>l&&(l=r.PostfixTokenObjects[e].Depth);let u=Object.keys(a),c=0;u.sort(((e,t)=>a[e][0].Depth<a[t][0].Depth?1:a[e][0].Depth>a[t][0].Depth?-1:0)),r.PostfixLayerstackMap={};const h=["+","-"],f=["Token.Operator","Token.Assignment"];for(let e=0;e<u.length;e++){let t=a[u[e]];for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let n=0;n<t.length;n++){const s=t[n];if(h.includes(s.Token)&&(0==n||f.includes(t[n-1].Type))&&(s.Descriptor=JSON.parse(JSON.stringify(s.Descriptor)),s.Descriptor.Precedence=1),"Token.Operator"===t[n].Type&&s.Descriptor.Precedence===e){if(1===t.length)return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found a single operator in a solve layer expression at token index ${n}`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(0!=n||"-"!=s.Token&&"+"!=s.Token){if(0==n&&("+"!=s.Token||"-"!=s.Token))return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the beginning of a solve layer expression at token index ${n}`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(n==t.length-1)return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found an operator at the end of a solve layer expression at token index ${n}`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;if(n>0&&"-"==s.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))s.VirtualSymbolName=`VNLO_${c}`,c++;else{if(0==n&&"+"==s.Token)continue;if(n>0&&"+"==s.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))continue;if(("Token.Operator"===t[n-1].Type||"Token.Operator"===t[n+1].Type)&&"-"!=t[n+1].Token&&"+"!=t[n+1].Token)return r.ExpressionParserLog.push(`ERROR: ExpressionParser.buildPostfixedSolveList found an operator at token index ${n} that is not surrounded by two values.`),this.log.error(r.ExpressionParserLog[r.ExpressionParserLog.length-1]),r.PostfixSolveList;s.VirtualSymbolName=`V_${c}`,r.PostfixLayerstackMap[s.SolveLayerStack]=s.VirtualSymbolName,c++}}else s.VirtualSymbolName=`VNLO_${c}`,r.PostfixLayerstackMap[s.SolveLayerStack]=s.VirtualSymbolName,c++}else if("Token.Function"===t[n].Type&&0===e){let e=t[n];e.VirtualSymbolName=`VFE_${c}`,c++,r.PostfixLayerstackMap[e.SolveLayerStack]=e.VirtualSymbolName}}}let p=[];for(let e=0;e<r.PostfixTokenObjects.length;e++){let t=r.PostfixTokenObjects[e];if("Token.Parenthesis"===t.Type)if(t.ParenthesisStack=t.VirtualSymbolName,0==e){t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e=`VP_${c}`,c++),t.VirtualSymbolName=e,p.push(t)}else if("("===t.Token){if("Token.Function"===r.PostfixTokenObjects[e-1].Type){t.IsFunction=!0,t.Function=r.PostfixTokenObjects[e-1];let n=r.PostfixLayerstackMap[t.VirtualSymbolName];n||(n=`VFP_${c}`,c++),t.VirtualSymbolName=n}else{t.IsFunction=!1;let e=r.PostfixLayerstackMap[t.VirtualSymbolName];e||(e=`VP_${c}`,c++),t.VirtualSymbolName=e}p.push(t)}else if(")"===t.Token){let e=p.pop();e.IsFunction?(t.IsFunction=!0,t.VirtualSymbolName=e.Function.VirtualSymbolName):(t.IsFunction=!1,t.VirtualSymbolName=e.VirtualSymbolName)}}for(let e=0;e<u.length;e++){let t=[],r=!1,n=a[u[e]];for(let e=0;e<n.length;e++){let s=n[e];if("Token.Operator"===s.Type&&(r=s),"Token.Function"===s.Type)s.PreviousOperator=r;else if("Token.Parenthesis"===s.Type&&"("===s.Token&&s.IsFunction)t.push(s),s.Function.PreviousOperator&&(s.PreviousOperator=s.Function.PreviousOperator);else if("Token.Parenthesis"===s.Type&&"("===s.Token)s.PreviousOperator=r,t.push(s);else if("Token.Parenthesis"===s.Type&&")"===s.Token){let r=t.pop();if(e<n.length-1)for(let t=e+1;t<n.length;t++)if("Token.Operator"===n[t].Type){r.NextOperator=n[t];break}r.PreviousOperator&&r.NextOperator&&(r.PreviousOperator.Descriptor.Precedence<=r.NextOperator.Descriptor.Precedence?r.NextOperator.LeftVirtualSymbolName=r.PreviousOperator.VirtualSymbolName:r.PreviousOperator.RightVirtualSymbolName=r.NextOperator.VirtualSymbolName)}else"SolveLayerStack"in s||(t.length>0?s.SolveLayerStack=t[t.length-1].SolveLayerStack:s.SolveLayerStack="Expression_Root")}}for(let e=0;e<u.length;e++){let t=!1,r=!1,n=a[u[e]];for(let e=n.length-1;e>=0;e--){let s=n[e];"Token.Operator"===s.Type&&(r?s.Descriptor.Precedence>t?(s.RightVirtualSymbolName=r.VirtualSymbolName,r=s):s.Descriptor.Precedence<t&&(r=s):r=s,t=s.Descriptor.Precedence)}let s=[],i=!1;for(let e=n.length-1;e>=0;e--){let r=n[e];if("Token.Operator"===r.Type){if(i)if(r.Descriptor.Precedence>t){if(s.length>0)for(let e=s.length-1;e>=0;e--)if(s[e].Descriptor.Precedence>=r.Descriptor.Precedence){s[e].LeftVirtualSymbolName=r.VirtualSymbolName,s.slice(e,1);break}i=r}else r.Descriptor.Precedence<t&&(s.push(i),i=r);else i=r;t=r.Descriptor.Precedence}}}for(let e=0;e<u.length;e++){let t=a[u[e]];if(1!==t.length){for(let e=0;e<=this.ExpressionParser.tokenMaxPrecedence;e++)for(let n=0;n<t.length;n++)if("Token.Operator"===t[n].Type&&t[n].Descriptor.Precedence===e){let e=t[n];if(0==n&&"-"==e.Token){let s=this.getTokenContainerObject("*");s.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(s,this.getTokenContainerObject("-1.0"),t[n+1]))}else if(n>0&&"-"==e.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token)){let s=this.getTokenContainerObject("*");s.VirtualSymbolName=e.VirtualSymbolName,r.PostfixSolveList.push(this.getPosfixSolveListOperation(s,this.getTokenContainerObject("-1.0"),t[n+1]))}else{if(0==n&&"+"==e.Token)continue;if(n>0&&"+"==e.Token&&("Token.Operator"===t[n-1].Type||"("===t[n-1].Token))continue;r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[n-1],t[n+1],t,n))}}else if("Token.Function"===t[n].Type&&0===e){let e=t[n];r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[n+1],this.getTokenContainerObject("0.0")))}}else{let e=this.getTokenContainerObject("=");if(e.VirtualSymbolName=r.PostfixLayerstackMap[t[0].SolveLayerStack],!e.VirtualSymbolName)for(let n=0;n<r.PostfixTokenObjects.length;n++)if(r.PostfixTokenObjects[n].ParenthesisStack===t[0].SolveLayerStack){e.VirtualSymbolName=r.PostfixTokenObjects[n].VirtualSymbolName;break}r.PostfixSolveList.push(this.getPosfixSolveListOperation(e,t[0],this.getTokenContainerObject("0.0")))}}let d="PostfixedAssignmentOperator"in r?this.getTokenContainerObject(r.PostfixedAssignmentOperator.Token):this.getTokenContainerObject("=");d.VirtualSymbolName=r.PostfixedAssignmentAddress;let g=this.getTokenContainerObject("Result","Token.LastResult"),y=this.getPosfixSolveListOperation(d,g,this.getTokenContainerObject("SolverMarshal","Token.SolverMarshal"));return r.PostfixSolveList.push(y),r.PostfixSolveList}}},{"./Fable-Service-ExpressionParser-Base.js":141}],147:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js"),s=e("../Fable-SetConcatArray.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-Solver"}solvePostfixedExpression(e,t,r,n){let i="object"==typeof r?r:{ExpressionParserLog:[]},o="object"==typeof n?n:this.fable.newManyfest(),a="object"==typeof t?t:{},l="fable"in i;if(l||(i.fable=this.fable),!Array.isArray(e))return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed a non-array postfixed expression."),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1;if(e.length<1)return i.ExpressionParserLog.push("ERROR: ExpressionParser.solvePostfixedExpression was passed an empty postfixed expression."),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1;i.VirtualSymbols={};for(let t=0;t<e.length;t++){if("Token.SolverInstruction"===e[t].Operation.Type)continue;let r={ExpressionStep:e[t],ExpressionStepIndex:t,ResultsObject:i,Manifest:o};if("Token.LastResult"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=i.LastResult),"Token.LastResult"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=i.LastResult),"Token.VirtualSymbol"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.LeftValue.Token)),"Token.VirtualSymbol"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.RightValue.Token)),"Token.Parenthesis"===r.ExpressionStep.LeftValue.Type&&(r.ExpressionStep.LeftValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.LeftValue.VirtualSymbolName)),"Token.Parenthesis"===r.ExpressionStep.RightValue.Type&&(r.ExpressionStep.RightValue.Value=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.RightValue.VirtualSymbolName)),"Token.Constant"!==r.ExpressionStep.LeftValue.Type||"Value"in r.ExpressionStep.LeftValue||(r.ExpressionStep.LeftValue.Value=r.ExpressionStep.LeftValue.Token),"Token.Constant"!==r.ExpressionStep.RightValue.Type||"Value"in r.ExpressionStep.RightValue||(r.ExpressionStep.RightValue.Value=r.ExpressionStep.RightValue.Token),r.ExpressionStep.Operation.Type="Operator"){let e,n=!1;if(r.ExpressionStep.Operation.Token in this.ExpressionParser.tokenMap?e=`ResultsObject.${r.ExpressionStep.Operation.Descriptor.Function}`:r.ExpressionStep.Operation.Token.toLowerCase()in this.ExpressionParser.functionMap&&(n=!0,e=`ResultsObject.${this.ExpressionParser.functionMap[r.ExpressionStep.Operation.Token.toLowerCase()].Address}`),n)try{let t;const n=o.getValueAtAddress(r,e);if("function"==typeof n){let i=null;e.includes(".")&&(i=o.getValueAtAddress(r,e.split(".").slice(0,-1).join(".")));let a=r.ExpressionStep.LeftValue.Value;a=a instanceof s?a.values:[a],t=n.apply(i,a)}o.setValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,t),i.LastResult=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return i.ExpressionParserLog.push(`ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ${t} with function ${r.ExpressionStep.Operation.Token}: ${e}`),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1}else try{o.setValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName,o.getValueAtAddress(r,`${e}(ExpressionStep.LeftValue.Value,ExpressionStep.RightValue.Value)`)),i.LastResult=o.getValueAtAddress(i.VirtualSymbols,r.ExpressionStep.VirtualSymbolName)}catch(e){return i.ExpressionParserLog.push(`ERROR: ExpressionParser.solvePostfixedExpression failed to solve step ${t} with function ${r.ExpressionStep.Operation.Token}: ${e}`),this.log.error(i.ExpressionParserLog[i.ExpressionParserLog.length-1]),!1}i.SolverFinalVirtualSymbol=r.ExpressionStep.VirtualSymbolName}}let u=o.getValueAtAddress(i,`VirtualSymbols.${i.SolverFinalVirtualSymbol}`);for(let t=0;t<e.length;t++)"Token.SolverMarshal"===e[t].RightValue.Type&&(o.setValueAtAddress(i.VirtualSymbols,e[t].VirtualSymbolName,u),e[t].Operation.Descriptor.OnlyEmpty?this.fable.Utility.addressIsNullOrEmpty(a,e[t].VirtualSymbolName)&&o.setValueByHash(a,e[t].VirtualSymbolName,u):o.setValueByHash(a,e[t].VirtualSymbolName,u));return i.RawResult=u,l||delete i.fable,"object"==typeof u?u:void 0!==u?u.toString():u}}},{"../Fable-SetConcatArray.js":164,"./Fable-Service-ExpressionParser-Base.js":141}],148:[function(e,t,r){t.exports={"=":{Name:"Assign Value",Token:"=",Function:"fable.Math.assignValue",Precedence:0,Type:"Assignment"},"?=":{Name:"Null or Empty Coalescing Assign Value",Token:"?=",Function:"fable.Math.assignValue",OnlyEmpty:!0,Precedence:0,Type:"Assignment"},"(":{Name:"Left Parenthesis",Token:"(",Precedence:0,Type:"Parenthesis"},")":{Name:"Right Parenthesis",Token:")",Precedence:0,Type:"Parenthesis"},",":{Name:"Set Concatenate",Token:",",Function:"fable.Math.setConcatenate",Precedence:4,Type:"Operator"},"*":{Name:"Multiply",Token:"*",Function:"fable.Math.multiplyPrecise",Precedence:3,Type:"Operator"},"/":{Name:"Divide",Token:"/",Function:"fable.Math.dividePrecise",Precedence:3,Type:"Operator"},"^":{Name:"Exponent",Token:"^",Function:"fable.Math.powerPrecise",Precedence:2,Type:"Operator"},"%":{Name:"Modulus",Token:"%",Function:"fable.Math.modPrecise",Precedence:3,Type:"Operator"},"+":{Name:"Add",Token:"+",Function:"fable.Math.addPrecise",Precedence:4,Type:"Operator"},"-":{Name:"Subtract",Token:"-",Function:"fable.Math.subtractPrecise",Precedence:4,Type:"Operator"}}},{}],149:[function(e,t,r){const n=e("./Fable-Service-ExpressionParser-Base.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ExpressionParser-ValueMarshal"}substituteValuesInTokenizedObjects(e,t,r,n){let s="object"==typeof r?r:{ExpressionParserLog:[]};if(!Array.isArray(e))return s.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects was passed a non-array tokenized object list."),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),e;if("object"!=typeof t)return s.ExpressionParserLog.push("ERROR: ExpressionParser.substituteValuesInTokenizedObjects either was passed no data source, or was passed a non-object data source."),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),e;let i=t,o="object"==typeof n?n:this.fable.newManyfest(n);for(let t=0;t<e.length;t++){if("object"!=typeof e[t]){s.ExpressionParserLog.push(`WARNING: ExpressionParser.substituteValuesInTokenizedObjects found a non-object tokenized object at index ${t}`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);continue}let r=e[t];if("Token.Symbol"===e[t].Type&&!r.Resolved){let e=o.getValueByHash(i,r.Token);if(!e){r.Value=e,r.Resolve=!0,s.ExpressionParserLog.push(`WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the symbol hash or address ${r.Token} at index ${t}`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);continue}s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${e}] for the state address ${r.Token} at index ${t}`),this.LogNoisiness>1&&this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);try{let t=new this.fable.Utility.bigNumber(e);r.Resolved=!0,r.Value=t.toString()}catch(n){Array.isArray(e)||"object"==typeof e?(r.Resolved=!0,r.Value=e):(r.Resolved=!0,r.Value=e,s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ${r.Token} at index ${t}; using raw value.`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]))}}if("Token.StateAddress"===e[t].Type&&!r.Resolved){let e=o.getValueAtAddress(i,r.Token);if(!e){s.ExpressionParserLog.push(`WARNING: ExpressionParser.substituteValuesInTokenizedObjects found no value for the state address ${r.Token} at index ${t}`),this.log.warn(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);continue}this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);try{let t=new this.fable.Utility.bigNumber(e);r.Resolved=!0,r.Value=t.toString()}catch(e){s.ExpressionParserLog.push(`ERROR: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ${r.Token} at index ${t}`),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),r.Resolved=!1}}if("Token.String"!==e[t].Type||r.Resolved||(s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${r.Token}] for the string ${r.Token} at index ${t}`),this.LogNoisiness>1&&this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),r.Resolved=!0,r.Value=r.Token.substring(1,r.Token.length-1)),"Token.Constant"===e[t].Type&&!r.Resolved){s.ExpressionParserLog.push(`INFO: ExpressionParser.substituteValuesInTokenizedObjects found a value [${r.Token}] for the constant ${r.Token} at index ${t}`),this.LogNoisiness>1&&this.log.info(s.ExpressionParserLog[s.ExpressionParserLog.length-1]);try{let e=new this.fable.Utility.bigNumber(r.Token);r.Resolved=!0,r.Value=e.toString()}catch(e){s.ExpressionParserLog.push(`ERROR: ExpressionParser.substituteValuesInTokenizedObjects found a non-numeric value for the state address ${r.Token} at index ${t}`),this.log.error(s.ExpressionParserLog[s.ExpressionParserLog.length-1]),r.Resolved=!1}}}return e}}},{"./Fable-Service-ExpressionParser-Base.js":141}],150:[function(e,t,r){(function(r){(function(){const n=e("fable-serviceproviderbase"),s=e("fs"),i=e("path"),o=e("readline");t.exports=class extends n{constructor(e,t,n){super(e,t,n),this.serviceType="FilePersistence","Mode"in this.options||(this.options.Mode=parseInt("0777",8)&~r.umask()),this.libFS=s,this.libPath=i,this.libReadline=o}joinPath(){return i.resolve(...arguments)}resolvePath(){return i.resolve(...arguments)}existsSync(e){return s.existsSync(e)}exists(e,t){return t(null,this.existsSync(e))}deleteFileSync(e){return s.unlinkSync(e)}deleteFolderSync(e){return s.rmdirSync(e)}readFileSync(e,t){let r=void 0===t?"utf8":t;return s.readFileSync(e,r)}readFile(e,t,r){let n=void 0===t?"utf8":t;return s.readFile(e,n,r)}readFileCSV(e,t,r,n,s){let i=this.fable.instantiateServiceProviderWithoutRegistration("CSVParser",t),o="function"==typeof r?r:e=>{this.fable.log.trace(`CSV Reader received line ${e}`)},a="function"==typeof n?n:()=>{this.fable.log.info(`CSV Read of ${e} complete.`)},l="function"==typeof s?s:t=>{this.fable.log.error(`CSV Read of ${e} Error: ${t}`,t)};return this.lineReaderFactory(e,(e=>{let t=i.parseCSVLine(e);t&&o(t,e)}),a,l)}appendFileSync(e,t,r){let n=void 0===r?"utf8":r;return s.appendFileSync(e,t,n)}writeFileSync(e,t,r){let n=void 0===r?"utf8":r;return s.writeFileSync(e,t,n)}writeFileSyncFromObject(e,t){return this.writeFileSync(e,JSON.stringify(t,null,4))}writeFileSyncFromArray(e,t){if(!Array.isArray(t))return this.log.error(`File Persistence Service attempted to write ${e} from array but the expected array was not an array (it was a ${typeof t}).`),Error("Attempted to write ${pFileName} from array but the expected array was not an array (it was a ${typeof(pFileArray)}).");for(let r=0;r<t.length;r++)return this.appendFileSync(e,`${t[r]}\n`)}writeFile(e,t,r,n){let i=void 0===r?"utf8":r;return s.writeFile(e,t,i,n)}lineReaderFactory(e,t,r,n){let i={};return"string"==typeof e&&(i.filePath=e,i.fileStream=s.createReadStream(i.filePath),i.reader=o.createInterface({input:i.fileStream,crlfDelay:1/0}),"function"==typeof n&&i.reader.on("error",n),i.reader.on("line","function"==typeof t?t:()=>{}),"function"==typeof r&&i.reader.on("close",r),i)}makeFolderRecursive(e,t){let r=e;if("string"==typeof e)r={Path:e};else if("object"!=typeof e)return t(new Error("Parameters object or string not properly passed to recursive folder create.")),!1;return"string"!=typeof r.Path?(t(new Error("Parameters object needs a path to run the folder create operation.")),!1):("Mode"in r||(r.Mode=this.options.Mode),void 0===r.CurrentPathIndex?(r.ActualPath=i.normalize(r.Path),r.ActualPathParts=r.ActualPath.split(i.sep),r.CurrentPathIndex=0,r.CurrentPath=""):(r.CurrentPath==i.sep?r.CurrentPath=r.CurrentPath+r.ActualPathParts[r.CurrentPathIndex]:r.CurrentPath=r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],r.CurrentPathIndex++),r.CurrentPathIndex>=r.ActualPathParts.length?t(null):void s.open(r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],"r",((e,n)=>{if(n&&s.closeSync(n),!e||"ENOENT"!=e.code)return this.makeFolderRecursive(r,t);s.mkdir(r.CurrentPath+i.sep+r.ActualPathParts[r.CurrentPathIndex],r.Mode,(e=>e?"EEXIST"==e.code?this.makeFolderRecursive(r,t):(console.log(e.code),t(e)):this.makeFolderRecursive(r,t)))})))}}}).call(this)}).call(this,e("_process"))},{_process:91,"fable-serviceproviderbase":53,fs:19,path:87,readline:19}],151:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r)}checkIf(e,t,r,n,s){let i=this.fable.Math.parsePrecise(e,null),o=this.fable.Math.parsePrecise(r,null),a=!1;if(null===i||null===o)switch(void 0===s&&(s=""),t){case"<":case"LT":a=e<r;break;case"<=":case"LTE":a=e<=r;break;case">":case"GT":a=e>r;break;case">=":case"GTE":a=e>=r;break;case"==":a=e==r;break;case"===":a=e===r;break;default:this.fable.log.warn(`[FableServiceLogic.checkIf] Invalid comparison operator: ${t}`),a=e==r}else switch(void 0===s&&(s="0"),t){case"<":case"LT":a=this.fable.Math.ltPrecise(i,o);break;case"<=":case"LTE":a=this.fable.Math.ltePrecise(i,o);break;case">":case"GT":a=this.fable.Math.gtPrecise(i,o);break;case">=":case"GTE":a=this.fable.Math.gtePrecise(i,o);break;case"==":a=0==this.fable.Math.comparePreciseWithin(i,o,"0.000001");break;case"===":a=0==this.fable.Math.comparePrecise(i,o);break;default:this.fable.log.warn(`[FableServiceLogic.checkIf] Invalid comparison operator: ${t}`),a=e==r?n:s}return a?n:s}when(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?Array.isArray(e)&&e.length<1||"object"==typeof e&&Object.keys(e).length<1?r:t:r}}},{"fable-serviceproviderbase":53}],152:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("./Fable-SetConcatArray.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="Math",this.pi="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679",this.euler="2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664",this.bigNumber=this.fable.Utility.bigNumber,this.ln2Cache=new Map}get roundDown(){return this.bigNumber.roundDown}get roundHalfUp(){return this.bigNumber.roundHalfUp}get roundHalfEven(){return this.bigNumber.roundHalfEven}get roundUp(){return this.bigNumber.roundUp}parsePrecise(e,t){let r;try{r=new this.bigNumber(e)}catch(e){r=void 0===t?"0.0":t}return r?r.toString():r}assignValue(e){return e}percentagePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;if(0==n)return"0";let s=new this.bigNumber(r).div(n);return s=s.times(100),s.toString()}setConcatenate(e,t){return new s(e,t)}roundPrecise(e,t,r){let n=isNaN(e)?0:e,s=isNaN(t)?0:parseInt(t,10),i=void 0===r?this.roundHalfUp:parseInt(r,10);return new this.bigNumber(n).round(s,i).toString()}toFixedPrecise(e,t,r){let n=isNaN(e)?0:e,s=isNaN(t)?0:parseInt(t,10),i=void 0===r?this.roundHalfUp:r;return new this.bigNumber(n).toFixed(s,i).toString()}addPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).plus(n).toString()}subtractPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).minus(n).toString()}powerPrecise(e,t){let r,n=isNaN(e)?0:e,s=isNaN(t)?0:parseInt(t);if(s==Number(t)){r=new this.bigNumber(n).pow(s)}else r=Math.pow(n,Number(t));return r.toString()}multiplyPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).times(n).toString()}dividePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).div(n).toString()}modPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).mod(n).toString()}sqrtPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).sqrt().toString()}absPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).abs().toString()}floorPrecise(e){let t=isNaN(e)?0:e;return Math.floor(t).toString()}ceilPrecise(e){let t=isNaN(e)?0:e;return Math.ceil(t).toString()}comparePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).cmp(n)}comparePreciseWithin(e,t,r){let n=isNaN(e)?0:e,s=isNaN(t)?0:t,i=new this.bigNumber(n);return i.minus(s).abs().lte(r)?0:i.lt(s)?-1:1}gtPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).gt(n)}gtePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).gte(n)}ltPrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).lt(n)}ltePrecise(e,t){let r=isNaN(e)?0:e,n=isNaN(t)?0:t;return new this.bigNumber(r).lte(n)}radPrecise(e){let t=isNaN(e)?0:e;return new this.bigNumber(t).times(Math.PI).div(180).toString()}piPrecise(e){return void 0===e?this.pi:this.roundPrecise(this.pi,e)}eulerPrecise(e){return void 0===e?this.euler:this.roundPrecise(this.euler,e)}sin(e){let t=isNaN(e)?0:e;return Math.sin(t)}cos(e){let t=isNaN(e)?0:e;return Math.cos(t)}tan(e){let t=isNaN(e)?0:e;return Math.tan(t)}countSetElements(e){return Array.isArray(e)?e.length:"object"==typeof e?Object.keys(e).length:e?1:0}sortSetPrecise(e){let t=[];if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push(this.parsePrecise(e[r],NaN));else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)t.push(this.parsePrecise(e[r[n]],NaN))}return t.sort(((e,t)=>this.comparePrecise(e,t))),t}bucketSetPrecise(e,t){let r={},n=this.parsePrecise(t,NaN);if(Array.isArray(e))for(let t=0;t<e.length;t++){let s=this.parsePrecise(e[t],NaN).toString();isNaN(n)||(s=this.dividePrecise(e[t],n)),s in r||(r[s]=0),r[s]=r[s]+1}else if("object"==typeof e){let t=Object.keys(e);for(let s=0;s<t.length;s++){let i=this.parsePrecise(e[t[s]],NaN).toString();isNaN(n)||(i=this.dividePrecise(e[s],n)),i in r||(r[i]=0),r[i]=r[i]+1}}return r}histogramPrecise(e){return this.bucketSetPrecise(e)}sortHistogramPrecise(e){let t={},r=Object.keys(e);r.sort(((t,r)=>e[t]-e[r]));for(let n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}cleanValueArray(e,t){let r=void 0!==t&&t;if(!Array.isArray(e))return[];let n=[];for(let t=0;t<e.length;t++){let s=this.parsePrecise(e[t],NaN);isNaN(s)||r&&"0"==s||n.push(s)}return n}arbitraryNaturalLogOfTwo(e){const t=0|e,r=new this.bigNumber(t);if(this.ln2Cache.has(t))return this.ln2Cache.get(t);const n=new this.bigNumber(2),s=n.minus(1).div(n.plus(1)),i=s.mul(s);let o=new this.bigNumber(0),a=s,l=1;const u=this.powerPrecise(10,-r.add(8));for(let e=0;e<2e5&&(o=o.plus(a.div(l)),a=a.mul(i),l+=2,!a.abs().div(l).lt(u));e++);const c=o.mul(2);return this.ln2Cache.set(t,c),c}arbitraryNaturalLog(e,t){let r=new this.bigNumber(e),n=new this.bigNumber(t);if(r.lte(0))throw new Error("ln undefined for non-positive values.");if(r.eq(1))return new this.bigNumber(0);const s=new this.bigNumber(2);let i=0,o=r;const a=new this.bigNumber("1.5"),l=new this.bigNumber("0.75");for(;o.gt(a);)o=o.div(s),i+=1;for(;o.lt(l);)o=o.mul(s),i-=1;const u=o.minus(1).div(o.plus(1)),c=u.mul(u);let h=new this.bigNumber(0),f=u,p=1;const d=this.powerPrecise(10,-n.add(6));for(let e=0;e<2e5&&(h=h.plus(f.div(p)),f=f.mul(c),p+=2,!f.abs().div(p).lt(d));e++);const g=h.mul(2),y=this.arbitraryNaturalLogOfTwo(n);return g.plus(y.mul(i))}logPrecise(e,t,r){let n=void 0===t?this.bigNumber(10):this.bigNumber(t);const s=void 0===r?9:r,i=s+8,o=this.bigNumber.DP,a=this.bigNumber.RM;this.bigNumber.DP=i,this.bigNumber.RM=1;const l=this.bigNumber(e),u=this.bigNumber(n);if(l.lte(0))return this.log.error(`Fable logPrecise Error: Number must be greater than 0; number was ${e}.`),NaN;if(u.lte(0)||u.eq(1))return this.log.error(`Fable logPrecise Error: Base must be greater than 0 and not equal to 1 -- base ${Base} was passed in.`),NaN;const c=this.arbitraryNaturalLog(l,s),h=this.arbitraryNaturalLog(u,s);let f=c.div(h).toFixed(s);return this.bigNumber.DP=o,this.bigNumber.RM=a,f}expPrecise(e,t){let r=isNaN(e)?this.bigNumber(1):this.bigNumber(e);const n=void 0===t?9:parseInt(t,10),s=this.bigNumber.DP;this.bigNumber.DP=n+10;const i=new this.bigNumber("0.693147180559945309417232121458176568"),o=new this.bigNumber("709.782712893384"),a=new this.bigNumber("-744.4400719213812");if(r.gt(o))return this.bigNumber.DP=s,NaN;if(r.lt(a))return this.bigNumber.DP=s,new this.bigNumber(0);let l;try{l=r.div(i).round(0,0)}catch(t){return this.log.error(`Fable expPrecise Error: Rounding error during range reduction for value of ${e}. Error: ${t}`),this.bigNumber.DP=s,NaN}const u=r.minus(l.times(i)),c=new this.bigNumber(10).pow(-(n+2));let h=new this.bigNumber(1),f=new this.bigNumber(1),p=1;for(;h=h.times(u).div(p),!h.abs().lt(c);)if(f=f.plus(h),p++,p>2e3){this.log.warn(`Fable expPrecise warning: Taylor series failed to converge after 2000 iterations for value of ${e}.`);break}const d=new this.bigNumber(2),g=l.abs().toNumber();let y=0===g?new this.bigNumber(1):d.pow(g);const m=l.gte(0)?f.times(y):f.div(y);return this.bigNumber.DP=s,m.round(n).toString()}cleanValueObject(e){if("object"!=typeof e)return{};let t={},r=Object.keys(e);for(let n=0;n<r.length;n++){let s=this.parsePrecise(e[r[n]],NaN);isNaN(s)||(t[r[n]]=s)}return t}histogramDistributionByExactValue(e,t,r){if(!Array.isArray(e))return e;if(!t)return{};let n={};for(let s=0;s<e.length;s++){let i=this.fable.Utility.getValueByHash(e[s],t,r).toString();i in n||(n[i]=0),n[i]=n[i]+1}return n}histogramDistributionByExactValueFromInternalState(e,t){if(!e)return{};let r=this.fable.Utility.getInternalValueByHash(e);return this.histogramDistributionByExactValue(r,t)}histogramAggregationByExactValue(e,t,r,n){if(!Array.isArray(e))return e;if(!t||!r)return{};let s={};for(let i=0;i<e.length;i++){let o=this.fable.Utility.getValueByHash(e[i],t,n).toString(),a=this.parsePrecise(this.fable.Utility.getValueByHash(e[i],r,n),NaN);o in s||(s[o]=0),isNaN(a)||(s[o]=this.addPrecise(s[o],a))}return s}histogramAggregationByExactValueFromInternalState(e,t,r){if(!e)return{};let n=this.fable.Utility.getInternalValueByHash(e);return this.histogramAggregationByExactValue(n,t,r)}entryInSet(e,t,r){const n="number"==typeof r?r:parseInt(r);if(!Array.isArray(e))return e;if(!t)return!1;if(isNaN(n)||n>=e.length)return!1;let s=e.toSorted(((e,r)=>this.comparePrecise(e[t],r[t])));return s[n<0?s.length+n:n]}smallestInSet(e,t){return this.entryInSet(e,t,0)}largestInSet(e,t){return this.entryInSet(e,t,-1)}cumulativeSummation(e,t,r,n){if(!Array.isArray(e))return e;if(!t||!r)return e;let s="0.0";for(let i=0;i<e.length;i++){let o=this.parsePrecise(this.fable.Utility.getValueByHash(e[i],t,n));isNaN(o)?this.fable.Utility.setValueByHash(e[i],r,s,n):(s=this.addPrecise(o,s),this.fable.Utility.setValueByHash(e[i],r,s,n))}return e}maxPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let n=this.parsePrecise(e[r],NaN);this.gtPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)if(t){let s=this.parsePrecise(e[r[n]],NaN);this.gtPrecise(s,t)&&(t=s)}else t=this.parsePrecise(e[r[n]],NaN)}return t}minPrecise(e){let t=NaN;if(Array.isArray(e))for(let r=0;r<e.length;r++)if(t){let n=this.parsePrecise(e[r],NaN);!isNaN(n)&&this.ltPrecise(n,t)&&(t=n)}else t=this.parsePrecise(e[r],NaN);else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++)if(t){let s=this.parsePrecise(e[r[n]],NaN);!isNaN(s)&&this.ltPrecise(s,t)&&(t=s)}else t=this.parsePrecise(e[r[n]],NaN)}return t}sumPrecise(e){let t="0.0";if(Array.isArray(e))for(let r=0;r<e.length;r++){let n=this.parsePrecise(e[r],NaN);isNaN(n)||(t=this.addPrecise(t,n))}else if("object"==typeof e){let r=Object.keys(e);for(let n=0;n<r.length;n++){let s=this.parsePrecise(e[r[n]],NaN);isNaN(s)||(t=this.addPrecise(t,s))}}return t}meanPrecise(e){let t=this.sumPrecise(e),r=this.countSetElements(e);return 0==r?"0.0":this.dividePrecise(t,r)}averagePrecise(e){return this.meanPrecise(e)}medianPrecise(e){let t=this.countSetElements(e);if(0==t)return"0.0";let r=this.sortSetPrecise(e),n=Math.floor(t/2);if(t%2==1)return r[n];{let e=r[n-1],t=r[n];return this.dividePrecise(this.addPrecise(e,t),2)}}modePrecise(e){let t=this.bucketSetPrecise(e),r=0,n=Object.keys(t),s=[];for(let e=0;e<n.length;e++)t[n[e]]>r?(r=t[n[e]],s=[n[e]]):t[n[e]]==r&&s.push(n[e]);return s}}},{"./Fable-SetConcatArray.js":164,"fable-serviceproviderbase":53}],153:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js"),i=e("./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="MetaTemplate",this.WordTree=new s,this.StringParser=new i(this.fable),this.ParseTree=this.WordTree.ParseTree}addPattern(e,t,r,n){return this.WordTree.addPattern(e,t,r,n)}addPatternBoth(e,t,r,n,s){return this.WordTree.addPatternBoth(e,t,r,n,s)}parseString(e,t,r,n,s,i){return this.LogNoisiness>4&&this.fable.log.trace(`Metatemplate parsing template string [${e}] where the callback is a ${typeof r}`,{TemplateData:t}),this.StringParser.parseString(e,this.ParseTree,t,r,n,s,i)}}},{"./Fable-Service-MetaTemplate/MetaTemplate-StringParser.js":154,"./Fable-Service-MetaTemplate/MetaTemplate-WordTree.js":155,"fable-serviceproviderbase":53}],154:[function(e,t,r){t.exports=class{constructor(e){this.fable=e}newParserState(e){return{ParseTree:e,Asynchronous:!1,Output:"",OutputBuffer:"",Pattern:{},PatternMatch:!1,PatternMatchEnd:!1}}appendOutputBuffer(e,t){t.OutputBuffer+=e}flushOutputBuffer(e){e.Output+=e.OutputBuffer,e.OutputBuffer=""}resetOutputBuffer(e){return this.flushOutputBuffer(e),e.Pattern=!1,e.PatternStartNode=!1,e.StartPatternMatchComplete=!1,e.EndPatternMatchBegan=!1,e.PatternMatch=!1,!0}parseCharacter(e,t,r,n,s,i){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan){if(e in t.Pattern.PatternEnd){t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t);let o="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=o?t.Pattern.Parse.call(o,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i),this.resetOutputBuffer(t)}e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t))}else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern)){let e="ParserContext"in t.Pattern&&t.Pattern.ParserContext;return t.OutputBuffer=e?t.Pattern.Parse.call(e,t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i):t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStartString.length,t.OutputBuffer.length-(t.Pattern.PatternStartString.length+t.Pattern.PatternEndString.length)),r,n,s,i),this.resetOutputBuffer(t)}}else this.resetOutputBuffer(t);if(!t.PatternMatch){if(e in t.ParseTree)return this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0,!0;this.appendOutputBuffer(e,t)}return!1}executePatternAsync(e,t,r,n,s,i){if(e.Pattern.isAsync){let o="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return o?e.Pattern.ParseAsync.call(o,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,((t,n)=>(t&&this.fable.log.info(`Precedent ERROR: Async template error happened parsing ${e.Pattern.PatternStart} ... ${e.Pattern.PatternEnd}: ${t}`),e.OutputBuffer=n,this.resetOutputBuffer(e),r())),n,s,i):e.Pattern.ParseAsync(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,((t,n)=>(t&&this.fable.log.info(`Precedent ERROR: Async template error happened parsing ${e.Pattern.PatternStart} ... ${e.Pattern.PatternEnd}: ${t}`),e.OutputBuffer=n,this.resetOutputBuffer(e),r())),n,s,i)}{let o="ParserContext"in e.Pattern&&e.Pattern.ParserContext;return e.OutputBuffer=o?e.Pattern.Parse.call(o,e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,n,s,i):e.Pattern.Parse(e.OutputBuffer.substr(e.Pattern.PatternStartString.length,e.OutputBuffer.length-(e.Pattern.PatternStartString.length+e.Pattern.PatternEndString.length)),t,n,s,i),this.resetOutputBuffer(e),r()}}parseCharacterAsync(e,t,r,n,s,i,o){if(t.PatternMatch)if(!t.StartPatternMatchComplete&&e in t.Pattern)t.Pattern=t.Pattern[e],this.appendOutputBuffer(e,t);else if(t.EndPatternMatchBegan)if(e in t.Pattern.PatternEnd){if(t.Pattern=t.Pattern.PatternEnd[e],this.appendOutputBuffer(e,t),"Parse"in t.Pattern)return this.executePatternAsync(t,r,n,s,i,o)}else e in t.PatternStartNode.PatternEnd?(t.Pattern=t.PatternStartNode.PatternEnd[e],this.appendOutputBuffer(e,t)):(t.EndPatternMatchBegan=!1,this.appendOutputBuffer(e,t));else if("PatternEnd"in t.Pattern){if(t.StartPatternMatchComplete||(t.StartPatternMatchComplete=!0,t.PatternStartNode=t.Pattern),this.appendOutputBuffer(e,t),e in t.Pattern.PatternEnd&&(t.EndPatternMatchBegan=!0,t.Pattern=t.Pattern.PatternEnd[e],"Parse"in t.Pattern))return this.executePatternAsync(t,r,n,s,i,o)}else this.resetOutputBuffer(t);else e in t.ParseTree?(this.resetOutputBuffer(t),this.appendOutputBuffer(e,t),t.Pattern=t.ParseTree[e],t.PatternMatch=!0):this.appendOutputBuffer(e,t);return n()}parseString(e,t,r,n,s,i,o){let a=Array.isArray(s)?s:[],l=Array.from(a);if(l.push(r),"function"!=typeof n){let n=this.newParserState(t);for(var u=0;u<e.length;u++)this.parseCharacter(e[u],n,r,l,i,o);return this.flushOutputBuffer(n),n.Output}{let s=this.newParserState(t);s.Asynchronous=!0;let a=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");for(let t=0;t<e.length;t++)a.anticipate((n=>{this.parseCharacterAsync(e[t],s,r,n,l,i,o)}));a.wait((e=>(this.flushOutputBuffer(s),n(e,s.Output))))}}}},{}],155:[function(e,t,r){t.exports=class{constructor(){this.ParseTree={}}addChild(e,t){return t in e||(e[t]={}),e[t]}addEndChild(e,t){return"PatternEnd"in e||(e.PatternEnd={}),e.PatternEnd[t]={},e.PatternEnd[t]}addPatternBoth(e,t,r,n,s){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;let i=this.ParseTree;for(var o=0;o<e.length;o++)i=this.addChild(i,e[o],o);"PatternEnd"in i||(i.PatternEnd={});let a="string"==typeof t?t:e;for(let e=0;e<a.length;e++)i=this.addEndChild(i,a[e],e);return i.PatternStartString=e,i.PatternEndString=a,i.Parse="function"==typeof r?r:"string"==typeof r?(e,t)=>r:(e,t)=>e,i.ParseAsync="function"==typeof n?n:"string"==typeof n?(e,t,r)=>r(null,n):(e,t,r)=>r(null,i.Parse(e,t)),s&&(i.ParserContext=s),i.isAsync=!0,i}addPattern(e,t,r,n){return this.addPatternBoth(e,t,r,null,n)}}},{}],156:[function(e,t,r){t.exports={Metadata:{UUID:!1,Hash:!1,Name:"",Summary:"",Version:0},Status:{Completed:!1,StepCount:1},Steps:[],Errors:[],Log:[]}},{}],157:[function(e,t,r){const{PE:n}=e("big.js"),s=e("fable-serviceproviderbase"),i=JSON.stringify(e("./Fable-Service-Operation-DefaultSettings.js"));t.exports=class extends s{constructor(e,t,r){super(e,t,r),this.timeStamps={},this.serviceType="PhasedOperation",this.state=JSON.parse(i),this.stepMap={},this.stepFunctions={},this.state.Metadata.Hash=this.Hash,this.state.Metadata.UUID=this.UUID,this.state.Metadata.Name="string"==typeof this.options.Name?this.options.Name:`Unnamed Operation ${this.state.Metadata.UUID}`,this.name=this.state.Metadata.Name,this.progressTrackerSet=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTrackerSet"),this.state.OverallProgressTracker=this.progressTrackerSet.createProgressTracker(`Overall-${this.state.Metadata.UUID}`),this.log=this}execute(e){if(this.state.OverallProgressTracker.StartTimeStamp>0)return e(new Error(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} has already been executed!`));let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");this.progressTrackerSet.setProgressTrackerTotalOperations(this.state.OverallProgressTracker.Hash,this.state.Status.StepCount),this.progressTrackerSet.startProgressTracker(this.state.OverallProgressTracker.Hash),this.info(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} starting...`);for(let e=0;e<this.state.Steps.length;e++)t.anticipate(function(t){return this.fable.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}] ${this.state.Steps[e].Name} starting...`),this.progressTrackerSet.startProgressTracker(this.state.Steps[e].ProgressTracker.Hash),t()}.bind(this)),t.anticipate(this.stepFunctions[this.state.Steps[e].GUIDStep].bind({log:this,fable:this.fable,options:this.state.Steps[e].Metadata,metadata:this.state.Steps[e].Metadata,ProgressTracker:this.progressTrackerSet.getProgressTracker(this.state.Steps[e].ProgressTracker.Hash),logProgressTrackerStatus:function(){return this.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}]: ${this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash)}`)}.bind(this),OperationState:this.state,StepState:this.state.Steps[e]})),t.anticipate(function(t){this.progressTrackerSet.endProgressTracker(this.state.Steps[e].ProgressTracker.Hash);let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.Steps[e].ProgressTracker.Hash);this.fable.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}] ${this.state.Steps[e].Name} complete.`),this.fable.log.info(`Step #${e} [${this.state.Steps[e].GUIDStep}] ${this.state.Steps[e].Name} ${r}.`),this.progressTrackerSet.incrementProgressTracker(this.state.OverallProgressTracker.Hash,1);let n=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.fable.log.info(`Operation [${this.state.Metadata.UUID}] ${n}.`),t()}.bind(this));t.wait((t=>{if(t)return this.fable.log.error(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} had an error: ${t}`,t),e(t);this.info(`Operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} complete.`);let r=this.progressTrackerSet.getProgressTrackerStatusString(this.state.OverallProgressTracker.Hash);return this.progressTrackerSet.endProgressTracker(this.state.OverallProgressTracker.Hash),this.fable.log.info(`Operation [${this.state.Metadata.UUID}] ${r}.`),e()}))}addStep(e,t,r,n,s){let i={};return i.GUIDStep=void 0!==s?s:`STEP-${this.state.Steps.length}-${this.fable.DataGeneration.randomNumericString()}`,i.Name=void 0!==r?r:`Step [${i.GUIDStep}]`,i.Description=void 0!==n?n:`Step execution of ${i.Name}.`,i.ProgressTracker=this.progressTrackerSet.createProgressTracker(i.GUIDStep),i.Metadata="object"==typeof t?t:{},this.state.Steps.push(i),this.stepMap[i.GUIDStep]=i,this.stepFunctions[i.GUIDStep]="function"==typeof e?e:function(e){return e()},this.state.Status.StepCount++,i}setStepTotalOperations(e,t){if(!(e in this.stepMap))return new Error(`Step [${e}] does not exist in operation [${this.state.Metadata.UUID}] ${this.state.Metadata.Name} when attempting to set total operations to ${t}.`);this.progressTrackerSet.setProgressTrackerTotalOperations(this.stepMap[e].ProgressTracker.Hash,t)}writeOperationLog(e,t,r){this.state.Log.push(`[${(new Date).toUTCString()}]-[${e}]: ${t}`),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(e,t){this.state.Errors.push(`${e}`),"object"==typeof t&&this.state.Errors.push(JSON.stringify(t))}trace(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}debug(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}info(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}warn(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}error(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}fatal(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}},{"./Fable-Service-Operation-DefaultSettings.js":156,"big.js":17,"fable-serviceproviderbase":53}],158:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTime",this.timeStamps={}}formatTimeDuration(e){let t="number"==typeof e?e:0;if(e<0)return"unknown";let r="";return t>36e5&&(r+=Math.floor(t/36e5)+"h ",t%=36e5),t>6e4&&(r+=Math.floor(t/6e4)+"m ",t%=6e4),t>1e3&&(r+=Math.floor(t/1e3)+"s ",t%=1e3),r+=Math.round(t)+"ms",r}createTimeStamp(e){let t="string"==typeof e?e:"Default";return this.timeStamps[t]=+new Date,this.timeStamps[t]}getTimeStampValue(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps?this.timeStamps[t]:-1}updateTimeStampValue(e,t){let r="string"==typeof e?e:"Default",n=!1;return n="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&n?(this.timeStamps[r]=n,this.timeStamps[r]):-1}removeTimeStamp(e){let t="string"==typeof e?e:"Default";return t in this.timeStamps&&(delete this.timeStamps[t],!0)}getTimeStampDelta(e,t){let r="string"==typeof e?e:"Default",n=!1;return n="string"==typeof t?tmpReference in this.timeStamps&&this.timeStamps[tmpReference]:"number"==typeof t?t:+new Date,r in this.timeStamps&&n?n-this.timeStamps[r]:-1}getDurationBetweenTimestamps(e,t){let r="string"==typeof e?e:"Default",n="string"==typeof t?t:"Default";return r in this.timeStamps&&n in this.timeStamps?this.timeStamps[n]-this.timeStamps[r]:-1}getTimeStampDeltaMessage(e,t,r){let n="string"==typeof e?e:"Default",s=void 0!==t?t:`Elapsed for ${n}: `,i=this.getTimeStampDelta(n,r);return`${s} ${this.formatTimeDuration(i)}`}logTimeStampDelta(e,t,r){this.fable.log.info(this.getTimeStampDeltaMessage(e,t,r))}}},{"fable-serviceproviderbase":53}],159:[function(e,t,r){t.exports=class{constructor(e,t){this.progressTrackerSet=e,this.progressTrackerHash=t,this.data=this.progressTrackerSet.getProgressTrackerData(this.progressTrackerHash)}updateProgressTracker(e){return this.progressTrackerSet.updateProgressTracker(this.progressTrackerHash,e)}incrementProgressTracker(e){return this.progressTrackerSet.incrementProgressTracker(this.progressTrackerHash,e)}setProgressTrackerTotalOperations(e){return this.progressTrackerSet.setProgressTrackerTotalOperations(this.progressTrackerHash,e)}getProgressTrackerStatusString(){return this.progressTrackerSet.getProgressTrackerStatusString(this.progressTrackerHash)}}},{}],160:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("./Fable-Service-ProgressTracker/ProgressTracker.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="ProgressTrackerSet",this.progressTrackers={},this.progressTimes=this.fable.instantiateServiceProviderWithoutRegistration("ProgressTime"),this.progressTimes.createTimeStamp("CurrentTime")}getProgressTracker(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn(`ProgressTracker ${t} does not exist! Creating a new tracker...`),this.createProgressTracker(t,100)),new s(this,e)}getProgressTrackerData(e){let t="string"==typeof e?e:"Default";return t in this.progressTrackers||(this.fable.log.warn(`ProgressTracker ${t} does not exist! Creating a new tracker...`),this.createProgressTracker(t,100)),this.progressTrackers[t]}createProgressTracker(e,t){let r="string"==typeof e?e:"Default",n={Hash:r,StartTimeHash:`${r}-Start`,StartTimeStamp:-1,CurrentTimeStamp:-1,EndTimeHash:`${r}-End`,EndTimeStamp:-1,PercentComplete:-1,AllowTruePercentComplete:!1,ElapsedTime:-1,AverageOperationTime:-1,EstimatedCompletionTime:-1,TotalCount:"number"==typeof t?t:100,CurrentCount:-1};return r in this.progressTrackers&&(this.fable.log.warn(`ProgressTracker ${r} already exists! Overwriting with a new tracker...`),this.progressTimes.removeTimeStamp(n.StartTimeHash),this.progressTimes.removeTimeStamp(n.EndTimeHash)),this.progressTrackers[r]=n,n}setProgressTrackerTotalOperations(e,t){let r="string"==typeof e?e:"Default",n="number"==typeof t?t:100;return r in this.progressTrackers||(this.fable.log.warn(`Attempted to set the total operations of ProgressTracker ${r} but it does not exist! Creating a new tracker...`),this.createProgressTracker(r,n)),this.progressTrackers[r].TotalCount=n,this.progressTrackers[r]}startProgressTracker(e){let t="string"==typeof e?e:"Default";t in this.progressTrackers||this.createProgressTracker(t,100);let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].StartTimeHash),r.StartTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].StartTimeHash),r.CurrentCount<0&&(r.CurrentCount=0),this.solveProgressTrackerStatus(t)}endProgressTracker(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error(`Attempted to end ProgressTracker ${t} that does not exist!`),!1;let r=this.progressTrackers[t];return this.progressTimes.createTimeStamp(this.progressTrackers[t].EndTimeHash),r.EndTimeStamp=this.progressTimes.getTimeStampValue(this.progressTrackers[t].EndTimeHash),this.solveProgressTrackerStatus(t)}solveProgressTrackerStatus(e){let t="string"==typeof e?e:"Default";if(!(t in this.progressTrackers))return this.fable.log.error(`Attempted to solve ProgressTracker ${t} that does not exist!`),!1;let r=this.progressTrackers[t];return(r.TotalCount<1||isNaN(r.TotalCount))&&(this.fable.log.error(`ProgressTracker ${r.Hash} has an invalid total count of operations (${r.TotalCount}! Setting it to the default of 100...`),r.TotalCount=100),r.CurrentCount<1?r.PercentComplete=0:r.PercentComplete=r.CurrentCount/r.TotalCount*100,!r.AllowTruePercentComplete&&r.PercentComplete>100&&(r.PercentComplete=100),this.progressTimes.updateTimeStampValue("CurrentTime"),r.CurrentTimeStamp=this.progressTimes.getTimeStampValue("CurrentTime"),r.ElapsedTime=r.CurrentTimeStamp-r.StartTimeStamp,r.EndTimeStamp>0&&(r.ElapsedTime=r.EndTimeStamp-r.StartTimeStamp),r.CurrentCount>0?r.AverageOperationTime=(r.CurrentTimeStamp-r.StartTimeStamp)/r.CurrentCount:r.AverageOperationTime=-1,r.AverageOperationTime>0?r.EstimatedCompletionTime=Math.max(r.TotalCount-r.CurrentCount,0)*r.AverageOperationTime:r.EstimatedCompletionTime=-1,r}updateProgressTracker(e,t){let r="string"==typeof e?e:"Default",n=parseInt(t);return isNaN(n)?(this.fable.log.warn(`Attempted to update ProgressTracker ${r} with an invalid number of operations!`),!1):(r in this.progressTrackers||this.createProgressTracker(100,r),this.progressTrackers[r].CurrentCount=n,this.solveProgressTrackerStatus(r))}incrementProgressTracker(e,t){let r="string"==typeof e?e:"Default",n=parseInt(t);return isNaN(n)&&(n=1),r in this.progressTrackers?(this.progressTrackers[r].StartTimeStamp<1&&(this.fable.log.warn(`Attempted to increment ProgressTracker ${r} but it was not started.. starting now.`),this.startProgressTracker(r)),this.progressTrackers[r].CurrentCount=this.progressTrackers[r].CurrentCount+n,this.solveProgressTrackerStatus(r)):(this.fable.log.warn(`Attempted to increment ProgressTracker ${r} but it did not exist.`),!1)}getProgressTrackerCompletedOperationCountString(e){let t="string"==typeof e?e:"Default";const r=this.progressTrackers[t];return r.CurrentCount<0?"none":r.CurrentCount<1?"0":`${r.CurrentCount}`}getProgressTrackerPercentCompleteString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1||e.CurrentCount<1?"0%":(e.EndTimeStamp,`${e.PercentComplete.toFixed(3)}%`)}return`ProgressTracker ${t} does not exist! No stats to display.`}getProgressTrackerStatusString(e){let t="string"==typeof e?e:"Default";if(this.solveProgressTrackerStatus(t),t in this.progressTrackers){const e=this.progressTrackers[t];return e.StartTimeStamp<1?`ProgressTracker ${e.Hash} has not been started yet.`:e.CurrentCount<1&&e.EndTimeStamp<1?`ProgressTracker ${e.Hash} has no completed operations. ${this.progressTimes.formatTimeDuration(e.ElapsedTime)} have elapsed since it was started.`:e.EndTimeStamp<1?`ProgressTracker ${e.Hash} is ${e.PercentComplete.toFixed(3)}% completed - ${e.CurrentCount} / ${e.TotalCount} operations over ${this.progressTimes.formatTimeDuration(e.ElapsedTime)} (median ${this.progressTimes.formatTimeDuration(e.AverageOperationTime)} per). Estimated completion: ${this.progressTimes.formatTimeDuration(e.EstimatedCompletionTime)}`:`ProgressTracker ${e.Hash} is done. ${e.CurrentCount} / ${e.TotalCount} operations were completed in ${this.progressTimes.formatTimeDuration(e.ElapsedTime)} (median ${this.progressTimes.formatTimeDuration(e.AverageOperationTime)} per).`}return`ProgressTracker ${t} does not exist! No stats to display.`}logProgressTrackerStatus(e){this.fable.log.info(this.getProgressTrackerStatusString(e))}}},{"./Fable-Service-ProgressTracker/ProgressTracker.js":159,"fable-serviceproviderbase":53}],161:[function(e,t,r){(function(r){(function(){const n=e("fable-serviceproviderbase"),s=e("simple-get"),i=e("cookie");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.TraceLog=!1,(this.options.TraceLog||this.fable.TraceLog)&&(this.TraceLog=!0),this.dataFormat=this.fable.services.DataFormat,this.serviceType="RestClient",this.cookie=!1,this.prepareRequestOptions=e=>e}get simpleGet(){return s}prepareCookies(e){if(this.cookie){let t=this.cookie;"headers"in e||(e.headers={});let r=Object.keys(t);r.length>0&&(e.headers.cookie=i.serialize(r[0],t[r[0]]))}return e}preRequest(e){let t=this.prepareCookies(e);return"RestClientURLPrefix"in this.fable.settings&&(t.url=this.fable.settings.RestClientURLPrefix+t.url),this.prepareRequestOptions(t)}executeChunkedRequest(e,t){let r=this.preRequest(e);return r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug(`Beginning ${r.method} request to ${r.url} at ${r.RequestStartTime}`),s(r,((e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${r.method} connected in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms code ${n.statusCode}`)}let s="";n.on("data",(e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${r.method} data chunk size ${e.length}b received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,t)}ms`)}s+=e})),n.on("end",(()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`==> ${r.method} completed data size ${s.length}b received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms`)}return t(e,n,s)}))}))}executeChunkedRequestBinary(e,t){let n=this.preRequest(e);return n.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug(`Beginning ${n.method} request to ${n.url} at ${n.RequestStartTime}`),n.json=!1,n.encoding=null,s(n,((e,s)=>{if(e)return t(e,s);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${n.method} connected in ${this.dataFormat.formatTimeDelta(n.RequestStartTime,e)}ms code ${s.statusCode}`)}let i=!1;s.on("data",(e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e ${n.method} data chunk size ${e.length}b received in ${this.dataFormat.formatTimeDelta(n.RequestStartTime,t)}ms`)}i=i?r.concat([i,e]):r.from(e)})),s.on("end",(()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`==> ${n.method} completed data size ${i.length}b received in ${this.dataFormat.formatTimeDelta(n.RequestStartTime,e)}ms`)}return t(e,s,i)}))}))}executeJSONRequest(e,t){e.json=!0;let r=this.preRequest(e);return"headers"in r||(r.headers={}),r.RequestStartTime=this.fable.log.getTimeStamp(),this.TraceLog&&this.fable.log.debug(`Beginning ${r.method} JSON request to ${r.url} at ${r.RequestStartTime}`),s(r,((e,n)=>{if(e)return t(e,n);if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e JSON ${r.method} connected in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms code ${n.statusCode}`)}let s="";n.on("data",(e=>{if(this.TraceLog){let t=this.fable.log.getTimeStamp();this.fable.log.debug(`--\x3e JSON ${r.method} data chunk size ${e.length}b received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,t)}ms`)}s+=e})),n.on("end",(()=>{if(this.TraceLog){let e=this.fable.log.getTimeStamp();this.fable.log.debug(`==> JSON ${r.method} completed - received in ${this.dataFormat.formatTimeDelta(r.RequestStartTime,e)}ms`)}return t(e,n,JSON.parse(s))}))}))}getJSON(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeJSONRequest(r,t)}putJSON(e,t){return"object"!=typeof e.body?t(new Error("PUT JSON Error Invalid options object")):(e.method="PUT",this.executeJSONRequest(e,t))}postJSON(e,t){return"object"!=typeof e.body?t(new Error("POST JSON Error Invalid options object")):(e.method="POST",this.executeJSONRequest(e,t))}patchJSON(e,t){return"object"!=typeof e.body?t(new Error("PATCH JSON Error Invalid options object")):(e.method="PATCH",this.executeJSONRequest(e,t))}headJSON(e,t){return"object"!=typeof e.body?t(new Error("HEAD JSON Error Invalid options object")):(e.method="HEAD",this.executeJSONRequest(e,t))}delJSON(e,t){return e.method="DELETE",this.executeJSONRequest(e,t)}getRawText(e,t){let r="object"==typeof e?e:{};return"string"==typeof e&&(r.url=e),r.method="GET",this.executeChunkedRequest(r,t)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:20,cookie:27,"fable-serviceproviderbase":53,"simple-get":105}],162:[function(e,t,r){const n=e("fable-serviceproviderbase");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.serviceType="Template",this.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},this.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},this.renderFunction=!1,this.templateString=!1}renderTemplate(e){return this.renderFunction(e)}templateFunction(){return this.renderTemplate.bind(this)}buildTemplateFunction(e,t){return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,(e=>`\\${this.templateEscapes[e]}`)).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,((e,t)=>`'+\n(${decodeURIComponent(t)})+\n'`)).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,((e,t)=>`';\n${decodeURIComponent(t)}\n;__p+='`))+"';\n",this.TemplateSource=`with(pTemplateDataObject||{}){\n${this.TemplateSource}}\n`,this.TemplateSource=`var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n${this.TemplateSource}return __p;\n`,this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"fable-serviceproviderbase":53}],163:[function(e,t,r){const n=e("fable-serviceproviderbase"),s=e("async.waterfall"),i=e("async.eachlimit"),o=e("big.js");t.exports=class extends n{constructor(e,t,r){super(e,t,r),this.templates={},this.waterfall=s,this.eachLimit=i,this.bigNumber=o}extend(e){for(let t=0;t<(arguments.length<=1?0:arguments.length-1);t++){let r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if("object"==typeof r){let t=Object.keys(r);for(let n=0;n<t.length;n++)e[t[n]]=r[t[n]]}}return e}template(e,t){return this.fable.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}buildHashedTemplate(e,t,r){let n=this.fable.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}chunk(e,t,r){let n=[...e],s="number"==typeof t?t:0,i=void 0!==r?r:[];if(s<=0)return i;for(;n.length;)i.push(n.splice(0,s));return i}getInternalValueByHash(e){return this.getValueByHash(this.fable,e)}getValueByHash(e,t,r){let n=r;return void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),n.getValueByHash(e,t)}setValueByHash(e,t,r,n){let s=n;return void 0===s&&(this.manifest||(this.manifest=this.fable.newManyfest()),s=this.manifest),s.setValueByHash(e,t,r)}createValueArrayByHashes(e,t,r){let n=r;if(void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),!Array.isArray(t))return[];let s=[];for(let r=0;r<t.length;r++)s.push(n.getValueByHash(e,t[r]));return s}createValueArrayByHashesFromInternal(e,t){return this.createValueArrayByHashes(this.fable,e,t)}createValueArrayByHashParametersFromInternal(){if(arguments.length<2)return[];let e=Array.prototype.slice.call(arguments);return this.createValueArrayByHashes(this.fable,e)}createValueObjectByHashes(e,t,r){let n=r;if(void 0===n&&(this.manifest||(this.manifest=this.fable.newManyfest()),n=this.manifest),!Array.isArray(t))return{};let s={};for(let r=0;r<t.length;r++)s[t[r]]=n.getValueByHash(e,t[r]);return s}createValueObjectByHashesFromInternal(e,t){return this.createValueObjectByHashes(this.fable,e,t)}createValueObjectByHashParametersFromInternal(){let e=Array.prototype.slice.call(arguments);return this.createValueObjectByHashes(this.fable,e)}addressIsNullOrEmpty(e,t){if(this.manifest||(this.manifest=this.fable.newManyfest()),!this.manifest.checkAddressExists(e,t))return!0;let r=this.manifest.getValueByHash(e,t);return null===r||""===r}isoStringToDate(e){"Dates"in this.fable||this.fable.instantiateServiceProvider("Dates");let t=!1;try{t=this.fable.Dates.dayJS.utc(e)}catch(t){return this.fable.log.error(`Could not parse date string ${e} with dayJS.`),!1}return!!t&&t.toDate()}findFirstValueByStringIncludes(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let s=0;s<e.length;s++){let i=this.manifest.getValueByHash(e[s],t);if(i&&i.includes(r))return this.manifest.getValueByHash(e[s],n)}}findFirstValueByStringIncludesInternal(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let s=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByStringIncludes(s,t,r,n)}findFirstValueByExactMatch(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),Array.isArray(e))for(let s=0;s<e.length;s++){let i=this.manifest.getValueByHash(e[s],t);if(i&&i==r)return this.manifest.getValueByHash(e[s],n)}}findFirstValueByExactMatchInternal(e,t,r,n){if(this.manifest||(this.manifest=this.fable.newManyfest()),"string"!=typeof e)return;let s=this.manifest.getValueByHash(this.fable,e);return this.findFirstValueByExactMatch(s,t,r,n)}flattenArrayOfSolverInputs(e){if(!Array.isArray(e)&&("object"==typeof e&&(e=Object.values(e)),!e))return[];return e.flatMap((e=>Array.isArray(e)?e:"object"==typeof e?Object.values(e):[e]))}createArrayFromAbsoluteValues(){let e=[];for(let t=0;t<arguments.length;t++)e.push(arguments[t]);return e}}},{"async.eachlimit":1,"async.waterfall":15,"big.js":17,"fable-serviceproviderbase":53}],164:[function(e,t,r){class n{constructor(e,t){this.values=e instanceof n?e.values.concat([t]):t instanceof n?[e].concat(t.values):[e,t]}}t.exports=n},{}]},{},[132])(132)}));
|
|
12
12
|
//# sourceMappingURL=fable.min.js.map
|