pict 1.0.257 → 1.0.258

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.
Files changed (116) hide show
  1. package/dist/pict.compatible.js +492 -105
  2. package/dist/pict.compatible.js.map +1 -1
  3. package/dist/pict.compatible.min.js +2 -2
  4. package/dist/pict.compatible.min.js.map +1 -1
  5. package/dist/pict.js +483 -96
  6. package/dist/pict.js.map +1 -1
  7. package/dist/pict.min.js +2 -2
  8. package/dist/pict.min.js.map +1 -1
  9. package/package.json +6 -4
  10. package/source/Pict-Meadow-EntityProvider.js +101 -0
  11. package/source/Pict.js +3 -0
  12. package/source/templates/Pict-Template-Data.js +9 -0
  13. package/source/templates/Pict-Template-DataValueByKey.js +9 -0
  14. package/source/templates/Pict-Template-Entity.js +16 -6
  15. package/source/templates/Pict-Template-Template.js +23 -4
  16. package/source/templates/Pict-Template-TemplateByReference.js +25 -6
  17. package/source/templates/Pict-Template-TemplateFromMap.js +22 -2
  18. package/source/templates/Pict-Template-TemplateSet.js +22 -3
  19. package/source/templates/Pict-Template-TemplateSetFromMap.js +21 -2
  20. package/source/templates/Pict-Template-TemplateSetWithPayload.js +20 -1
  21. package/source/templates/Pict-Template-TemplateValueSet.js +22 -3
  22. package/source/templates/Pict-Template-View.js +8 -1
  23. package/source/templates/data/Pict-Template-DataEncodeJavascriptString.js +50 -0
  24. package/source/templates/data/Pict-Template-DataJson.js +11 -2
  25. package/source/templates/data/Pict-Template-DateOnlyFormat.js +9 -0
  26. package/source/templates/data/Pict-Template-DateTimeFormat.js +9 -0
  27. package/source/templates/data/Pict-Template-Digits.js +9 -0
  28. package/source/templates/data/Pict-Template-Dollars.js +9 -0
  29. package/source/templates/data/Pict-Template-HtmlCommentEnd.js +11 -2
  30. package/source/templates/data/Pict-Template-HtmlCommentStart.js +11 -2
  31. package/source/templates/data/Pict-Template-Join.js +9 -0
  32. package/source/templates/data/Pict-Template-JoinUnique.js +9 -0
  33. package/source/templates/data/Pict-Template-PascalCaseIdentifier.js +9 -0
  34. package/source/templates/data/Pict-Template-PluckJoinUnique.js +9 -0
  35. package/source/templates/data-generation/Pict-Template-RandomNumber.js +9 -0
  36. package/source/templates/data-generation/Pict-Template-RandomNumberString.js +9 -0
  37. package/source/templates/debugging/Pict-Template-Breakpoint.js +9 -0
  38. package/source/templates/debugging/Pict-Template-DataValueTree.js +10 -0
  39. package/source/templates/debugging/Pict-Template-LogStatement.js +9 -0
  40. package/source/templates/debugging/Pict-Template-LogValue.js +9 -0
  41. package/source/templates/debugging/Pict-Template-LogValueTree.js +9 -0
  42. package/source/templates/logic/Pict-Template-NotEmpty.js +11 -4
  43. package/source/templates/logic/Pict-Template-TemplateIf.js +54 -41
  44. package/source/templates/logic/Pict-Template-TemplateIfAbsolute.js +54 -41
  45. package/test/Pict_entityprovider_tests.js +89 -0
  46. package/test/Pict_template_tests.js +10 -0
  47. package/types/source/Pict-Meadow-EntityProvider.d.ts +1 -0
  48. package/types/source/Pict-Meadow-EntityProvider.d.ts.map +1 -1
  49. package/types/source/Pict.d.ts +2 -56
  50. package/types/source/Pict.d.ts.map +1 -1
  51. package/types/source/templates/Pict-Template-Data.d.ts +0 -1
  52. package/types/source/templates/Pict-Template-Data.d.ts.map +1 -1
  53. package/types/source/templates/Pict-Template-DataValueByKey.d.ts +0 -1
  54. package/types/source/templates/Pict-Template-DataValueByKey.d.ts.map +1 -1
  55. package/types/source/templates/Pict-Template-Entity.d.ts +0 -1
  56. package/types/source/templates/Pict-Template-Entity.d.ts.map +1 -1
  57. package/types/source/templates/Pict-Template-Template.d.ts +0 -2
  58. package/types/source/templates/Pict-Template-Template.d.ts.map +1 -1
  59. package/types/source/templates/Pict-Template-TemplateByReference.d.ts +0 -2
  60. package/types/source/templates/Pict-Template-TemplateByReference.d.ts.map +1 -1
  61. package/types/source/templates/Pict-Template-TemplateFromMap.d.ts +0 -2
  62. package/types/source/templates/Pict-Template-TemplateFromMap.d.ts.map +1 -1
  63. package/types/source/templates/Pict-Template-TemplateSet.d.ts +0 -2
  64. package/types/source/templates/Pict-Template-TemplateSet.d.ts.map +1 -1
  65. package/types/source/templates/Pict-Template-TemplateSetFromMap.d.ts +0 -2
  66. package/types/source/templates/Pict-Template-TemplateSetFromMap.d.ts.map +1 -1
  67. package/types/source/templates/Pict-Template-TemplateSetWithPayload.d.ts +0 -2
  68. package/types/source/templates/Pict-Template-TemplateSetWithPayload.d.ts.map +1 -1
  69. package/types/source/templates/Pict-Template-TemplateValueSet.d.ts +0 -2
  70. package/types/source/templates/Pict-Template-TemplateValueSet.d.ts.map +1 -1
  71. package/types/source/templates/Pict-Template-View.d.ts +0 -1
  72. package/types/source/templates/Pict-Template-View.d.ts.map +1 -1
  73. package/types/source/templates/data/Pict-Template-DataEncodeJavascriptString.d.ts +13 -0
  74. package/types/source/templates/data/Pict-Template-DataEncodeJavascriptString.d.ts.map +1 -0
  75. package/types/source/templates/data/Pict-Template-DataJson.d.ts +2 -3
  76. package/types/source/templates/data/Pict-Template-DataJson.d.ts.map +1 -1
  77. package/types/source/templates/data/Pict-Template-DateOnlyFormat.d.ts +0 -1
  78. package/types/source/templates/data/Pict-Template-DateOnlyFormat.d.ts.map +1 -1
  79. package/types/source/templates/data/Pict-Template-DateTimeFormat.d.ts +0 -1
  80. package/types/source/templates/data/Pict-Template-DateTimeFormat.d.ts.map +1 -1
  81. package/types/source/templates/data/Pict-Template-Digits.d.ts +0 -1
  82. package/types/source/templates/data/Pict-Template-Digits.d.ts.map +1 -1
  83. package/types/source/templates/data/Pict-Template-Dollars.d.ts +0 -1
  84. package/types/source/templates/data/Pict-Template-Dollars.d.ts.map +1 -1
  85. package/types/source/templates/data/Pict-Template-HtmlCommentEnd.d.ts +2 -3
  86. package/types/source/templates/data/Pict-Template-HtmlCommentEnd.d.ts.map +1 -1
  87. package/types/source/templates/data/Pict-Template-HtmlCommentStart.d.ts +2 -3
  88. package/types/source/templates/data/Pict-Template-HtmlCommentStart.d.ts.map +1 -1
  89. package/types/source/templates/data/Pict-Template-Join.d.ts +0 -1
  90. package/types/source/templates/data/Pict-Template-Join.d.ts.map +1 -1
  91. package/types/source/templates/data/Pict-Template-JoinUnique.d.ts +0 -1
  92. package/types/source/templates/data/Pict-Template-JoinUnique.d.ts.map +1 -1
  93. package/types/source/templates/data/Pict-Template-PascalCaseIdentifier.d.ts +0 -1
  94. package/types/source/templates/data/Pict-Template-PascalCaseIdentifier.d.ts.map +1 -1
  95. package/types/source/templates/data/Pict-Template-PluckJoinUnique.d.ts +0 -1
  96. package/types/source/templates/data/Pict-Template-PluckJoinUnique.d.ts.map +1 -1
  97. package/types/source/templates/data-generation/Pict-Template-RandomNumber.d.ts +0 -1
  98. package/types/source/templates/data-generation/Pict-Template-RandomNumber.d.ts.map +1 -1
  99. package/types/source/templates/data-generation/Pict-Template-RandomNumberString.d.ts +0 -1
  100. package/types/source/templates/data-generation/Pict-Template-RandomNumberString.d.ts.map +1 -1
  101. package/types/source/templates/debugging/Pict-Template-Breakpoint.d.ts +0 -1
  102. package/types/source/templates/debugging/Pict-Template-Breakpoint.d.ts.map +1 -1
  103. package/types/source/templates/debugging/Pict-Template-DataValueTree.d.ts +0 -1
  104. package/types/source/templates/debugging/Pict-Template-DataValueTree.d.ts.map +1 -1
  105. package/types/source/templates/debugging/Pict-Template-LogStatement.d.ts +0 -1
  106. package/types/source/templates/debugging/Pict-Template-LogStatement.d.ts.map +1 -1
  107. package/types/source/templates/debugging/Pict-Template-LogValue.d.ts +0 -1
  108. package/types/source/templates/debugging/Pict-Template-LogValue.d.ts.map +1 -1
  109. package/types/source/templates/debugging/Pict-Template-LogValueTree.d.ts +0 -1
  110. package/types/source/templates/debugging/Pict-Template-LogValueTree.d.ts.map +1 -1
  111. package/types/source/templates/logic/Pict-Template-NotEmpty.d.ts +0 -1
  112. package/types/source/templates/logic/Pict-Template-NotEmpty.d.ts.map +1 -1
  113. package/types/source/templates/logic/Pict-Template-TemplateIf.d.ts +0 -2
  114. package/types/source/templates/logic/Pict-Template-TemplateIf.d.ts.map +1 -1
  115. package/types/source/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts +0 -2
  116. package/types/source/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts.map +1 -1
@@ -752,7 +752,7 @@ return[this._HexLookup[pBuffer[i++]],this._HexLookup[pBuffer[i++]],this._HexLook
752
752
  tmpRandomBytes[6]=tmpRandomBytes[6]&0x0f|0x40;tmpRandomBytes[8]=tmpRandomBytes[8]&0x3f|0x80;return this.bytesToUUID(tmpRandomBytes);}// Simple random UUID generation
753
753
  },{key:"generateRandom",value:function generateRandom(){var tmpUUID='';for(var i=0;i<this._UUIDLength;i++){tmpUUID+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));}return tmpUUID;}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
754
754
  },{key:"getUUID",value:function getUUID(){if(this._UUIDModeRandom){return this.generateRandom();}else{return this.generateUUIDv4();}}}]);}(libFableServiceProviderBase);// This is for backwards compatibility
755
- function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports.new=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.10","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","test":"./node_modules/.bin/mocha -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"quackage":"^1.0.41"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.38","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
755
+ function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports.new=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.11","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","test":"./node_modules/.bin/mocha -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"quackage":"^1.0.41"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.38","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
756
756
  * Fable Application Services Support Library
757
757
  * @author <steven@velozo.com>
758
758
  */// Pre-init services
@@ -1101,6 +1101,33 @@ tmpEnclosureStack.push(tmpEnclosureStartSymbolMap[tmpString[i]]);}// IF This is
1101
1101
  else if(tmpString[i]in tmpEnclosureEndSymbolMap// AND it matches the current nest level symbol
1102
1102
  &&tmpEnclosureEndSymbolMap[tmpString[i]]==tmpEnclosureStack[tmpEnclosureStack.length-1]){// Pop it off the stack!
1103
1103
  tmpEnclosureStack.pop();}}return tmpString;}/**
1104
+ * Encodes a string using encodeURIComponent, returning the encoded string.
1105
+ * If the input is not a string, returns the input unchanged.
1106
+ *
1107
+ * @param {string} pString - The string to encode.
1108
+ * @returns {string|*} The encoded string, or the original input if it is not a string.
1109
+ */},{key:"stringEncodeURIComponent",value:function stringEncodeURIComponent(pString){if(typeof pString!=='string'){return pString;}return encodeURIComponent(pString);}/**
1110
+ * Safely decodes a URI component string using decodeURIComponent.
1111
+ * If the input is not a string or decoding fails, returns the original input.
1112
+ *
1113
+ * @param {string} pString - The string to decode.
1114
+ * @returns {string} The decoded string, or the original input if decoding fails.
1115
+ */},{key:"stringDecodeURIComponent",value:function stringDecodeURIComponent(pString){if(typeof pString!=='string'){return pString;}try{return decodeURIComponent(pString);}catch(e){this.fable.Log.error("Failed to decode URI component: ".concat(pString),e);return pString;// Return the original string if decoding fails
1116
+ }}/**
1117
+ * Encodes a string so that it can be safely embedded in JavaScript code.
1118
+ * Escapes special characters such as quotes, backslashes, and newlines.
1119
+ *
1120
+ * @param {string} pString - The input string to encode.
1121
+ * @returns {string} The encoded string with special characters escaped.
1122
+ */},{key:"stringEncodeForJavascript",value:function stringEncodeForJavascript(pString){if(typeof pString!=='string'){return pString;}return pString.replace(this._Regex_matcherJavascriptEncode,function(pMatch){switch(pMatch){case'"':return'\\"';case'\'':return'\\\'';case'\\':return'\\\\';case'\n':return'\\n';case'\r':return'\\r';default:return pMatch;// Return the original character if no encoding is needed
1123
+ }});}/**
1124
+ * Decodes a JavaScript-escaped string by replacing common escape sequences
1125
+ * (such as \" \\n \\r \\' and \\\\) with their actual character representations.
1126
+ *
1127
+ * @param {string} pString - The string to decode. If not a string, the input is returned as-is.
1128
+ * @returns {string} The decoded string with escape sequences replaced, or the original input if not a string.
1129
+ */},{key:"stringDecodeForJavascript",value:function stringDecodeForJavascript(pString){if(typeof pString!=='string'){return pString;}return pString.replace(this._Regex_matcherJavascriptDecode,function(pMatch){switch(pMatch){case'\\"':return'"';case'\\\'':return'\'';case'\\\\':return'\\';case'\\n':return'\n';case'\\r':return'\r';default:return pMatch;// Return the original character if no decoding is needed
1130
+ }});}/**
1104
1131
  * Count the number of enclosures in a string based on the start and end characters.
1105
1132
  *
1106
1133
  * If no start or end characters are specified, it will default to parentheses. If the string is not a string, it will return 0.
@@ -4941,7 +4968,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
4941
4968
  // presumably different callback function.
4942
4969
  // This makes sure that own properties are retained, so that
4943
4970
  // decorations and such are not lost along the way.
4944
- module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.257","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.27.0","@types/jquery":"^3.5.32","eslint":"^9.27.0","globals":"^16.1.0","quackage":"^1.0.41"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.10","pict-application":"^1.0.25","pict-provider":"^1.0.3","pict-template":"^1.0.10","pict-view":"^1.0.60","typescript":"^5.8.3"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
4971
+ module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.258","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4","eslint":"^9.27.0","globals":"^16.2.0","quackage":"^1.0.41","sinon":"^20.0.0"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.11","pict-application":"^1.0.25","pict-provider":"^1.0.3","pict-template":"^1.0.10","pict-view":"^1.0.60","typescript":"^5.8.3"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
4945
4972
  /* global Pict, _Pict: writeable *//**
4946
4973
  * Simple function to load a pict Application
4947
4974
  *
@@ -5118,7 +5145,19 @@ this.recordSetCache[pEntity].maxAge=10000;this.recordSetCache[pEntity].maxLength
5118
5145
  if(!('Entity'in pEntityInformation)||typeof pEntityInformation.Entity!='string'){this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain an Entity string.");return fCallback();}if(!('Destination'in pEntityInformation)||typeof pEntityInformation.Destination!='string'){this.log.warn("EntityBundleRequest failed to parse entity request because the entity stanza did not contain a Destination string.");return fCallback();}if(!('Filter'in pEntityInformation)||typeof pEntityInformation.Filter!='string'){pEntityInformation.Filter='';}if(!('FilterData'in pEntityInformation)||_typeof(pEntityInformation.FilterData)!='object'){pEntityInformation.FilterData={};}if(!('RecordStartCursor'in pEntityInformation)||typeof pEntityInformation.RecordStartCursor!='number'){pEntityInformation.RecordStartCursor=0;}if(!('PageSize'in pEntityInformation)||typeof pEntityInformation.PageSize!='number'){pEntityInformation.PageSize=100;}var tmpRecordStartCursor=null;var tmpRecordCount=null;if(pEntityInformation.RecordCount){tmpRecordStartCursor=pEntityInformation.RecordStartCursor;tmpRecordCount=pEntityInformation.RecordCount;}// Parse the filter template
5119
5146
  var tmpFilterString=this.fable.parseTemplate(pEntityInformation.Filter,pEntityInformation.FilterData);// Create a callback function to handle receiving the record set
5120
5147
  var fRecordFetchComplete=function fRecordFetchComplete(pError,pRecordSet){if(pError){_this75.log.error("EntityBundleRequest request Error getting entity set for [".concat(pEntityInformation.Entity,"] with filter [").concat(tmpFilterString,"]: ").concat(pError),pError);return fCallback(pError,'');}_this75.log.trace("EntityBundleRequest found ".concat(pRecordSet.length," records for ").concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"]"));// Now assign it back to the destination; because this is not view specific it doesn't use the manifests from them (to deal with scope overlap with subgrids).
5121
- if(pEntityInformation.SingleRecord){if(pRecordSet.length>1){_this75.log.warn("EntityBundleRequest found more than one record for ".concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"] but SingleRecord is true; setting the first record."));}if(pRecordSet.length<1){_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,false);}_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet[0]);}else{_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet);}return fCallback();};if(tmpRecordCount){this.getEntitySetPage(pEntityInformation.Entity,tmpFilterString,tmpRecordStartCursor,tmpRecordCount,fRecordFetchComplete);}else{this.getEntitySet(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,fCallback){var _this76=this;// First sanity check the pCustomRequestInformation
5148
+ if(pEntityInformation.SingleRecord){if(pRecordSet.length>1){_this75.log.warn("EntityBundleRequest found more than one record for ".concat(pEntityInformation.Entity," filtered to [").concat(tmpFilterString,"] but SingleRecord is true; setting the first record."));}if(pRecordSet.length<1){_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,false);}_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet[0]);}else{_this75.fable.manifest.setValueByHash(_this75.fable,pEntityInformation.Destination,pRecordSet);}return fCallback();};if(tmpRecordCount){this.getEntitySetPage(pEntityInformation.Entity,tmpFilterString,tmpRecordStartCursor,tmpRecordCount,fRecordFetchComplete);}else{this.getEntitySet(pEntityInformation.Entity,tmpFilterString,fRecordFetchComplete);}}},{key:"mapJoin",value:function mapJoin(pCustomRequestInformation,fCallback){/*
5149
+ {
5150
+ "Type": "MapJoin",
5151
+ "DestinationRecordSetAddress": "Record.CoreEntities",
5152
+ "DestinationJoinValue": "IDBook",
5153
+ "JoinJoinValueLHS": "IDBook",
5154
+ "Joins": "Record.BookAuthorJoins",
5155
+ "JoinJoinValueRHS": "IDAuthor",
5156
+ "JoinRecordSetAddress": "Record.Authors",
5157
+ "JoinValue": "IDAuthor",
5158
+ "RecordDestinationAddress": "Authors"
5159
+ }
5160
+ */var tmpDestinationEntities=this.fable.manifest.getValueByHash(this.fable,pCustomRequestInformation.DestinationRecordSetAddress);if(!Array.isArray(tmpDestinationEntities)){return fCallback(new Error("EntityBundleRequest failed to map join because the destination [".concat(pCustomRequestInformation.DestinationRecordSetAddress,"] did not return an array.")));}var tmpJoinEntities=this.fable.manifest.getValueByHash(this.fable,pCustomRequestInformation.Joins);if(!Array.isArray(tmpJoinEntities)){return fCallback(new Error("EntityBundleRequest failed to map join because the join [".concat(pCustomRequestInformation.Joins,"] did not return an array.")));}var tmpSourceEntities=this.fable.manifest.getValueByHash(this.fable,pCustomRequestInformation.JoinRecordSetAddress);if(!Array.isArray(tmpSourceEntities)){return fCallback(new Error("EntityBundleRequest failed to map join because the source [".concat(pCustomRequestInformation.JoinRecordSetAddress,"] did not return an array.")));}var tmpLHSJoinKey=pCustomRequestInformation.JoinJoinValueLHS||pCustomRequestInformation.DestinationJoinValue;var tmpRHSJoinKey=pCustomRequestInformation.JoinJoinValueRHS||pCustomRequestInformation.JoinValue;var tmpDestinationLookup={};var tmpSourceLookup={};var tmpJoinMap={};var _iterator3=_createForOfIteratorHelper(tmpDestinationEntities),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _tmpDestinationEntity=_step3.value;var tmpDestinationJoinValue=_tmpDestinationEntity[pCustomRequestInformation.DestinationJoinValue];tmpDestinationLookup[tmpDestinationJoinValue]=_tmpDestinationEntity;}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}var _iterator4=_createForOfIteratorHelper(tmpSourceEntities),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _tmpSourceEntity=_step4.value;var tmpSourceJoinValue=_tmpSourceEntity[pCustomRequestInformation.JoinValue];tmpSourceLookup[tmpSourceJoinValue]=_tmpSourceEntity;}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}var _iterator5=_createForOfIteratorHelper(tmpJoinEntities),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var tmpJoinEntity=_step5.value;var _tmpLHSJoinValue=tmpJoinEntity[tmpLHSJoinKey];var _tmpRHSJoinValue=tmpJoinEntity[tmpRHSJoinKey];tmpJoinMap[_tmpLHSJoinValue]=tmpJoinMap[_tmpLHSJoinValue]||new Set();tmpJoinMap[_tmpLHSJoinValue].add(_tmpRHSJoinValue);}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}for(var _i58=0,_Object$keys=Object.keys(tmpJoinMap);_i58<_Object$keys.length;_i58++){var tmpLHSJoinValue=_Object$keys[_i58];var tmpRHSJoinValues=Array.from(tmpJoinMap[tmpLHSJoinValue]);var tmpDestinationEntity=tmpDestinationLookup[tmpLHSJoinValue];if(!tmpDestinationEntity){this.log.error("EntityBundleRequest failed to map join because the LHS join value [".concat(tmpLHSJoinValue,"] was not found in the destination lookup."));continue;}for(var _i59=0,_tmpRHSJoinValues=tmpRHSJoinValues;_i59<_tmpRHSJoinValues.length;_i59++){var tmpRHSJoinValue=_tmpRHSJoinValues[_i59];var tmpSourceEntity=tmpSourceLookup[tmpRHSJoinValue];if(!tmpSourceEntity){this.log.error("EntityBundleRequest failed to map join because the RHS join value [".concat(tmpRHSJoinValue,"] was not found in the source lookup."));continue;}tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]=tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress]||[];tmpDestinationEntity[pCustomRequestInformation.RecordDestinationAddress].push(tmpSourceEntity);}}fCallback(null,tmpDestinationEntities);}},{key:"gatherCustomDataSet",value:function gatherCustomDataSet(pCustomRequestInformation,fCallback){var _this76=this;// First sanity check the pCustomRequestInformation
5122
5161
  if(!('URL'in pCustomRequestInformation)||typeof pCustomRequestInformation.URL!='string'){this.log.warn("EntityBundleRequest failed to parse custom data request because the stanza did not contain a URL string.");return fCallback();}if(!('URLData'in pCustomRequestInformation)||_typeof(pCustomRequestInformation.URLData)!='object'){pCustomRequestInformation.URLData={};}// Parse the filter template
5123
5162
  var tmpURLTemplateString=this.fable.parseTemplate(pCustomRequestInformation.URL,pCustomRequestInformation.URLData);if(tmpURLTemplateString==''){// We may want to continue, but for now let's say nah and nope out.
5124
5163
  this.log.warn("EntityBundleRequest failed to parse custom data request because the entity Filter did not return a string for FilterBy");}var tmpURLPrefix='';// This will only be true if the "Host" is set.
@@ -5131,16 +5170,16 @@ if(pCustomRequestInformation.Destination){_this76.fable.manifest.setValueByHash(
5131
5170
  * @param {Object} pEntitiesBundleDescription - The entity bundle description object.
5132
5171
  *
5133
5172
  * @return {Promise<any>} - Returns a promise that resolves when the data has been gathered.
5134
- */},{key:"gatherDataFromServer",value:function gatherDataFromServer(pEntitiesBundleDescription,fCallback){var _this77=this;if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");return Promise.reject(new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.'));}var tmpAnticipate=this.fable.newAnticipate();var _loop3=function _loop3(){var tmpEntityBundleEntry=pEntitiesBundleDescription[i];tmpAnticipate.anticipate(function(fNext){try{switch(tmpEntityBundleEntry.Type){case'Custom':return _this77.gatherCustomDataSet(tmpEntityBundleEntry,fNext);// This is the default case, for a meadow entity set or single entity
5173
+ */},{key:"gatherDataFromServer",value:function gatherDataFromServer(pEntitiesBundleDescription,fCallback){var _this77=this;if(!Array.isArray(pEntitiesBundleDescription)){this.log.error("EntityBundleRequest failed to parse entity bundle request because the input was not an array.");return Promise.reject(new Error('EntityBundleRequest failed to parse entity bundle request because the input was not an array.'));}var tmpAnticipate=this.fable.newAnticipate();var _loop3=function _loop3(){var tmpEntityBundleEntry=pEntitiesBundleDescription[i];tmpAnticipate.anticipate(function(fNext){try{switch(tmpEntityBundleEntry.Type){case'Custom':return _this77.gatherCustomDataSet(tmpEntityBundleEntry,fNext);case'MapJoin':return _this77.mapJoin(tmpEntityBundleEntry,fNext);// This is the default case, for a meadow entity set or single entity
5135
5174
  case'MeadowEntity':default:return _this77.gatherEntitySet(tmpEntityBundleEntry,fNext);}}catch(pError){_this77.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),pError);}return fNext();});};for(var i=0;i<pEntitiesBundleDescription.length;i++){_loop3();}tmpAnticipate.wait(function(pError){//FIXME: should we be ignoring this error? rejecting here is unsafe since the result isn't guaranteed to be handled, so will crash stuff currently
5136
5175
  if(pError){_this77.log.error("EntityBundleRequest error gathering entity set: ".concat(pError),pError);return fCallback(pError);}return fCallback();});}},{key:"getEntity",value:function getEntity(pEntity,pIDRecord,fCallback){this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
5137
- this.recordCache[pEntity].prune(function(){var _this78=this;var tmpPossibleRecord=this.recordCache[pEntity].read(pIDRecord);if(tmpPossibleRecord){return fCallback(null,tmpPossibleRecord);}var tmpOptions={url:"".concat(this.options.urlPrefix).concat(pEntity,"/").concat(pIDRecord)};tmpOptions=this.prepareRequestOptions(tmpOptions);return this.restClient.getJSON(tmpOptions,function(pError,pResponse,pBody){if(pBody){_this78.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(pRecordStartCursor,"/").concat(pRecordCount);return this.restClient.getJSON(tmpURL,function(pDownloadError,pDownloadResponse,pDownloadBody){return fCallback(pDownloadError,pDownloadBody);}.bind(this));}},{key:"getEntitySetRecordCount",value:function getEntitySetRecordCount(pEntity,pMeadowFilterExpression,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count/FilteredTo/").concat(pMeadowFilterExpression);return this.restClient.getJSON(tmpURL,function(pError,pResponse,pBody){if(pError){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pError));return fCallback(pError);}var tmpRecordCount=0;if(pBody.Count){tmpRecordCount=pBody.Count;}return fCallback(pError,tmpRecordCount);}.bind(this));}},{key:"getEntitySet",value:function getEntitySet(pEntity,pMeadowFilterExpression,fCallback){// TODO: Should we test for too many record IDs here by string length in pMeadowFilterExpression?
5176
+ this.recordCache[pEntity].prune(function(){var _this78=this;var tmpPossibleRecord=this.recordCache[pEntity].read(pIDRecord);if(tmpPossibleRecord){return fCallback(null,tmpPossibleRecord);}var tmpOptions={url:"".concat(this.options.urlPrefix).concat(pEntity,"/").concat(pIDRecord)};tmpOptions=this.prepareRequestOptions(tmpOptions);return this.restClient.getJSON(tmpOptions,function(pError,pResponse,pBody){if(pResponse&&pResponse.statusCode&&pResponse.statusCode>=400){_this78.log.error("Error getting entity [".concat(pEntity,"] with ID [").concat(pIDRecord,"] from url [").concat(tmpOptions.url,"]: ").concat(pResponse.statusCode," ").concat(pResponse.statusMessage));return fCallback(new Error("Error getting entity [".concat(pEntity,"] with ID [").concat(pIDRecord,"] from url [").concat(tmpOptions.url,"]: ").concat(pResponse.statusCode," ").concat(JSON.stringify(pBody||{}))));}if(pBody){_this78.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(pRecordStartCursor,"/").concat(pRecordCount);return this.restClient.getJSON(tmpURL,function(pDownloadError,pDownloadResponse,pDownloadBody){if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){this.log.error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pDownloadResponse.statusCode," ").concat(pDownloadResponse.statusMessage));return fCallback(new Error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pDownloadResponse.statusCode," ").concat(JSON.stringify(pDownloadBody||{}))));}return fCallback(pDownloadError,pDownloadBody);}.bind(this));}},{key:"getEntitySetRecordCount",value:function getEntitySetRecordCount(pEntity,pMeadowFilterExpression,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count/FilteredTo/").concat(pMeadowFilterExpression);return this.restClient.getJSON(tmpURL,function(pError,pResponse,pBody){if(pResponse&&pResponse.statusCode&&pResponse.statusCode>=400){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pResponse.statusCode," ").concat(pResponse.statusMessage));return fCallback(new Error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pResponse.statusCode," ").concat(JSON.stringify(pBody||{}))));}if(pError){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pError));return fCallback(pError);}var tmpRecordCount=0;if(pBody.Count){tmpRecordCount=pBody.Count;}return fCallback(pError,tmpRecordCount);}.bind(this));}},{key:"getEntitySet",value:function getEntitySet(pEntity,pMeadowFilterExpression,fCallback){// TODO: Should we test for too many record IDs here by string length in pMeadowFilterExpression?
5138
5177
  // FBL~ID${pDestinationEntity}~INN~${tmpIDRecordsCommaSeparated}
5139
5178
  // If the list is mega-long we can parse it and break it into chunks.
5140
5179
  this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
5141
5180
  this.recordSetCache[pEntity].prune(function(){var _this79=this;var tmpPossibleRecords=this.recordSetCache[pEntity].read(pMeadowFilterExpression);if(tmpPossibleRecords){return fCallback(null,tmpPossibleRecords);}return this.getEntitySetRecordCount(pEntity,pMeadowFilterExpression,function(pRecordCountError,pRecordCount){if(pRecordCountError){return fCallback(pRecordCountError);}var tmpRecordCount=pRecordCount;if(isNaN(pRecordCount)){_this79.log.error("Entity count did not return a number for [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"]... something is fatally wrong from the server accessed in getEntitySet call."));return fCallback(new Error('Entity count did not return a number in getEntitySet.'));}var tmpDownloadURIFragments=[];var tmpDownloadBatchSize=_this79.options.downloadBatchSize;for(var i=0;i<tmpRecordCount/tmpDownloadBatchSize;i++){// Generate each of the URI fragments to download
5142
5181
  tmpDownloadURIFragments.push("".concat(_this79.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(i*tmpDownloadBatchSize,"/").concat(tmpDownloadBatchSize));}var tmpEntitySet=[];// Now run these in series (it's possible to parallelize the requests but they would not be in server order)
5143
- _this79.fable.Utility.eachLimit(tmpDownloadURIFragments,1,function(pURIFragment,fDownloadCallback){_this79.restClient.getJSON(pURIFragment,function(pDownloadError,pDownloadResponse,pDownloadBody){tmpEntitySet=tmpEntitySet.concat(pDownloadBody);// Should we be caching each record?
5182
+ _this79.fable.Utility.eachLimit(tmpDownloadURIFragments,1,function(pURIFragment,fDownloadCallback){_this79.restClient.getJSON(pURIFragment,function(pDownloadError,pDownloadResponse,pDownloadBody){if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){_this79.log.error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(pURIFragment,"]: ").concat(pDownloadResponse.statusCode," ").concat(pDownloadResponse.statusMessage));return fDownloadCallback(new Error("Error getting entity set of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(pURIFragment,"]: ").concat(pDownloadResponse.statusCode," ").concat(JSON.stringify(pDownloadBody||{}))));}tmpEntitySet=tmpEntitySet.concat(pDownloadBody);// Should we be caching each record?
5144
5183
  return fDownloadCallback(pDownloadError);});},function(pFullDownloadError){if(tmpEntitySet){_this79.recordSetCache[pEntity].put(tmpEntitySet,pMeadowFilterExpression);}return fCallback(pFullDownloadError,tmpEntitySet);});});}.bind(this));}}]);}(libFableServiceBase);module.exports=PictMeadowEntityProvider;},{"fable":68}],198:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictTemplateProvider=/*#__PURE__*/function(_libFableServiceBase23){/**
5145
5184
  * @param {Object} pFable - The Fable Framework instance
5146
5185
  * @param {Object} pOptions - The options for the service
@@ -5213,7 +5252,7 @@ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHa
5213
5252
  * Pict management object.
5214
5253
  */var Pict=/*#__PURE__*/function(_libFable){/**
5215
5254
  * @param {Object<String, any>} pSettings - The settings for the Pict instance.
5216
- */function Pict(pSettings){var _this81;_classCallCheck2(this,Pict);_this81=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this81.settings;_this81.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this81._PackageFable=_this81._Package;_this81._Package=libPackage;_this81.browserAddress="window._Pict";if("BrowserAddress"in _this81.settings){_this81.browserAddress=_this81.settings.BrowserAddress;}_this81.children=[];/** @type {import('pict-application')} */_this81.PictApplication=null;// shim types from fable until we export types properly
5255
+ */function Pict(pSettings){var _this81;_classCallCheck2(this,Pict);_this81=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this81.settings;_this81.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this81._PackageFable=_this81._Package;/** @type {Record<string, any>} */_this81._Package=libPackage;_this81.browserAddress="window._Pict";if("BrowserAddress"in _this81.settings){_this81.browserAddress=_this81.settings.BrowserAddress;}_this81.children=[];/** @type {import('pict-application')} */_this81.PictApplication=null;// shim types from fable until we export types properly
5217
5256
  /** @type {any} */_this81.log;//NOTE: This needs to come before any other providers which may instantiate a rest client so we don't proliferate them
5218
5257
  _this81.instantiateServiceProvider("RestClient");/**
5219
5258
  * The templateProvider provides a basic key->template mapping with default fallback capabilities
@@ -5313,7 +5352,7 @@ if("default_configuration"in pApplicationPrototype){tmpOptions=this.fable.Utilit
5313
5352
  */},{key:"initializePictTemplateEngine",value:function initializePictTemplateEngine(){if(!this._DefaultPictTemplatesInitialized){// Just looking up data in the application state template expression
5314
5353
  //{~Data:AppData.Some.Value.to.Render~}
5315
5354
  //{~D:AppData.Some.Value.to.Render~}
5316
- this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-TemplateByReference.js"));this.addTemplate(require("./templates/Pict-Template-DataValueByKey.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
5355
+ this.addTemplate(require("./templates/Pict-Template-Data.js"));this.addTemplate(require("./templates/Pict-Template-TemplateByReference.js"));this.addTemplate(require("./templates/Pict-Template-DataValueByKey.js"));this.addTemplate(require("./templates/Pict-Template-View.js"));this.addTemplate(require("./templates/data/Pict-Template-DataEncodeJavascriptString.js"));// HTML Comment Start and End based on truthiness ... if the value is false, the comment shows up.
5317
5356
  // {~HtmlCommentStart:Some.Address~} gives you "<!--"
5318
5357
  // {~HCS:Some.Address~} gives you "<!--"
5319
5358
  this.addTemplate(require("./templates/data/Pict-Template-HtmlCommentStart.js"));// {~HtmlCommentEnd:Some.Address~} gives you "-->"
@@ -5373,7 +5412,7 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplate(tmpTempla
5373
5412
  *
5374
5413
  * @return {String?} The parsed template string, or undefined if a callback was provided
5375
5414
  */},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray){var _this83=this;// TODO: This will need streaming -- for now janky old string append does the trick
5376
- var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this83.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i58=0;_i58<tmpKeys.length;_i58++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i58]],null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5415
+ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this83.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i60=0;_i60<tmpKeys.length;_i60++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i60]],null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5377
5416
  * Parse a template set by hash.
5378
5417
  *
5379
5418
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5393,7 +5432,7 @@ if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSet(tmpTem
5393
5432
  *
5394
5433
  * @return {String?} The parsed template string, or undefined if a callback was provided
5395
5434
  */},{key:"parseTemplateSetWithPayload",value:function parseTemplateSetWithPayload(pTemplateString,pDataSet,pPayload,fCallback,pContextArray){var _this84=this;// TODO: This will need streaming -- for now janky old string append does the trick
5396
- var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this84.parseTemplate(pTemplateString,{Data:pRecord,Payload:pPayload},function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[i],Payload:pPayload},null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i59=0;_i59<tmpKeys.length;_i59++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i59]],Payload:pPayload},null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5435
+ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this84.parseTemplate(pTemplateString,{Data:pRecord,Payload:pPayload},function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error("Pict: Template Set: pDataSet is not an array or object."),"");}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=="object"){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[i],Payload:pPayload},null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i61=0;_i61<tmpKeys.length;_i61++){tmpValue+=this.parseTemplate(pTemplateString,{Data:pDataSet[tmpKeys[_i61]],Payload:pPayload},null,pContextArray);}}return tmpValue;}else{return"";}}}/**
5397
5436
  * Parse a template set by hash.
5398
5437
  *
5399
5438
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -5405,7 +5444,7 @@ var tmpValue="";if(typeof fCallback=="function"){if(Array.isArray(pDataSet)||_ty
5405
5444
  * @return {String?} The parsed template string, or undefined if a callback was provided
5406
5445
  */},{key:"parseTemplateSetWithPayloadByHash",value:function parseTemplateSetWithPayloadByHash(pTemplateHash,pDataSet,pPayload,fCallback,pContextArray){var tmpTemplateString=this.TemplateProvider.getTemplate(pTemplateHash);// TODO: Unsure if returning empty is always the right behavior -- if it isn't we will use config to set the behavior
5407
5446
  if(!tmpTemplateString){tmpTemplateString="";}return this.parseTemplateSetWithPayload(tmpTemplateString,pDataSet,pPayload,fCallback,pContextArray);}}]);}(libFable);module.exports=Pict;module.exports.PictApplicationClass=require("pict-application");module.exports.PictViewClass=require("pict-view");module.exports.PictProviderClass=require("pict-provider");module.exports.PictTemplateClass=require("pict-template");module.exports.EnvironmentLog=require("./environments/Pict-Environment-Log.js");module.exports.EnvironmentObject=require("./environments/Pict-Environment-Object.js");// This is to help understand the type of enivironement we're executing in
5408
- module.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");module.exports.safeOnDocumentReady=require("./Pict-Browser-SafeOnDocumentReady.js");module.exports.safeLoadPictApplication=require("./Pict-Browser-SafeLoad.js");},{"../package.json":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./templates/Pict-Template-Data.js":202,"./templates/Pict-Template-DataValueByKey.js":203,"./templates/Pict-Template-Entity.js":204,"./templates/Pict-Template-Self.js":205,"./templates/Pict-Template-Template.js":206,"./templates/Pict-Template-TemplateByReference.js":207,"./templates/Pict-Template-TemplateFromMap.js":208,"./templates/Pict-Template-TemplateSet.js":209,"./templates/Pict-Template-TemplateSetFromMap.js":210,"./templates/Pict-Template-TemplateSetWithPayload.js":211,"./templates/Pict-Template-TemplateValueSet.js":212,"./templates/Pict-Template-View.js":213,"./templates/data-generation/Pict-Template-RandomNumber.js":214,"./templates/data-generation/Pict-Template-RandomNumberString.js":215,"./templates/data/Pict-Template-DataJson.js":216,"./templates/data/Pict-Template-DateOnlyFormat.js":217,"./templates/data/Pict-Template-DateOnlyYMD.js":218,"./templates/data/Pict-Template-DateTimeFormat.js":219,"./templates/data/Pict-Template-DateTimeYMD.js":220,"./templates/data/Pict-Template-Digits.js":221,"./templates/data/Pict-Template-Dollars.js":222,"./templates/data/Pict-Template-HtmlCommentEnd.js":223,"./templates/data/Pict-Template-HtmlCommentStart.js":224,"./templates/data/Pict-Template-Join.js":225,"./templates/data/Pict-Template-JoinUnique.js":226,"./templates/data/Pict-Template-PascalCaseIdentifier.js":227,"./templates/data/Pict-Template-PluckJoinUnique.js":228,"./templates/debugging/Pict-Template-Breakpoint.js":229,"./templates/debugging/Pict-Template-DataValueTree.js":230,"./templates/debugging/Pict-Template-LogStatement.js":231,"./templates/debugging/Pict-Template-LogValue.js":232,"./templates/debugging/Pict-Template-LogValueTree.js":233,"./templates/logic/Pict-Template-NotEmpty.js":234,"./templates/logic/Pict-Template-TemplateIf.js":236,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":237,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
5447
+ module.exports.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");module.exports.safeOnDocumentReady=require("./Pict-Browser-SafeOnDocumentReady.js");module.exports.safeLoadPictApplication=require("./Pict-Browser-SafeLoad.js");},{"../package.json":191,"./Pict-Browser-SafeLoad.js":192,"./Pict-Browser-SafeOnDocumentReady.js":193,"./Pict-CSS.js":194,"./Pict-Content-Assignment.js":195,"./Pict-DataProvider.js":196,"./Pict-Meadow-EntityProvider.js":197,"./Pict-Template-Provider.js":198,"./environments/Pict-Environment-Log.js":200,"./environments/Pict-Environment-Object.js":201,"./templates/Pict-Template-Data.js":202,"./templates/Pict-Template-DataValueByKey.js":203,"./templates/Pict-Template-Entity.js":204,"./templates/Pict-Template-Self.js":205,"./templates/Pict-Template-Template.js":206,"./templates/Pict-Template-TemplateByReference.js":207,"./templates/Pict-Template-TemplateFromMap.js":208,"./templates/Pict-Template-TemplateSet.js":209,"./templates/Pict-Template-TemplateSetFromMap.js":210,"./templates/Pict-Template-TemplateSetWithPayload.js":211,"./templates/Pict-Template-TemplateValueSet.js":212,"./templates/Pict-Template-View.js":213,"./templates/data-generation/Pict-Template-RandomNumber.js":214,"./templates/data-generation/Pict-Template-RandomNumberString.js":215,"./templates/data/Pict-Template-DataEncodeJavascriptString.js":216,"./templates/data/Pict-Template-DataJson.js":217,"./templates/data/Pict-Template-DateOnlyFormat.js":218,"./templates/data/Pict-Template-DateOnlyYMD.js":219,"./templates/data/Pict-Template-DateTimeFormat.js":220,"./templates/data/Pict-Template-DateTimeYMD.js":221,"./templates/data/Pict-Template-Digits.js":222,"./templates/data/Pict-Template-Dollars.js":223,"./templates/data/Pict-Template-HtmlCommentEnd.js":224,"./templates/data/Pict-Template-HtmlCommentStart.js":225,"./templates/data/Pict-Template-Join.js":226,"./templates/data/Pict-Template-JoinUnique.js":227,"./templates/data/Pict-Template-PascalCaseIdentifier.js":228,"./templates/data/Pict-Template-PluckJoinUnique.js":229,"./templates/debugging/Pict-Template-Breakpoint.js":230,"./templates/debugging/Pict-Template-DataValueTree.js":231,"./templates/debugging/Pict-Template-LogStatement.js":232,"./templates/debugging/Pict-Template-LogValue.js":233,"./templates/debugging/Pict-Template-LogValueTree.js":234,"./templates/logic/Pict-Template-NotEmpty.js":235,"./templates/logic/Pict-Template-TemplateIf.js":237,"./templates/logic/Pict-Template-TemplateIfAbsolute.js":238,"fable":68,"pict-application":139,"pict-provider":141,"pict-template":143,"pict-view":145}],200:[function(require,module,exports){/**
5409
5448
  * Pict browser shim loader
5410
5449
  * @author <steven@velozo.com>
5411
5450
  *
@@ -5507,11 +5546,27 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
5507
5546
  * @param {Object} pFable - The Fable Framework instance
5508
5547
  * @param {Object} pOptions - The options for the service
5509
5548
  * @param {String} pServiceHash - The hash of the service
5510
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this85;_classCallCheck2(this,PictTemplateProviderData);_this85=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this85.log;_this85.addPattern('{~Data:','~}');_this85.addPattern('{~D:','~}');return _this85;}_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpDefaultValue='';if(tmpHash.indexOf(':')>-1){tmpDefaultValue=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],203:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
5549
+ */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this85;_classCallCheck2(this,PictTemplateProviderData);_this85=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this85.log;_this85.addPattern('{~Data:','~}');_this85.addPattern('{~D:','~}');return _this85;}/**
5550
+ * Render a template expression, returning a string with the resulting content.
5551
+ *
5552
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5553
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5554
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5555
+ *
5556
+ * @return {string} The rendered template
5557
+ */_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpDefaultValue='';if(tmpHash.indexOf(':')>-1){tmpDefaultValue=tmpHash.split(':')[1];tmpHash=tmpHash.split(':')[0];}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'||tmpValue===''){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],203:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueByKey=/*#__PURE__*/function(_libPictTemplate2){/**
5511
5558
  * @param {Object} pFable - The Fable Framework instance
5512
5559
  * @param {Object} pOptions - The options for the service
5513
5560
  * @param {String} pServiceHash - The hash of the service
5514
- */function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this86;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this86=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this86.log;_this86.addPattern('{~DataValueByKey:','~}');_this86.addPattern('{~DVBK:','~}');return _this86;}_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpHashArray=tmpHash.split(':');if(tmpHashArray.length<2){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] failed because there were not two stanzas in the expression [").concat(pTemplateHash,"]"));return'';}var tmpDefaultValue='';if(tmpHashArray.length>2){tmpDefaultValue=tmpHashArray[2];}var tmpValueObject=this.resolveStateFromAddress(tmpHashArray[0],tmpRecord,pContextArray);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray);var tmpValue=this.pict.manifest.getValueByHash(tmpValueObject,tmpValueAddress);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueByKey;},{"pict-template":143}],204:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate3){/**
5561
+ */function PictTemplateProviderDataValueByKey(pFable,pOptions,pServiceHash){var _this86;_classCallCheck2(this,PictTemplateProviderDataValueByKey);_this86=_callSuper(this,PictTemplateProviderDataValueByKey,[pFable,pOptions,pServiceHash]);/** @type {any} */_this86.log;_this86.addPattern('{~DataValueByKey:','~}');_this86.addPattern('{~DVBK:','~}');return _this86;}/**
5562
+ * Render a template expression, returning a string with the resulting content.
5563
+ *
5564
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5565
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5566
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5567
+ *
5568
+ * @return {string} The rendered template
5569
+ */_inherits(PictTemplateProviderDataValueByKey,_libPictTemplate2);return _createClass2(PictTemplateProviderDataValueByKey,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpHashArray=tmpHash.split(':');if(tmpHashArray.length<2){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] failed because there were not two stanzas in the expression [").concat(pTemplateHash,"]"));return'';}var tmpDefaultValue='';if(tmpHashArray.length>2){tmpDefaultValue=tmpHashArray[2];}var tmpValueObject=this.resolveStateFromAddress(tmpHashArray[0],tmpRecord,pContextArray);var tmpValueAddress=this.resolveStateFromAddress(tmpHashArray[1],tmpRecord,pContextArray);var tmpValue=this.pict.manifest.getValueByHash(tmpValueObject,tmpValueAddress);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return tmpDefaultValue;}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueByKey;},{"pict-template":143}],204:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate3){/**
5515
5570
  * @param {Object} pFable - The Fable Framework instance
5516
5571
  * @param {Object} pOptions - The options for the service
5517
5572
  * @param {String} pServiceHash - The hash of the service
@@ -5524,12 +5579,21 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
5524
5579
  *
5525
5580
  * @return {string} The rendered template
5526
5581
  */_inherits(PictTemplateProviderEntity,_libPictTemplate3);return _createClass2(PictTemplateProviderEntity,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){// TODO: Better messaging
5527
- this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"]"));}var tmpEntity=false;/** @type {string|number} */var tmpEntityID='';var tmpEntityTemplate=false;// This expression requires 2 parts -- a third is optional, and, if present, is the template to render to.
5528
- var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]"));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]")),'');}tmpEntity=tmpAddressParts[0].trim();tmpEntityID=tmpAddressParts[1].trim();tmpEntityTemplate=tmpAddressParts[2].trim();if(!isNaN(Number(tmpEntityID))){try{tmpEntityID=parseInt(String(tmpEntityID));}catch(_unused){this.log.warn("Pict: Entity Render: Could not parse entity ID.");tmpEntityID=0;}}else{// This is an address, so we need to get the value at the address
5582
+ this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}/**
5583
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5584
+ *
5585
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5586
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5587
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5588
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5589
+ *
5590
+ * @return {void}
5591
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"]"));}var tmpEntity;/** @type {string|number} */var tmpEntityID='';var tmpEntityTemplate;// This expression requires 2 parts -- a third is optional, and, if present, is the template to render to.
5592
+ var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}tmpEntity=tmpAddressParts[0].trim();tmpEntityID=tmpAddressParts[1].trim();tmpEntityTemplate=tmpAddressParts[2].trim();if(!isNaN(Number(tmpEntityID))){try{tmpEntityID=parseInt(String(tmpEntityID));}catch(_unused){this.log.warn("Pict: Entity Render: Could not parse entity ID.");tmpEntityID=0;}}else{// This is an address, so we need to get the value at the address
5529
5593
  tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray);}// No Entity or EntityID
5530
- if(!tmpEntity||!tmpEntityID){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID)),'');}if(this.pict.LogNoisiness>3){this.log.trace("Pict: Entity Render: Entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] as template [").concat(tmpEntityTemplate,"] from [").concat(tmpHash,"]"));}// Now try to get the entity
5594
+ if(!tmpEntity||!tmpEntityID){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID));return tmpCallback(null,'');}if(this.pict.LogNoisiness>3){this.log.trace("Pict: Entity Render: Entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] as template [").concat(tmpEntityTemplate,"] from [").concat(tmpHash,"]"));}// Now try to get the entity
5531
5595
  this.pict.EntityProvider.getEntity(tmpEntity,tmpEntityID,function(pError,pRecord){if(pError){this.log.error("Pict: Entity Render: Error getting entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] for [").concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}// Now render the template
5532
- if(tmpEntityTemplate){return this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray);}else{return tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],205:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate4){/**
5596
+ if(tmpEntityTemplate){this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray);}else{tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":143}],205:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate4){/**
5533
5597
  * @param {Object} pFable - The Fable Framework instance
5534
5598
  * @param {Object} pOptions - The options for the service
5535
5599
  * @param {String} pServiceHash - The hash of the service
@@ -5545,85 +5609,204 @@ if(tmpEntityTemplate){return this.pict.parseTemplateByHash(tmpEntityTemplate,pRe
5545
5609
  * @param {Object} pFable - The Fable Framework instance
5546
5610
  * @param {Object} pOptions - The options for the service
5547
5611
  * @param {String} pServiceHash - The hash of the service
5548
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderTemplate);_this89=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this89.log;_this89.addPattern('{~Template:','~}');_this89.addPattern('{~T:','~}');return _this89;}_inherits(PictTemplateProviderTemplate,_libPictTemplate5);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5612
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderTemplate);_this89=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this89.log;_this89.addPattern('{~Template:','~}');_this89.addPattern('{~T:','~}');return _this89;}/**
5613
+ * Render a template expression, returning a string with the resulting content.
5614
+ *
5615
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5616
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5617
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5618
+ *
5619
+ * @return {string} The rendered template
5620
+ */_inherits(PictTemplateProviderTemplate,_libPictTemplate5);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5549
5621
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5550
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5551
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5622
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5623
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}/**
5624
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5625
+ *
5626
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5627
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5628
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5629
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5630
+ *
5631
+ * @return {void}
5632
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5552
5633
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5553
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5634
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5554
5635
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5555
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],207:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate6){/**
5636
+ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],207:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplate=/*#__PURE__*/function(_libPictTemplate6){/**
5556
5637
  * @param {Object} pFable - The Fable Framework instance
5557
5638
  * @param {Object} pOptions - The options for the service
5558
5639
  * @param {String} pServiceHash - The hash of the service
5559
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictTemplateProviderTemplate);_this90=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this90.log;_this90.addPattern('{~TemplateByReference:','~}');_this90.addPattern('{~TBR:','~}');return _this90;}_inherits(PictTemplateProviderTemplate,_libPictTemplate6);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5640
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictTemplateProviderTemplate);_this90=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this90.log;_this90.addPattern('{~TemplateByReference:','~}');_this90.addPattern('{~TBR:','~}');return _this90;}/**
5641
+ * Render a template expression, returning a string with the resulting content.
5642
+ *
5643
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5644
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5645
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5646
+ *
5647
+ * @return {string} The rendered template
5648
+ */_inherits(PictTemplateProviderTemplate,_libPictTemplate6);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5560
5649
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHashReferenceLocation=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHashReferenceLocation=tmpHash;}// No template hash
5561
- if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]");}// Now look up the template by the reference
5650
+ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return'';}// Now look up the template by the reference
5562
5651
  var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray);// No template hash
5563
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5564
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5652
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5653
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}/**
5654
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5655
+ *
5656
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5657
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5658
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5659
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5660
+ *
5661
+ * @return {void}
5662
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHashReferenceLocation;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5565
5663
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHashReferenceLocation=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHashReferenceLocation=tmpHash;}// No template hash
5566
- if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]");}// Now look up the template by the reference
5664
+ if(!tmpTemplateHashReferenceLocation){this.log.warn("Pict: Template Render Async: TemplateHashReferenceLocation not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now look up the template by the reference
5567
5665
  var tmpTemplateHash=this.resolveStateFromAddress(tmpTemplateHashReferenceLocation,pRecord,pContextArray);// No template hash
5568
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5666
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5569
5667
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5570
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate7){/**
5668
+ this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplate;},{"pict-template":143}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateFromMap=/*#__PURE__*/function(_libPictTemplate7){/**
5571
5669
  * @param {Object} pFable - The Fable Framework instance
5572
5670
  * @param {Object} pOptions - The options for the service
5573
5671
  * @param {String} pServiceHash - The hash of the service
5574
- */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this91=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this91.log;_this91.addPattern('{~TFM:','~}');_this91.addPattern('{~TemplateFromMap:','~}');return _this91;}_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5672
+ */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this91=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this91.log;_this91.addPattern('{~TFM:','~}');_this91.addPattern('{~TemplateFromMap:','~}');return _this91;}/**
5673
+ * Render a template expression, returning a string with the resulting content.
5674
+ *
5675
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5676
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5677
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5678
+ *
5679
+ * @return {string} The rendered template
5680
+ */_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5575
5681
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5576
5682
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
5577
5683
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5578
- return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5684
+ return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}/**
5685
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5686
+ *
5687
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5688
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5689
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5690
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5691
+ *
5692
+ * @return {void}
5693
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5579
5694
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5580
5695
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5581
5696
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5582
5697
  // The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
5583
- return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate8){/**
5698
+ this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateFromMap;},{"pict-template":143}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSet=/*#__PURE__*/function(_libPictTemplate8){/**
5584
5699
  * @param {Object} pFable - The Fable Framework instance
5585
5700
  * @param {Object} pOptions - The options for the service
5586
5701
  * @param {String} pServiceHash - The hash of the service
5587
- */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this92=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.log;_this92.addPattern('{~TemplateSet:','~}');_this92.addPattern('{~TS:','~}');return _this92;}_inherits(PictTemplateProviderTemplateSet,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5702
+ */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this92=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.log;_this92.addPattern('{~TemplateSet:','~}');_this92.addPattern('{~TS:','~}');return _this92;}/**
5703
+ * Render a template expression, returning a string with the resulting content.
5704
+ *
5705
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5706
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5707
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5708
+ *
5709
+ * @return {string} The rendered template
5710
+ */_inherits(PictTemplateProviderTemplateSet,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5588
5711
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5589
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5590
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5712
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5713
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}/**
5714
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5715
+ *
5716
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5717
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5718
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5719
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5720
+ *
5721
+ * @return {void}
5722
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5591
5723
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfData=tmpTemplateHashPart[1];// No TemplateFromMap hash
5592
5724
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5593
5725
  tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);if(!tmpData){// No address was provided, just render the template with what this template has.
5594
5726
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5595
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate9){/**
5727
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSet;},{"pict-template":143}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetFromMap=/*#__PURE__*/function(_libPictTemplate9){/**
5596
5728
  * @param {Object} pFable - The Fable Framework instance
5597
5729
  * @param {Object} pOptions - The options for the service
5598
5730
  * @param {String} pServiceHash - The hash of the service
5599
- */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this93=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~TSFM:','~}');_this93.addPattern('{~TemplateSetFromMap:','~}');return _this93;}_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate9);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5731
+ */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this93=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.log;_this93.addPattern('{~TSFM:','~}');_this93.addPattern('{~TemplateSetFromMap:','~}');return _this93;}/**
5732
+ * Render a template expression, returning a string with the resulting content.
5733
+ *
5734
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5735
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5736
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5737
+ *
5738
+ * @return {string} The rendered template
5739
+ */_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate9);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5600
5740
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5601
5741
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
5602
5742
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5603
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5743
+ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}/**
5744
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5745
+ *
5746
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5747
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5748
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5749
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5750
+ *
5751
+ * @return {void}
5752
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5604
5753
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5605
5754
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5606
5755
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5607
5756
  // The async portion of this is a mind bender because of how entry can happen dynamically from TemplateFromMaps
5608
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate10){/**
5757
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetFromMap;},{"pict-template":143}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateSetWithPayload=/*#__PURE__*/function(_libPictTemplate10){/**
5609
5758
  * @param {Object} pFable - The Fable Framework instance
5610
5759
  * @param {Object} pOptions - The options for the service
5611
5760
  * @param {String} pServiceHash - The hash of the service
5612
- */function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this94=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~TemplateSetWithPayload:','~}');_this94.addPattern('{~TSWP:','~}');return _this94;}_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] with record:"),pRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5613
- var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray);}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5614
- var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate11){/**
5761
+ */function PictTemplateProviderTemplateSetWithPayload(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderTemplateSetWithPayload);_this94=_callSuper(this,PictTemplateProviderTemplateSetWithPayload,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.log;_this94.addPattern('{~TemplateSetWithPayload:','~}');_this94.addPattern('{~TSWP:','~}');return _this94;}/**
5762
+ * Render a template expression, returning a string with the resulting content.
5763
+ *
5764
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5765
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5766
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5767
+ *
5768
+ * @return {string} The rendered template
5769
+ */_inherits(PictTemplateProviderTemplateSetWithPayload,_libPictTemplate10);return _createClass2(PictTemplateProviderTemplateSetWithPayload,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] with record:"),pRecord);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5770
+ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return"";}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,null,pContextArray);}/**
5771
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5772
+ *
5773
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5774
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5775
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5776
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5777
+ *
5778
+ * @return {void}
5779
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetWithPayloadRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpAddressOfPayload;// This is just a simple 3 part hash (template, address of set, address of payload)
5780
+ var tmpTemplateHashes=tmpHash.trim().split(':');if(tmpTemplateHashes.length<3){this.log.trace("PICT Template [fTemplateSetWithPayloadRender]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateHash=tmpTemplateHashes[0];tmpAddressOfData=tmpTemplateHashes[1];tmpAddressOfPayload=tmpTemplateHashes[2];var tmpData=this.resolveStateFromAddress(tmpAddressOfData,pRecord,pContextArray);if(!tmpData){tmpData=pRecord;}if(!tmpData){tmpData={};}var tmpPayloadData=this.resolveStateFromAddress(tmpAddressOfPayload,pRecord,pContextArray);if(!tmpPayloadData){tmpPayloadData=pRecord;}if(!tmpPayloadData){tmpPayloadData={};}return this.pict.parseTemplateSetWithPayloadByHash(tmpTemplateHash,tmpData,tmpPayloadData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateSetWithPayload;},{"pict-template":143}],212:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateValueSet=/*#__PURE__*/function(_libPictTemplate11){/**
5615
5781
  * @param {Object} pFable - The Fable Framework instance
5616
5782
  * @param {Object} pOptions - The options for the service
5617
5783
  * @param {String} pServiceHash - The hash of the service
5618
- */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this95=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~TemplateValueSet:','~}');_this95.addPattern('{~TVS:','~}');return _this95;}_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5784
+ */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this95=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.log;_this95.addPattern('{~TemplateValueSet:','~}');_this95.addPattern('{~TVS:','~}');return _this95;}/**
5785
+ * Render a template expression, returning a string with the resulting content.
5786
+ *
5787
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5788
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5789
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5790
+ *
5791
+ * @return {string} The rendered template
5792
+ */_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate11);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5619
5793
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5620
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i60=0;_i60<tmpValueKeys.length;_i60++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i60]],Key:tmpValueKeys[_i60]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5621
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5794
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i62=0;_i62<tmpValueKeys.length;_i62++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i62]],Key:tmpValueKeys[_i62]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5795
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray);}}/**
5796
+ * Render a template expression, deliver a string with the resulting content to a callback function.
5797
+ *
5798
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5799
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5800
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5801
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
5802
+ *
5803
+ * @return {void}
5804
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5622
5805
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfData=tmpTemplateHashPart[1];// No TemplateFromMap hash
5623
5806
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5624
- tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i61=0;_i61<tmpValueKeys.length;_i61++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i61]],Key:tmpData[tmpValueKeys[_i61]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5807
+ tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i63=0;_i63<tmpValueKeys.length;_i63++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i63]],Key:tmpData[tmpValueKeys[_i63]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5625
5808
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5626
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate12){/**
5809
+ this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":143}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderView=/*#__PURE__*/function(_libPictTemplate12){/**
5627
5810
  * @param {Object} pFable - The Fable Framework instance
5628
5811
  * @param {Object} pOptions - The options for the service
5629
5812
  * @param {String} pServiceHash - The hash of the service
@@ -5637,36 +5820,86 @@ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(
5637
5820
  * @return {string} The rendered template
5638
5821
  */_inherits(PictTemplateProviderView,_libPictTemplate12);return _createClass2(PictTemplateProviderView,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return'';}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];tmpView.render('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord);var tmpResult=this.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
5639
5822
  //delete this.pict.__TemplateOutputCache[tmpRenderGUID];
5640
- return tmpResult;}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var _this97=this;var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return'';}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];return tmpView.renderAsync('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,function(pError,pResult){if(pError){_this97.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this97.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
5823
+ return tmpResult;}/**
5824
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5825
+ * @param {any} pRecord - The json object to be used as the Record for the template
5826
+ * @param {(pError?: Error, pResult?: string) => void} fCallback - The callback function to call with the result
5827
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5828
+ * @return {void}
5829
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var _this97=this;var tmpViewHash=pTemplateHash.trim();if(!(tmpViewHash in this.pict.views)){this.log.warn("Pict: View Template Render: View not found for [".concat(tmpViewHash,"]"));return fCallback(null,'');}var tmpRenderGUID=this.pict.getUUID();var tmpView=this.pict.views[tmpViewHash];return tmpView.renderAsync('__Virtual',"__TemplateOutputCache.".concat(tmpRenderGUID),pRecord,function(pError,pResult){if(pError){_this97.log.warn("Pict: View Template Render: Error rendering view [".concat(tmpViewHash,"]"),pError);return fCallback(pError,'');}var tmpResult=_this97.pict.__TemplateOutputCache[tmpRenderGUID];// TODO: Uncomment this when we like how it's working
5641
5830
  //delete this.pict.__TemplateOutputCache[tmpRenderGUID];
5642
5831
  return fCallback(null,tmpResult);});}}]);}(libPictTemplate);module.exports=PictTemplateProviderView;},{"pict-template":143}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate13){/**
5643
5832
  * @param {Object} pFable - The Fable Framework instance
5644
5833
  * @param {Object} pOptions - The options for the service
5645
5834
  * @param {String} pServiceHash - The hash of the service
5646
- */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this98=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~RandomNumber:','~}');_this98.addPattern('{~RN:','~}');return _this98;}_inherits(PictTemplateProviderRandomNumber,_libPictTemplate13);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate14){/**
5835
+ */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this98=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~RandomNumber:','~}');_this98.addPattern('{~RN:','~}');return _this98;}/**
5836
+ * Render a template expression, returning a string with the resulting content.
5837
+ *
5838
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5839
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5840
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5841
+ *
5842
+ * @return {string} The rendered template
5843
+ */_inherits(PictTemplateProviderRandomNumber,_libPictTemplate13);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":143}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate14){/**
5647
5844
  * @param {Object} pFable - The Fable Framework instance
5648
5845
  * @param {Object} pOptions - The options for the service
5649
5846
  * @param {String} pServiceHash - The hash of the service
5650
- */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this99=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~RandomNumberString:','~}');_this99.addPattern('{~RNS:','~}');return _this99;}_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate15){/**
5847
+ */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this99=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~RandomNumberString:','~}');_this99.addPattern('{~RNS:','~}');return _this99;}/**
5848
+ * Render a template expression, returning a string with the resulting content.
5849
+ *
5850
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5851
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5852
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5853
+ *
5854
+ * @return {string} The rendered template
5855
+ */_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate14);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":143}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataEncodeJavascriptString=/*#__PURE__*/function(_libPictTemplate15){/**
5651
5856
  * @param {Object} pFable - The Fable Framework instance
5652
5857
  * @param {Object} pOptions - The options for the service
5653
5858
  * @param {String} pServiceHash - The hash of the service
5654
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderDollars);_this100=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~DataJson:','~}');_this100.addPattern('{~DJ:','~}');return _this100;}_inherits(PictTemplateProviderDollars,_libPictTemplate15);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate16){/**
5859
+ */function PictTemplateProviderDataEncodeJavascriptString(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderDataEncodeJavascriptString);_this100=_callSuper(this,PictTemplateProviderDataEncodeJavascriptString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~DataEncodeJavascriptString:','~}');_this100.addPattern('{~DEJS:','~}');return _this100;}/**
5860
+ * Render a template expression, returning a string with the resulting content.
5861
+ *
5862
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5863
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5864
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5865
+ *
5866
+ * @return {string} The rendered template
5867
+ */_inherits(PictTemplateProviderDataEncodeJavascriptString,_libPictTemplate15);return _createClass2(PictTemplateProviderDataEncodeJavascriptString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToEncode=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.pict.DataFormat.stringEncodeForJavascript(tmpDataToEncode);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataEncodeJavascriptString;},{"pict-template":143}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJSONOutput=/*#__PURE__*/function(_libPictTemplate16){/**
5868
+ * @param {Object} pFable - The Fable Framework instance
5869
+ * @param {Object} pOptions - The options for the service
5870
+ * @param {String} pServiceHash - The hash of the service
5871
+ */function PictTemplateProviderJSONOutput(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderJSONOutput);_this101=_callSuper(this,PictTemplateProviderJSONOutput,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~DataJson:','~}');_this101.addPattern('{~DJ:','~}');return _this101;}/**
5872
+ * Render a template expression, returning a string with the resulting content.
5873
+ *
5874
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5875
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5876
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5877
+ *
5878
+ * @return {string} The rendered template
5879
+ */_inherits(PictTemplateProviderJSONOutput,_libPictTemplate16);return _createClass2(PictTemplateProviderJSONOutput,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJSONOutput;},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyFormat=/*#__PURE__*/function(_libPictTemplate17){/**
5655
5880
  * @param {import('fable')} pFable - The Fable Framework instance
5656
5881
  * @param {any} pOptions - The options for the service
5657
5882
  * @param {String} pServiceHash - The hash of the service
5658
- */function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this101=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.options;/** @type {any} */_this101.log;_this101.addPattern('{~DateOnlyFormat:','~}');return _this101;}_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate16);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5883
+ */function PictTemplateProviderDateOnlyFormat(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderDateOnlyFormat);_this102=_callSuper(this,PictTemplateProviderDateOnlyFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.options;/** @type {any} */_this102.log;_this102.addPattern('{~DateOnlyFormat:','~}');return _this102;}/**
5884
+ * Render a template expression, returning a string with the resulting content.
5885
+ *
5886
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5887
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5888
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5889
+ *
5890
+ * @return {string} The rendered template
5891
+ */_inherits(PictTemplateProviderDateOnlyFormat,_libPictTemplate17);return _createClass2(PictTemplateProviderDateOnlyFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateOnlyFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5659
5892
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.format(tmpDateValueSet[1]);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyFormat;/*
5660
5893
  # DEAR DEAD CODE DIARY:
5661
5894
 
5662
5895
  ```javascript
5663
5896
 
5664
5897
  ```
5665
- */},{"pict-template":143}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate17){/**
5898
+ */},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateOnlyYMD=/*#__PURE__*/function(_libPictTemplate18){/**
5666
5899
  * @param {Object} pFable - The Fable Framework instance
5667
5900
  * @param {Object} pOptions - The options for the service
5668
5901
  * @param {String} pServiceHash - The hash of the service
5669
- */function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this102=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this102.options;/** @type {any} */_this102.log;_this102.addPattern('{~DateOnlyYMD:','~}');return _this102;}/**
5902
+ */function PictTemplateProviderDateOnlyYMD(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderDateOnlyYMD);_this103=_callSuper(this,PictTemplateProviderDateOnlyYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.options;/** @type {any} */_this103.log;_this103.addPattern('{~DateOnlyYMD:','~}');return _this103;}/**
5670
5903
  * Render a template expression, returning a string with the resulting content.
5671
5904
  *
5672
5905
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -5674,15 +5907,23 @@ var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');return tmpDayJS.
5674
5907
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5675
5908
  *
5676
5909
  * @return {string} The rendered template
5677
- */_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate17);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5910
+ */_inherits(PictTemplateProviderDateOnlyYMD,_libPictTemplate18);return _createClass2(PictTemplateProviderDateOnlyYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5678
5911
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue).tz('UTC');//FIXME: this is kind of wacked out; -62167219200000 is the unix ms timestamp for 0000-01-01 00:00:00 UTC
5679
5912
  // not even sure showing negative is right; showing the era is probably better (BCE vs CE)
5680
- var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate18){/**
5913
+ var prefix=tmpDayJS.valueOf()<-62167219200000?'-':'';return prefix+tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateOnlyYMD;},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeFormat=/*#__PURE__*/function(_libPictTemplate19){/**
5681
5914
  * @param {Object} pFable - The Fable Framework instance
5682
5915
  * @param {Object} pOptions - The options for the service
5683
5916
  * @param {String} pServiceHash - The hash of the service
5684
- */function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this103=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.options;/** @type {any} */_this103.log;_this103.addPattern('{~DateTimeFormat:','~}');_this103.addPattern('{~DateFormat:','~}');// for backwards compatibility
5685
- return _this103;}_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate18);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5917
+ */function PictTemplateProviderDateTimeFormat(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderDateTimeFormat);_this104=_callSuper(this,PictTemplateProviderDateTimeFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.options;/** @type {any} */_this104.log;_this104.addPattern('{~DateTimeFormat:','~}');_this104.addPattern('{~DateFormat:','~}');// for backwards compatibility
5918
+ return _this104;}/**
5919
+ * Render a template expression, returning a string with the resulting content.
5920
+ *
5921
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5922
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5923
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5924
+ *
5925
+ * @return {string} The rendered template
5926
+ */_inherits(PictTemplateProviderDateTimeFormat,_libPictTemplate19);return _createClass2(PictTemplateProviderDateTimeFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5686
5927
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
5687
5928
  if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused6){//this.log.error(`Error casting date passed timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
5688
5929
  // Day.js will try to guess the user's timezone for us
@@ -5692,12 +5933,12 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
5692
5933
  ```javascript
5693
5934
 
5694
5935
  ```
5695
- */},{"pict-template":143}],220:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate19){/**
5936
+ */},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateTimeYMD=/*#__PURE__*/function(_libPictTemplate20){/**
5696
5937
  * @param {Object} pFable - The Fable Framework instance
5697
5938
  * @param {Object} pOptions - The options for the service
5698
5939
  * @param {String} pServiceHash - The hash of the service
5699
- */function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this104=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.options;/** @type {any} */_this104.log;_this104.addPattern('{~DateTimeYMD:','~}');_this104.addPattern('{~DateYMD:','~}');// for backwards compatibility
5700
- return _this104;}/**
5940
+ */function PictTemplateProviderDateTimeYMD(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderDateTimeYMD);_this105=_callSuper(this,PictTemplateProviderDateTimeYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.options;/** @type {any} */_this105.log;_this105.addPattern('{~DateTimeYMD:','~}');_this105.addPattern('{~DateYMD:','~}');// for backwards compatibility
5941
+ return _this105;}/**
5701
5942
  * Render a template expression, returning a string with the resulting content.
5702
5943
  *
5703
5944
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
@@ -5705,111 +5946,257 @@ return _this104;}/**
5705
5946
  * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5706
5947
  *
5707
5948
  * @return {string} The rendered template
5708
- */_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate19);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5949
+ */_inherits(PictTemplateProviderDateTimeYMD,_libPictTemplate20);return _createClass2(PictTemplateProviderDateTimeYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"] with data:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateTimeYMD]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5709
5950
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
5710
5951
  if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused7){//this.log.error(`Error casting timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
5711
5952
  // Day.js will try to guess the user's timezone for us
5712
- try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}return tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateTimeYMD;},{"pict-template":143}],221:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate20){/**
5953
+ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}return tmpDayJS.format('YYYY-MM-DD');}}]);}(libPictTemplate);module.exports=PictTemplateProviderDateTimeYMD;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDigits=/*#__PURE__*/function(_libPictTemplate21){/**
5713
5954
  * @param {Object} pFable - The Fable Framework instance
5714
5955
  * @param {Object} pOptions - The options for the service
5715
5956
  * @param {String} pServiceHash - The hash of the service
5716
- */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderDigits);_this105=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.options;/** @type {any} */_this105.log;_this105.addPattern('{~Digits:','~}');return _this105;}_inherits(PictTemplateProviderDigits,_libPictTemplate20);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],222:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate21){/**
5957
+ */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderDigits);_this106=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.options;/** @type {any} */_this106.log;_this106.addPattern('{~Digits:','~}');return _this106;}/**
5958
+ * Render a template expression, returning a string with the resulting content.
5959
+ *
5960
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5961
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5962
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5963
+ *
5964
+ * @return {string} The rendered template
5965
+ */_inherits(PictTemplateProviderDigits,_libPictTemplate21);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate22){/**
5717
5966
  * @param {Object} pFable - The Fable Framework instance
5718
5967
  * @param {Object} pOptions - The options for the service
5719
5968
  * @param {String} pServiceHash - The hash of the service
5720
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this106;_classCallCheck2(this,PictTemplateProviderDollars);_this106=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this106.options;/** @type {any} */_this106.log;_this106.addPattern('{~Dollars:','~}');return _this106;}_inherits(PictTemplateProviderDollars,_libPictTemplate21);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],223:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate22){/**
5969
+ */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderDollars);_this107=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.options;/** @type {any} */_this107.log;_this107.addPattern('{~Dollars:','~}');return _this107;}/**
5970
+ * Render a template expression, returning a string with the resulting content.
5971
+ *
5972
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5973
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5974
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5975
+ *
5976
+ * @return {string} The rendered template
5977
+ */_inherits(PictTemplateProviderDollars,_libPictTemplate22);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandEnd=/*#__PURE__*/function(_libPictTemplate23){/**
5721
5978
  * @param {Object} pFable - The Fable Framework instance
5722
5979
  * @param {Object} pOptions - The options for the service
5723
5980
  * @param {String} pServiceHash - The hash of the service
5724
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this107;_classCallCheck2(this,PictTemplateProviderData);_this107=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this107.log;_this107.addPattern('{~HtmlCommentEnd:','~}');_this107.addPattern('{~HCE:','~}');return _this107;}_inherits(PictTemplateProviderData,_libPictTemplate22);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],224:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate23){/**
5981
+ */function PictTemplateProviderHTMLCommandEnd(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderHTMLCommandEnd);_this108=_callSuper(this,PictTemplateProviderHTMLCommandEnd,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~HtmlCommentEnd:','~}');_this108.addPattern('{~HCE:','~}');return _this108;}/**
5982
+ * Render a template expression, returning a string with the resulting content.
5983
+ *
5984
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5985
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5986
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5987
+ *
5988
+ * @return {string} The rendered template
5989
+ */_inherits(PictTemplateProviderHTMLCommandEnd,_libPictTemplate23);return _createClass2(PictTemplateProviderHTMLCommandEnd,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return' -->';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderHTMLCommandStart=/*#__PURE__*/function(_libPictTemplate24){/**
5725
5990
  * @param {Object} pFable - The Fable Framework instance
5726
5991
  * @param {Object} pOptions - The options for the service
5727
5992
  * @param {String} pServiceHash - The hash of the service
5728
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this108;_classCallCheck2(this,PictTemplateProviderData);_this108=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this108.log;_this108.addPattern('{~HtmlCommentStart:','~}');_this108.addPattern('{~HCS:','~}');return _this108;}_inherits(PictTemplateProviderData,_libPictTemplate23);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":143}],225:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate24){/**
5993
+ */function PictTemplateProviderHTMLCommandStart(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderHTMLCommandStart);_this109=_callSuper(this,PictTemplateProviderHTMLCommandStart,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.log;_this109.addPattern('{~HtmlCommentStart:','~}');_this109.addPattern('{~HCS:','~}');return _this109;}/**
5994
+ * Render a template expression, returning a string with the resulting content.
5995
+ *
5996
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
5997
+ * @param {any} pRecord - The json object to be used as the Record for the template render
5998
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
5999
+ *
6000
+ * @return {string} The rendered template
6001
+ */_inherits(PictTemplateProviderHTMLCommandStart,_libPictTemplate24);return _createClass2(PictTemplateProviderHTMLCommandStart,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue=false;if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(!tmpValue){return'<!-- ';}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":143}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate25){/**
5729
6002
  * @param {Object} pFable - The Fable Framework instance
5730
6003
  * @param {Object} pOptions - The options for the service
5731
6004
  * @param {String} pServiceHash - The hash of the service
5732
- */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this109;_classCallCheck2(this,PictTemplateProviderJoin);_this109=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this109.options;/** @type {any} */_this109.log;_this109.addPattern('{~Join:','~}');_this109.addPattern('{~J:','~}');return _this109;}_inherits(PictTemplateProviderJoin,_libPictTemplate24);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5733
- var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":143}],226:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate25){/**
6005
+ */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderJoin);_this110=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.options;/** @type {any} */_this110.log;_this110.addPattern('{~Join:','~}');_this110.addPattern('{~J:','~}');return _this110;}/**
6006
+ * Render a template expression, returning a string with the resulting content.
6007
+ *
6008
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6009
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6010
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6011
+ *
6012
+ * @return {string} The rendered template
6013
+ */_inherits(PictTemplateProviderJoin,_libPictTemplate25);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
6014
+ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":143}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate26){/**
5734
6015
  * @param {Object} pFable - The Fable Framework instance
5735
6016
  * @param {Object} pOptions - The options for the service
5736
6017
  * @param {String} pServiceHash - The hash of the service
5737
- */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this110;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this110=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this110.options;/** @type {any} */_this110.log;_this110.addPattern('{~JoinUnique:','~}');_this110.addPattern('{~JU:','~}');return _this110;}_inherits(PictTemplateProviderJoinUnique,_libPictTemplate25);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5738
- var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":143}],227:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate26){/**
6018
+ */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this111=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.options;/** @type {any} */_this111.log;_this111.addPattern('{~JoinUnique:','~}');_this111.addPattern('{~JU:','~}');return _this111;}/**
6019
+ * Render a template expression, returning a string with the resulting content.
6020
+ *
6021
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6022
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6023
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6024
+ *
6025
+ * @return {string} The rendered template
6026
+ */_inherits(PictTemplateProviderJoinUnique,_libPictTemplate26);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
6027
+ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate27){/**
5739
6028
  * @param {Object} pFable - The Fable Framework instance
5740
6029
  * @param {Object} pOptions - The options for the service
5741
6030
  * @param {String} pServiceHash - The hash of the service
5742
- */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this111;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this111=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this111.options;/** @type {any} */_this111.log;_this111.addPattern('{~PascalCaseIdentifier:','~}');return _this111;}_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate26);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
6031
+ */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this112=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.options;/** @type {any} */_this112.log;_this112.addPattern('{~PascalCaseIdentifier:','~}');return _this112;}/**
6032
+ * Render a template expression, returning a string with the resulting content.
6033
+ *
6034
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6035
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6036
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6037
+ *
6038
+ * @return {string} The rendered template
6039
+ */_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate27);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
5743
6040
  # DEAR DEAD CODE DIARY:
5744
6041
 
5745
6042
  ```javascript
5746
6043
 
5747
6044
  ```
5748
- */},{"pict-template":143}],228:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate27){/**
6045
+ */},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPluckJoinUnique=/*#__PURE__*/function(_libPictTemplate28){/**
5749
6046
  * @param {Object} pFable - The Fable Framework instance
5750
6047
  * @param {Object} pOptions - The options for the service
5751
6048
  * @param {String} pServiceHash - The hash of the service
5752
- */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this112;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this112=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this112.options;/** @type {any} */_this112.log;_this112.addPattern('{~PluckJoinUnique:','~}');_this112.addPattern('{~PJU:','~}');return _this112;}_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate27);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
6049
+ */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this113=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.options;/** @type {any} */_this113.log;_this113.addPattern('{~PluckJoinUnique:','~}');_this113.addPattern('{~PJU:','~}');return _this113;}/**
6050
+ * Render a template expression, returning a string with the resulting content.
6051
+ *
6052
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6053
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6054
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6055
+ *
6056
+ * @return {string} The rendered template
6057
+ */_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate28);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
5753
6058
  var tmpSeparator=tmpDataAddresses.shift();var tmpAddress=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
5754
- for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":143}],229:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate28){/**
6059
+ for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate29){/**
5755
6060
  * @param {Object} pFable - The Fable Framework instance
5756
6061
  * @param {Object} pOptions - The options for the service
5757
6062
  * @param {String} pServiceHash - The hash of the service
5758
- */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this113;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this113=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this113.log;_this113.addPattern('{~Breakpoint','~}');return _this113;}_inherits(PictTemplateProviderBreakpoint,_libPictTemplate28);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
6063
+ */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this114=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.log;_this114.addPattern('{~Breakpoint','~}');return _this114;}/**
6064
+ * Render a template expression, returning a string with the resulting content.
6065
+ *
6066
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6067
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6068
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6069
+ *
6070
+ * @return {string} The rendered template
6071
+ */_inherits(PictTemplateProviderBreakpoint,_libPictTemplate29);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
5759
6072
  debugger;// eslint-disable-line no-debugger
5760
- return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],230:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate29){/**
6073
+ return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate30){/**
5761
6074
  * @param {Object} pFable - The Fable Framework instance
5762
6075
  * @param {Object} pOptions - The options for the service
5763
6076
  * @param {String} pServiceHash - The hash of the service
5764
- */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this114;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this114=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this114.log;_this114.addPattern('{~DataTree:','~}');_this114.addPattern('{~DT:','~}');return _this114;}_inherits(PictTemplateProviderDataValueTree,_libPictTemplate29);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
6077
+ */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this115=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.log;_this115.addPattern('{~DataTree:','~}');_this115.addPattern('{~DT:','~}');return _this115;}/**
6078
+ * Render a template expression, returning a string with the resulting content.
6079
+ *
6080
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6081
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6082
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6083
+ *
6084
+ * @return {string} The rendered template
6085
+ */_inherits(PictTemplateProviderDataValueTree,_libPictTemplate30);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
5765
6086
  tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectValueTree~}</div>";}if(tmpData.ResolvedValueType=='object'){tmpData.ObjectValueTree=this.dataValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ResolvedValue,0,tmpData.TreeMaxDepth,pContextArray);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);tmpData.ObjectValueTree=tmpData.ResolveValue;}return this.pict.parseTemplate(tmpPictObjectWrapTemplate,tmpData,null,pContextArray);}},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);var tmpPictObjectBranchTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Branch');if(!tmpPictObjectBranchTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Branch
5766
- tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],231:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate30){/**
6087
+ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":143}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate31){/**
5767
6088
  * @param {Object} pFable - The Fable Framework instance
5768
6089
  * @param {Object} pOptions - The options for the service
5769
6090
  * @param {String} pServiceHash - The hash of the service
5770
- */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this115;_classCallCheck2(this,PictTemplateProviderLogStatement);_this115=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this115.log;_this115.addPattern('{~LogStatement:','~}');_this115.addPattern('{~LS:','~}');return _this115;}_inherits(PictTemplateProviderLogStatement,_libPictTemplate30);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],232:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate31){/**
6091
+ */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderLogStatement);_this116=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.log;_this116.addPattern('{~LogStatement:','~}');_this116.addPattern('{~LS:','~}');return _this116;}/**
6092
+ * Render a template expression, returning a string with the resulting content.
6093
+ *
6094
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6095
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6096
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6097
+ *
6098
+ * @return {string} The rendered template
6099
+ */_inherits(PictTemplateProviderLogStatement,_libPictTemplate31);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":143}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate32){/**
5771
6100
  * @param {Object} pFable - The Fable Framework instance
5772
6101
  * @param {Object} pOptions - The options for the service
5773
6102
  * @param {String} pServiceHash - The hash of the service
5774
- */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this116;_classCallCheck2(this,PictTemplateProviderLogValue);_this116=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this116.log;_this116.addPattern('{~LogValue:','~}');_this116.addPattern('{~LV:','~}');return _this116;}_inherits(PictTemplateProviderLogValue,_libPictTemplate31);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":143}],233:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate32){/**
6103
+ */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderLogValue);_this117=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this117.log;_this117.addPattern('{~LogValue:','~}');_this117.addPattern('{~LV:','~}');return _this117;}/**
6104
+ * Render a template expression, returning a string with the resulting content.
6105
+ *
6106
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6107
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6108
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6109
+ *
6110
+ * @return {string} The rendered template
6111
+ */_inherits(PictTemplateProviderLogValue,_libPictTemplate32);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate33){/**
5775
6112
  * @param {Object} pFable - The Fable Framework instance
5776
6113
  * @param {Object} pOptions - The options for the service
5777
6114
  * @param {String} pServiceHash - The hash of the service
5778
- */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this117;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this117=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this117,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this117.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this117.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this117.log;_this117.addPattern('{~LogValueTree:','~}');_this117.addPattern('{~LVT:','~}');return _this117;}_inherits(PictTemplateProviderLogValueTree,_libPictTemplate32);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":143}],234:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate33){/**
6115
+ */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this118=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this118,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this118.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this118.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this118.log;_this118.addPattern('{~LogValueTree:','~}');_this118.addPattern('{~LVT:','~}');return _this118;}/**
6116
+ * Render a template expression, returning a string with the resulting content.
6117
+ *
6118
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6119
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6120
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6121
+ *
6122
+ * @return {string} The rendered template
6123
+ */_inherits(PictTemplateProviderLogValueTree,_libPictTemplate33);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate34){/**
5779
6124
  * @param {Object} pFable - The Fable Framework instance
5780
6125
  * @param {Object} pOptions - The options for the service
5781
6126
  * @param {String} pServiceHash - The hash of the service
5782
- */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this118;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this118=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this118.log;_this118.addPattern('{~NotEmpty:','~}');_this118.addPattern('{~NE:','~}');return _this118;}_inherits(PictTemplateProviderNotEmpty,_libPictTemplate33);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
5783
- if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}else{return'';}}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],235:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate34){/**
6127
+ */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this119=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.log;_this119.addPattern('{~NotEmpty:','~}');_this119.addPattern('{~NE:','~}');return _this119;}/**
6128
+ * Render a template expression, returning a string with the resulting content.
6129
+ *
6130
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6131
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6132
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6133
+ *
6134
+ * @return {string} The rendered template
6135
+ */_inherits(PictTemplateProviderNotEmpty,_libPictTemplate34);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
6136
+ if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate35){/**
5784
6137
  * @param {Object} pFable - The Fable Framework instance
5785
6138
  * @param {Object} pOptions - The options for the service
5786
6139
  * @param {String} pServiceHash - The hash of the service
5787
- */function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate34);return _createClass2(PictTemplateProviderTemplateIfBase,[{key:"compareValues",value:function compareValues(pValueLeft,pOperator,pValueRight){switch(pOperator){case'TRUE':return pValueLeft===true;case'FALSE':return pValueLeft===false;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length>pValueRight;case'object':return pValueLeft.length>pValueRight;default:return false;}case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length<pValueRight;case'object':return pValueLeft.length<pValueRight;default:return false;}case'!=':return pValueLeft!=pValueRight;case'<':return pValueLeft<pValueRight;case'>':return pValueLeft>pValueRight;case'<=':return pValueLeft<=pValueRight;case'>=':return pValueLeft>=pValueRight;case'===':return pValueLeft===pValueRight;case'==':return pValueLeft==pValueRight;default:return false;}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateIfBase;},{"pict-template":143}],236:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
6140
+ */function PictTemplateProviderTemplateIfBase(pFable,pOptions,pServiceHash){_classCallCheck2(this,PictTemplateProviderTemplateIfBase);return _callSuper(this,PictTemplateProviderTemplateIfBase,[pFable,pOptions,pServiceHash]);}_inherits(PictTemplateProviderTemplateIfBase,_libPictTemplate35);return _createClass2(PictTemplateProviderTemplateIfBase,[{key:"compareValues",value:function compareValues(pValueLeft,pOperator,pValueRight){switch(pOperator){case'TRUE':return pValueLeft===true;case'FALSE':return pValueLeft===false;case'LNGT':case'LENGTH_GREATER_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length>pValueRight;case'object':return pValueLeft.length>pValueRight;default:return false;}case'LNLT':case'LENGTH_LESS_THAN':switch(_typeof(pValueLeft)){case'string':return pValueLeft.length<pValueRight;case'object':return pValueLeft.length<pValueRight;default:return false;}case'!=':return pValueLeft!=pValueRight;case'<':return pValueLeft<pValueRight;case'>':return pValueLeft>pValueRight;case'<=':return pValueLeft<=pValueRight;case'>=':return pValueLeft>=pValueRight;case'===':return pValueLeft===pValueRight;case'==':return pValueLeft==pValueRight;default:return false;}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateIfBase;},{"pict-template":143}],237:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIf=/*#__PURE__*/function(_libPictTemplateIf){/**
5788
6141
  * @param {Object} pFable - The Fable Framework instance
5789
6142
  * @param {Object} pOptions - The options for the service
5790
6143
  * @param {String} pServiceHash - The hash of the service
5791
- */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this119;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this119=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this119.log;_this119.addPattern('{~TemplateIf:','~}');_this119.addPattern('{~TIf:','~}');return _this119;}_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5792
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
5793
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
5794
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
5795
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return'';}else{if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5796
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5797
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
5798
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
5799
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
6144
+ */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this120=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~TemplateIf:','~}');_this120.addPattern('{~TIf:','~}');return _this120;}/**
6145
+ * Render a template expression, returning a string with the resulting content.
6146
+ *
6147
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6148
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6149
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6150
+ *
6151
+ * @return {string} The rendered template
6152
+ */_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return'';}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6153
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}// No comparison operation
6154
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return'';}// Now try to break the comparison into three parts...
6155
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return'';}// Now look up the data at the comparison location
6156
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6157
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6158
+ * Render a template expression, deliver a string with the resulting content to a callback function.
6159
+ *
6160
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6161
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6162
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6163
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6164
+ *
6165
+ * @return {void}
6166
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(null,'');}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6167
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
6168
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now try to break the comparison into three parts...
6169
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now look up the data at the comparison location
5800
6170
  try{// This is the only thing that's different from the absolute value function above. Collapse these.
5801
- var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIf;},{"./Pict-Template-TemplateIf-Base.js":235}],237:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
6171
+ var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIf;},{"./Pict-Template-TemplateIf-Base.js":236}],238:[function(require,module,exports){var libPictTemplateIf=require('./Pict-Template-TemplateIf-Base.js');var PictTemplateProviderTemplateIfAbsolute=/*#__PURE__*/function(_libPictTemplateIf2){/**
5802
6172
  * @param {Object} pFable - The Fable Framework instance
5803
6173
  * @param {Object} pOptions - The options for the service
5804
6174
  * @param {String} pServiceHash - The hash of the service
5805
- */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this120;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this120=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this120.log;_this120.addPattern('{~TemplateIfAbsolute:','~}');_this120.addPattern('{~TIfAbs:','~}');return _this120;}_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5806
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
5807
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
5808
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
5809
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}else{if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5810
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5811
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
5812
- if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
5813
- var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
5814
- try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}else{if(!tmpAddressOfData){return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIfAbsolute;},{"./Pict-Template-TemplateIf-Base.js":235}]},{},[199])(199);});
6175
+ */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this121;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this121=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this121.log;_this121.addPattern('{~TemplateIfAbsolute:','~}');_this121.addPattern('{~TIfAbs:','~}');return _this121;}/**
6176
+ * Render a template expression, returning a string with the resulting content.
6177
+ *
6178
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6179
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6180
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6181
+ *
6182
+ * @return {string} The rendered template
6183
+ */_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return'';}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6184
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return'';}// No comparison operation
6185
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return'';}// Now try to break the comparison into three parts...
6186
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return'';}// Now look up the data at the comparison location
6187
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
6188
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return'';}}/**
6189
+ * Render a template expression, deliver a string with the resulting content to a callback function.
6190
+ *
6191
+ * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
6192
+ * @param {any} pRecord - The json object to be used as the Record for the template render
6193
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
6194
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
6195
+ *
6196
+ * @return {void}
6197
+ */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(null,'');}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
6198
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// No comparison operation
6199
+ if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now try to break the comparison into three parts...
6200
+ var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(null,'');}// Now look up the data at the comparison location
6201
+ try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return tmpCallback(null,'');}if(!tmpAddressOfData){this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}}}]);}(libPictTemplateIf);module.exports=PictTemplateProviderTemplateIfAbsolute;},{"./Pict-Template-TemplateIf-Base.js":236}]},{},[199])(199);});
5815
6202
  //# sourceMappingURL=pict.compatible.js.map