fable 3.0.20 → 3.0.21

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
@@ -1,4 +1,9 @@
1
- "use strict";!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fable=t()}}((function(){return function t(e,r,n){function i(o,a){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){var n=t("async.util.eachoflimit"),i=t("async.util.withoutindex");e.exports=function(t,e,r,s){return n(e)(t,i(r),s)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(t,e,r){e.exports=function(t){return function e(r){function n(){return t.length&&t[r].apply(null,arguments),n.next()}return n.next=function(){return r<t.length-1?e(r+1):null},n}(0)}},{}],3:[function(t,e,r){var n=t("async.util.once"),i=t("async.util.noop"),s=t("async.util.onlyonce"),o=t("async.util.keyiterator");e.exports=function(t){return function(e,r,a){a=n(a||i);var l=o(e=e||[]);if(t<=0)return a(null);var c=!1,u=0,h=!1;!function n(){if(c&&u<=0)return a(null);for(;u<t&&!h;){var i=l();if(null===i)return c=!0,void(u<=0&&a(null));u+=1,r(e[i],i,s((function(t){u-=1,t?(a(t),h=!0):n()})))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(t,e,r){var n=t("async.util.setimmediate"),i=t("async.util.restparam");e.exports=function(t){return i((function(e){var r=e.pop();e.push((function(){var t=arguments;i?n((function(){r.apply(null,t)})):r.apply(null,t)}));var i=!0;t.apply(this,e),i=!1}))}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(t,e,r){e.exports=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],6:[function(t,e,r){var n=t("async.util.isarray");e.exports=function(t){return n(t)||"number"==typeof t.length&&t.length>=0&&t.length%1==0}},{"async.util.isarray":5}],7:[function(t,e,r){var n=t("async.util.keys"),i=t("async.util.isarraylike");e.exports=function(t){var e,r,s=-1;return i(t)?(e=t.length,function(){return++s<e?s:null}):(r=n(t),e=r.length,function(){return++s<e?r[s]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(t,e,r){e.exports=Object.keys||function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}},{}],9:[function(t,e,r){e.exports=function(){}},{}],10:[function(t,e,r){e.exports=function(t){return function(){null!==t&&(t.apply(this,arguments),t=null)}}},{}],11:[function(t,e,r){e.exports=function(t){return function(){if(null===t)throw new Error("Callback was already called.");t.apply(this,arguments),t=null}}},{}],12:[function(t,e,r){e.exports=function(t,e){return e=null==e?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),n=new Array(r),i=0;i<r;i++)n[i]=arguments[i+e];switch(e){case 0:return t.call(this,n);case 1:return t.call(this,arguments[0],n)}}}},{}],13:[function(t,e,r){(function(t){(function(){var r="function"==typeof t&&t,n=function(t){setTimeout(t,0)};e.exports=function(t){return(r||n)(t)}}).call(this)}).call(this,t("timers").setImmediate)},{timers:33}],14:[function(t,e,r){e.exports=function(t){return function(e,r,n){return t(e,n)}}},{}],15:[function(t,e,r){var n=t("async.util.once"),i=t("async.util.noop"),s=t("async.util.isarray"),o=t("async.util.restparam"),a=t("async.util.ensureasync"),l=t("async.iterator");e.exports=function(t,e){if(e=n(e||i),!s(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();!function t(r){return o((function(n,i){if(n)e.apply(null,[n].concat(i));else{var s=r.next();s?i.push(t(s)):i.push(e),a(r).apply(null,i)}}))}(l(t))()}},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(t,e,r){},{}],17:[function(t,e,r){e.exports=
1
+ "use strict";!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fable=t()}}((function(){return function t(e,r,n){function i(o,a){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){var n=t("async.util.eachoflimit"),i=t("async.util.withoutindex");e.exports=function(t,e,r,s){return n(e)(t,i(r),s)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(t,e,r){e.exports=function(t){return function e(r){function n(){return t.length&&t[r].apply(null,arguments),n.next()}return n.next=function(){return r<t.length-1?e(r+1):null},n}(0)}},{}],3:[function(t,e,r){var n=t("async.util.once"),i=t("async.util.noop"),s=t("async.util.onlyonce"),o=t("async.util.keyiterator");e.exports=function(t){return function(e,r,a){a=n(a||i);var l=o(e=e||[]);if(t<=0)return a(null);var c=!1,u=0,h=!1;!function n(){if(c&&u<=0)return a(null);for(;u<t&&!h;){var i=l();if(null===i)return c=!0,void(u<=0&&a(null));u+=1,r(e[i],i,s((function(t){u-=1,t?(a(t),h=!0):n()})))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(t,e,r){var n=t("async.util.setimmediate"),i=t("async.util.restparam");e.exports=function(t){return i((function(e){var r=e.pop();e.push((function(){var t=arguments;i?n((function(){r.apply(null,t)})):r.apply(null,t)}));var i=!0;t.apply(this,e),i=!1}))}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(t,e,r){e.exports=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],6:[function(t,e,r){var n=t("async.util.isarray");e.exports=function(t){return n(t)||"number"==typeof t.length&&t.length>=0&&t.length%1==0}},{"async.util.isarray":5}],7:[function(t,e,r){var n=t("async.util.keys"),i=t("async.util.isarraylike");e.exports=function(t){var e,r,s=-1;return i(t)?(e=t.length,function(){return++s<e?s:null}):(r=n(t),e=r.length,function(){return++s<e?r[s]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(t,e,r){e.exports=Object.keys||function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}},{}],9:[function(t,e,r){e.exports=function(){}},{}],10:[function(t,e,r){e.exports=function(t){return function(){null!==t&&(t.apply(this,arguments),t=null)}}},{}],11:[function(t,e,r){e.exports=function(t){return function(){if(null===t)throw new Error("Callback was already called.");t.apply(this,arguments),t=null}}},{}],12:[function(t,e,r){e.exports=function(t,e){return e=null==e?t.length-1:+e,function(){for(var r=Math.max(arguments.length-e,0),n=new Array(r),i=0;i<r;i++)n[i]=arguments[i+e];switch(e){case 0:return t.call(this,n);case 1:return t.call(this,arguments[0],n)}}}},{}],13:[function(t,e,r){(function(t){(function(){var r="function"==typeof t&&t,n=function(t){setTimeout(t,0)};e.exports=function(t){return(r||n)(t)}}).call(this)}).call(this,t("timers").setImmediate)},{timers:34}],14:[function(t,e,r){e.exports=function(t){return function(e,r,n){return t(e,n)}}},{}],15:[function(t,e,r){var n=t("async.util.once"),i=t("async.util.noop"),s=t("async.util.isarray"),o=t("async.util.restparam"),a=t("async.util.ensureasync"),l=t("async.iterator");e.exports=function(t,e){if(e=n(e||i),!s(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();!function t(r){return o((function(n,i){if(n)e.apply(null,[n].concat(i));else{var s=r.next();s?i.push(t(s)):i.push(e),a(r).apply(null,i)}}))}(l(t))()}},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(t,e,r){},{}],17:[function(t,e,r){e.exports=
2
+ /**
3
+ * @license MIT
4
+ * @author <steven@velozo.com>
5
+ */
6
+ class{constructor(){this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlpha=/[^a-z0-9]/gi,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}stringReverse(t){return t.split("").reverse().join("")}stringStartsWith(t,e,r){return this._UseEngineStringStartsWith?t.startsWith(e,r):this.stringStartsWith_Polyfill.call(t,e,r)}stringStartsWith_Polyfill(t,e){return this.slice(e||0,t.length)===t}stringEndsWith(t,e,r){return this._UseEngineStringEndsWith?t.endsWith(e,r):this.stringEndsWith_Polyfill.call(t,e,r)}stringEndsWith_Polyfill(t,e){return e<this.length?e|=0:e=this.length,this.substr(e-t.length,t.length)===t}insecureStringHash(t){let e=0,r=t.length,n=0;for(;n<r;)e=(e<<5)-e+t.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(e)}cleanEnclosureWrapCharacters(t,e){return e.startsWith(t)&&e.endsWith(t)?e.substring(1,e.length-1):e}cleanNonAlphaCharacters(t){if("string"==typeof t&&""!=t)return t.replace(this._Regex_formatterCleanNonAlpha,this._Value_Clean_formatterCleanNonAlpha)}formatterInsertCommas(t){let e=this.stringReverse(t).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(e)}processAddCommasToNumberRegex(t,e,r,n,i,s){return e+(i?this.formatterInsertCommas(n)+i+s:this.formatterInsertCommas(n+s))}formatterAddCommasToNumber(t){return t.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(t){let e=parseFloat(t).toFixed(2);return isNaN(e)&&("string"==typeof t&&(e=parseFloat(t.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(e))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(e))}formatterRoundNumber(t,e){let r=void 0===e?2:e,n=Number.parseFloat(t).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}stringBeforeMatch(t,e){return t.split(e)[0]}stringAfterMatch(t,e){let r=t.indexOf(e);return r<0||r+e.length>=t.length?"":t.substring(r+e.length)}stringCountEnclosures(t,e,r){let n="string"==typeof t?t:"",i="string"==typeof e?e:"(",s="string"==typeof r?r:")",o=0,a=0;for(let t=0;t<n.length;t++)n[t]==i?(0==a&&o++,a++):n[t]==s&&a--;return o}stringGetEnclosureValueByIndex(t,e,r,n){let i="string"==typeof t?t:"",s="number"==typeof e?e:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,c=0,u=!1,h=0,f=0;for(let t=0;t<i.length;t++)i[t]==o?(c++,1==c&&(l++,s==l-1&&(u=!0,h=t))):i[t]==a&&(c--,0==c&&u&&f<=h&&(f=t,u=!1));return l<=s?"":f>0&&f>h?i.substring(h+1,f):i.substring(h+1)}stringRemoveEnclosureByIndex(t,e,r,n){let i="string"==typeof t?t:"",s="number"==typeof e?e:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,c=0,u=!1,h=0,f=0;for(let t=0;t<i.length;t++)i[t]==o?(c++,1==c&&(l++,s==l-1&&(u=!0,h=t))):i[t]==a&&(c--,0==c&&u&&f<=h&&(f=t,u=!1));if(l<=s)return i;let g="";return h>1&&(g=i.substring(0,h)),i.length>f+1&&f>h&&(g+=i.substring(f+1)),g}}},{}],18:[function(t,e,r){e.exports=
2
7
  /**
3
8
  * Base Logger Class
4
9
  *
@@ -6,7 +11,7 @@
6
11
  *
7
12
  * @author Steven Velozo <steven@velozo.com>
8
13
  */
9
- class{constructor(t,e){this._Settings="object"==typeof t?t:{},this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}generateInsecureUUID(){let t=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,(e=>{let r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?r:3&r|8).toString(16)}))}initialize(){}trace(t,e){this.write("trace",t,e)}debug(t,e){this.write("debug",t,e)}info(t,e){this.write("info",t,e)}warn(t,e){this.write("warn",t,e)}error(t,e){this.write("error",t,e)}fatal(t,e){this.write("fatal",t,e)}write(t,e,r){return!0}}},{}],18:[function(t,e,r){
14
+ class{constructor(t,e){this._Settings="object"==typeof t?t:{},this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}generateInsecureUUID(){let t=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,(e=>{let r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?r:3&r|8).toString(16)}))}initialize(){}trace(t,e){this.write("trace",t,e)}debug(t,e){this.write("debug",t,e)}info(t,e){this.write("info",t,e)}warn(t,e){this.write("warn",t,e)}error(t,e){this.write("error",t,e)}fatal(t,e){this.write("fatal",t,e)}write(t,e,r){return!0}}},{}],19:[function(t,e,r){
10
15
  /**
11
16
  * Default Logger Provider Function
12
17
  *
@@ -14,7 +19,7 @@ class{constructor(t,e){this._Settings="object"==typeof t?t:{},this.loggerUUID=th
14
19
  *
15
20
  * @author Steven Velozo <steven@velozo.com>
16
21
  */
17
- getDefaultProviders=()=>{let e={};return e.console=t("./Fable-Log-Logger-Console.js"),e.default=e.console,e},e.exports=getDefaultProviders()},{"./Fable-Log-Logger-Console.js":20}],19:[function(t,e,r){e.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],20:[function(t,e,r){let n=t("./Fable-Log-BaseLogger.js");e.exports=class extends n{constructor(t,e){super(t),this._ShowTimeStamps=!this._Settings.hasOwnProperty("showtimestamps")||1==this._Settings.showtimestamps,this._FormattedTimeStamps=!this._Settings.hasOwnProperty("formattedtimestamps")||1==this._Settings.formattedtimestamps,this._ContextMessage=this._Settings.hasOwnProperty("Context")?"(".concat(this._Settings.Context,")"):e._Settings.hasOwnProperty("Product")?"(".concat(e._Settings.Product,")"):"Unnamed_Log_Context",this._OutputLogLinesToConsole=!this._Settings.hasOwnProperty("outputloglinestoconsole")||this._Settings.outputloglinestoconsole,this._OutputObjectsToConsole=!this._Settings.hasOwnProperty("outputobjectstoconsole")||this._Settings.outputobjectstoconsole,this.prefixCache={};for(let t=0;t<=this.levels.length;t++)this.prefixCache[this.levels[t]]="[".concat(this.levels[t],"] ").concat(this._ContextMessage,": "),this._ShowTimeStamps&&(this.prefixCache[this.levels[t]]=" "+this.prefixCache[this.levels[t]])}write(t,e,r){let n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);let i="".concat(n).concat(this.prefixCache[t]).concat(e);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}},{"./Fable-Log-BaseLogger.js":17}],21:[function(t,e,r){const n=t("./Fable-Log-Logger-Console.js"),i=t("fs"),s=t("path");e.exports=class extends n{constructor(t,e){super(t,e),this.logFileRawPath=this._Settings.hasOwnProperty("path")?this._Settings.path:"./".concat(this._ContextMessage,".log"),this.logFilePath=s.normalize(this.logFileRawPath),this.logFileStreamOptions=this._Settings.hasOwnProperty("fileStreamoptions")?this._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},this.fileWriter=i.createWriteStream(this.logFilePath,this.logFileStreamOptions),this.activelyWriting=!1,this.logLineStrings=[],this.logObjectStrings=[],this.defaultWriteCompleteCallback=()=>{},this.defaultBufferFlushCallback=()=>{}}closeWriter(t){let e="function"==typeof t?t:()=>{};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",e.bind(this))}completeBufferFlushToLogFile(t){this.activelyWriting=!1;let e="function"==typeof t?t:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return e();this.flushBufferToLogFile(e)}flushBufferToLogFile(t){if(!this.activelyWriting){this.activelyWriting=!0;let e="function"==typeof t?t:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];let i="";for(let t=0;t<r.length;t++)i+="".concat(r[t],"\n"),!1!==n[t]&&(i+="".concat(n[t],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(e);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,e))}}write(t,e,r){let n=super.write(t,e,r);this.logLineStrings.push(n),void 0!==r?this.logObjectStrings.push(JSON.stringify(r,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}},{"./Fable-Log-Logger-Console.js":20,fs:16,path:28}],22:[function(t,e,r){
22
+ getDefaultProviders=()=>{let e={};return e.console=t("./Fable-Log-Logger-Console.js"),e.default=e.console,e},e.exports=getDefaultProviders()},{"./Fable-Log-Logger-Console.js":21}],20:[function(t,e,r){e.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],21:[function(t,e,r){let n=t("./Fable-Log-BaseLogger.js");e.exports=class extends n{constructor(t,e){super(t),this._ShowTimeStamps=!this._Settings.hasOwnProperty("showtimestamps")||1==this._Settings.showtimestamps,this._FormattedTimeStamps=!this._Settings.hasOwnProperty("formattedtimestamps")||1==this._Settings.formattedtimestamps,this._ContextMessage=this._Settings.hasOwnProperty("Context")?"(".concat(this._Settings.Context,")"):e._Settings.hasOwnProperty("Product")?"(".concat(e._Settings.Product,")"):"Unnamed_Log_Context",this._OutputLogLinesToConsole=!this._Settings.hasOwnProperty("outputloglinestoconsole")||this._Settings.outputloglinestoconsole,this._OutputObjectsToConsole=!this._Settings.hasOwnProperty("outputobjectstoconsole")||this._Settings.outputobjectstoconsole,this.prefixCache={};for(let t=0;t<=this.levels.length;t++)this.prefixCache[this.levels[t]]="[".concat(this.levels[t],"] ").concat(this._ContextMessage,": "),this._ShowTimeStamps&&(this.prefixCache[this.levels[t]]=" "+this.prefixCache[this.levels[t]])}write(t,e,r){let n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);let i="".concat(n).concat(this.prefixCache[t]).concat(e);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}},{"./Fable-Log-BaseLogger.js":18}],22:[function(t,e,r){const n=t("./Fable-Log-Logger-Console.js"),i=t("fs"),s=t("path");e.exports=class extends n{constructor(t,e){super(t,e),this.logFileRawPath=this._Settings.hasOwnProperty("path")?this._Settings.path:"./".concat(this._ContextMessage,".log"),this.logFilePath=s.normalize(this.logFileRawPath),this.logFileStreamOptions=this._Settings.hasOwnProperty("fileStreamoptions")?this._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},this.fileWriter=i.createWriteStream(this.logFilePath,this.logFileStreamOptions),this.activelyWriting=!1,this.logLineStrings=[],this.logObjectStrings=[],this.defaultWriteCompleteCallback=()=>{},this.defaultBufferFlushCallback=()=>{}}closeWriter(t){let e="function"==typeof t?t:()=>{};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",e.bind(this))}completeBufferFlushToLogFile(t){this.activelyWriting=!1;let e="function"==typeof t?t:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return e();this.flushBufferToLogFile(e)}flushBufferToLogFile(t){if(!this.activelyWriting){this.activelyWriting=!0;let e="function"==typeof t?t:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];let i="";for(let t=0;t<r.length;t++)i+="".concat(r[t],"\n"),!1!==n[t]&&(i+="".concat(n[t],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(e);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,e))}}write(t,e,r){let n=super.write(t,e,r);this.logLineStrings.push(n),void 0!==r?this.logObjectStrings.push(JSON.stringify(r,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}},{"./Fable-Log-Logger-Console.js":21,fs:16,path:29}],23:[function(t,e,r){
18
23
  /**
19
24
  * Fable Logging Add-on
20
25
  *
@@ -23,7 +28,7 @@ getDefaultProviders=()=>{let e={};return e.console=t("./Fable-Log-Logger-Console
23
28
  * @author Steven Velozo <steven@velozo.com>
24
29
  * @module Fable Logger
25
30
  */
26
- class n{constructor(e,r){let n="object"==typeof e?e:{};this._Settings=n,this._Providers=t("./Fable-Log-DefaultProviders-Node.js"),this._StreamDefinitions=n.hasOwnProperty("LogStreams")?n.LogStreams:t("./Fable-Log-DefaultStreams.json"),this.logStreams=[],this.logProviders={},this.activeLogStreams={},this.logStreamsTrace=[],this.logStreamsDebug=[],this.logStreamsInfo=[],this.logStreamsWarn=[],this.logStreamsError=[],this.logStreamsFatal=[],this.datumDecorator=t=>t,this.uuid="string"==typeof n.Product?n.Product:"Default"}addLogger(t,e){if(this.activeLogStreams.hasOwnProperty(t.loggerUUID))return!1;switch(this.logStreams.push(t),this.activeLogStreams[t.loggerUUID]=!0,e){case"trace":this.logStreamsTrace.push(t);case"debug":this.logStreamsDebug.push(t);case"info":this.logStreamsInfo.push(t);case"warn":this.logStreamsWarn.push(t);case"error":this.logStreamsError.push(t);case"fatal":this.logStreamsFatal.push(t)}return!0}setDatumDecorator(t){this.datumDecorator="function"==typeof t?t:t=>t}trace(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsTrace.length;e++)this.logStreamsTrace[e].trace(t,r)}debug(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsDebug.length;e++)this.logStreamsDebug[e].debug(t,r)}info(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsInfo.length;e++)this.logStreamsInfo[e].info(t,r)}warn(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsWarn.length;e++)this.logStreamsWarn[e].warn(t,r)}error(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsError.length;e++)this.logStreamsError[e].error(t,r)}fatal(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsFatal.length;e++)this.logStreamsFatal[e].fatal(t,r)}initialize(){for(let t=0;t<this._StreamDefinitions.length;t++){let e=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[t]);this._Providers.hasOwnProperty(e.loggertype)?this.addLogger(new this._Providers[e.loggertype](e,this),e.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(e)))}for(let t=0;t<this.logStreams.length;t++)this.logStreams[t].initialize()}logTime(t,e){let r=void 0!==t?t:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),e)}getTimeStamp(){return+new Date}getTimeDelta(t){return+new Date-t}logTimeDelta(t,e,r){let n=void 0!==e?e:"Time Measurement",i=+new Date;this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(t,"ms)"),r)}logTimeDeltaHuman(t,e,r){let n=void 0!==e?e:"Time Measurement",i=+new Date,s=parseInt(t%1e3),o=parseInt(t/1e3%60),a=parseInt(t/6e4%60),l=parseInt(t/36e5);s=s<10?"00"+s:s<100?"0"+s:s,o=o<10?"0"+o:o,a=a<10?"0"+a:a,l=l<10?"0"+l:l,this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(t,"ms) or (").concat(l,":").concat(a,":").concat(o,".").concat(s,")"),r)}logTimeDeltaRelative(t,e,r){this.logTimeDelta(this.getTimeDelta(t),e,r)}logTimeDeltaRelativeHuman(t,e,r){this.logTimeDeltaHuman(this.getTimeDelta(t),e,r)}}e.exports=n,e.exports.new=function(t){return new n(t)},e.exports.LogProviderBase=t("./Fable-Log-BaseLogger.js"),e.exports.LogProviderConsole=t("./Fable-Log-Logger-Console.js"),e.exports.LogProviderConsole=t("./Fable-Log-Logger-SimpleFlatFile.js")},{"./Fable-Log-BaseLogger.js":17,"./Fable-Log-DefaultProviders-Node.js":18,"./Fable-Log-DefaultStreams.json":19,"./Fable-Log-Logger-Console.js":20,"./Fable-Log-Logger-SimpleFlatFile.js":21}],23:[function(t,e,r){e.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],24:[function(t,e,r){(function(t){(function(){e.exports=
31
+ class n{constructor(e,r){let n="object"==typeof e?e:{};this._Settings=n,this._Providers=t("./Fable-Log-DefaultProviders-Node.js"),this._StreamDefinitions=n.hasOwnProperty("LogStreams")?n.LogStreams:t("./Fable-Log-DefaultStreams.json"),this.logStreams=[],this.logProviders={},this.activeLogStreams={},this.logStreamsTrace=[],this.logStreamsDebug=[],this.logStreamsInfo=[],this.logStreamsWarn=[],this.logStreamsError=[],this.logStreamsFatal=[],this.datumDecorator=t=>t,this.uuid="string"==typeof n.Product?n.Product:"Default"}addLogger(t,e){if(this.activeLogStreams.hasOwnProperty(t.loggerUUID))return!1;switch(this.logStreams.push(t),this.activeLogStreams[t.loggerUUID]=!0,e){case"trace":this.logStreamsTrace.push(t);case"debug":this.logStreamsDebug.push(t);case"info":this.logStreamsInfo.push(t);case"warn":this.logStreamsWarn.push(t);case"error":this.logStreamsError.push(t);case"fatal":this.logStreamsFatal.push(t)}return!0}setDatumDecorator(t){this.datumDecorator="function"==typeof t?t:t=>t}trace(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsTrace.length;e++)this.logStreamsTrace[e].trace(t,r)}debug(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsDebug.length;e++)this.logStreamsDebug[e].debug(t,r)}info(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsInfo.length;e++)this.logStreamsInfo[e].info(t,r)}warn(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsWarn.length;e++)this.logStreamsWarn[e].warn(t,r)}error(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsError.length;e++)this.logStreamsError[e].error(t,r)}fatal(t,e){const r=this.datumDecorator(e);for(let e=0;e<this.logStreamsFatal.length;e++)this.logStreamsFatal[e].fatal(t,r)}initialize(){for(let t=0;t<this._StreamDefinitions.length;t++){let e=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[t]);this._Providers.hasOwnProperty(e.loggertype)?this.addLogger(new this._Providers[e.loggertype](e,this),e.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(e)))}for(let t=0;t<this.logStreams.length;t++)this.logStreams[t].initialize()}logTime(t,e){let r=void 0!==t?t:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),e)}getTimeStamp(){return+new Date}getTimeDelta(t){return+new Date-t}logTimeDelta(t,e,r){let n=void 0!==e?e:"Time Measurement",i=+new Date;this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(t,"ms)"),r)}logTimeDeltaHuman(t,e,r){let n=void 0!==e?e:"Time Measurement",i=+new Date,s=parseInt(t%1e3),o=parseInt(t/1e3%60),a=parseInt(t/6e4%60),l=parseInt(t/36e5);s=s<10?"00"+s:s<100?"0"+s:s,o=o<10?"0"+o:o,a=a<10?"0"+a:a,l=l<10?"0"+l:l,this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(t,"ms) or (").concat(l,":").concat(a,":").concat(o,".").concat(s,")"),r)}logTimeDeltaRelative(t,e,r){this.logTimeDelta(this.getTimeDelta(t),e,r)}logTimeDeltaRelativeHuman(t,e,r){this.logTimeDeltaHuman(this.getTimeDelta(t),e,r)}}e.exports=n,e.exports.new=function(t){return new n(t)},e.exports.LogProviderBase=t("./Fable-Log-BaseLogger.js"),e.exports.LogProviderConsole=t("./Fable-Log-Logger-Console.js"),e.exports.LogProviderConsole=t("./Fable-Log-Logger-SimpleFlatFile.js")},{"./Fable-Log-BaseLogger.js":18,"./Fable-Log-DefaultProviders-Node.js":19,"./Fable-Log-DefaultStreams.json":20,"./Fable-Log-Logger-Console.js":21,"./Fable-Log-Logger-SimpleFlatFile.js":22}],24:[function(t,e,r){e.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],25:[function(t,e,r){(function(t){(function(){e.exports=
27
32
  /**
28
33
  * Fable Settings Template Processor
29
34
  *
@@ -34,7 +39,7 @@ class n{constructor(e,r){let n="object"==typeof e?e:{};this._Settings=n,this._Pr
34
39
  * @author Steven Velozo <steven@velozo.com>
35
40
  * @module Fable Settings
36
41
  */
37
- class{constructor(e){this.templateProcessor=new e.precedent,this.templateProcessor.addPattern("${","}",(e=>{let r=e.trim(),n=r.indexOf("|"),i=r.substring(n+1),s=n>-1?r.substring(0,n):r;return t.env.hasOwnProperty(s)?t.env[s]:i}))}parseSetting(t){return this.templateProcessor.parseString(t)}}}).call(this)}).call(this,t("_process"))},{_process:32}],25:[function(t,e,r){
42
+ class{constructor(e){this.templateProcessor=new e.precedent,this.templateProcessor.addPattern("${","}",(e=>{let r=e.trim(),n=r.indexOf("|"),i=r.substring(n+1),s=n>-1?r.substring(0,n):r;return t.env.hasOwnProperty(s)?t.env[s]:i}))}parseSetting(t){return this.templateProcessor.parseString(t)}}}).call(this)}).call(this,t("_process"))},{_process:33}],26:[function(t,e,r){
38
43
  /**
39
44
  * Fable Settings Add-on
40
45
  *
@@ -43,7 +48,7 @@ class{constructor(e){this.templateProcessor=new e.precedent,this.templateProcess
43
48
  * @author Steven Velozo <steven@velozo.com>
44
49
  * @module Fable Settings
45
50
  */
46
- const n=t("precedent"),i=t("./Fable-Settings-TemplateProcessor.js");class s{constructor(e){this.dependencies={precedent:n},this.settingsTemplateProcessor=new i(this.dependencies),this._configureEnvTemplating(e),this.default=this.buildDefaultSettings();let r=this.merge(e,this.buildDefaultSettings());if(this.base=JSON.parse(JSON.stringify(r)),r.DefaultConfigFile)try{r=this.merge(t(r.DefaultConfigFile),r)}catch(t){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+t)}if(r.ConfigFile)try{r=this.merge(t(r.ConfigFile),r)}catch(t){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+t)}this.settings=r}buildDefaultSettings(){return JSON.parse(JSON.stringify(t("./Fable-Settings-Default")))}_configureEnvTemplating(t){this._PerformEnvTemplating=!t||!0!==t.NoEnvReplacement}_resolveEnv(t){for(const e in t)"object"==typeof t[e]?this._resolveEnv(t[e]):"string"==typeof t[e]&&(t[e]=this.settingsTemplateProcessor.parseSetting(t[e]))}_isObject(t){return"object"==typeof t&&!Array.isArray(t)}_deepMergeObjects(t,e){if(e&&this._isObject(e))return Object.keys(e).forEach((r=>{const n=e[r];if(this._isObject(n)){const e=t[r];if(e&&this._isObject(e))return void this._deepMergeObjects(e,n)}t[r]=n})),t}merge(t,e){let r="object"==typeof t?t:{},n="object"==typeof e?e:this.settings,i=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,i),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}fill(t){let e="object"==typeof t?t:{},r=JSON.parse(JSON.stringify(e));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}e.exports=s,e.exports.new=function(t){return new s(t)},e.exports.precedent=n},{"./Fable-Settings-Default":23,"./Fable-Settings-TemplateProcessor.js":24,precedent:29}],26:[function(t,e,r){e.exports=
51
+ const n=t("precedent"),i=t("./Fable-Settings-TemplateProcessor.js");class s{constructor(e){this.dependencies={precedent:n},this.settingsTemplateProcessor=new i(this.dependencies),this._configureEnvTemplating(e),this.default=this.buildDefaultSettings();let r=this.merge(e,this.buildDefaultSettings());if(this.base=JSON.parse(JSON.stringify(r)),r.DefaultConfigFile)try{r=this.merge(t(r.DefaultConfigFile),r)}catch(t){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+t)}if(r.ConfigFile)try{r=this.merge(t(r.ConfigFile),r)}catch(t){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+t)}this.settings=r}buildDefaultSettings(){return JSON.parse(JSON.stringify(t("./Fable-Settings-Default")))}_configureEnvTemplating(t){this._PerformEnvTemplating=!t||!0!==t.NoEnvReplacement}_resolveEnv(t){for(const e in t)"object"==typeof t[e]?this._resolveEnv(t[e]):"string"==typeof t[e]&&(t[e]=this.settingsTemplateProcessor.parseSetting(t[e]))}_isObject(t){return"object"==typeof t&&!Array.isArray(t)}_deepMergeObjects(t,e){if(e&&this._isObject(e))return Object.keys(e).forEach((r=>{const n=e[r];if(this._isObject(n)){const e=t[r];if(e&&this._isObject(e))return void this._deepMergeObjects(e,n)}t[r]=n})),t}merge(t,e){let r="object"==typeof t?t:{},n="object"==typeof e?e:this.settings,i=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,i),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}fill(t){let e="object"==typeof t?t:{},r=JSON.parse(JSON.stringify(e));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}e.exports=s,e.exports.new=function(t){return new s(t)},e.exports.precedent=n},{"./Fable-Settings-Default":24,"./Fable-Settings-TemplateProcessor.js":25,precedent:30}],27:[function(t,e,r){e.exports=
47
52
  /**
48
53
  * Random Byte Generator - Browser version
49
54
  *
@@ -51,7 +56,7 @@ const n=t("precedent"),i=t("./Fable-Settings-TemplateProcessor.js");class s{cons
51
56
  *
52
57
  * @author Steven Velozo <steven@velozo.com>
53
58
  */
54
- class{constructor(){this.getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)}generateWhatWGBytes(){let t=new Uint8Array(16);return this.getRandomValues(t),t}generateRandomBytes(){let t=new Uint8Array(16);for(let e,r=0;r<16;r++)0==(3&r)&&(e=4294967296*Math.random()),t[r]=e>>>((3&r)<<3)&255;return t}generate(){return this.getRandomValues?this.generateWhatWGBytes():this.generateRandomBytes()}}},{}],27:[function(t,e,r){
59
+ class{constructor(){this.getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)}generateWhatWGBytes(){let t=new Uint8Array(16);return this.getRandomValues(t),t}generateRandomBytes(){let t=new Uint8Array(16);for(let e,r=0;r<16;r++)0==(3&r)&&(e=4294967296*Math.random()),t[r]=e>>>((3&r)<<3)&255;return t}generate(){return this.getRandomValues?this.generateWhatWGBytes():this.generateRandomBytes()}}},{}],28:[function(t,e,r){
55
60
  /**
56
61
  * Fable UUID Generator
57
62
  *
@@ -60,7 +65,7 @@ class{constructor(){this.getRandomValues="undefined"!=typeof crypto&&crypto.getR
60
65
  * @author Steven Velozo <steven@velozo.com>
61
66
  * @module Fable UUID
62
67
  */
63
- var n=t("./Fable-UUID-Random.js");class i{constructor(t){this._UUIDModeRandom=!("object"!=typeof t||!t.hasOwnProperty("UUIDModeRandom"))&&1==t.UUIDModeRandom,this._UUIDLength="object"==typeof t&&t.hasOwnProperty("UUIDLength")?t.UUIDLength+0:8,this._UUIDRandomDictionary="object"==typeof t&&t.hasOwnProperty("UUIDDictionary")?t.UUIDDictionary+0:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.randomByteGenerator=new n,this._HexLookup=[];for(let t=0;t<256;++t)this._HexLookup[t]=(t+256).toString(16).substr(1)}bytesToUUID(t){let e=0;return[this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]]].join("")}generateUUIDv4(){new Array(16);var t=this.randomByteGenerator.generate();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,this.bytesToUUID(t)}generateRandom(){let t="";for(let e=0;e<this._UUIDLength;e++)t+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return t}getUUID(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}e.exports=i,e.exports.new=function(t){return new i(t)}},{"./Fable-UUID-Random.js":26}],28:[function(t,e,r){(function(t){(function(){function r(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var r,n="",i=0,s=-1,o=0,a=0;a<=t.length;++a){if(a<t.length)r=t.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),s=a,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,s=a,o=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(s+1,a):n=t.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var i={resolve:function(){for(var e,i="",s=!1,o=arguments.length-1;o>=-1&&!s;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=t.cwd()),a=e),r(a),0!==a.length&&(i=a+"/"+i,s=47===a.charCodeAt(0))}return i=n(i,!s),s?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!e)).length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];r(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":i.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=i.resolve(t))===(e=i.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var s=t.length,o=s-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length-a,c=o<l?o:l,u=-1,h=0;h<=c;++h){if(h===c){if(l>c){if(47===e.charCodeAt(a+h))return e.slice(a+h+1);if(0===h)return e.slice(a+h)}else o>c&&(47===t.charCodeAt(n+h)?u=h:0===h&&(u=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(a+h))break;47===f&&(u=h)}var g="";for(h=n+u+1;h<=s;++h)h!==s&&47!==t.charCodeAt(h)||(0===g.length?g+="..":g+="/..");return g.length>0?g+e.slice(a+u):(a+=u,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,s=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');r(t);var n,i=0,s=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,l=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===l&&(o=!1,l=n+1),a>=0&&(c===e.charCodeAt(a)?-1==--a&&(s=n):(a=-1,s=l))}return i===s?s=l:-1===s&&(s=t.length),t.slice(i,s)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!o){i=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":t.slice(i,s)},extname:function(t){r(t);for(var e=-1,n=0,i=-1,s=!0,o=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(47!==l)-1===i&&(s=!1,i=a+1),46===l?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!s){n=a+1;break}}return-1===e||-1===i||0===o||1===o&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),s=47===i;s?(e.root="/",n=1):n=0;for(var o=-1,a=0,l=-1,c=!0,u=t.length-1,h=0;u>=n;--u)if(47!==(i=t.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===o?o=u:1!==h&&(h=1):-1!==o&&(h=-1);else if(!c){a=u+1;break}return-1===o||-1===l||0===h||1===h&&o===l-1&&o===a+1?-1!==l&&(e.base=e.name=0===a&&s?t.slice(1,l):t.slice(a,l)):(0===a&&s?(e.name=t.slice(1,o),e.base=t.slice(1,l)):(e.name=t.slice(a,o),e.base=t.slice(a,l)),e.ext=t.slice(o,l)),a>0?e.dir=t.slice(0,a-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}).call(this)}).call(this,t("_process"))},{_process:32}],29:[function(t,e,r){
68
+ var n=t("./Fable-UUID-Random.js");class i{constructor(t){this._UUIDModeRandom=!("object"!=typeof t||!t.hasOwnProperty("UUIDModeRandom"))&&1==t.UUIDModeRandom,this._UUIDLength="object"==typeof t&&t.hasOwnProperty("UUIDLength")?t.UUIDLength+0:8,this._UUIDRandomDictionary="object"==typeof t&&t.hasOwnProperty("UUIDDictionary")?t.UUIDDictionary+0:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.randomByteGenerator=new n,this._HexLookup=[];for(let t=0;t<256;++t)this._HexLookup[t]=(t+256).toString(16).substr(1)}bytesToUUID(t){let e=0;return[this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],"-",this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]],this._HexLookup[t[e++]]].join("")}generateUUIDv4(){new Array(16);var t=this.randomByteGenerator.generate();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,this.bytesToUUID(t)}generateRandom(){let t="";for(let e=0;e<this._UUIDLength;e++)t+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return t}getUUID(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}e.exports=i,e.exports.new=function(t){return new i(t)}},{"./Fable-UUID-Random.js":27}],29:[function(t,e,r){(function(t){(function(){function r(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var r,n="",i=0,s=-1,o=0,a=0;a<=t.length;++a){if(a<t.length)r=t.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),s=a,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,s=a,o=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(s+1,a):n=t.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var i={resolve:function(){for(var e,i="",s=!1,o=arguments.length-1;o>=-1&&!s;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=t.cwd()),a=e),r(a),0!==a.length&&(i=a+"/"+i,s=47===a.charCodeAt(0))}return i=n(i,!s),s?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!e)).length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];r(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":i.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=i.resolve(t))===(e=i.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var s=t.length,o=s-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length-a,c=o<l?o:l,u=-1,h=0;h<=c;++h){if(h===c){if(l>c){if(47===e.charCodeAt(a+h))return e.slice(a+h+1);if(0===h)return e.slice(a+h)}else o>c&&(47===t.charCodeAt(n+h)?u=h:0===h&&(u=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(a+h))break;47===f&&(u=h)}var g="";for(h=n+u+1;h<=s;++h)h!==s&&47!==t.charCodeAt(h)||(0===g.length?g+="..":g+="/..");return g.length>0?g+e.slice(a+u):(a+=u,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,s=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');r(t);var n,i=0,s=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,l=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===l&&(o=!1,l=n+1),a>=0&&(c===e.charCodeAt(a)?-1==--a&&(s=n):(a=-1,s=l))}return i===s?s=l:-1===s&&(s=t.length),t.slice(i,s)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!o){i=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":t.slice(i,s)},extname:function(t){r(t);for(var e=-1,n=0,i=-1,s=!0,o=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(47!==l)-1===i&&(s=!1,i=a+1),46===l?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!s){n=a+1;break}}return-1===e||-1===i||0===o||1===o&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),s=47===i;s?(e.root="/",n=1):n=0;for(var o=-1,a=0,l=-1,c=!0,u=t.length-1,h=0;u>=n;--u)if(47!==(i=t.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===o?o=u:1!==h&&(h=1):-1!==o&&(h=-1);else if(!c){a=u+1;break}return-1===o||-1===l||0===h||1===h&&o===l-1&&o===a+1?-1!==l&&(e.base=e.name=0===a&&s?t.slice(1,l):t.slice(a,l)):(0===a&&s?(e.name=t.slice(1,o),e.base=t.slice(1,l)):(e.name=t.slice(a,o),e.base=t.slice(a,l)),e.ext=t.slice(o,l)),a>0?e.dir=t.slice(0,a-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}).call(this)}).call(this,t("_process"))},{_process:33}],30:[function(t,e,r){
64
69
  /**
65
70
  * Precedent Meta-Templating
66
71
  *
@@ -70,7 +75,7 @@ var n=t("./Fable-UUID-Random.js");class i{constructor(t){this._UUIDModeRandom=!(
70
75
  *
71
76
  * @description Process text streams, parsing out meta-template expressions.
72
77
  */
73
- var n=t("./WordTree.js"),i=t("./StringParser.js");e.exports=class{constructor(){this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}addPattern(t,e,r){return this.WordTree.addPattern(t,e,r)}parseString(t){return this.StringParser.parseString(t,this.ParseTree)}}},{"./StringParser.js":30,"./WordTree.js":31}],30:[function(t,e,r){e.exports=
78
+ var n=t("./WordTree.js"),i=t("./StringParser.js");e.exports=class{constructor(){this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}addPattern(t,e,r){return this.WordTree.addPattern(t,e,r)}parseString(t){return this.StringParser.parseString(t,this.ParseTree)}}},{"./StringParser.js":31,"./WordTree.js":32}],31:[function(t,e,r){e.exports=
74
79
  /**
75
80
  * String Parser
76
81
  *
@@ -80,7 +85,7 @@ var n=t("./WordTree.js"),i=t("./StringParser.js");e.exports=class{constructor(){
80
85
  *
81
86
  * @description Parse a string, properly processing each matched token in the word tree.
82
87
  */
83
- class{constructor(){}newParserState(t){return{ParseTree:t,Output:"",OutputBuffer:"",Pattern:!1,PatternMatch:!1,PatternMatchOutputBuffer:""}}assignNode(t,e){e.PatternMatch=t,e.PatternMatch.hasOwnProperty("PatternEnd")&&(e.Pattern=e.PatternMatch)}appendOutputBuffer(t,e){e.OutputBuffer+=t}flushOutputBuffer(t){t.Output+=t.OutputBuffer,t.OutputBuffer=""}checkPatternEnd(t){t.OutputBuffer.length>=t.Pattern.PatternEnd.length+t.Pattern.PatternStart.length&&t.OutputBuffer.substr(-t.Pattern.PatternEnd.length)===t.Pattern.PatternEnd&&(t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStart.length,t.OutputBuffer.length-(t.Pattern.PatternStart.length+t.Pattern.PatternEnd.length))),this.flushOutputBuffer(t),t.Pattern=!1,t.PatternMatch=!1)}parseCharacter(t,e){!e.PatternMatch&&e.ParseTree.hasOwnProperty(t)?(this.assignNode(e.ParseTree[t],e),this.appendOutputBuffer(t,e)):e.PatternMatch?(e.PatternMatch.hasOwnProperty(t)&&this.assignNode(e.PatternMatch[t],e),this.appendOutputBuffer(t,e),e.Pattern&&this.checkPatternEnd(e)):e.Output+=t}parseString(t,e){let r=this.newParserState(e);for(var n=0;n<t.length;n++)this.parseCharacter(t[n],r);return this.flushOutputBuffer(r),r.Output}}},{}],31:[function(t,e,r){e.exports=
88
+ class{constructor(){}newParserState(t){return{ParseTree:t,Output:"",OutputBuffer:"",Pattern:!1,PatternMatch:!1,PatternMatchOutputBuffer:""}}assignNode(t,e){e.PatternMatch=t,e.PatternMatch.hasOwnProperty("PatternEnd")&&(e.Pattern=e.PatternMatch)}appendOutputBuffer(t,e){e.OutputBuffer+=t}flushOutputBuffer(t){t.Output+=t.OutputBuffer,t.OutputBuffer=""}checkPatternEnd(t){t.OutputBuffer.length>=t.Pattern.PatternEnd.length+t.Pattern.PatternStart.length&&t.OutputBuffer.substr(-t.Pattern.PatternEnd.length)===t.Pattern.PatternEnd&&(t.OutputBuffer=t.Pattern.Parse(t.OutputBuffer.substr(t.Pattern.PatternStart.length,t.OutputBuffer.length-(t.Pattern.PatternStart.length+t.Pattern.PatternEnd.length))),this.flushOutputBuffer(t),t.Pattern=!1,t.PatternMatch=!1)}parseCharacter(t,e){!e.PatternMatch&&e.ParseTree.hasOwnProperty(t)?(this.assignNode(e.ParseTree[t],e),this.appendOutputBuffer(t,e)):e.PatternMatch?(e.PatternMatch.hasOwnProperty(t)&&this.assignNode(e.PatternMatch[t],e),this.appendOutputBuffer(t,e),e.Pattern&&this.checkPatternEnd(e)):e.Output+=t}parseString(t,e){let r=this.newParserState(e);for(var n=0;n<t.length;n++)this.parseCharacter(t[n],r);return this.flushOutputBuffer(r),r.Output}}},{}],32:[function(t,e,r){e.exports=
84
89
  /**
85
90
  * Word Tree
86
91
  *
@@ -90,23 +95,23 @@ class{constructor(){}newParserState(t){return{ParseTree:t,Output:"",OutputBuffer
90
95
  *
91
96
  * @description Create a tree (directed graph) of Javascript objects, one character per object.
92
97
  */
93
- class{constructor(){this.ParseTree={}}addChild(t,e,r){return t.hasOwnProperty(e[r])||(t[e[r]]={}),t[e[r]]}addPattern(t,e,r){if(t.length<1)return!1;if("string"==typeof e&&e.length<1)return!1;let n=this.ParseTree;for(var i=0;i<t.length;i++)n=this.addChild(n,t,i);return n.PatternStart=t,n.PatternEnd="string"==typeof e&&e.length>0?e:t,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:t=>t,!0}}},{}],32:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,u=[],h=!1,f=-1;function g(){h&&c&&(h=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!h){var t=l(g);h=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new d(t,e)),1!==u.length||h||l(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],33:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":32,timers:33}],34:[function(t,e,r){var n=t("./Fable.js");"object"!=typeof window||window.hasOwnProperty("Fable")||(window.Fable=n),e.exports=n},{"./Fable.js":40}],35:[function(t,e,r){const n=JSON.stringify({Metadata:{GUID:!1,Hash:!1,Title:"",Summary:"",Version:0},Status:{Completed:!1,CompletionProgress:0,CompletionTimeElapsed:0,Steps:1,StepsCompleted:0,StartTime:0,EndTime:0},Errors:[],Log:[]});e.exports=class{constructor(t,e,r){this.fable=t,this.name=e,this.state=JSON.parse(n),this.state.Metadata.GUID=this.fable.getUUID(),this.state.Metadata.Hash=this.state.GUID,"string"==typeof r&&(this.state.Metadata.Hash=r)}get GUID(){return this.state.Metadata.GUID}get Hash(){return this.state.Metadata.Hash}get log(){return this}writeOperationLog(t,e,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(t,"]: ").concat(e)),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(t,e){this.state.Errors.push("".concat(t)),"object"==typeof e&&this.state.Errors.push(JSON.stringify(e))}trace(t,e){this.writeOperationLog("TRACE",t,e),this.fable.log.trace(t,e)}debug(t,e){this.writeOperationLog("DEBUG",t,e),this.fable.log.debug(t,e)}info(t,e){this.writeOperationLog("INFO",t,e),this.fable.log.info(t,e)}warn(t,e){this.writeOperationLog("WARN",t,e),this.fable.log.warn(t,e)}error(t,e){this.writeOperationLog("ERROR",t,e),this.writeOperationErrors(t,e),this.fable.log.error(t,e)}fatal(t,e){this.writeOperationLog("FATAL",t,e),this.writeOperationErrors(t,e),this.fable.log.fatal(t,e)}}},{}],36:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js");e.exports=class extends n{constructor(t,e,r){super(t,e,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(t){return this.renderFunction(t)}templateFunction(t){return this.renderTemplate.bind(this)}buildTemplateFunction(t,e){return this.TemplateSource="__p+='"+t.replace(this.Matchers.Escaper,(t=>"\\".concat(this.templateEscapes[t]))).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,((t,e)=>"'+\n(".concat(decodeURIComponent(e),")+\n'"))).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,((t,e)=>"';\n".concat(decodeURIComponent(e),"\n;__p+='")))+"';\n",this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n"),this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n"),this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==e?this.renderFunction(e):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"./Fable-ServiceProviderBase.js":38}],37:[function(t,e,r){
98
+ class{constructor(){this.ParseTree={}}addChild(t,e,r){return t.hasOwnProperty(e[r])||(t[e[r]]={}),t[e[r]]}addPattern(t,e,r){if(t.length<1)return!1;if("string"==typeof e&&e.length<1)return!1;let n=this.ParseTree;for(var i=0;i<t.length;i++)n=this.addChild(n,t,i);return n.PatternStart=t,n.PatternEnd="string"==typeof e&&e.length>0?e:t,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:t=>t,!0}}},{}],33:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,u=[],h=!1,f=-1;function g(){h&&c&&(h=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!h){var t=l(g);h=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new d(t,e)),1!==u.length||h||l(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],34:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":33,timers:34}],35:[function(t,e,r){var n=t("./Fable.js");"object"!=typeof window||window.hasOwnProperty("Fable")||(window.Fable=n),e.exports=n},{"./Fable.js":42}],36:[function(t,e,r){const n=JSON.stringify({Metadata:{GUID:!1,Hash:!1,Title:"",Summary:"",Version:0},Status:{Completed:!1,CompletionProgress:0,CompletionTimeElapsed:0,Steps:1,StepsCompleted:0,StartTime:0,EndTime:0},Errors:[],Log:[]});e.exports=class{constructor(t,e,r){this.fable=t,this.name=e,this.state=JSON.parse(n),this.state.Metadata.GUID=this.fable.getUUID(),this.state.Metadata.Hash=this.state.GUID,"string"==typeof r&&(this.state.Metadata.Hash=r)}get GUID(){return this.state.Metadata.GUID}get Hash(){return this.state.Metadata.Hash}get log(){return this}writeOperationLog(t,e,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(t,"]: ").concat(e)),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(t,e){this.state.Errors.push("".concat(t)),"object"==typeof e&&this.state.Errors.push(JSON.stringify(e))}trace(t,e){this.writeOperationLog("TRACE",t,e),this.fable.log.trace(t,e)}debug(t,e){this.writeOperationLog("DEBUG",t,e),this.fable.log.debug(t,e)}info(t,e){this.writeOperationLog("INFO",t,e),this.fable.log.info(t,e)}warn(t,e){this.writeOperationLog("WARN",t,e),this.fable.log.warn(t,e)}error(t,e){this.writeOperationLog("ERROR",t,e),this.writeOperationErrors(t,e),this.fable.log.error(t,e)}fatal(t,e){this.writeOperationLog("FATAL",t,e),this.writeOperationErrors(t,e),this.fable.log.fatal(t,e)}}},{}],37:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("data-arithmatic");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="DataArithmatic",this._DataArithmaticLibrary=new i}}},{"./Fable-ServiceProviderBase.js":41,"data-arithmatic":17}],38:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js");e.exports=class extends n{constructor(t,e,r){super(t,e,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(t){return this.renderFunction(t)}templateFunction(t){return this.renderTemplate.bind(this)}buildTemplateFunction(t,e){return this.TemplateSource="__p+='"+t.replace(this.Matchers.Escaper,(t=>"\\".concat(this.templateEscapes[t]))).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,((t,e)=>"'+\n(".concat(decodeURIComponent(e),")+\n'"))).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,((t,e)=>"';\n".concat(decodeURIComponent(e),"\n;__p+='")))+"';\n",this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n"),this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n"),this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==e?this.renderFunction(e):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"./Fable-ServiceProviderBase.js":41}],39:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("async.waterfall"),s=t("async.eachlimit");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.templates={},this.waterfall=i,this.eachLimit=s}extend(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Object.assign(t,...r)}template(t,e){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(t,e)}buildHashedTemplate(t,e,r){let n=this.fable.serviceManager.instantiateServiceProvider("Template",{},t);return this.templates[t]=n.buildTemplateFunction(e,r),this.templates[t]}chunk(t,e,r){let n=[...t],i="number"==typeof e?e:0,s=void 0!==r?r:[];if(i<=0)return s;for(;n.length;)s.push(n.splice(0,i));return s}}},{"./Fable-ServiceProviderBase.js":41,"async.eachlimit":1,"async.waterfall":15}],40:[function(t,e,r){
94
99
  /**
95
100
  * Fable Application Services Management
96
101
  * @license MIT
97
102
  * @author <steven@velozo.com>
98
103
  */
99
- const n=t("./Fable-ServiceProviderBase.js");e.exports=class{constructor(t){this.fable=t,this.serviceTypes=[],this.services={},this.defaultServices={},this.serviceClasses={}}addServiceType(t,e){this.serviceTypes.push(t),this.services[t]={},"function"==typeof e&&e.prototype instanceof n?this.serviceClasses[t]=e:this.serviceClasses[t]=n}instantiateServiceProvider(t,e,r){let n=this.instantiateServiceProviderWithoutRegistration(t,e,r);return this.services[t][n.Hash]=n,this.defaultServices.hasOwnProperty(t)||(this.defaultServices[t]=n),n}instantiateServiceProviderWithoutRegistration(t,e,r){return new this.serviceClasses[t](this.fable,e,r)}setDefaultServiceInstantiation(t,e){return!!this.services[t].hasOwnProperty(e)&&(this.defaultServices[t]=this.services[t][e],!0)}},e.exports.ServiceProviderBase=n},{"./Fable-ServiceProviderBase.js":38}],38:[function(t,e,r){e.exports=
104
+ const n=t("./Fable-ServiceProviderBase.js");e.exports=class{constructor(t){this.fable=t,this.serviceTypes=[],this.services={},this.defaultServices={},this.serviceClasses={}}addServiceType(t,e){this.serviceTypes.push(t),this.services[t]={},"function"==typeof e&&e.prototype instanceof n?this.serviceClasses[t]=e:this.serviceClasses[t]=n}instantiateServiceProvider(t,e,r){let n=this.instantiateServiceProviderWithoutRegistration(t,e,r);return this.services[t][n.Hash]=n,this.defaultServices.hasOwnProperty(t)||(this.defaultServices[t]=n),n}instantiateServiceProviderWithoutRegistration(t,e,r){return new this.serviceClasses[t](this.fable,e,r)}setDefaultServiceInstantiation(t,e){return!!this.services[t].hasOwnProperty(e)&&(this.defaultServices[t]=this.services[t][e],!0)}},e.exports.ServiceProviderBase=n},{"./Fable-ServiceProviderBase.js":41}],41:[function(t,e,r){e.exports=
100
105
  /**
101
106
  * Fable Service Base
102
107
  * @license MIT
103
108
  * @author <steven@velozo.com>
104
109
  */
105
- class{constructor(t,e,r){this.fable=t,this.options="object"==typeof e?e:{},this.serviceType="Unknown",this.UUID=t.getUUID(),this.Hash="string"==typeof r?r:"".concat(this.UUID)}}},{}],39:[function(t,e,r){const n=t("async.waterfall"),i=t("async.eachlimit");e.exports=class{constructor(t){this.fable=t,this.templates={},this.waterfall=n,this.eachLimit=i}extend(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Object.assign(t,...r)}template(t,e){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(t,e)}buildHashedTemplate(t,e,r){let n=this.fable.serviceManager.instantiateServiceProvider("Template",{},t);return this.templates[t]=n.buildTemplateFunction(e,r),this.templates[t]}chunk(t,e,r){let n=[...t],i="number"==typeof e?e:0,s=void 0!==r?r:[];if(i<=0)return s;for(;n.length;)s.push(n.splice(0,i));return s}}},{"async.eachlimit":1,"async.waterfall":15}],40:[function(t,e,r){
110
+ class{constructor(t,e,r){this.fable=t,this.options="object"==typeof e?e:{},this.serviceType="Unknown",this.UUID=t.getUUID(),this.Hash="string"==typeof r?r:"".concat(this.UUID)}}},{}],42:[function(t,e,r){
106
111
  /**
107
112
  * Fable Application Services Support Library
108
113
  * @license MIT
109
114
  * @author <steven@velozo.com>
110
115
  */
111
- const n=t("fable-settings"),i=t("fable-uuid"),s=t("fable-log"),o=t("./Fable-Utility.js"),a=t("./Fable-ServiceManager.js"),l=t("./Fable-Service-Template.js"),c=t("./Fable-Operation.js");class u{constructor(t){let e=new n(t);this.settingsManager=e,this.libUUID=new i(this.settingsManager.settings),this.log=new s(this.settingsManager.settings),this.log.initialize(),this.Utility=new o(this),this.Dependencies={precedent:n.precedent},this.Operations={},this.serviceManager=new a(this),this.serviceManager.addServiceType("Template",l),this.services=this.serviceManager.services,this.defaultServices=this.serviceManager.defaultServices}get settings(){return this.settingsManager.settings}get fable(){return this}getUUID(){return this.libUUID.getUUID()}createOperation(t,e){let r=new c(this,t,e);return this.Operations.hasOwnProperty(r.Hash)||(this.Operations[r.Hash]=r),r}getOperation(t){return!!this.Operations.hasOwnProperty(t)&&this.Operations[t]}}e.exports=u,e.exports.new=function(t){return new u(t)},e.exports.LogProviderBase=s.LogProviderBase,e.exports.ServiceProviderBase=a.ServiceProviderBase,e.exports.precedent=n.precedent},{"./Fable-Operation.js":35,"./Fable-Service-Template.js":36,"./Fable-ServiceManager.js":37,"./Fable-Utility.js":39,"fable-log":22,"fable-settings":25,"fable-uuid":27}]},{},[34])(34)}));
116
+ const n=t("fable-settings"),i=t("fable-uuid"),s=t("fable-log"),o=t("./Fable-ServiceManager.js"),a=t("./Fable-Service-DataArithmatic.js"),l=t("./Fable-Service-Template.js"),c=t("./Fable-Service-Utility.js"),u=t("./Fable-Operation.js");class h{constructor(t){let e=new n(t);this.settingsManager=e,this.libUUID=new i(this.settingsManager.settings),this.log=new s(this.settingsManager.settings),this.log.initialize(),this.Dependencies={precedent:n.precedent},this.Operations={},this.serviceManager=new o(this),this.serviceManager.addServiceType("DataArithmatic",a),this.fable.serviceManager.instantiateServiceProvider("DataArithmatic",{},"Default-Service-DataArithmatic"),this.DataArithmatic=this.serviceManager.defaultServices.DataArithmatic._DataArithmaticLibrary,this.serviceManager.addServiceType("Template",l),this.serviceManager.addServiceType("Utility",c),this.fable.serviceManager.instantiateServiceProvider("Utility",{},"Default-Service-Utility"),this.Utility=this.serviceManager.defaultServices.Utility,this.services=this.serviceManager.services,this.defaultServices=this.serviceManager.defaultServices}get settings(){return this.settingsManager.settings}get fable(){return this}getUUID(){return this.libUUID.getUUID()}createOperation(t,e){let r=new u(this,t,e);return this.Operations.hasOwnProperty(r.Hash)||(this.Operations[r.Hash]=r),r}getOperation(t){return!!this.Operations.hasOwnProperty(t)&&this.Operations[t]}}e.exports=h,e.exports.new=function(t){return new h(t)},e.exports.LogProviderBase=s.LogProviderBase,e.exports.ServiceProviderBase=o.ServiceProviderBase,e.exports.precedent=n.precedent},{"./Fable-Operation.js":36,"./Fable-Service-DataArithmatic.js":37,"./Fable-Service-Template.js":38,"./Fable-Service-Utility.js":39,"./Fable-ServiceManager.js":40,"fable-log":23,"fable-settings":26,"fable-uuid":28}]},{},[35])(35)}));
112
117
  //# sourceMappingURL=fable.min.js.map