fable 3.0.24 → 3.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fable.js
CHANGED
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
*/
|
|
561
561
|
formatterRoundNumber(pValue, pDigits) {
|
|
562
562
|
let tmpDigits = typeof pDigits == 'undefined' ? 2 : pDigits;
|
|
563
|
-
let tmpValue =
|
|
563
|
+
let tmpValue = parseFloat(pValue).toFixed(tmpDigits);
|
|
564
564
|
if (isNaN(tmpValue)) {
|
|
565
565
|
let tmpZed = 0;
|
|
566
566
|
return tmpZed.toFixed(tmpDigits);
|
|
@@ -818,7 +818,7 @@
|
|
|
818
818
|
*/
|
|
819
819
|
|
|
820
820
|
// Return the providers that are available without extensions loaded
|
|
821
|
-
getDefaultProviders = () => {
|
|
821
|
+
var getDefaultProviders = () => {
|
|
822
822
|
let tmpDefaultProviders = {};
|
|
823
823
|
tmpDefaultProviders.console = require('./Fable-Log-Logger-Console.js');
|
|
824
824
|
tmpDefaultProviders.default = tmpDefaultProviders.console;
|
|
@@ -2617,8 +2617,8 @@
|
|
|
2617
2617
|
* @param {string} pString - The string to parse
|
|
2618
2618
|
* @return {string} The result from the parser
|
|
2619
2619
|
*/
|
|
2620
|
-
parseString(pString) {
|
|
2621
|
-
return this._MetaTemplateLibrary.parseString(pString,
|
|
2620
|
+
parseString(pString, pData) {
|
|
2621
|
+
return this._MetaTemplateLibrary.parseString(pString, pData);
|
|
2622
2622
|
}
|
|
2623
2623
|
}
|
|
2624
2624
|
module.exports = FableServiceMetaTemplate;
|
package/dist/fable.min.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @license MIT
|
|
4
4
|
* @author <steven@velozo.com>
|
|
5
5
|
*/
|
|
6
|
-
class{constructor(){this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlpha=/[^a-z0-9]/gi,this._Value_MoneySign_Currency="$",this._Value_NaN_Currency="--",this._Value_GroupSeparator_Number=",",this._Value_Prefix_StringHash="HSH",this._Value_Clean_formatterCleanNonAlpha="_",this._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,this._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith}stringReverse(t){return t.split("").reverse().join("")}stringStartsWith(t,e,r){return this._UseEngineStringStartsWith?t.startsWith(e,r):this.stringStartsWith_Polyfill.call(t,e,r)}stringStartsWith_Polyfill(t,e){return this.slice(e||0,t.length)===t}stringEndsWith(t,e,r){return this._UseEngineStringEndsWith?t.endsWith(e,r):this.stringEndsWith_Polyfill.call(t,e,r)}stringEndsWith_Polyfill(t,e){return e<this.length?e|=0:e=this.length,this.substr(e-t.length,t.length)===t}insecureStringHash(t){let e=0,r=t.length,n=0;for(;n<r;)e=(e<<5)-e+t.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(e)}cleanEnclosureWrapCharacters(t,e){return e.startsWith(t)&&e.endsWith(t)?e.substring(1,e.length-1):e}cleanNonAlphaCharacters(t){if("string"==typeof t&&""!=t)return t.replace(this._Regex_formatterCleanNonAlpha,this._Value_Clean_formatterCleanNonAlpha)}formatterInsertCommas(t){let e=this.stringReverse(t).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(e)}processAddCommasToNumberRegex(t,e,r,n,i,s){return e+(i?this.formatterInsertCommas(n)+i+s:this.formatterInsertCommas(n+s))}formatterAddCommasToNumber(t){return t.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(t){let e=parseFloat(t).toFixed(2);return isNaN(e)&&("string"==typeof t&&(e=parseFloat(t.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(e))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(e))}formatterRoundNumber(t,e){let r=void 0===e?2:e,n=
|
|
6
|
+
class{constructor(){this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_formatterAddCommasToNumber=/^([-+]?)(0?)(\d+)(.?)(\d+)$/g,this._Regex_formatterDollarsRemoveCommas=/,/gi,this._Regex_formatterCleanNonAlpha=/[^a-z0-9]/gi,this._Value_MoneySign_Currency="$",this._Value_NaN_Currency="--",this._Value_GroupSeparator_Number=",",this._Value_Prefix_StringHash="HSH",this._Value_Clean_formatterCleanNonAlpha="_",this._UseEngineStringStartsWith="function"==typeof String.prototype.startsWith,this._UseEngineStringEndsWith="function"==typeof String.prototype.endsWith}stringReverse(t){return t.split("").reverse().join("")}stringStartsWith(t,e,r){return this._UseEngineStringStartsWith?t.startsWith(e,r):this.stringStartsWith_Polyfill.call(t,e,r)}stringStartsWith_Polyfill(t,e){return this.slice(e||0,t.length)===t}stringEndsWith(t,e,r){return this._UseEngineStringEndsWith?t.endsWith(e,r):this.stringEndsWith_Polyfill.call(t,e,r)}stringEndsWith_Polyfill(t,e){return e<this.length?e|=0:e=this.length,this.substr(e-t.length,t.length)===t}insecureStringHash(t){let e=0,r=t.length,n=0;for(;n<r;)e=(e<<5)-e+t.charCodeAt(n++)|0;return"".concat(this._Value_Prefix_StringHash).concat(e)}cleanEnclosureWrapCharacters(t,e){return e.startsWith(t)&&e.endsWith(t)?e.substring(1,e.length-1):e}cleanNonAlphaCharacters(t){if("string"==typeof t&&""!=t)return t.replace(this._Regex_formatterCleanNonAlpha,this._Value_Clean_formatterCleanNonAlpha)}formatterInsertCommas(t){let e=this.stringReverse(t).match(this._Regex_formatterInsertCommas).join(",");return this.stringReverse(e)}processAddCommasToNumberRegex(t,e,r,n,i,s){return e+(i?this.formatterInsertCommas(n)+i+s:this.formatterInsertCommas(n+s))}formatterAddCommasToNumber(t){return t.toString().replace(this._Regex_formatterAddCommasToNumber,this.processAddCommasToNumberRegex.bind(this))}formatterDollars(t){let e=parseFloat(t).toFixed(2);return isNaN(e)&&("string"==typeof t&&(e=parseFloat(t.replace(this._Value_MoneySign_Currency,"").replace(this._Regex_formatterDollarsRemoveCommas,"")).toFixed(2)),isNaN(e))?this._Value_NaN_Currency:"$".concat(this.formatterAddCommasToNumber(e))}formatterRoundNumber(t,e){let r=void 0===e?2:e,n=parseFloat(t).toFixed(r);if(isNaN(n)){return(0).toFixed(r)}return n}stringBeforeMatch(t,e){return t.split(e)[0]}stringAfterMatch(t,e){let r=t.indexOf(e);return r<0||r+e.length>=t.length?"":t.substring(r+e.length)}stringCountEnclosures(t,e,r){let n="string"==typeof t?t:"",i="string"==typeof e?e:"(",s="string"==typeof r?r:")",o=0,a=0;for(let t=0;t<n.length;t++)n[t]==i?(0==a&&o++,a++):n[t]==s&&a--;return o}stringGetEnclosureValueByIndex(t,e,r,n){let i="string"==typeof t?t:"",s="number"==typeof e?e:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,c=0,u=!1,h=0,f=0;for(let t=0;t<i.length;t++)i[t]==o?(c++,1==c&&(l++,s==l-1&&(u=!0,h=t))):i[t]==a&&(c--,0==c&&u&&f<=h&&(f=t,u=!1));return l<=s?"":f>0&&f>h?i.substring(h+1,f):i.substring(h+1)}stringRemoveEnclosureByIndex(t,e,r,n){let i="string"==typeof t?t:"",s="number"==typeof e?e:0,o="string"==typeof r?r:"(",a="string"==typeof n?n:")",l=0,c=0,u=!1,h=0,f=0;for(let t=0;t<i.length;t++)i[t]==o?(c++,1==c&&(l++,s==l-1&&(u=!0,h=t))):i[t]==a&&(c--,0==c&&u&&f<=h&&(f=t,u=!1));if(l<=s)return i;let g="";return h>1&&(g=i.substring(0,h)),i.length>f+1&&f>h&&(g+=i.substring(f+1)),g}}},{}],18:[function(t,e,r){e.exports=
|
|
7
7
|
/**
|
|
8
8
|
* Base Logger Class
|
|
9
9
|
*
|
|
@@ -11,15 +11,7 @@ class{constructor(){this._Regex_formatterInsertCommas=/.{1,3}/g,this._Regex_form
|
|
|
11
11
|
*
|
|
12
12
|
* @author Steven Velozo <steven@velozo.com>
|
|
13
13
|
*/
|
|
14
|
-
class{constructor(t,e){this._Settings="object"==typeof t?t:{},this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}generateInsecureUUID(){let t=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,(e=>{let r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?r:3&r|8).toString(16)}))}initialize(){}trace(t,e){this.write("trace",t,e)}debug(t,e){this.write("debug",t,e)}info(t,e){this.write("info",t,e)}warn(t,e){this.write("warn",t,e)}error(t,e){this.write("error",t,e)}fatal(t,e){this.write("fatal",t,e)}write(t,e,r){return!0}}},{}],19:[function(t,e,r){
|
|
15
|
-
/**
|
|
16
|
-
* Default Logger Provider Function
|
|
17
|
-
*
|
|
18
|
-
* @license MIT
|
|
19
|
-
*
|
|
20
|
-
* @author Steven Velozo <steven@velozo.com>
|
|
21
|
-
*/
|
|
22
|
-
getDefaultProviders=()=>{let e={};return e.console=t("./Fable-Log-Logger-Console.js"),e.default=e.console,e},e.exports=getDefaultProviders()},{"./Fable-Log-Logger-Console.js":21}],20:[function(t,e,r){e.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],21:[function(t,e,r){let n=t("./Fable-Log-BaseLogger.js");e.exports=class extends n{constructor(t,e){super(t),this._ShowTimeStamps=!this._Settings.hasOwnProperty("showtimestamps")||1==this._Settings.showtimestamps,this._FormattedTimeStamps=!this._Settings.hasOwnProperty("formattedtimestamps")||1==this._Settings.formattedtimestamps,this._ContextMessage=this._Settings.hasOwnProperty("Context")?"(".concat(this._Settings.Context,")"):e._Settings.hasOwnProperty("Product")?"(".concat(e._Settings.Product,")"):"Unnamed_Log_Context",this._OutputLogLinesToConsole=!this._Settings.hasOwnProperty("outputloglinestoconsole")||this._Settings.outputloglinestoconsole,this._OutputObjectsToConsole=!this._Settings.hasOwnProperty("outputobjectstoconsole")||this._Settings.outputobjectstoconsole,this.prefixCache={};for(let t=0;t<=this.levels.length;t++)this.prefixCache[this.levels[t]]="[".concat(this.levels[t],"] ").concat(this._ContextMessage,": "),this._ShowTimeStamps&&(this.prefixCache[this.levels[t]]=" "+this.prefixCache[this.levels[t]])}write(t,e,r){let n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);let i="".concat(n).concat(this.prefixCache[t]).concat(e);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}},{"./Fable-Log-BaseLogger.js":18}],22:[function(t,e,r){const n=t("./Fable-Log-Logger-Console.js"),i=t("fs"),s=t("path");e.exports=class extends n{constructor(t,e){super(t,e),this.logFileRawPath=this._Settings.hasOwnProperty("path")?this._Settings.path:"./".concat(this._ContextMessage,".log"),this.logFilePath=s.normalize(this.logFileRawPath),this.logFileStreamOptions=this._Settings.hasOwnProperty("fileStreamoptions")?this._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},this.fileWriter=i.createWriteStream(this.logFilePath,this.logFileStreamOptions),this.activelyWriting=!1,this.logLineStrings=[],this.logObjectStrings=[],this.defaultWriteCompleteCallback=()=>{},this.defaultBufferFlushCallback=()=>{}}closeWriter(t){let e="function"==typeof t?t:()=>{};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",e.bind(this))}completeBufferFlushToLogFile(t){this.activelyWriting=!1;let e="function"==typeof t?t:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return e();this.flushBufferToLogFile(e)}flushBufferToLogFile(t){if(!this.activelyWriting){this.activelyWriting=!0;let e="function"==typeof t?t:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];let i="";for(let t=0;t<r.length;t++)i+="".concat(r[t],"\n"),!1!==n[t]&&(i+="".concat(n[t],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(e);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,e))}}write(t,e,r){let n=super.write(t,e,r);this.logLineStrings.push(n),void 0!==r?this.logObjectStrings.push(JSON.stringify(r,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}},{"./Fable-Log-Logger-Console.js":21,fs:16,path:29}],23:[function(t,e,r){
|
|
14
|
+
class{constructor(t,e){this._Settings="object"==typeof t?t:{},this.loggerUUID=this.generateInsecureUUID(),this.levels=["trace","debug","info","warn","error","fatal"]}generateInsecureUUID(){let t=(new Date).getTime();return"LOGSTREAM-xxxxxx-yxxxxx".replace(/[xy]/g,(e=>{let r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?r:3&r|8).toString(16)}))}initialize(){}trace(t,e){this.write("trace",t,e)}debug(t,e){this.write("debug",t,e)}info(t,e){this.write("info",t,e)}warn(t,e){this.write("warn",t,e)}error(t,e){this.write("error",t,e)}fatal(t,e){this.write("fatal",t,e)}write(t,e,r){return!0}}},{}],19:[function(t,e,r){e.exports=(()=>{let e={};return e.console=t("./Fable-Log-Logger-Console.js"),e.default=e.console,e})()},{"./Fable-Log-Logger-Console.js":21}],20:[function(t,e,r){e.exports=[{loggertype:"console",streamtype:"console",level:"trace"}]},{}],21:[function(t,e,r){let n=t("./Fable-Log-BaseLogger.js");e.exports=class extends n{constructor(t,e){super(t),this._ShowTimeStamps=!this._Settings.hasOwnProperty("showtimestamps")||1==this._Settings.showtimestamps,this._FormattedTimeStamps=!this._Settings.hasOwnProperty("formattedtimestamps")||1==this._Settings.formattedtimestamps,this._ContextMessage=this._Settings.hasOwnProperty("Context")?"(".concat(this._Settings.Context,")"):e._Settings.hasOwnProperty("Product")?"(".concat(e._Settings.Product,")"):"Unnamed_Log_Context",this._OutputLogLinesToConsole=!this._Settings.hasOwnProperty("outputloglinestoconsole")||this._Settings.outputloglinestoconsole,this._OutputObjectsToConsole=!this._Settings.hasOwnProperty("outputobjectstoconsole")||this._Settings.outputobjectstoconsole,this.prefixCache={};for(let t=0;t<=this.levels.length;t++)this.prefixCache[this.levels[t]]="[".concat(this.levels[t],"] ").concat(this._ContextMessage,": "),this._ShowTimeStamps&&(this.prefixCache[this.levels[t]]=" "+this.prefixCache[this.levels[t]])}write(t,e,r){let n="";this._ShowTimeStamps&&this._FormattedTimeStamps?n=(new Date).toISOString():this._ShowTimeStamps&&(n=+new Date);let i="".concat(n).concat(this.prefixCache[t]).concat(e);return this._OutputLogLinesToConsole&&console.log(i),this._OutputObjectsToConsole&&void 0!==r&&console.log(JSON.stringify(r,null,2)),i}}},{"./Fable-Log-BaseLogger.js":18}],22:[function(t,e,r){const n=t("./Fable-Log-Logger-Console.js"),i=t("fs"),s=t("path");e.exports=class extends n{constructor(t,e){super(t,e),this.logFileRawPath=this._Settings.hasOwnProperty("path")?this._Settings.path:"./".concat(this._ContextMessage,".log"),this.logFilePath=s.normalize(this.logFileRawPath),this.logFileStreamOptions=this._Settings.hasOwnProperty("fileStreamoptions")?this._Settings.fileStreamOptions:{flags:"a",encoding:"utf8"},this.fileWriter=i.createWriteStream(this.logFilePath,this.logFileStreamOptions),this.activelyWriting=!1,this.logLineStrings=[],this.logObjectStrings=[],this.defaultWriteCompleteCallback=()=>{},this.defaultBufferFlushCallback=()=>{}}closeWriter(t){let e="function"==typeof t?t:()=>{};if(this.fileWriter)return this.fileWriter.end("\n"),this.fileWriter.once("finish",e.bind(this))}completeBufferFlushToLogFile(t){this.activelyWriting=!1;let e="function"==typeof t?t:this.defaultBufferFlushCallback;if(!(this.logLineStrings.length>0))return e();this.flushBufferToLogFile(e)}flushBufferToLogFile(t){if(!this.activelyWriting){this.activelyWriting=!0;let e="function"==typeof t?t:this.defaultBufferFlushCallback,r=this.logLineStrings,n=this.logObjectStrings;this.logLineStrings=[],this.logObjectStrings=[];let i="";for(let t=0;t<r.length;t++)i+="".concat(r[t],"\n"),!1!==n[t]&&(i+="".concat(n[t],"\n"));if(this.fileWriter.write(i,"utf8"))return this.completeBufferFlushToLogFile(e);this.fileWriter.once("drain",this.completeBufferFlushToLogFile.bind(this,e))}}write(t,e,r){let n=super.write(t,e,r);this.logLineStrings.push(n),void 0!==r?this.logObjectStrings.push(JSON.stringify(r,null,4)):this.logObjectStrings.push(!1),this.flushBufferToLogFile()}}},{"./Fable-Log-Logger-Console.js":21,fs:16,path:29}],23:[function(t,e,r){
|
|
23
15
|
/**
|
|
24
16
|
* Fable Logging Add-on
|
|
25
17
|
*
|
|
@@ -95,7 +87,7 @@ class{constructor(){}newParserState(t){return{ParseTree:t,Output:"",OutputBuffer
|
|
|
95
87
|
*
|
|
96
88
|
* @description Create a tree (directed graph) of Javascript objects, one character per object.
|
|
97
89
|
*/
|
|
98
|
-
class{constructor(){this.ParseTree={}}addChild(t,e,r){return t.hasOwnProperty(e[r])||(t[e[r]]={}),t[e[r]]}addPattern(t,e,r){if(t.length<1)return!1;if("string"==typeof e&&e.length<1)return!1;let n=this.ParseTree;for(var i=0;i<t.length;i++)n=this.addChild(n,t,i);return n.PatternStart=t,n.PatternEnd="string"==typeof e&&e.length>0?e:t,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:t=>t,!0}}},{}],33:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,u=[],h=!1,f=-1;function g(){h&&c&&(h=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!h){var t=l(g);h=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new d(t,e)),1!==u.length||h||l(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],34:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":33,timers:34}],35:[function(t,e,r){var n=t("./Fable.js");"object"!=typeof window||window.hasOwnProperty("Fable")||(window.Fable=n),e.exports=n},{"./Fable.js":43}],36:[function(t,e,r){const n=JSON.stringify({Metadata:{GUID:!1,Hash:!1,Title:"",Summary:"",Version:0},Status:{Completed:!1,CompletionProgress:0,CompletionTimeElapsed:0,Steps:1,StepsCompleted:0,StartTime:0,EndTime:0},Errors:[],Log:[]});e.exports=class{constructor(t,e,r){this.fable=t,this.name=e,this.state=JSON.parse(n),this.state.Metadata.GUID=this.fable.getUUID(),this.state.Metadata.Hash=this.state.GUID,"string"==typeof r&&(this.state.Metadata.Hash=r)}get GUID(){return this.state.Metadata.GUID}get Hash(){return this.state.Metadata.Hash}get log(){return this}writeOperationLog(t,e,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(t,"]: ").concat(e)),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(t,e){this.state.Errors.push("".concat(t)),"object"==typeof e&&this.state.Errors.push(JSON.stringify(e))}trace(t,e){this.writeOperationLog("TRACE",t,e),this.fable.log.trace(t,e)}debug(t,e){this.writeOperationLog("DEBUG",t,e),this.fable.log.debug(t,e)}info(t,e){this.writeOperationLog("INFO",t,e),this.fable.log.info(t,e)}warn(t,e){this.writeOperationLog("WARN",t,e),this.fable.log.warn(t,e)}error(t,e){this.writeOperationLog("ERROR",t,e),this.writeOperationErrors(t,e),this.fable.log.error(t,e)}fatal(t,e){this.writeOperationLog("FATAL",t,e),this.writeOperationErrors(t,e),this.fable.log.fatal(t,e)}}},{}],37:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("data-arithmatic");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="DataArithmatic",this._DataArithmaticLibrary=new i}}},{"./Fable-ServiceProviderBase.js":42,"data-arithmatic":17}],38:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("precedent");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="MetaTemplate",this._MetaTemplateLibrary=new i(this.options)}addPattern(t,e,r){return this._MetaTemplateLibrary.addPattern(t,e,r)}parseString(t){return this._MetaTemplateLibrary.parseString(t,
|
|
90
|
+
class{constructor(){this.ParseTree={}}addChild(t,e,r){return t.hasOwnProperty(e[r])||(t[e[r]]={}),t[e[r]]}addPattern(t,e,r){if(t.length<1)return!1;if("string"==typeof e&&e.length<1)return!1;let n=this.ParseTree;for(var i=0;i<t.length;i++)n=this.addChild(n,t,i);return n.PatternStart=t,n.PatternEnd="string"==typeof e&&e.length>0?e:t,n.Parse="function"==typeof r?r:"string"==typeof r?()=>r:t=>t,!0}}},{}],33:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,u=[],h=!1,f=-1;function g(){h&&c&&(h=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!h){var t=l(g);h=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new d(t,e)),1!==u.length||h||l(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],34:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":33,timers:34}],35:[function(t,e,r){var n=t("./Fable.js");"object"!=typeof window||window.hasOwnProperty("Fable")||(window.Fable=n),e.exports=n},{"./Fable.js":43}],36:[function(t,e,r){const n=JSON.stringify({Metadata:{GUID:!1,Hash:!1,Title:"",Summary:"",Version:0},Status:{Completed:!1,CompletionProgress:0,CompletionTimeElapsed:0,Steps:1,StepsCompleted:0,StartTime:0,EndTime:0},Errors:[],Log:[]});e.exports=class{constructor(t,e,r){this.fable=t,this.name=e,this.state=JSON.parse(n),this.state.Metadata.GUID=this.fable.getUUID(),this.state.Metadata.Hash=this.state.GUID,"string"==typeof r&&(this.state.Metadata.Hash=r)}get GUID(){return this.state.Metadata.GUID}get Hash(){return this.state.Metadata.Hash}get log(){return this}writeOperationLog(t,e,r){this.state.Log.push("".concat((new Date).toUTCString()," [").concat(t,"]: ").concat(e)),"object"==typeof r&&this.state.Log.push(JSON.stringify(r))}writeOperationErrors(t,e){this.state.Errors.push("".concat(t)),"object"==typeof e&&this.state.Errors.push(JSON.stringify(e))}trace(t,e){this.writeOperationLog("TRACE",t,e),this.fable.log.trace(t,e)}debug(t,e){this.writeOperationLog("DEBUG",t,e),this.fable.log.debug(t,e)}info(t,e){this.writeOperationLog("INFO",t,e),this.fable.log.info(t,e)}warn(t,e){this.writeOperationLog("WARN",t,e),this.fable.log.warn(t,e)}error(t,e){this.writeOperationLog("ERROR",t,e),this.writeOperationErrors(t,e),this.fable.log.error(t,e)}fatal(t,e){this.writeOperationLog("FATAL",t,e),this.writeOperationErrors(t,e),this.fable.log.fatal(t,e)}}},{}],37:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("data-arithmatic");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="DataArithmatic",this._DataArithmaticLibrary=new i}}},{"./Fable-ServiceProviderBase.js":42,"data-arithmatic":17}],38:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("precedent");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="MetaTemplate",this._MetaTemplateLibrary=new i(this.options)}addPattern(t,e,r){return this._MetaTemplateLibrary.addPattern(t,e,r)}parseString(t,e){return this._MetaTemplateLibrary.parseString(t,e)}}},{"./Fable-ServiceProviderBase.js":42,precedent:30}],39:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.serviceType="Template",this.Matchers={Evaluate:/<%([\s\S]+?)%>/g,Interpolate:/<%=([\s\S]+?)%>/g,Escaper:/\\|'|\r|\n|\t|\u2028|\u2029/g,Unescaper:/\\(\\|'|r|n|t|u2028|u2029)/g,GuaranteedNonMatch:/.^/},this.templateEscapes={"\\":"\\","'":"'",r:"\r","\r":"r",n:"\n","\n":"n",t:"\t","\t":"t",u2028:"\u2028","\u2028":"u2028",u2029:"\u2029","\u2029":"u2029"},this.renderFunction=!1,this.templateString=!1}renderTemplate(t){return this.renderFunction(t)}templateFunction(t){return this.renderTemplate.bind(this)}buildTemplateFunction(t,e){return this.TemplateSource="__p+='"+t.replace(this.Matchers.Escaper,(t=>"\\".concat(this.templateEscapes[t]))).replace(this.Matchers.Interpolate||this.Matchers.GuaranteedNonMatch,((t,e)=>"'+\n(".concat(decodeURIComponent(e),")+\n'"))).replace(this.Matchers.Evaluate||this.Matchers.GuaranteedNonMatch,((t,e)=>"';\n".concat(decodeURIComponent(e),"\n;__p+='")))+"';\n",this.TemplateSource="with(pTemplateDataObject||{}){\n".concat(this.TemplateSource,"}\n"),this.TemplateSource="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n".concat(this.TemplateSource,"return __p;\n"),this.renderFunction=new Function("pTemplateDataObject",this.TemplateSource),void 0!==e?this.renderFunction(e):(this.TemplateSourceCompiled="function(obj){\n"+this.TemplateSource+"}",this.templateFunction())}}},{"./Fable-ServiceProviderBase.js":42}],40:[function(t,e,r){const n=t("./Fable-ServiceProviderBase.js"),i=t("async.waterfall"),s=t("async.eachlimit");e.exports=class extends n{constructor(t,e,r){super(t,e,r),this.templates={},this.waterfall=i,this.eachLimit=s}extend(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Object.assign(t,...r)}template(t,e){return this.fable.serviceManager.instantiateServiceProviderWithoutRegistration("Template").buildTemplateFunction(t,e)}buildHashedTemplate(t,e,r){let n=this.fable.serviceManager.instantiateServiceProvider("Template",{},t);return this.templates[t]=n.buildTemplateFunction(e,r),this.templates[t]}chunk(t,e,r){let n=[...t],i="number"==typeof e?e:0,s=void 0!==r?r:[];if(i<=0)return s;for(;n.length;)s.push(n.splice(0,i));return s}}},{"./Fable-ServiceProviderBase.js":42,"async.eachlimit":1,"async.waterfall":15}],41:[function(t,e,r){
|
|
99
91
|
/**
|
|
100
92
|
* Fable Application Services Management
|
|
101
93
|
* @license MIT
|