fable 3.0.21 → 3.0.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.
@@ -2696,7 +2696,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2696
2696
  }
2697
2697
  module.exports = libNPMModuleWrapper;
2698
2698
  }, {
2699
- "./Fable.js": 42
2699
+ "./Fable.js": 43
2700
2700
  }],
2701
2701
  36: [function (require, module, exports) {
2702
2702
  var _OperationStatePrototype = JSON.stringify({
@@ -2823,14 +2823,62 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2823
2823
  }(libFableServiceBase);
2824
2824
  module.exports = FableServiceDataArithmatic;
2825
2825
  }, {
2826
- "./Fable-ServiceProviderBase.js": 41,
2826
+ "./Fable-ServiceProviderBase.js": 42,
2827
2827
  "data-arithmatic": 17
2828
2828
  }],
2829
2829
  38: [function (require, module, exports) {
2830
2830
  var libFableServiceBase = require('./Fable-ServiceProviderBase.js');
2831
- var FableServiceTemplate = /*#__PURE__*/function (_libFableServiceBase2) {
2832
- _inherits(FableServiceTemplate, _libFableServiceBase2);
2833
- var _super4 = _createSuper(FableServiceTemplate);
2831
+ var libPrecedent = require('precedent');
2832
+ var FableServiceMetaTemplate = /*#__PURE__*/function (_libFableServiceBase2) {
2833
+ _inherits(FableServiceMetaTemplate, _libFableServiceBase2);
2834
+ var _super4 = _createSuper(FableServiceMetaTemplate);
2835
+ function FableServiceMetaTemplate(pFable, pOptions, pServiceHash) {
2836
+ var _this5;
2837
+ _classCallCheck(this, FableServiceMetaTemplate);
2838
+ _this5 = _super4.call(this, pFable, pOptions, pServiceHash);
2839
+ _this5.serviceType = 'MetaTemplate';
2840
+ _this5._MetaTemplateLibrary = new libPrecedent(_this5.options);
2841
+ return _this5;
2842
+ }
2843
+
2844
+ /**
2845
+ * Add a Pattern to the Parse Tree
2846
+ * @method addPattern
2847
+ * @param {Object} pTree - A node on the parse tree to push the characters into
2848
+ * @param {string} pPattern - The string to add to the tree
2849
+ * @param {number} pIndex - callback function
2850
+ * @return {bool} True if adding the pattern was successful
2851
+ */
2852
+ _createClass(FableServiceMetaTemplate, [{
2853
+ key: "addPattern",
2854
+ value: function addPattern(pPatternStart, pPatternEnd, pParser) {
2855
+ return this._MetaTemplateLibrary.addPattern(pPatternStart, pPatternEnd, pParser);
2856
+ }
2857
+
2858
+ /**
2859
+ * Parse a string with the existing parse tree
2860
+ * @method parseString
2861
+ * @param {string} pString - The string to parse
2862
+ * @return {string} The result from the parser
2863
+ */
2864
+ }, {
2865
+ key: "parseString",
2866
+ value: function parseString(pString) {
2867
+ return this._MetaTemplateLibrary.parseString(pString, this.ParseTree);
2868
+ }
2869
+ }]);
2870
+ return FableServiceMetaTemplate;
2871
+ }(libFableServiceBase);
2872
+ module.exports = FableServiceMetaTemplate;
2873
+ }, {
2874
+ "./Fable-ServiceProviderBase.js": 42,
2875
+ "precedent": 30
2876
+ }],
2877
+ 39: [function (require, module, exports) {
2878
+ var libFableServiceBase = require('./Fable-ServiceProviderBase.js');
2879
+ var FableServiceTemplate = /*#__PURE__*/function (_libFableServiceBase3) {
2880
+ _inherits(FableServiceTemplate, _libFableServiceBase3);
2881
+ var _super5 = _createSuper(FableServiceTemplate);
2834
2882
  // Underscore and lodash have a behavior, _.template, which compiles a
2835
2883
  // string-based template with code snippets into simple executable pieces,
2836
2884
  // with the added twist of returning a precompiled function ready to go.
@@ -2841,14 +2889,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2841
2889
  // This is an implementation of that.
2842
2890
  // TODO: Make this use precedent, add configuration, add debugging.
2843
2891
  function FableServiceTemplate(pFable, pOptions, pServiceHash) {
2844
- var _this5;
2892
+ var _this6;
2845
2893
  _classCallCheck(this, FableServiceTemplate);
2846
- _this5 = _super4.call(this, pFable, pOptions, pServiceHash);
2847
- _this5.serviceType = 'Template';
2894
+ _this6 = _super5.call(this, pFable, pOptions, pServiceHash);
2895
+ _this6.serviceType = 'Template';
2848
2896
 
2849
2897
  // These are the exact regex's used in lodash/underscore
2850
2898
  // TODO: Switch this to precedent
2851
- _this5.Matchers = {
2899
+ _this6.Matchers = {
2852
2900
  Evaluate: /<%([\s\S]+?)%>/g,
2853
2901
  Interpolate: /<%=([\s\S]+?)%>/g,
2854
2902
  Escaper: /\\|'|\r|\n|\t|\u2028|\u2029/g,
@@ -2859,7 +2907,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2859
2907
 
2860
2908
  // This is a helper for the escaper and unescaper functions.
2861
2909
  // Right now we are going to keep what underscore is doing, but, not forever.
2862
- _this5.templateEscapes = {
2910
+ _this6.templateEscapes = {
2863
2911
  '\\': '\\',
2864
2912
  "'": "'",
2865
2913
  'r': '\r',
@@ -2876,9 +2924,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2876
2924
 
2877
2925
  // This is defined as such to underscore that it is a dynamic programming
2878
2926
  // function on this class.
2879
- _this5.renderFunction = false;
2880
- _this5.templateString = false;
2881
- return _this5;
2927
+ _this6.renderFunction = false;
2928
+ _this6.templateString = false;
2929
+ return _this6;
2882
2930
  }
2883
2931
  _createClass(FableServiceTemplate, [{
2884
2932
  key: "renderTemplate",
@@ -2894,11 +2942,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2894
2942
  }, {
2895
2943
  key: "buildTemplateFunction",
2896
2944
  value: function buildTemplateFunction(pTemplateText, pData) {
2897
- var _this6 = this;
2945
+ var _this7 = this;
2898
2946
  // For now this is being kept in a weird form ... this is to mimic the old
2899
2947
  // underscore code until this is rewritten using precedent.
2900
2948
  this.TemplateSource = "__p+='" + pTemplateText.replace(this.Matchers.Escaper, function (pMatch) {
2901
- return "\\".concat(_this6.templateEscapes[pMatch]);
2949
+ return "\\".concat(_this7.templateEscapes[pMatch]);
2902
2950
  }).replace(this.Matchers.Interpolate || this.Matchers.GuaranteedNonMatch, function (pMatch, pCode) {
2903
2951
  return "'+\n(".concat(decodeURIComponent(pCode), ")+\n'");
2904
2952
  }).replace(this.Matchers.Evaluate || this.Matchers.GuaranteedNonMatch, function (pMatch, pCode) {
@@ -2921,17 +2969,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2921
2969
  }(libFableServiceBase);
2922
2970
  module.exports = FableServiceTemplate;
2923
2971
  }, {
2924
- "./Fable-ServiceProviderBase.js": 41
2972
+ "./Fable-ServiceProviderBase.js": 42
2925
2973
  }],
2926
- 39: [function (require, module, exports) {
2974
+ 40: [function (require, module, exports) {
2927
2975
  var libFableServiceBase = require('./Fable-ServiceProviderBase.js');
2928
2976
 
2929
2977
  // TODO: These are still pretty big -- consider the smaller polyfills
2930
2978
  var libAsyncWaterfall = require('async.waterfall');
2931
2979
  var libAsyncEachLimit = require('async.eachlimit');
2932
- var FableServiceUtility = /*#__PURE__*/function (_libFableServiceBase3) {
2933
- _inherits(FableServiceUtility, _libFableServiceBase3);
2934
- var _super5 = _createSuper(FableServiceUtility);
2980
+ var FableServiceUtility = /*#__PURE__*/function (_libFableServiceBase4) {
2981
+ _inherits(FableServiceUtility, _libFableServiceBase4);
2982
+ var _super6 = _createSuper(FableServiceUtility);
2935
2983
  // Underscore and lodash have a behavior, _.template, which compiles a
2936
2984
  // string-based template with code snippets into simple executable pieces,
2937
2985
  // with the added twist of returning a precompiled function ready to go.
@@ -2942,15 +2990,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2942
2990
  // This is an implementation of that.
2943
2991
  // TODO: Make this use precedent, add configuration, add debugging.
2944
2992
  function FableServiceUtility(pFable, pOptions, pServiceHash) {
2945
- var _this7;
2993
+ var _this8;
2946
2994
  _classCallCheck(this, FableServiceUtility);
2947
- _this7 = _super5.call(this, pFable, pOptions, pServiceHash);
2948
- _this7.templates = {};
2995
+ _this8 = _super6.call(this, pFable, pOptions, pServiceHash);
2996
+ _this8.templates = {};
2949
2997
 
2950
2998
  // These two functions are used extensively throughout
2951
- _this7.waterfall = libAsyncWaterfall;
2952
- _this7.eachLimit = libAsyncEachLimit;
2953
- return _this7;
2999
+ _this8.waterfall = libAsyncWaterfall;
3000
+ _this8.eachLimit = libAsyncEachLimit;
3001
+ return _this8;
2954
3002
  }
2955
3003
 
2956
3004
  // Underscore and lodash have a behavior, _.extend, which merges objects.
@@ -3008,11 +3056,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
3008
3056
  }(libFableServiceBase);
3009
3057
  module.exports = FableServiceUtility;
3010
3058
  }, {
3011
- "./Fable-ServiceProviderBase.js": 41,
3059
+ "./Fable-ServiceProviderBase.js": 42,
3012
3060
  "async.eachlimit": 1,
3013
3061
  "async.waterfall": 15
3014
3062
  }],
3015
- 40: [function (require, module, exports) {
3063
+ 41: [function (require, module, exports) {
3016
3064
  /**
3017
3065
  * Fable Application Services Management
3018
3066
  * @license MIT
@@ -3090,9 +3138,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
3090
3138
  module.exports = FableService;
3091
3139
  module.exports.ServiceProviderBase = libFableServiceBase;
3092
3140
  }, {
3093
- "./Fable-ServiceProviderBase.js": 41
3141
+ "./Fable-ServiceProviderBase.js": 42
3094
3142
  }],
3095
- 41: [function (require, module, exports) {
3143
+ 42: [function (require, module, exports) {
3096
3144
  /**
3097
3145
  * Fable Service Base
3098
3146
  * @license MIT
@@ -3108,7 +3156,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
3108
3156
  });
3109
3157
  module.exports = FableServiceProviderBase;
3110
3158
  }, {}],
3111
- 42: [function (require, module, exports) {
3159
+ 43: [function (require, module, exports) {
3112
3160
  /**
3113
3161
  * Fable Application Services Support Library
3114
3162
  * @license MIT
@@ -3120,6 +3168,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
3120
3168
  var libFableServiceManager = require('./Fable-ServiceManager.js');
3121
3169
  var libFableServiceDataArithmatic = require('./Fable-Service-DataArithmatic.js');
3122
3170
  var libFableServiceTemplate = require('./Fable-Service-Template.js');
3171
+ var libFableServiceMetaTemplate = require('./Fable-Service-MetaTemplate.js');
3123
3172
  var libFableServiceUtility = require('./Fable-Service-Utility.js');
3124
3173
  var libFableOperation = require('./Fable-Operation.js');
3125
3174
  var Fable = /*#__PURE__*/function () {
@@ -3151,6 +3200,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
3151
3200
  // Initialize the template service
3152
3201
  this.serviceManager.addServiceType('Template', libFableServiceTemplate);
3153
3202
 
3203
+ // Initialize the metatemplate service
3204
+ this.serviceManager.addServiceType('MetaTemplate', libFableServiceMetaTemplate);
3205
+
3154
3206
  // Initialize and instantiate the default baked-in Utility service
3155
3207
  this.serviceManager.addServiceType('Utility', libFableServiceUtility);
3156
3208
  this.fable.serviceManager.instantiateServiceProvider('Utility', {}, 'Default-Service-Utility');
@@ -3208,9 +3260,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
3208
3260
  }, {
3209
3261
  "./Fable-Operation.js": 36,
3210
3262
  "./Fable-Service-DataArithmatic.js": 37,
3211
- "./Fable-Service-Template.js": 38,
3212
- "./Fable-Service-Utility.js": 39,
3213
- "./Fable-ServiceManager.js": 40,
3263
+ "./Fable-Service-MetaTemplate.js": 38,
3264
+ "./Fable-Service-Template.js": 39,
3265
+ "./Fable-Service-Utility.js": 40,
3266
+ "./Fable-ServiceManager.js": 41,
3214
3267
  "fable-log": 23,
3215
3268
  "fable-settings": 26,
3216
3269
  "fable-uuid": 28
@@ -1,9 +1,9 @@
1
- "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},_get.apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(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)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fable=e()}}((function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){var n=e("async.util.eachoflimit"),i=e("async.util.withoutindex");t.exports=function(e,t,r,o){return n(t)(e,i(r),o)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(e,t,r){t.exports=function(e){return function t(r){function n(){return e.length&&e[r].apply(null,arguments),n.next()}return n.next=function(){return r<e.length-1?t(r+1):null},n}(0)}},{}],3:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),o=e("async.util.onlyonce"),a=e("async.util.keyiterator");t.exports=function(e){return function(t,r,s){s=n(s||i);var u=a(t=t||[]);if(e<=0)return s(null);var l=!1,c=0,f=!1;!function n(){if(l&&c<=0)return s(null);for(;c<e&&!f;){var i=u();if(null===i)return l=!0,void(c<=0&&s(null));c+=1,r(t[i],i,o((function(e){c-=1,e?(s(e),f=!0):n()})))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(e,t,r){var n=e("async.util.setimmediate"),i=e("async.util.restparam");t.exports=function(e){return i((function(t){var r=t.pop();t.push((function(){var e=arguments;i?n((function(){r.apply(null,e)})):r.apply(null,e)}));var i=!0;e.apply(this,t),i=!1}))}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],6:[function(e,t,r){var n=e("async.util.isarray");t.exports=function(e){return n(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}},{"async.util.isarray":5}],7:[function(e,t,r){var n=e("async.util.keys"),i=e("async.util.isarraylike");t.exports=function(e){var t,r,o=-1;return i(e)?(t=e.length,function(){return++o<t?o:null}):(r=n(e),t=r.length,function(){return++o<t?r[o]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(e,t,r){t.exports=Object.keys||function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}},{}],9:[function(e,t,r){t.exports=function(){}},{}],10:[function(e,t,r){t.exports=function(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}},{}],11:[function(e,t,r){t.exports=function(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}},{}],12:[function(e,t,r){t.exports=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=new Array(r),i=0;i<r;i++)n[i]=arguments[i+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n)}}}},{}],13:[function(e,t,r){(function(e){(function(){var r="function"==typeof e&&e,n=function(e){setTimeout(e,0)};t.exports=function(e){return(r||n)(e)}}).call(this)}).call(this,e("timers").setImmediate)},{timers:34}],14:[function(e,t,r){t.exports=function(e){return function(t,r,n){return e(t,n)}}},{}],15:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),o=e("async.util.isarray"),a=e("async.util.restparam"),s=e("async.util.ensureasync"),u=e("async.iterator");t.exports=function(e,t){if(t=n(t||i),!o(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();!function e(r){return a((function(n,i){if(n)t.apply(null,[n].concat(i));else{var o=r.next();o?i.push(e(o)):i.push(t),s(r).apply(null,i)}}))}(u(e))()}},{"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(e,t,r){},{}],17:[function(e,t,r){
1
+ "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},_get.apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(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)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fable=e()}}((function(){return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){var n=e("async.util.eachoflimit"),i=e("async.util.withoutindex");t.exports=function(e,t,r,a){return n(t)(e,i(r),a)}},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(e,t,r){t.exports=function(e){return function t(r){function n(){return e.length&&e[r].apply(null,arguments),n.next()}return n.next=function(){return r<e.length-1?t(r+1):null},n}(0)}},{}],3:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),a=e("async.util.onlyonce"),o=e("async.util.keyiterator");t.exports=function(e){return function(t,r,s){s=n(s||i);var u=o(t=t||[]);if(e<=0)return s(null);var l=!1,c=0,f=!1;!function n(){if(l&&c<=0)return s(null);for(;c<e&&!f;){var i=u();if(null===i)return l=!0,void(c<=0&&s(null));c+=1,r(t[i],i,a((function(e){c-=1,e?(s(e),f=!0):n()})))}}()}}},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(e,t,r){var n=e("async.util.setimmediate"),i=e("async.util.restparam");t.exports=function(e){return i((function(t){var r=t.pop();t.push((function(){var e=arguments;i?n((function(){r.apply(null,e)})):r.apply(null,e)}));var i=!0;e.apply(this,t),i=!1}))}},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],6:[function(e,t,r){var n=e("async.util.isarray");t.exports=function(e){return n(e)||"number"==typeof e.length&&e.length>=0&&e.length%1==0}},{"async.util.isarray":5}],7:[function(e,t,r){var n=e("async.util.keys"),i=e("async.util.isarraylike");t.exports=function(e){var t,r,a=-1;return i(e)?(t=e.length,function(){return++a<t?a:null}):(r=n(e),t=r.length,function(){return++a<t?r[a]:null})}},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(e,t,r){t.exports=Object.keys||function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}},{}],9:[function(e,t,r){t.exports=function(){}},{}],10:[function(e,t,r){t.exports=function(e){return function(){null!==e&&(e.apply(this,arguments),e=null)}}},{}],11:[function(e,t,r){t.exports=function(e){return function(){if(null===e)throw new Error("Callback was already called.");e.apply(this,arguments),e=null}}},{}],12:[function(e,t,r){t.exports=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=new Array(r),i=0;i<r;i++)n[i]=arguments[i+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n)}}}},{}],13:[function(e,t,r){(function(e){(function(){var r="function"==typeof e&&e,n=function(e){setTimeout(e,0)};t.exports=function(e){return(r||n)(e)}}).call(this)}).call(this,e("timers").setImmediate)},{timers:34}],14:[function(e,t,r){t.exports=function(e){return function(t,r,n){return e(t,n)}}},{}],15:[function(e,t,r){var n=e("async.util.once"),i=e("async.util.noop"),a=e("async.util.isarray"),o=e("async.util.restparam"),s=e("async.util.ensureasync"),u=e("async.iterator");t.exports=function(e,t){if(t=n(t||i),!a(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();!function e(r){return o((function(n,i){if(n)t.apply(null,[n].concat(i));else{var a=r.next();a?i.push(e(a)):i.push(t),s(r).apply(null,i)}}))}(u(e))()}},{"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(e,t,r){},{}],17:[function(e,t,r){
2
2
  /**
3
3
  * @license MIT
4
4
  * @author <steven@velozo.com>
5
5
  */
6
- var n=function(){function e(){_classCallCheck(this,e),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}return _createClass(e,[{key:"stringReverse",value:function(e){return e.split("").reverse().join("")}},{key:"stringStartsWith",value:function(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}},{key:"stringStartsWith_Polyfill",value:function(e,t){return this.slice(t||0,e.length)===e}},{key:"stringEndsWith",value:function(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}},{key:"stringEndsWith_Polyfill",value:function(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}},{key:"insecureStringHash",value:function(e){for(var t=0,r=e.length,n=0;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(t)}},{key:"cleanEnclosureWrapCharacters",value:function(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}},{key:"cleanNonAlphaCharacters",value:function(e){if("string"==typeof e&&""!=e)return e.replace(this._Regex_formatterCleanNonAlpha,this._Value_Clean_formatterCleanNonAlpha)}},{key:"formatterInsertCommas",value:function(e){var t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}},{key:"processAddCommasToNumberRegex",value:function(e,t,r,n,i,o){return t+(i?this.formatterInsertCommas(n)+i+o:this.formatterInsertCommas(n+o))}},{key:"formatterAddCommasToNumber",value:function(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}},{key:"formatterDollars",value:function(e){var t=parseFloat(e).toFixed(2);return isNaN(t)&&("string"==typeof e&&(t=parseFloat(e.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(t))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(t))}},{key:"formatterRoundNumber",value:function(e,t){var r=void 0===t?2:t,n=Number.parseFloat(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}},{key:"stringBeforeMatch",value:function(e,t){return e.split(t)[0]}},{key:"stringAfterMatch",value:function(e,t){var r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}},{key:"stringCountEnclosures",value:function(e,t,r){for(var n="string"==typeof e?e:"",i="string"==typeof t?t:"(",o="string"==typeof r?r:")",a=0,s=0,u=0;u<n.length;u++)n[u]==i?(0==s&&a++,s++):n[u]==o&&s--;return a}},{key:"stringGetEnclosureValueByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",o="number"==typeof t?t:0,a="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,l=0,c=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==a?1==++l&&o==++u-1&&(c=!0,f=p):i[p]==s&&0==--l&&c&&h<=f&&(h=p,c=!1);return u<=o?"":h>0&&h>f?i.substring(f+1,h):i.substring(f+1)}},{key:"stringRemoveEnclosureByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",o="number"==typeof t?t:0,a="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,l=0,c=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==a?1==++l&&o==++u-1&&(c=!0,f=p):i[p]==s&&0==--l&&c&&h<=f&&(h=p,c=!1);if(u<=o)return i;var g="";return f>1&&(g=i.substring(0,f)),i.length>h+1&&h>f&&(g+=i.substring(h+1)),g}}]),e}();t.exports=n},{}],18:[function(e,t,r){
6
+ var n=function(){function e(){_classCallCheck(this,e),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}return _createClass(e,[{key:"stringReverse",value:function(e){return e.split("").reverse().join("")}},{key:"stringStartsWith",value:function(e,t,r){return this._UseEngineStringStartsWith?e.startsWith(t,r):this.stringStartsWith_Polyfill.call(e,t,r)}},{key:"stringStartsWith_Polyfill",value:function(e,t){return this.slice(t||0,e.length)===e}},{key:"stringEndsWith",value:function(e,t,r){return this._UseEngineStringEndsWith?e.endsWith(t,r):this.stringEndsWith_Polyfill.call(e,t,r)}},{key:"stringEndsWith_Polyfill",value:function(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}},{key:"insecureStringHash",value:function(e){for(var t=0,r=e.length,n=0;n<r;)t=(t<<5)-t+e.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(t)}},{key:"cleanEnclosureWrapCharacters",value:function(e,t){return t.startsWith(e)&&t.endsWith(e)?t.substring(1,t.length-1):t}},{key:"cleanNonAlphaCharacters",value:function(e){if("string"==typeof e&&""!=e)return e.replace(this._Regex_formatterCleanNonAlpha,this._Value_Clean_formatterCleanNonAlpha)}},{key:"formatterInsertCommas",value:function(e){var t=this.stringReverse(e).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(t)}},{key:"processAddCommasToNumberRegex",value:function(e,t,r,n,i,a){return t+(i?this.formatterInsertCommas(n)+i+a:this.formatterInsertCommas(n+a))}},{key:"formatterAddCommasToNumber",value:function(e){return e.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}},{key:"formatterDollars",value:function(e){var t=parseFloat(e).toFixed(2);return isNaN(t)&&("string"==typeof e&&(t=parseFloat(e.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(t))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(t))}},{key:"formatterRoundNumber",value:function(e,t){var r=void 0===t?2:t,n=Number.parseFloat(e).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}},{key:"stringBeforeMatch",value:function(e,t){return e.split(t)[0]}},{key:"stringAfterMatch",value:function(e,t){var r=e.indexOf(t);return r<0||r+t.length>=e.length?"":e.substring(r+t.length)}},{key:"stringCountEnclosures",value:function(e,t,r){for(var n="string"==typeof e?e:"",i="string"==typeof t?t:"(",a="string"==typeof r?r:")",o=0,s=0,u=0;u<n.length;u++)n[u]==i?(0==s&&o++,s++):n[u]==a&&s--;return o}},{key:"stringGetEnclosureValueByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",a="number"==typeof t?t:0,o="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,l=0,c=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==o?1==++l&&a==++u-1&&(c=!0,f=p):i[p]==s&&0==--l&&c&&h<=f&&(h=p,c=!1);return u<=a?"":h>0&&h>f?i.substring(f+1,h):i.substring(f+1)}},{key:"stringRemoveEnclosureByIndex",value:function(e,t,r,n){for(var i="string"==typeof e?e:"",a="number"==typeof t?t:0,o="string"==typeof r?r:"(",s="string"==typeof n?n:")",u=0,l=0,c=!1,f=0,h=0,p=0;p<i.length;p++)i[p]==o?1==++l&&a==++u-1&&(c=!0,f=p):i[p]==s&&0==--l&&c&&h<=f&&(h=p,c=!1);if(u<=a)return i;var g="";return f>1&&(g=i.substring(0,f)),i.length>h+1&&h>f&&(g+=i.substring(h+1)),g}}]),e}();t.exports=n},{}],18:[function(e,t,r){
7
7
  /**
8
8
  * Base Logger Class
9
9
  *
@@ -19,7 +19,7 @@ var n=function(){function e(t,r){_classCallCheck(this,e),this._Settings="object"
19
19
  *
20
20
  * @author Steven Velozo <steven@velozo.com>
21
21
  */
22
- getDefaultProviders=function(){var t={};return t.console=e("./Fable-Log-Logger-Console.js"),t.default=t.console,t},t.exports=getDefaultProviders()},{"./Fable-Log-Logger-Console.js":21}],20:[function(e,t,r){t.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],21:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;_classCallCheck(this,r),(i=t.call(this,e))._ShowTimeStamps=!i._Settings.hasOwnProperty("showtimestamps")||1==i._Settings.showtimestamps,i._FormattedTimeStamps=!i._Settings.hasOwnProperty("formattedtimestamps")||1==i._Settings.formattedtimestamps,i._ContextMessage=i._Settings.hasOwnProperty("Context")?"(".concat(i._Settings.Context,")"):n._Settings.hasOwnProperty("Product")?"(".concat(n._Settings.Product,")"):"Unnamed_Log_Context",i._OutputLogLinesToConsole=!i._Settings.hasOwnProperty("outputloglinestoconsole")||i._Settings.outputloglinestoconsole,i._OutputObjectsToConsole=!i._Settings.hasOwnProperty("outputobjectstoconsole")||i._Settings.outputobjectstoconsole,i.prefixCache={};for(var o=0;o<=i.levels.length;o++)i.prefixCache[i.levels[o]]="[".concat(i.levels[o],"] ").concat(i._ContextMessage,": "),i._ShowTimeStamps&&(i.prefixCache[i.levels[o]]=" "+i.prefixCache[i.levels[o]]);return i}return _createClass(r,[{key:"write",value:function(e,t,r){var n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);var i="".concat(n).concat(this.prefixCache[e]).concat(t);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}]),r}(e("./Fable-Log-BaseLogger.js"));t.exports=n},{"./Fable-Log-BaseLogger.js":18}],22:[function(e,t,r){var n=e("./Fable-Log-Logger-Console.js"),i=e("fs"),o=e("path"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var a;return _classCallCheck(this,r),(a=t.call(this,e,n)).logFileRawPath=a._Settings.hasOwnProperty("path")?a._Settings.path:"./".concat(a._ContextMessage,".log"),a.logFilePath=o.normalize(a.logFileRawPath),a.logFileStreamOptions=a._Settings.hasOwnProperty("fileStreamoptions")?a._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},a.fileWriter=i.createWriteStream(a.logFilePath,a.logFileStreamOptions),a.activelyWriting=!1,a.logLineStrings=[],a.logObjectStrings=[],a.defaultWriteCompleteCallback=function(){},a.defaultBufferFlushCallback=function(){},a}return _createClass(r,[{key:"closeWriter",value:function(e){var t="function"==typeof e?e:function(){};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",t.bind(this))}},{key:"completeBufferFlushToLogFile",value:function(e){this.activelyWriting=!1;var t="function"==typeof e?e:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return t();this.flushBufferToLogFile(t)}},{key:"flushBufferToLogFile",value:function(e){if(!this.activelyWriting){this.activelyWriting=!0;var t="function"==typeof e?e:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];for(var i="",o=0;o<r.length;o++)i+="".concat(r[o],"\n"),!1!==n[o]&&(i+="".concat(n[o],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(t);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,t))}}},{key:"write",value:function(e,t,n){var i=_get(_getPrototypeOf(r.prototype),"write",this).call(this,e,t,n);this.logLineStrings.push(i),void 0!==n?this.logObjectStrings.push(JSON.stringify(n,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}]),r}(n);t.exports=a},{"./Fable-Log-Logger-Console.js":21,fs:16,path:29}],23:[function(e,t,r){
22
+ getDefaultProviders=function(){var t={};return t.console=e("./Fable-Log-Logger-Console.js"),t.default=t.console,t},t.exports=getDefaultProviders()},{"./Fable-Log-Logger-Console.js":21}],20:[function(e,t,r){t.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],21:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;_classCallCheck(this,r),(i=t.call(this,e))._ShowTimeStamps=!i._Settings.hasOwnProperty("showtimestamps")||1==i._Settings.showtimestamps,i._FormattedTimeStamps=!i._Settings.hasOwnProperty("formattedtimestamps")||1==i._Settings.formattedtimestamps,i._ContextMessage=i._Settings.hasOwnProperty("Context")?"(".concat(i._Settings.Context,")"):n._Settings.hasOwnProperty("Product")?"(".concat(n._Settings.Product,")"):"Unnamed_Log_Context",i._OutputLogLinesToConsole=!i._Settings.hasOwnProperty("outputloglinestoconsole")||i._Settings.outputloglinestoconsole,i._OutputObjectsToConsole=!i._Settings.hasOwnProperty("outputobjectstoconsole")||i._Settings.outputobjectstoconsole,i.prefixCache={};for(var a=0;a<=i.levels.length;a++)i.prefixCache[i.levels[a]]="[".concat(i.levels[a],"] ").concat(i._ContextMessage,": "),i._ShowTimeStamps&&(i.prefixCache[i.levels[a]]=" "+i.prefixCache[i.levels[a]]);return i}return _createClass(r,[{key:"write",value:function(e,t,r){var n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);var i="".concat(n).concat(this.prefixCache[e]).concat(t);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}]),r}(e("./Fable-Log-BaseLogger.js"));t.exports=n},{"./Fable-Log-BaseLogger.js":18}],22:[function(e,t,r){var n=e("./Fable-Log-Logger-Console.js"),i=e("fs"),a=e("path"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var o;return _classCallCheck(this,r),(o=t.call(this,e,n)).logFileRawPath=o._Settings.hasOwnProperty("path")?o._Settings.path:"./".concat(o._ContextMessage,".log"),o.logFilePath=a.normalize(o.logFileRawPath),o.logFileStreamOptions=o._Settings.hasOwnProperty("fileStreamoptions")?o._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},o.fileWriter=i.createWriteStream(o.logFilePath,o.logFileStreamOptions),o.activelyWriting=!1,o.logLineStrings=[],o.logObjectStrings=[],o.defaultWriteCompleteCallback=function(){},o.defaultBufferFlushCallback=function(){},o}return _createClass(r,[{key:"closeWriter",value:function(e){var t="function"==typeof e?e:function(){};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",t.bind(this))}},{key:"completeBufferFlushToLogFile",value:function(e){this.activelyWriting=!1;var t="function"==typeof e?e:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return t();this.flushBufferToLogFile(t)}},{key:"flushBufferToLogFile",value:function(e){if(!this.activelyWriting){this.activelyWriting=!0;var t="function"==typeof e?e:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];for(var i="",a=0;a<r.length;a++)i+="".concat(r[a],"\n"),!1!==n[a]&&(i+="".concat(n[a],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(t);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,t))}}},{key:"write",value:function(e,t,n){var i=_get(_getPrototypeOf(r.prototype),"write",this).call(this,e,t,n);this.logLineStrings.push(i),void 0!==n?this.logObjectStrings.push(JSON.stringify(n,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}]),r}(n);t.exports=o},{"./Fable-Log-Logger-Console.js":21,fs:16,path:29}],23:[function(e,t,r){
23
23
  /**
24
24
  * Fable Logging Add-on
25
25
  *
@@ -28,7 +28,7 @@ getDefaultProviders=function(){var t={};return t.console=e("./Fable-Log-Logger-C
28
28
  * @author Steven Velozo <steven@velozo.com>
29
29
  * @module Fable Logger
30
30
  */
31
- var n=function(){function t(r,n){_classCallCheck(this,t);var i="object"===_typeof(r)?r:{};this._Settings=i,this._Providers=e("./Fable-Log-DefaultProviders-Node.js"),this._StreamDefinitions=i.hasOwnProperty("LogStreams")?i.LogStreams:e("./Fable-Log-DefaultStreams.json"),this.logStreams=[],this.logProviders={},this.activeLogStreams={},this.logStreamsTrace=[],this.logStreamsDebug=[],this.logStreamsInfo=[],this.logStreamsWarn=[],this.logStreamsError=[],this.logStreamsFatal=[],this.datumDecorator=function(e){return e},this.uuid="string"==typeof i.Product?i.Product:"Default"}return _createClass(t,[{key:"addLogger",value:function(e,t){if(this.activeLogStreams.hasOwnProperty(e.loggerUUID))return!1;switch(this.logStreams.push(e),this.activeLogStreams[e.loggerUUID]=!0,t){case"trace":this.logStreamsTrace.push(e);case"debug":this.logStreamsDebug.push(e);case"info":this.logStreamsInfo.push(e);case"warn":this.logStreamsWarn.push(e);case"error":this.logStreamsError.push(e);case"fatal":this.logStreamsFatal.push(e)}return!0}},{key:"setDatumDecorator",value:function(e){this.datumDecorator="function"==typeof e?e:function(e){return e}}},{key:"trace",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsTrace.length;n++)this.logStreamsTrace[n].trace(e,r)}},{key:"debug",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsDebug.length;n++)this.logStreamsDebug[n].debug(e,r)}},{key:"info",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsInfo.length;n++)this.logStreamsInfo[n].info(e,r)}},{key:"warn",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsWarn.length;n++)this.logStreamsWarn[n].warn(e,r)}},{key:"error",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsError.length;n++)this.logStreamsError[n].error(e,r)}},{key:"fatal",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsFatal.length;n++)this.logStreamsFatal[n].fatal(e,r)}},{key:"initialize",value:function(){for(var e=0;e<this._StreamDefinitions.length;e++){var t=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[e]);this._Providers.hasOwnProperty(t.loggertype)?this.addLogger(new this._Providers[t.loggertype](t,this),t.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(t)))}for(var r=0;r<this.logStreams.length;r++)this.logStreams[r].initialize()}},{key:"logTime",value:function(e,t){var r=void 0!==e?e:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),t)}},{key:"getTimeStamp",value:function(){return+new Date}},{key:"getTimeDelta",value:function(e){return+new Date-e}},{key:"logTimeDelta",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=(_typeof(r),+new Date);this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms)"),r)}},{key:"logTimeDeltaHuman",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=+new Date,o=parseInt(e%1e3),a=parseInt(e/1e3%60),s=parseInt(e/6e4%60),u=parseInt(e/36e5);o=o<10?"00"+o:o<100?"0"+o:o,a=a<10?"0"+a:a,s=s<10?"0"+s:s,u=u<10?"0"+u:u,this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms) or (").concat(u,":").concat(s,":").concat(a,".").concat(o,")"),r)}},{key:"logTimeDeltaRelative",value:function(e,t,r){this.logTimeDelta(this.getTimeDelta(e),t,r)}},{key:"logTimeDeltaRelativeHuman",value:function(e,t,r){this.logTimeDeltaHuman(this.getTimeDelta(e),t,r)}}]),t}();t.exports=n,t.exports.new=function(e){return new n(e)},t.exports.LogProviderBase=e("./Fable-Log-BaseLogger.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-Console.js"),t.exports.LogProviderConsole=e("./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(e,t,r){t.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],25:[function(e,t,r){(function(e){(function(){
31
+ var n=function(){function t(r,n){_classCallCheck(this,t);var i="object"===_typeof(r)?r:{};this._Settings=i,this._Providers=e("./Fable-Log-DefaultProviders-Node.js"),this._StreamDefinitions=i.hasOwnProperty("LogStreams")?i.LogStreams:e("./Fable-Log-DefaultStreams.json"),this.logStreams=[],this.logProviders={},this.activeLogStreams={},this.logStreamsTrace=[],this.logStreamsDebug=[],this.logStreamsInfo=[],this.logStreamsWarn=[],this.logStreamsError=[],this.logStreamsFatal=[],this.datumDecorator=function(e){return e},this.uuid="string"==typeof i.Product?i.Product:"Default"}return _createClass(t,[{key:"addLogger",value:function(e,t){if(this.activeLogStreams.hasOwnProperty(e.loggerUUID))return!1;switch(this.logStreams.push(e),this.activeLogStreams[e.loggerUUID]=!0,t){case"trace":this.logStreamsTrace.push(e);case"debug":this.logStreamsDebug.push(e);case"info":this.logStreamsInfo.push(e);case"warn":this.logStreamsWarn.push(e);case"error":this.logStreamsError.push(e);case"fatal":this.logStreamsFatal.push(e)}return!0}},{key:"setDatumDecorator",value:function(e){this.datumDecorator="function"==typeof e?e:function(e){return e}}},{key:"trace",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsTrace.length;n++)this.logStreamsTrace[n].trace(e,r)}},{key:"debug",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsDebug.length;n++)this.logStreamsDebug[n].debug(e,r)}},{key:"info",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsInfo.length;n++)this.logStreamsInfo[n].info(e,r)}},{key:"warn",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsWarn.length;n++)this.logStreamsWarn[n].warn(e,r)}},{key:"error",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsError.length;n++)this.logStreamsError[n].error(e,r)}},{key:"fatal",value:function(e,t){for(var r=this.datumDecorator(t),n=0;n<this.logStreamsFatal.length;n++)this.logStreamsFatal[n].fatal(e,r)}},{key:"initialize",value:function(){for(var e=0;e<this._StreamDefinitions.length;e++){var t=Object.assign({loggertype:"default",streamtype:"console",level:"info"},this._StreamDefinitions[e]);this._Providers.hasOwnProperty(t.loggertype)?this.addLogger(new this._Providers[t.loggertype](t,this),t.level):console.log("Error initializing log stream: bad loggertype in stream definition ".concat(JSON.stringify(t)))}for(var r=0;r<this.logStreams.length;r++)this.logStreams[r].initialize()}},{key:"logTime",value:function(e,t){var r=void 0!==e?e:"Time",n=new Date;this.info("".concat(r," ").concat(n," (epoch ").concat(+n,")"),t)}},{key:"getTimeStamp",value:function(){return+new Date}},{key:"getTimeDelta",value:function(e){return+new Date-e}},{key:"logTimeDelta",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=(_typeof(r),+new Date);this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms)"),r)}},{key:"logTimeDeltaHuman",value:function(e,t,r){var n=void 0!==t?t:"Time Measurement",i=+new Date,a=parseInt(e%1e3),o=parseInt(e/1e3%60),s=parseInt(e/6e4%60),u=parseInt(e/36e5);a=a<10?"00"+a:a<100?"0"+a:a,o=o<10?"0"+o:o,s=s<10?"0"+s:s,u=u<10?"0"+u:u,this.info("".concat(n," logged at (epoch ").concat(+i,") took (").concat(e,"ms) or (").concat(u,":").concat(s,":").concat(o,".").concat(a,")"),r)}},{key:"logTimeDeltaRelative",value:function(e,t,r){this.logTimeDelta(this.getTimeDelta(e),t,r)}},{key:"logTimeDeltaRelativeHuman",value:function(e,t,r){this.logTimeDeltaHuman(this.getTimeDelta(e),t,r)}}]),t}();t.exports=n,t.exports.new=function(e){return new n(e)},t.exports.LogProviderBase=e("./Fable-Log-BaseLogger.js"),t.exports.LogProviderConsole=e("./Fable-Log-Logger-Console.js"),t.exports.LogProviderConsole=e("./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(e,t,r){t.exports={Product:"ApplicationNameHere",ProductVersion:"0.0.0",ConfigFile:!1,LogStreams:[{level:"trace"}]}},{}],25:[function(e,t,r){(function(e){(function(){
32
32
  /**
33
33
  * Fable Settings Template Processor
34
34
  *
@@ -39,7 +39,7 @@ var n=function(){function t(r,n){_classCallCheck(this,t);var i="object"===_typeo
39
39
  * @author Steven Velozo <steven@velozo.com>
40
40
  * @module Fable Settings
41
41
  */
42
- var r=function(){function t(r){_classCallCheck(this,t),this.templateProcessor=new r.precedent,this.templateProcessor.addPattern("${","}",(function(t){var r=t.trim(),n=r.indexOf("|"),i=r.substring(n+1),o=n>-1?r.substring(0,n):r;return e.env.hasOwnProperty(o)?e.env[o]:i}))}return _createClass(t,[{key:"parseSetting",value:function(e){return this.templateProcessor.parseString(e)}}]),t}();t.exports=r}).call(this)}).call(this,e("_process"))},{_process:33}],26:[function(e,t,r){
42
+ var r=function(){function t(r){_classCallCheck(this,t),this.templateProcessor=new r.precedent,this.templateProcessor.addPattern("${","}",(function(t){var r=t.trim(),n=r.indexOf("|"),i=r.substring(n+1),a=n>-1?r.substring(0,n):r;return e.env.hasOwnProperty(a)?e.env[a]:i}))}return _createClass(t,[{key:"parseSetting",value:function(e){return this.templateProcessor.parseString(e)}}]),t}();t.exports=r}).call(this)}).call(this,e("_process"))},{_process:33}],26:[function(e,t,r){
43
43
  /**
44
44
  * Fable Settings Add-on
45
45
  *
@@ -48,7 +48,7 @@ var r=function(){function t(r){_classCallCheck(this,t),this.templateProcessor=ne
48
48
  * @author Steven Velozo <steven@velozo.com>
49
49
  * @module Fable Settings
50
50
  */
51
- var n=e("precedent"),i=e("./Fable-Settings-TemplateProcessor.js"),o=function(){function t(r){_classCallCheck(this,t),this.dependencies={precedent:n},this.settingsTemplateProcessor=new i(this.dependencies),this._configureEnvTemplating(r),this.default=this.buildDefaultSettings();var o=this.merge(r,this.buildDefaultSettings());if(this.base=JSON.parse(JSON.stringify(o)),o.DefaultConfigFile)try{o=this.merge(e(o.DefaultConfigFile),o)}catch(e){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}if(o.ConfigFile)try{o=this.merge(e(o.ConfigFile),o)}catch(e){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}this.settings=o}return _createClass(t,[{key:"buildDefaultSettings",value:function(){return JSON.parse(JSON.stringify(e("./Fable-Settings-Default")))}},{key:"_configureEnvTemplating",value:function(e){this._PerformEnvTemplating=!e||!0!==e.NoEnvReplacement}},{key:"_resolveEnv",value:function(e){for(var t in e)"object"===_typeof(e[t])?this._resolveEnv(e[t]):"string"==typeof e[t]&&(e[t]=this.settingsTemplateProcessor.parseSetting(e[t]))}},{key:"_isObject",value:function(e){return"object"===_typeof(e)&&!Array.isArray(e)}},{key:"_deepMergeObjects",value:function(e,t){var r=this;if(t&&this._isObject(t))return Object.keys(t).forEach((function(n){var i=t[n];if(r._isObject(i)){var o=e[n];if(o&&r._isObject(o))return void r._deepMergeObjects(o,i)}e[n]=i})),e}},{key:"merge",value:function(e,t){var r="object"===_typeof(e)?e:{},n="object"===_typeof(t)?t:this.settings,i=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,i),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}},{key:"fill",value:function(e){var t="object"===_typeof(e)?e:{},r=JSON.parse(JSON.stringify(t));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}]),t}();t.exports=o,t.exports.new=function(e){return new o(e)},t.exports.precedent=n},{"./Fable-Settings-Default":24,"./Fable-Settings-TemplateProcessor.js":25,precedent:30}],27:[function(e,t,r){
51
+ var n=e("precedent"),i=e("./Fable-Settings-TemplateProcessor.js"),a=function(){function t(r){_classCallCheck(this,t),this.dependencies={precedent:n},this.settingsTemplateProcessor=new i(this.dependencies),this._configureEnvTemplating(r),this.default=this.buildDefaultSettings();var a=this.merge(r,this.buildDefaultSettings());if(this.base=JSON.parse(JSON.stringify(a)),a.DefaultConfigFile)try{a=this.merge(e(a.DefaultConfigFile),a)}catch(e){console.log("Fable-Settings Warning: Default configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}if(a.ConfigFile)try{a=this.merge(e(a.ConfigFile),a)}catch(e){console.log("Fable-Settings Warning: Configuration file specified but there was a problem loading it. Falling back to base."),console.log(" Loading Exception: "+e)}this.settings=a}return _createClass(t,[{key:"buildDefaultSettings",value:function(){return JSON.parse(JSON.stringify(e("./Fable-Settings-Default")))}},{key:"_configureEnvTemplating",value:function(e){this._PerformEnvTemplating=!e||!0!==e.NoEnvReplacement}},{key:"_resolveEnv",value:function(e){for(var t in e)"object"===_typeof(e[t])?this._resolveEnv(e[t]):"string"==typeof e[t]&&(e[t]=this.settingsTemplateProcessor.parseSetting(e[t]))}},{key:"_isObject",value:function(e){return"object"===_typeof(e)&&!Array.isArray(e)}},{key:"_deepMergeObjects",value:function(e,t){var r=this;if(t&&this._isObject(t))return Object.keys(t).forEach((function(n){var i=t[n];if(r._isObject(i)){var a=e[n];if(a&&r._isObject(a))return void r._deepMergeObjects(a,i)}e[n]=i})),e}},{key:"merge",value:function(e,t){var r="object"===_typeof(e)?e:{},n="object"===_typeof(t)?t:this.settings,i=JSON.parse(JSON.stringify(r));return n=this._deepMergeObjects(n,i),this._PerformEnvTemplating&&this._resolveEnv(n),this._configureEnvTemplating(n),n}},{key:"fill",value:function(e){var t="object"===_typeof(e)?e:{},r=JSON.parse(JSON.stringify(t));return this.settings=this._deepMergeObjects(r,this.settings),this.settings}}]),t}();t.exports=a,t.exports.new=function(e){return new a(e)},t.exports.precedent=n},{"./Fable-Settings-Default":24,"./Fable-Settings-TemplateProcessor.js":25,precedent:30}],27:[function(e,t,r){
52
52
  /**
53
53
  * Random Byte Generator - Browser version
54
54
  *
@@ -65,7 +65,7 @@ var n=function(){function e(){_classCallCheck(this,e),this.getRandomValues="unde
65
65
  * @author Steven Velozo <steven@velozo.com>
66
66
  * @module Fable UUID
67
67
  */
68
- var n=e("./Fable-UUID-Random.js"),i=function(){function e(t){_classCallCheck(this,e),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(var r=0;r<256;++r)this._HexLookup[r]=(r+256).toString(16).substr(1)}return _createClass(e,[{key:"bytesToUUID",value:function(e){var t=0;return[this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]]].join("")}},{key:"generateUUIDv4",value:function(){new Array(16);var e=this.randomByteGenerator.generate();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,this.bytesToUUID(e)}},{key:"generateRandom",value:function(){for(var e="",t=0;t<this._UUIDLength;t++)e+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return e}},{key:"getUUID",value:function(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}]),e}();t.exports=i,t.exports.new=function(e){return new i(e)}},{"./Fable-UUID-Random.js":27}],29:[function(e,t,r){(function(e){(function(){function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var i={resolve:function(){for(var t,i="",o=!1,a=arguments.length-1;a>=-1&&!o;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];r(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var o=e.length,a=o-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,l=a<u?a:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else a>l&&(47===e.charCodeAt(n+f)?c=f:0===f&&(c=0));break}var h=e.charCodeAt(n+f);if(h!==t.charCodeAt(s+f))break;47===h&&(c=f)}var p="";for(f=n+c+1;f<=o;++f)f!==o&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+c):(s+=c,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var n,i=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){r(e);for(var t=-1,n=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){n=s+1;break}}return-1===t||-1===i||0===a||1===a&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==_typeof(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(e));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),o=47===i;o?(t.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,l=!0,c=e.length-1,f=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u)),t.ext=e.slice(a,u)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this)}).call(this,e("_process"))},{_process:33}],30:[function(e,t,r){
68
+ var n=e("./Fable-UUID-Random.js"),i=function(){function e(t){_classCallCheck(this,e),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(var r=0;r<256;++r)this._HexLookup[r]=(r+256).toString(16).substr(1)}return _createClass(e,[{key:"bytesToUUID",value:function(e){var t=0;return[this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],"-",this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]],this._HexLookup[e[t++]]].join("")}},{key:"generateUUIDv4",value:function(){new Array(16);var e=this.randomByteGenerator.generate();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,this.bytesToUUID(e)}},{key:"generateRandom",value:function(){for(var e="",t=0;t<this._UUIDLength;t++)e+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));return e}},{key:"getUUID",value:function(){return this._UUIDModeRandom?this.generateRandom():this.generateUUIDv4()}}]),e}();t.exports=i,t.exports.new=function(e){return new i(e)}},{"./Fable-UUID-Random.js":27}],29:[function(e,t,r){(function(e){(function(){function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var r,n="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(a===s-1||1===o);else if(a!==s-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 u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=s,o=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var i={resolve:function(){for(var t,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(i=s+"/"+i,a=47===s.charCodeAt(0))}return i=n(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(r(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return r(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];r(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(r(e),r(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var a=e.length,o=a-n,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,l=o<u?o:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===t.charCodeAt(s+f))return t.slice(s+f+1);if(0===f)return t.slice(s+f)}else o>l&&(47===e.charCodeAt(n+f)?c=f:0===f&&(c=0));break}var h=e.charCodeAt(n+f);if(h!==t.charCodeAt(s+f))break;47===h&&(c=f)}var p="";for(f=n+c+1;f<=a;++f)f!==a&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+c):(s+=c,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(r(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');r(e);var n,i=0,a=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!o){i=n+1;break}}else-1===u&&(o=!1,u=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=u))}return i===a?a=u:-1===a&&(a=e.length),e.slice(i,a)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1);return-1===a?"":e.slice(i,a)},extname:function(e){r(e);for(var t=-1,n=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(a=!1,i=s+1),46===u?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){n=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==_typeof(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(e));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}("/",e)},parse:function(e){r(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,i=e.charCodeAt(0),a=47===i;a?(t.root="/",n=1):n=0;for(var o=-1,s=0,u=-1,l=!0,c=e.length-1,f=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===o?o=c:1!==f&&(f=1):-1!==o&&(f=-1);else if(!l){s=c+1;break}return-1===o||-1===u||0===f||1===f&&o===u-1&&o===s+1?-1!==u&&(t.base=t.name=0===s&&a?e.slice(1,u):e.slice(s,u)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,u)):(t.name=e.slice(s,o),t.base=e.slice(s,u)),t.ext=e.slice(o,u)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this)}).call(this,e("_process"))},{_process:33}],30:[function(e,t,r){
69
69
  /**
70
70
  * Precedent Meta-Templating
71
71
  *
@@ -75,7 +75,7 @@ var n=e("./Fable-UUID-Random.js"),i=function(){function e(t){_classCallCheck(thi
75
75
  *
76
76
  * @description Process text streams, parsing out meta-template expressions.
77
77
  */
78
- var n=e("./WordTree.js"),i=e("./StringParser.js"),o=function(){function e(){_classCallCheck(this,e),this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}return _createClass(e,[{key:"addPattern",value:function(e,t,r){return this.WordTree.addPattern(e,t,r)}},{key:"parseString",value:function(e){return this.StringParser.parseString(e,this.ParseTree)}}]),e}();t.exports=o},{"./StringParser.js":31,"./WordTree.js":32}],31:[function(e,t,r){
78
+ var n=e("./WordTree.js"),i=e("./StringParser.js"),a=function(){function e(){_classCallCheck(this,e),this.WordTree=new n,this.StringParser=new i,this.ParseTree=this.WordTree.ParseTree}return _createClass(e,[{key:"addPattern",value:function(e,t,r){return this.WordTree.addPattern(e,t,r)}},{key:"parseString",value:function(e){return this.StringParser.parseString(e,this.ParseTree)}}]),e}();t.exports=a},{"./StringParser.js":31,"./WordTree.js":32}],31:[function(e,t,r){
79
79
  /**
80
80
  * String Parser
81
81
  *
@@ -95,23 +95,23 @@ var n=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{ke
95
95
  *
96
96
  * @description Create a tree (directed graph) of Javascript objects, one character per object.
97
97
  */
98
- var n=function(){function e(){_classCallCheck(this,e),this.ParseTree={}}return _createClass(e,[{key:"addChild",value:function(e,t,r){return e.hasOwnProperty(t[r])||(e[t[r]]={}),e[t[r]]}},{key:"addPattern",value:function(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;for(var n=this.ParseTree,i=0;i<e.length;i++)n=this.addChild(n,e,i);return n.PatternStart=e,n.PatternEnd="string"==typeof t&&t.length>0?t:e,n.Parse="function"==typeof r?r:"string"==typeof r?function(){return r}:function(e){return e},!0}}]),e}();t.exports=n},{}],33:[function(e,t,r){var n,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!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:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],f=!1,h=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&g())}function g(){if(!f){var e=u(p);f=!0;for(var t=c.length;t;){for(l=c,c=[];++h<t;)l&&l[h].run();h=-1,t=c.length}l=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function v(){}o.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 y(e,t)),1!==c.length||f||u(g)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],34:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function l(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new l(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new l(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.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=u++,n=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":33,timers:34}],35:[function(e,t,r){var n=e("./Fable.js");"object"!==("undefined"==typeof window?"undefined":_typeof(window))||window.hasOwnProperty("Fable")||(window.Fable=n),t.exports=n},{"./Fable.js":42}],36:[function(e,t,r){var 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:[]}),i=function(){function e(t,r,i){_classCallCheck(this,e),this.fable=t,this.name=r,this.state=JSON.parse(n),this.state.Metadata.GUID=this.fable.getUUID(),this.state.Metadata.Hash=this.state.GUID,"string"==typeof i&&(this.state.Metadata.Hash=i)}return _createClass(e,[{key:"GUID",get:function(){return this.state.Metadata.GUID}},{key:"Hash",get:function(){return this.state.Metadata.Hash}},{key:"log",get:function(){return this}},{key:"writeOperationLog",value:function(e,t,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(e,"]: ").concat(t)),"object"==_typeof(r)&&this.state.Log.push(JSON.stringify(r))}},{key:"writeOperationErrors",value:function(e,t){this.state.Errors.push("".concat(e)),"object"==_typeof(t)&&this.state.Errors.push(JSON.stringify(t))}},{key:"trace",value:function(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}},{key:"debug",value:function(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}},{key:"info",value:function(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}},{key:"warn",value:function(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}},{key:"error",value:function(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}},{key:"fatal",value:function(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}]),e}();t.exports=i},{}],37:[function(e,t,r){var n=e("./Fable-ServiceProviderBase.js"),i=e("data-arithmatic"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,o){var a;return _classCallCheck(this,r),(a=t.call(this,e,n,o)).serviceType="DataArithmatic",a._DataArithmaticLibrary=new i,a}return _createClass(r)}(n);t.exports=o},{"./Fable-ServiceProviderBase.js":41,"data-arithmatic":17}],38:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var o;return _classCallCheck(this,r),(o=t.call(this,e,n,i)).serviceType="Template",o.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},o.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},o.renderFunction=!1,o.templateString=!1,o}return _createClass(r,[{key:"renderTemplate",value:function(e){return this.renderFunction(e)}},{key:"templateFunction",value:function(e){return this.renderTemplate.bind(this)}},{key:"buildTemplateFunction",value:function(e,t){var r=this;return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,(function(e){return"\\".concat(r.templateEscapes[e])})).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"'+\n(".concat(decodeURIComponent(t),")+\n'")})).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"';\n".concat(decodeURIComponent(t),"\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!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}]),r}(e("./Fable-ServiceProviderBase.js"));t.exports=n},{"./Fable-ServiceProviderBase.js":41}],39:[function(e,t,r){var n=e("./Fable-ServiceProviderBase.js"),i=e("async.waterfall"),o=e("async.eachlimit"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var s;return _classCallCheck(this,r),(s=t.call(this,e,n,a)).templates={},s.waterfall=i,s.eachLimit=o,s}return _createClass(r,[{key:"extend",value:function(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 Object.assign.apply(Object,[e].concat(r))}},{key:"template",value:function(e,t){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}},{key:"buildHashedTemplate",value:function(e,t,r){var n=this.fable.serviceManager.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}},{key:"chunk",value:function(e,t,r){var n=_toConsumableArray(e),i="number"==typeof t?t:0,o=void 0!==r?r:[];if(i<=0)return o;for(;n.length;)o.push(n.splice(0,i));return o}}]),r}(n);t.exports=a},{"./Fable-ServiceProviderBase.js":41,"async.eachlimit":1,"async.waterfall":15}],40:[function(e,t,r){
98
+ var n=function(){function e(){_classCallCheck(this,e),this.ParseTree={}}return _createClass(e,[{key:"addChild",value:function(e,t,r){return e.hasOwnProperty(t[r])||(e[t[r]]={}),e[t[r]]}},{key:"addPattern",value:function(e,t,r){if(e.length<1)return!1;if("string"==typeof t&&t.length<1)return!1;for(var n=this.ParseTree,i=0;i<e.length;i++)n=this.addChild(n,e,i);return n.PatternStart=e,n.PatternEnd="string"==typeof t&&t.length>0?t:e,n.Parse="function"==typeof r?r:"string"==typeof r?function(){return r}:function(e){return e},!0}}]),e}();t.exports=n},{}],33:[function(e,t,r){var n,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(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{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],f=!1,h=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&g())}function g(){if(!f){var e=u(p);f=!0;for(var t=c.length;t;){for(l=c,c=[];++h<t;)l&&l[h].run();h=-1,t=c.length}l=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function v(){}a.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 y(e,t)),1!==c.length||f||u(g)},y.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],34:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},u=0;function l(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new l(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new l(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},l.prototype.unref=l.prototype.ref=function(){},l.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=u++,n=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":33,timers:34}],35:[function(e,t,r){var n=e("./Fable.js");"object"!==("undefined"==typeof window?"undefined":_typeof(window))||window.hasOwnProperty("Fable")||(window.Fable=n),t.exports=n},{"./Fable.js":43}],36:[function(e,t,r){var 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:[]}),i=function(){function e(t,r,i){_classCallCheck(this,e),this.fable=t,this.name=r,this.state=JSON.parse(n),this.state.Metadata.GUID=this.fable.getUUID(),this.state.Metadata.Hash=this.state.GUID,"string"==typeof i&&(this.state.Metadata.Hash=i)}return _createClass(e,[{key:"GUID",get:function(){return this.state.Metadata.GUID}},{key:"Hash",get:function(){return this.state.Metadata.Hash}},{key:"log",get:function(){return this}},{key:"writeOperationLog",value:function(e,t,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(e,"]: ").concat(t)),"object"==_typeof(r)&&this.state.Log.push(JSON.stringify(r))}},{key:"writeOperationErrors",value:function(e,t){this.state.Errors.push("".concat(e)),"object"==_typeof(t)&&this.state.Errors.push(JSON.stringify(t))}},{key:"trace",value:function(e,t){this.writeOperationLog("TRACE",e,t),this.fable.log.trace(e,t)}},{key:"debug",value:function(e,t){this.writeOperationLog("DEBUG",e,t),this.fable.log.debug(e,t)}},{key:"info",value:function(e,t){this.writeOperationLog("INFO",e,t),this.fable.log.info(e,t)}},{key:"warn",value:function(e,t){this.writeOperationLog("WARN",e,t),this.fable.log.warn(e,t)}},{key:"error",value:function(e,t){this.writeOperationLog("ERROR",e,t),this.writeOperationErrors(e,t),this.fable.log.error(e,t)}},{key:"fatal",value:function(e,t){this.writeOperationLog("FATAL",e,t),this.writeOperationErrors(e,t),this.fable.log.fatal(e,t)}}]),e}();t.exports=i},{}],37:[function(e,t,r){var n=e("./Fable-ServiceProviderBase.js"),i=e("data-arithmatic"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var o;return _classCallCheck(this,r),(o=t.call(this,e,n,a)).serviceType="DataArithmatic",o._DataArithmaticLibrary=new i,o}return _createClass(r)}(n);t.exports=a},{"./Fable-ServiceProviderBase.js":42,"data-arithmatic":17}],38:[function(e,t,r){var n=e("./Fable-ServiceProviderBase.js"),i=e("precedent"),a=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,a){var o;return _classCallCheck(this,r),(o=t.call(this,e,n,a)).serviceType="MetaTemplate",o._MetaTemplateLibrary=new i(o.options),o}return _createClass(r,[{key:"addPattern",value:function(e,t,r){return this._MetaTemplateLibrary.addPattern(e,t,r)}},{key:"parseString",value:function(e){return this._MetaTemplateLibrary.parseString(e,this.ParseTree)}}]),r}(n);t.exports=a},{"./Fable-ServiceProviderBase.js":42,precedent:30}],39:[function(e,t,r){var n=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,i){var a;return _classCallCheck(this,r),(a=t.call(this,e,n,i)).serviceType="Template",a.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},a.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},a.renderFunction=!1,a.templateString=!1,a}return _createClass(r,[{key:"renderTemplate",value:function(e){return this.renderFunction(e)}},{key:"templateFunction",value:function(e){return this.renderTemplate.bind(this)}},{key:"buildTemplateFunction",value:function(e,t){var r=this;return this.TemplateSource="__p+='"+e.replace(this.Matchers.Escaper,(function(e){return"\\".concat(r.templateEscapes[e])})).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"'+\n(".concat(decodeURIComponent(t),")+\n'")})).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,(function(e,t){return"';\n".concat(decodeURIComponent(t),"\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!==t?this.renderFunction(t):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}]),r}(e("./Fable-ServiceProviderBase.js"));t.exports=n},{"./Fable-ServiceProviderBase.js":42}],40:[function(e,t,r){var n=e("./Fable-ServiceProviderBase.js"),i=e("async.waterfall"),a=e("async.eachlimit"),o=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n,o){var s;return _classCallCheck(this,r),(s=t.call(this,e,n,o)).templates={},s.waterfall=i,s.eachLimit=a,s}return _createClass(r,[{key:"extend",value:function(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 Object.assign.apply(Object,[e].concat(r))}},{key:"template",value:function(e,t){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(e,t)}},{key:"buildHashedTemplate",value:function(e,t,r){var n=this.fable.serviceManager.instantiateServiceProvider("Template",{},e);return this.templates[e]=n.buildTemplateFunction(t,r),this.templates[e]}},{key:"chunk",value:function(e,t,r){var n=_toConsumableArray(e),i="number"==typeof t?t:0,a=void 0!==r?r:[];if(i<=0)return a;for(;n.length;)a.push(n.splice(0,i));return a}}]),r}(n);t.exports=o},{"./Fable-ServiceProviderBase.js":42,"async.eachlimit":1,"async.waterfall":15}],41:[function(e,t,r){
99
99
  /**
100
100
  * Fable Application Services Management
101
101
  * @license MIT
102
102
  * @author <steven@velozo.com>
103
103
  */
104
- var n=e("./Fable-ServiceProviderBase.js"),i=function(){function e(t){_classCallCheck(this,e),this.fable=t,this.serviceTypes=[],this.services={},this.defaultServices={},this.serviceClasses={}}return _createClass(e,[{key:"addServiceType",value:function(e,t){this.serviceTypes.push(e),this.services[e]={},"function"==typeof t&&t.prototype instanceof n?this.serviceClasses[e]=t:this.serviceClasses[e]=n}},{key:"instantiateServiceProvider",value:function(e,t,r){var n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.services[e][n.Hash]=n,this.defaultServices.hasOwnProperty(e)||(this.defaultServices[e]=n),n}},{key:"instantiateServiceProviderWithoutRegistration",value:function(e,t,r){return new this.serviceClasses[e](this.fable,t,r)}},{key:"setDefaultServiceInstantiation",value:function(e,t){return!!this.services[e].hasOwnProperty(t)&&(this.defaultServices[e]=this.services[e][t],!0)}}]),e}();t.exports=i,t.exports.ServiceProviderBase=n},{"./Fable-ServiceProviderBase.js":41}],41:[function(e,t,r){
104
+ var n=e("./Fable-ServiceProviderBase.js"),i=function(){function e(t){_classCallCheck(this,e),this.fable=t,this.serviceTypes=[],this.services={},this.defaultServices={},this.serviceClasses={}}return _createClass(e,[{key:"addServiceType",value:function(e,t){this.serviceTypes.push(e),this.services[e]={},"function"==typeof t&&t.prototype instanceof n?this.serviceClasses[e]=t:this.serviceClasses[e]=n}},{key:"instantiateServiceProvider",value:function(e,t,r){var n=this.instantiateServiceProviderWithoutRegistration(e,t,r);return this.services[e][n.Hash]=n,this.defaultServices.hasOwnProperty(e)||(this.defaultServices[e]=n),n}},{key:"instantiateServiceProviderWithoutRegistration",value:function(e,t,r){return new this.serviceClasses[e](this.fable,t,r)}},{key:"setDefaultServiceInstantiation",value:function(e,t){return!!this.services[e].hasOwnProperty(t)&&(this.defaultServices[e]=this.services[e][t],!0)}}]),e}();t.exports=i,t.exports.ServiceProviderBase=n},{"./Fable-ServiceProviderBase.js":42}],42:[function(e,t,r){
105
105
  /**
106
106
  * Fable Service Base
107
107
  * @license MIT
108
108
  * @author <steven@velozo.com>
109
109
  */
110
- var n=_createClass((function e(t,r,n){_classCallCheck(this,e),this.fable=t,this.options="object"===_typeof(r)?r:{},this.serviceType="Unknown",this.UUID=t.getUUID(),this.Hash="string"==typeof n?n:"".concat(this.UUID)}));t.exports=n},{}],42:[function(e,t,r){
110
+ var n=_createClass((function e(t,r,n){_classCallCheck(this,e),this.fable=t,this.options="object"===_typeof(r)?r:{},this.serviceType="Unknown",this.UUID=t.getUUID(),this.Hash="string"==typeof n?n:"".concat(this.UUID)}));t.exports=n},{}],43:[function(e,t,r){
111
111
  /**
112
112
  * Fable Application Services Support Library
113
113
  * @license MIT
114
114
  * @author <steven@velozo.com>
115
115
  */
116
- var n=e("fable-settings"),i=e("fable-uuid"),o=e("fable-log"),a=e("./Fable-ServiceManager.js"),s=e("./Fable-Service-DataArithmatic.js"),u=e("./Fable-Service-Template.js"),l=e("./Fable-Service-Utility.js"),c=e("./Fable-Operation.js"),f=function(){function e(t){_classCallCheck(this,e);var r=new n(t);this.settingsManager=r,this.libUUID=new i(this.settingsManager.settings),this.log=new o(this.settingsManager.settings),this.log.initialize(),this.Dependencies={precedent:n.precedent},this.Operations={},this.serviceManager=new a(this),this.serviceManager.addServiceType("DataArithmatic",s),this.fable.serviceManager.instantiateServiceProvider("DataArithmatic",{},"Default-Service-DataArithmatic"),this.DataArithmatic=this.serviceManager.defaultServices.DataArithmatic._DataArithmaticLibrary,this.serviceManager.addServiceType("Template",u),this.serviceManager.addServiceType("Utility",l),this.fable.serviceManager.instantiateServiceProvider("Utility",{},"Default-Service-Utility"),this.Utility=this.serviceManager.defaultServices.Utility,this.services=this.serviceManager.services,this.defaultServices=this.serviceManager.defaultServices}return _createClass(e,[{key:"settings",get:function(){return this.settingsManager.settings}},{key:"fable",get:function(){return this}},{key:"getUUID",value:function(){return this.libUUID.getUUID()}},{key:"createOperation",value:function(e,t){var r=new c(this,e,t);return this.Operations.hasOwnProperty(r.Hash)||(this.Operations[r.Hash]=r),r}},{key:"getOperation",value:function(e){return!!this.Operations.hasOwnProperty(e)&&this.Operations[e]}}]),e}();t.exports=f,t.exports.new=function(e){return new f(e)},t.exports.LogProviderBase=o.LogProviderBase,t.exports.ServiceProviderBase=a.ServiceProviderBase,t.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)}));
116
+ var n=e("fable-settings"),i=e("fable-uuid"),a=e("fable-log"),o=e("./Fable-ServiceManager.js"),s=e("./Fable-Service-DataArithmatic.js"),u=e("./Fable-Service-Template.js"),l=e("./Fable-Service-MetaTemplate.js"),c=e("./Fable-Service-Utility.js"),f=e("./Fable-Operation.js"),h=function(){function e(t){_classCallCheck(this,e);var r=new n(t);this.settingsManager=r,this.libUUID=new i(this.settingsManager.settings),this.log=new a(this.settingsManager.settings),this.log.initialize(),this.Dependencies={precedent:n.precedent},this.Operations={},this.serviceManager=new o(this),this.serviceManager.addServiceType("DataArithmatic",s),this.fable.serviceManager.instantiateServiceProvider("DataArithmatic",{},"Default-Service-DataArithmatic"),this.DataArithmatic=this.serviceManager.defaultServices.DataArithmatic._DataArithmaticLibrary,this.serviceManager.addServiceType("Template",u),this.serviceManager.addServiceType("MetaTemplate",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}return _createClass(e,[{key:"settings",get:function(){return this.settingsManager.settings}},{key:"fable",get:function(){return this}},{key:"getUUID",value:function(){return this.libUUID.getUUID()}},{key:"createOperation",value:function(e,t){var r=new f(this,e,t);return this.Operations.hasOwnProperty(r.Hash)||(this.Operations[r.Hash]=r),r}},{key:"getOperation",value:function(e){return!!this.Operations.hasOwnProperty(e)&&this.Operations[e]}}]),e}();t.exports=h,t.exports.new=function(e){return new h(e)},t.exports.LogProviderBase=a.LogProviderBase,t.exports.ServiceProviderBase=o.ServiceProviderBase,t.exports.precedent=n.precedent},{"./Fable-Operation.js":36,"./Fable-Service-DataArithmatic.js":37,"./Fable-Service-MetaTemplate.js":38,"./Fable-Service-Template.js":39,"./Fable-Service-Utility.js":40,"./Fable-ServiceManager.js":41,"fable-log":23,"fable-settings":26,"fable-uuid":28}]},{},[35])(35)}));
117
117
  //# sourceMappingURL=fable.compatible.min.js.map