retold 4.0.1 → 4.0.2

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 (75) hide show
  1. package/.claude/settings.local.json +27 -1
  2. package/docs/README.md +7 -6
  3. package/docs/_sidebar.md +34 -21
  4. package/docs/_topbar.md +2 -2
  5. package/docs/architecture/module-architecture.md +234 -0
  6. package/docs/{modules.md → architecture/modules.md} +25 -22
  7. package/docs/cover.md +2 -2
  8. package/docs/css/docuserve.css +6 -6
  9. package/docs/examples/examples.md +71 -0
  10. package/docs/examples/todolist/todo-list-cli-client.md +178 -0
  11. package/docs/examples/todolist/todo-list-console-client.md +152 -0
  12. package/docs/examples/todolist/todo-list-model.md +114 -0
  13. package/docs/examples/todolist/todo-list-server.md +128 -0
  14. package/docs/examples/todolist/todo-list-web-client.md +177 -0
  15. package/docs/examples/todolist/todo-list.md +162 -0
  16. package/docs/getting-started.md +8 -7
  17. package/docs/index.html +4 -4
  18. package/docs/{meadow.md → modules/meadow.md} +4 -6
  19. package/docs/{orator.md → modules/orator.md} +1 -0
  20. package/docs/{pict.md → modules/pict.md} +30 -8
  21. package/docs/{utility.md → modules/utility.md} +0 -9
  22. package/docs/retold-catalog.json +896 -2317
  23. package/docs/retold-keyword-index.json +162327 -120227
  24. package/examples/todo-list/Dockerfile +45 -0
  25. package/examples/todo-list/README.md +394 -0
  26. package/examples/todo-list/cli-client/package-lock.json +418 -0
  27. package/examples/todo-list/cli-client/package.json +19 -0
  28. package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
  29. package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
  30. package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
  31. package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
  32. package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
  33. package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
  34. package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
  35. package/examples/todo-list/console-client/console-client.cjs +913 -0
  36. package/examples/todo-list/console-client/package-lock.json +426 -0
  37. package/examples/todo-list/console-client/package.json +19 -0
  38. package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
  39. package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
  40. package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
  41. package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
  42. package/examples/todo-list/docker-motd.sh +36 -0
  43. package/examples/todo-list/docker-run.sh +2 -0
  44. package/examples/todo-list/docker-shell.sh +2 -0
  45. package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
  46. package/examples/todo-list/model/Task-Compiled.json +25 -0
  47. package/examples/todo-list/model/Task.mddl +15 -0
  48. package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
  49. package/examples/todo-list/server/database-initialization-service.cjs +273 -0
  50. package/examples/todo-list/server/package-lock.json +6113 -0
  51. package/examples/todo-list/server/package.json +19 -0
  52. package/examples/todo-list/server/server.cjs +138 -0
  53. package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
  54. package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
  55. package/examples/todo-list/web-client/html/index.html +18 -0
  56. package/examples/todo-list/web-client/package-lock.json +12030 -0
  57. package/examples/todo-list/web-client/package.json +43 -0
  58. package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
  59. package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
  60. package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
  61. package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
  62. package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
  63. package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
  64. package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
  65. package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
  66. package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
  67. package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
  68. package/modules/Include-Retold-Module-List.sh +2 -2
  69. package/package.json +5 -5
  70. package/docs/js/pict.min.js +0 -12
  71. package/docs/js/pict.min.js.map +0 -1
  72. package/docs/pict-docuserve.min.js +0 -58
  73. package/docs/pict-docuserve.min.js.map +0 -1
  74. /package/docs/{architecture.md → architecture/architecture.md} +0 -0
  75. /package/docs/{fable.md → modules/fable.md} +0 -0
@@ -1,58 +0,0 @@
1
- "use strict";function _defineProperty(t,e,i){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:e+""}function _toPrimitive(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PictDocuserve=t()}}(function(){return function t(e,i,n){function o(r,a){if(!i[r]){if(!e[r]){var c="function"==typeof require&&require;if(!a&&c)return c(r,!0);if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[r]={exports:{}};e[r][0].call(h.exports,function(t){return o(e[r][1][t]||t)},h,h.exports,t,e,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){e.exports={name:"fable-serviceproviderbase",version:"3.0.15",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.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"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{fable:"^3.0.143",quackage:"^1.0.33"}}},{}],2:[function(t,e,i){const n=t("../package.json");class o{constructor(t,e,i){"object"==typeof t&&t.isFable?this.connectFable(t):this.fable=!1,this._PackageFableServiceProvider=n,this.fable?(this.UUID=t.getUUID(),this.options="object"==typeof e?e:{}):(this.options="object"!=typeof t||t.isFable?"object"==typeof e?e:{}:t,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof i?i:this.fable||"string"!=typeof e?"".concat(this.UUID):e}connectFable(t){if("object"!=typeof t||!t.isFable){let e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(typeof t,"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}_defineProperty(o,"isFableService",!0),e.exports=o,e.exports.CoreServiceProviderBase=o},{"../package.json":1}],3:[function(t,e,i){!function(){var t,n,o,s,r,a,c,l,h,d,p,u,f,g,m,v,b,y,w,D,A,I,T,P,S,x,C,V,L,U,R,k=function(t){var e=new k.Builder;return e.pipeline.add(k.trimmer,k.stopWordFilter,k.stemmer),e.searchPipeline.add(k.stemmer),t.call(e,e),e.build()};k.version="2.3.9",
2
- /*!
3
- * lunr.utils
4
- * Copyright (C) 2020 Oliver Nightingale
5
- */
6
- k.utils={},k.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),k.utils.asString=function(t){return null==t?"":t.toString()},k.utils.clone=function(t){if(null==t)return t;for(var e=Object.create(null),i=Object.keys(t),n=0;n<i.length;n++){var o=i[n],s=t[o];if(Array.isArray(s))e[o]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");e[o]=s}}return e},k.FieldRef=function(t,e,i){this.docRef=t,this.fieldName=e,this._stringValue=i},k.FieldRef.joiner="/",k.FieldRef.fromString=function(t){var e=t.indexOf(k.FieldRef.joiner);if(-1===e)throw"malformed field ref string";var i=t.slice(0,e),n=t.slice(e+1);return new k.FieldRef(n,i,t)},k.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+k.FieldRef.joiner+this.docRef),this._stringValue},
7
- /*!
8
- * lunr.Set
9
- * Copyright (C) 2020 Oliver Nightingale
10
- */
11
- k.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var e=0;e<this.length;e++)this.elements[t[e]]=!0}else this.length=0},k.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},k.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},k.Set.prototype.contains=function(t){return!!this.elements[t]},k.Set.prototype.intersect=function(t){var e,i,n,o=[];if(t===k.Set.complete)return this;if(t===k.Set.empty)return t;this.length<t.length?(e=this,i=t):(e=t,i=this),n=Object.keys(e.elements);for(var s=0;s<n.length;s++){var r=n[s];r in i.elements&&o.push(r)}return new k.Set(o)},k.Set.prototype.union=function(t){return t===k.Set.complete?k.Set.complete:t===k.Set.empty?this:new k.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},k.idf=function(t,e){var i=0;for(var n in t)"_index"!=n&&(i+=Object.keys(t[n]).length);var o=(e-i+.5)/(i+.5);return Math.log(1+Math.abs(o))},k.Token=function(t,e){this.str=t||"",this.metadata=e||{}},k.Token.prototype.toString=function(){return this.str},k.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},k.Token.prototype.clone=function(t){return t=t||function(t){return t},new k.Token(t(this.str,this.metadata),this.metadata)},
12
- /*!
13
- * lunr.tokenizer
14
- * Copyright (C) 2020 Oliver Nightingale
15
- */
16
- k.tokenizer=function(t,e){if(null==t||null==t)return[];if(Array.isArray(t))return t.map(function(t){return new k.Token(k.utils.asString(t).toLowerCase(),k.utils.clone(e))});for(var i=t.toString().toLowerCase(),n=i.length,o=[],s=0,r=0;s<=n;s++){var a=s-r;if(i.charAt(s).match(k.tokenizer.separator)||s==n){if(a>0){var c=k.utils.clone(e)||{};c.position=[r,a],c.index=o.length,o.push(new k.Token(i.slice(r,s),c))}r=s+1}}return o},k.tokenizer.separator=/[\s\-]+/,
17
- /*!
18
- * lunr.Pipeline
19
- * Copyright (C) 2020 Oliver Nightingale
20
- */
21
- k.Pipeline=function(){this._stack=[]},k.Pipeline.registeredFunctions=Object.create(null),k.Pipeline.registerFunction=function(t,e){e in this.registeredFunctions&&k.utils.warn("Overwriting existing registered function: "+e),t.label=e,k.Pipeline.registeredFunctions[t.label]=t},k.Pipeline.warnIfFunctionNotRegistered=function(t){t.label&&t.label in this.registeredFunctions||k.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},k.Pipeline.load=function(t){var e=new k.Pipeline;return t.forEach(function(t){var i=k.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);e.add(i)}),e},k.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(t){k.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},k.Pipeline.prototype.after=function(t,e){k.Pipeline.warnIfFunctionNotRegistered(e);var i=this._stack.indexOf(t);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,e)},k.Pipeline.prototype.before=function(t,e){k.Pipeline.warnIfFunctionNotRegistered(e);var i=this._stack.indexOf(t);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,e)},k.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},k.Pipeline.prototype.run=function(t){for(var e=this._stack.length,i=0;i<e;i++){for(var n=this._stack[i],o=[],s=0;s<t.length;s++){var r=n(t[s],s,t);if(null!=r&&""!==r)if(Array.isArray(r))for(var a=0;a<r.length;a++)o.push(r[a]);else o.push(r)}t=o}return t},k.Pipeline.prototype.runString=function(t,e){var i=new k.Token(t,e);return this.run([i]).map(function(t){return t.toString()})},k.Pipeline.prototype.reset=function(){this._stack=[]},k.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return k.Pipeline.warnIfFunctionNotRegistered(t),t.label})},
22
- /*!
23
- * lunr.Vector
24
- * Copyright (C) 2020 Oliver Nightingale
25
- */
26
- k.Vector=function(t){this._magnitude=0,this.elements=t||[]},k.Vector.prototype.positionForIndex=function(t){if(0==this.elements.length)return 0;for(var e=0,i=this.elements.length/2,n=i-e,o=Math.floor(n/2),s=this.elements[2*o];n>1&&(s<t&&(e=o),s>t&&(i=o),s!=t);)n=i-e,o=e+Math.floor(n/2),s=this.elements[2*o];return s==t||s>t?2*o:s<t?2*(o+1):void 0},k.Vector.prototype.insert=function(t,e){this.upsert(t,e,function(){throw"duplicate index"})},k.Vector.prototype.upsert=function(t,e,i){this._magnitude=0;var n=this.positionForIndex(t);this.elements[n]==t?this.elements[n+1]=i(this.elements[n+1],e):this.elements.splice(n,0,t,e)},k.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t=0,e=this.elements.length,i=1;i<e;i+=2){var n=this.elements[i];t+=n*n}return this._magnitude=Math.sqrt(t)},k.Vector.prototype.dot=function(t){for(var e=0,i=this.elements,n=t.elements,o=i.length,s=n.length,r=0,a=0,c=0,l=0;c<o&&l<s;)(r=i[c])<(a=n[l])?c+=2:r>a?l+=2:r==a&&(e+=i[c+1]*n[l+1],c+=2,l+=2);return e},k.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},k.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),e=1,i=0;e<this.elements.length;e+=2,i++)t[i]=this.elements[e];return t},k.Vector.prototype.toJSON=function(){return this.elements},
27
- /*!
28
- * lunr.stemmer
29
- * Copyright (C) 2020 Oliver Nightingale
30
- * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
31
- */
32
- k.stemmer=(t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},a="^("+(s="[^aeiou][^aeiouy]*")+")?"+(r=(o="[aeiouy]")+"[aeiou]*")+s+"("+r+")?$",c="^("+s+")?"+r+s+r+s,l="^("+s+")?"+o,h=new RegExp("^("+s+")?"+r+s),d=new RegExp(c),p=new RegExp(a),u=new RegExp(l),f=/^(.+?)(ss|i)es$/,g=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,b=/.$/,y=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),D=new RegExp("^"+s+o+"[^aeiouwxy]$"),A=/^(.+?[^aeiou])y$/,I=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,T=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,P=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,S=/^(.+?)(s|t)(ion)$/,x=/^(.+?)e$/,C=/ll$/,V=new RegExp("^"+s+o+"[^aeiouwxy]$"),L=function(e){var i,o,s,r,a,c,l;if(e.length<3)return e;if("y"==(s=e.substr(0,1))&&(e=s.toUpperCase()+e.substr(1)),a=g,(r=f).test(e)?e=e.replace(r,"$1$2"):a.test(e)&&(e=e.replace(a,"$1$2")),a=v,(r=m).test(e)){var L=r.exec(e);(r=h).test(L[1])&&(r=b,e=e.replace(r,""))}else a.test(e)&&(i=(L=a.exec(e))[1],(a=u).test(i)&&(c=w,l=D,(a=y).test(e=i)?e+="e":c.test(e)?(r=b,e=e.replace(r,"")):l.test(e)&&(e+="e")));return(r=A).test(e)&&(e=(i=(L=r.exec(e))[1])+"i"),(r=I).test(e)&&(i=(L=r.exec(e))[1],o=L[2],(r=h).test(i)&&(e=i+t[o])),(r=T).test(e)&&(i=(L=r.exec(e))[1],o=L[2],(r=h).test(i)&&(e=i+n[o])),a=S,(r=P).test(e)?(i=(L=r.exec(e))[1],(r=d).test(i)&&(e=i)):a.test(e)&&(i=(L=a.exec(e))[1]+L[2],(a=d).test(i)&&(e=i)),(r=x).test(e)&&(i=(L=r.exec(e))[1],a=p,c=V,((r=d).test(i)||a.test(i)&&!c.test(i))&&(e=i)),a=d,(r=C).test(e)&&a.test(e)&&(r=b,e=e.replace(r,"")),"y"==s&&(e=s.toLowerCase()+e.substr(1)),e},function(t){return t.update(L)}),k.Pipeline.registerFunction(k.stemmer,"stemmer"),
33
- /*!
34
- * lunr.stopWordFilter
35
- * Copyright (C) 2020 Oliver Nightingale
36
- */
37
- k.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){if(t&&e[t.toString()]!==t.toString())return t}},k.stopWordFilter=k.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),k.Pipeline.registerFunction(k.stopWordFilter,"stopWordFilter"),
38
- /*!
39
- * lunr.trimmer
40
- * Copyright (C) 2020 Oliver Nightingale
41
- */
42
- k.trimmer=function(t){return t.update(function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")})},k.Pipeline.registerFunction(k.trimmer,"trimmer"),
43
- /*!
44
- * lunr.TokenSet
45
- * Copyright (C) 2020 Oliver Nightingale
46
- */
47
- k.TokenSet=function(){this.final=!1,this.edges={},this.id=k.TokenSet._nextId,k.TokenSet._nextId+=1},k.TokenSet._nextId=1,k.TokenSet.fromArray=function(t){for(var e=new k.TokenSet.Builder,i=0,n=t.length;i<n;i++)e.insert(t[i]);return e.finish(),e.root},k.TokenSet.fromClause=function(t){return"editDistance"in t?k.TokenSet.fromFuzzyString(t.term,t.editDistance):k.TokenSet.fromString(t.term)},k.TokenSet.fromFuzzyString=function(t,e){for(var i=new k.TokenSet,n=[{node:i,editsRemaining:e,str:t}];n.length;){var o=n.pop();if(o.str.length>0){var s,r=o.str.charAt(0);r in o.node.edges?s=o.node.edges[r]:(s=new k.TokenSet,o.node.edges[r]=s),1==o.str.length&&(s.final=!0),n.push({node:s,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(0!=o.editsRemaining){if("*"in o.node.edges)var a=o.node.edges["*"];else{a=new k.TokenSet;o.node.edges["*"]=a}if(0==o.str.length&&(a.final=!0),n.push({node:a,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&n.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),1==o.str.length&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var c=o.node.edges["*"];else{c=new k.TokenSet;o.node.edges["*"]=c}1==o.str.length&&(c.final=!0),n.push({node:c,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var l,h=o.str.charAt(0),d=o.str.charAt(1);d in o.node.edges?l=o.node.edges[d]:(l=new k.TokenSet,o.node.edges[d]=l),1==o.str.length&&(l.final=!0),n.push({node:l,editsRemaining:o.editsRemaining-1,str:h+o.str.slice(2)})}}}return i},k.TokenSet.fromString=function(t){for(var e=new k.TokenSet,i=e,n=0,o=t.length;n<o;n++){var s=t[n],r=n==o-1;if("*"==s)e.edges[s]=e,e.final=r;else{var a=new k.TokenSet;a.final=r,e.edges[s]=a,e=a}}return i},k.TokenSet.prototype.toArray=function(){for(var t=[],e=[{prefix:"",node:this}];e.length;){var i=e.pop(),n=Object.keys(i.node.edges),o=n.length;i.node.final&&(i.prefix.charAt(0),t.push(i.prefix));for(var s=0;s<o;s++){var r=n[s];e.push({prefix:i.prefix.concat(r),node:i.node.edges[r]})}}return t},k.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var t=this.final?"1":"0",e=Object.keys(this.edges).sort(),i=e.length,n=0;n<i;n++){var o=e[n];t=t+o+this.edges[o].id}return t},k.TokenSet.prototype.intersect=function(t){for(var e=new k.TokenSet,i=void 0,n=[{qNode:t,output:e,node:this}];n.length;){i=n.pop();for(var o=Object.keys(i.qNode.edges),s=o.length,r=Object.keys(i.node.edges),a=r.length,c=0;c<s;c++)for(var l=o[c],h=0;h<a;h++){var d=r[h];if(d==l||"*"==l){var p=i.node.edges[d],u=i.qNode.edges[l],f=p.final&&u.final,g=void 0;d in i.output.edges?(g=i.output.edges[d]).final=g.final||f:((g=new k.TokenSet).final=f,i.output.edges[d]=g),n.push({qNode:u,output:g,node:p})}}}return e},k.TokenSet.Builder=function(){this.previousWord="",this.root=new k.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},k.TokenSet.Builder.prototype.insert=function(t){var e,i=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var n=0;n<t.length&&n<this.previousWord.length&&t[n]==this.previousWord[n];n++)i++;this.minimize(i),e=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(n=i;n<t.length;n++){var o=new k.TokenSet,s=t[n];e.edges[s]=o,this.uncheckedNodes.push({parent:e,char:s,child:o}),e=o}e.final=!0,this.previousWord=t},k.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},k.TokenSet.Builder.prototype.minimize=function(t){for(var e=this.uncheckedNodes.length-1;e>=t;e--){var i=this.uncheckedNodes[e],n=i.child.toString();n in this.minimizedNodes?i.parent.edges[i.char]=this.minimizedNodes[n]:(i.child._str=n,this.minimizedNodes[n]=i.child),this.uncheckedNodes.pop()}},
48
- /*!
49
- * lunr.Index
50
- * Copyright (C) 2020 Oliver Nightingale
51
- */
52
- k.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},k.Index.prototype.search=function(t){return this.query(function(e){new k.QueryParser(t,e).parse()})},k.Index.prototype.query=function(t){for(var e=new k.Query(this.fields),i=Object.create(null),n=Object.create(null),o=Object.create(null),s=Object.create(null),r=Object.create(null),a=0;a<this.fields.length;a++)n[this.fields[a]]=new k.Vector;t.call(e,e);for(a=0;a<e.clauses.length;a++){var c=e.clauses[a],l=null,h=k.Set.empty;l=c.usePipeline?this.pipeline.runString(c.term,{fields:c.fields}):[c.term];for(var d=0;d<l.length;d++){var p=l[d];c.term=p;var u=k.TokenSet.fromClause(c),f=this.tokenSet.intersect(u).toArray();if(0===f.length&&c.presence===k.Query.presence.REQUIRED){for(var g=0;g<c.fields.length;g++){s[U=c.fields[g]]=k.Set.empty}break}for(var m=0;m<f.length;m++){var v=f[m],b=this.invertedIndex[v],y=b._index;for(g=0;g<c.fields.length;g++){var w=b[U=c.fields[g]],D=Object.keys(w),A=v+"/"+U,I=new k.Set(D);if(c.presence==k.Query.presence.REQUIRED&&(h=h.union(I),void 0===s[U]&&(s[U]=k.Set.complete)),c.presence!=k.Query.presence.PROHIBITED){if(n[U].upsert(y,c.boost,function(t,e){return t+e}),!o[A]){for(var T=0;T<D.length;T++){var P,S=D[T],x=new k.FieldRef(S,U),C=w[S];void 0===(P=i[x])?i[x]=new k.MatchData(v,U,C):P.add(v,U,C)}o[A]=!0}}else void 0===r[U]&&(r[U]=k.Set.empty),r[U]=r[U].union(I)}}}if(c.presence===k.Query.presence.REQUIRED)for(g=0;g<c.fields.length;g++){s[U=c.fields[g]]=s[U].intersect(h)}}var V=k.Set.complete,L=k.Set.empty;for(a=0;a<this.fields.length;a++){var U;s[U=this.fields[a]]&&(V=V.intersect(s[U])),r[U]&&(L=L.union(r[U]))}var R=Object.keys(i),H=[],N=Object.create(null);if(e.isNegated()){R=Object.keys(this.fieldVectors);for(a=0;a<R.length;a++){x=R[a];var M=k.FieldRef.fromString(x);i[x]=new k.MatchData}}for(a=0;a<R.length;a++){var z=(M=k.FieldRef.fromString(R[a])).docRef;if(V.contains(z)&&!L.contains(z)){var E,B=this.fieldVectors[M],j=n[M.fieldName].similarity(B);if(void 0!==(E=N[z]))E.score+=j,E.matchData.combine(i[M]);else{var O={ref:z,score:j,matchData:i[M]};N[z]=O,H.push(O)}}}return H.sort(function(t,e){return e.score-t.score})},k.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(t){return[t,this.invertedIndex[t]]},this),e=Object.keys(this.fieldVectors).map(function(t){return[t,this.fieldVectors[t].toJSON()]},this);return{version:k.version,fields:this.fields,fieldVectors:e,invertedIndex:t,pipeline:this.pipeline.toJSON()}},k.Index.load=function(t){var e={},i={},n=t.fieldVectors,o=Object.create(null),s=t.invertedIndex,r=new k.TokenSet.Builder,a=k.Pipeline.load(t.pipeline);t.version!=k.version&&k.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+k.version+"' does not match serialized index '"+t.version+"'");for(var c=0;c<n.length;c++){var l=(d=n[c])[0],h=d[1];i[l]=new k.Vector(h)}for(c=0;c<s.length;c++){var d,p=(d=s[c])[0],u=d[1];r.insert(p),o[p]=u}return r.finish(),e.fields=t.fields,e.fieldVectors=i,e.invertedIndex=o,e.tokenSet=r.root,e.pipeline=a,new k.Index(e)},
53
- /*!
54
- * lunr.Builder
55
- * Copyright (C) 2020 Oliver Nightingale
56
- */
57
- k.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=k.tokenizer,this.pipeline=new k.Pipeline,this.searchPipeline=new k.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},k.Builder.prototype.ref=function(t){this._ref=t},k.Builder.prototype.field=function(t,e){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=e||{}},k.Builder.prototype.b=function(t){this._b=t<0?0:t>1?1:t},k.Builder.prototype.k1=function(t){this._k1=t},k.Builder.prototype.add=function(t,e){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=e||{},this.documentCount+=1;for(var o=0;o<n.length;o++){var s=n[o],r=this._fields[s].extractor,a=r?r(t):t[s],c=this.tokenizer(a,{fields:[s]}),l=this.pipeline.run(c),h=new k.FieldRef(i,s),d=Object.create(null);this.fieldTermFrequencies[h]=d,this.fieldLengths[h]=0,this.fieldLengths[h]+=l.length;for(var p=0;p<l.length;p++){var u=l[p];if(null==d[u]&&(d[u]=0),d[u]+=1,null==this.invertedIndex[u]){var f=Object.create(null);f._index=this.termIndex,this.termIndex+=1;for(var g=0;g<n.length;g++)f[n[g]]=Object.create(null);this.invertedIndex[u]=f}null==this.invertedIndex[u][s][i]&&(this.invertedIndex[u][s][i]=Object.create(null));for(var m=0;m<this.metadataWhitelist.length;m++){var v=this.metadataWhitelist[m],b=u.metadata[v];null==this.invertedIndex[u][s][i][v]&&(this.invertedIndex[u][s][i][v]=[]),this.invertedIndex[u][s][i][v].push(b)}}}},k.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),e=t.length,i={},n={},o=0;o<e;o++){var s=k.FieldRef.fromString(t[o]),r=s.fieldName;n[r]||(n[r]=0),n[r]+=1,i[r]||(i[r]=0),i[r]+=this.fieldLengths[s]}var a=Object.keys(this._fields);for(o=0;o<a.length;o++){var c=a[o];i[c]=i[c]/n[c]}this.averageFieldLength=i},k.Builder.prototype.createFieldVectors=function(){for(var t={},e=Object.keys(this.fieldTermFrequencies),i=e.length,n=Object.create(null),o=0;o<i;o++){for(var s=k.FieldRef.fromString(e[o]),r=s.fieldName,a=this.fieldLengths[s],c=new k.Vector,l=this.fieldTermFrequencies[s],h=Object.keys(l),d=h.length,p=this._fields[r].boost||1,u=this._documents[s.docRef].boost||1,f=0;f<d;f++){var g,m,v,b=h[f],y=l[b],w=this.invertedIndex[b]._index;void 0===n[b]?(g=k.idf(this.invertedIndex[b],this.documentCount),n[b]=g):g=n[b],m=g*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(a/this.averageFieldLength[r]))+y),m*=p,m*=u,v=Math.round(1e3*m)/1e3,c.insert(w,v)}t[s]=c}this.fieldVectors=t},k.Builder.prototype.createTokenSet=function(){this.tokenSet=k.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},k.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new k.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},k.Builder.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},k.MatchData=function(t,e,i){for(var n=Object.create(null),o=Object.keys(i||{}),s=0;s<o.length;s++){var r=o[s];n[r]=i[r].slice()}this.metadata=Object.create(null),void 0!==t&&(this.metadata[t]=Object.create(null),this.metadata[t][e]=n)},k.MatchData.prototype.combine=function(t){for(var e=Object.keys(t.metadata),i=0;i<e.length;i++){var n=e[i],o=Object.keys(t.metadata[n]);null==this.metadata[n]&&(this.metadata[n]=Object.create(null));for(var s=0;s<o.length;s++){var r=o[s],a=Object.keys(t.metadata[n][r]);null==this.metadata[n][r]&&(this.metadata[n][r]=Object.create(null));for(var c=0;c<a.length;c++){var l=a[c];null==this.metadata[n][r][l]?this.metadata[n][r][l]=t.metadata[n][r][l]:this.metadata[n][r][l]=this.metadata[n][r][l].concat(t.metadata[n][r][l])}}}},k.MatchData.prototype.add=function(t,e,i){if(!(t in this.metadata))return this.metadata[t]=Object.create(null),void(this.metadata[t][e]=i);if(e in this.metadata[t])for(var n=Object.keys(i),o=0;o<n.length;o++){var s=n[o];s in this.metadata[t][e]?this.metadata[t][e][s]=this.metadata[t][e][s].concat(i[s]):this.metadata[t][e][s]=i[s]}else this.metadata[t][e]=i},k.Query=function(t){this.clauses=[],this.allFields=t},k.Query.wildcard=new String("*"),k.Query.wildcard.NONE=0,k.Query.wildcard.LEADING=1,k.Query.wildcard.TRAILING=2,k.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},k.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=k.Query.wildcard.NONE),t.wildcard&k.Query.wildcard.LEADING&&t.term.charAt(0)!=k.Query.wildcard&&(t.term="*"+t.term),t.wildcard&k.Query.wildcard.TRAILING&&t.term.slice(-1)!=k.Query.wildcard&&(t.term=t.term+"*"),"presence"in t||(t.presence=k.Query.presence.OPTIONAL),this.clauses.push(t),this},k.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=k.Query.presence.PROHIBITED)return!1;return!0},k.Query.prototype.term=function(t,e){if(Array.isArray(t))return t.forEach(function(t){this.term(t,k.utils.clone(e))},this),this;var i=e||{};return i.term=t.toString(),this.clause(i),this},k.QueryParseError=function(t,e,i){this.name="QueryParseError",this.message=t,this.start=e,this.end=i},k.QueryParseError.prototype=new Error,k.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},k.QueryLexer.prototype.run=function(){for(var t=k.QueryLexer.lexText;t;)t=t(this)},k.QueryLexer.prototype.sliceString=function(){for(var t=[],e=this.start,i=this.pos,n=0;n<this.escapeCharPositions.length;n++)i=this.escapeCharPositions[n],t.push(this.str.slice(e,i)),e=i+1;return t.push(this.str.slice(e,this.pos)),this.escapeCharPositions.length=0,t.join("")},k.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},k.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},k.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return k.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},k.QueryLexer.prototype.width=function(){return this.pos-this.start},k.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},k.QueryLexer.prototype.backup=function(){this.pos-=1},k.QueryLexer.prototype.acceptDigitRun=function(){var t,e;do{e=(t=this.next()).charCodeAt(0)}while(e>47&&e<58);t!=k.QueryLexer.EOS&&this.backup()},k.QueryLexer.prototype.more=function(){return this.pos<this.length},k.QueryLexer.EOS="EOS",k.QueryLexer.FIELD="FIELD",k.QueryLexer.TERM="TERM",k.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",k.QueryLexer.BOOST="BOOST",k.QueryLexer.PRESENCE="PRESENCE",k.QueryLexer.lexField=function(t){return t.backup(),t.emit(k.QueryLexer.FIELD),t.ignore(),k.QueryLexer.lexText},k.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(k.QueryLexer.TERM)),t.ignore(),t.more())return k.QueryLexer.lexText},k.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(k.QueryLexer.EDIT_DISTANCE),k.QueryLexer.lexText},k.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(k.QueryLexer.BOOST),k.QueryLexer.lexText},k.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(k.QueryLexer.TERM)},k.QueryLexer.termSeparator=k.tokenizer.separator,k.QueryLexer.lexText=function(t){for(;;){var e=t.next();if(e==k.QueryLexer.EOS)return k.QueryLexer.lexEOS;if(92!=e.charCodeAt(0)){if(":"==e)return k.QueryLexer.lexField;if("~"==e)return t.backup(),t.width()>0&&t.emit(k.QueryLexer.TERM),k.QueryLexer.lexEditDistance;if("^"==e)return t.backup(),t.width()>0&&t.emit(k.QueryLexer.TERM),k.QueryLexer.lexBoost;if("+"==e&&1===t.width())return t.emit(k.QueryLexer.PRESENCE),k.QueryLexer.lexText;if("-"==e&&1===t.width())return t.emit(k.QueryLexer.PRESENCE),k.QueryLexer.lexText;if(e.match(k.QueryLexer.termSeparator))return k.QueryLexer.lexTerm}else t.escapeCharacter()}},k.QueryParser=function(t,e){this.lexer=new k.QueryLexer(t),this.query=e,this.currentClause={},this.lexemeIdx=0},k.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=k.QueryParser.parseClause;t;)t=t(this);return this.query},k.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},k.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},k.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},k.QueryParser.parseClause=function(t){var e=t.peekLexeme();if(null!=e)switch(e.type){case k.QueryLexer.PRESENCE:return k.QueryParser.parsePresence;case k.QueryLexer.FIELD:return k.QueryParser.parseField;case k.QueryLexer.TERM:return k.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+e.type;throw e.str.length>=1&&(i+=" with value '"+e.str+"'"),new k.QueryParseError(i,e.start,e.end)}},k.QueryParser.parsePresence=function(t){var e=t.consumeLexeme();if(null!=e){switch(e.str){case"-":t.currentClause.presence=k.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=k.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+e.str+"'";throw new k.QueryParseError(i,e.start,e.end)}var n=t.peekLexeme();if(null==n){i="expecting term or field, found nothing";throw new k.QueryParseError(i,e.start,e.end)}switch(n.type){case k.QueryLexer.FIELD:return k.QueryParser.parseField;case k.QueryLexer.TERM:return k.QueryParser.parseTerm;default:i="expecting term or field, found '"+n.type+"'";throw new k.QueryParseError(i,n.start,n.end)}}},k.QueryParser.parseField=function(t){var e=t.consumeLexeme();if(null!=e){if(-1==t.query.allFields.indexOf(e.str)){var i=t.query.allFields.map(function(t){return"'"+t+"'"}).join(", "),n="unrecognised field '"+e.str+"', possible fields: "+i;throw new k.QueryParseError(n,e.start,e.end)}t.currentClause.fields=[e.str];var o=t.peekLexeme();if(null==o){n="expecting term, found nothing";throw new k.QueryParseError(n,e.start,e.end)}if(o.type===k.QueryLexer.TERM)return k.QueryParser.parseTerm;n="expecting term, found '"+o.type+"'";throw new k.QueryParseError(n,o.start,o.end)}},k.QueryParser.parseTerm=function(t){var e=t.consumeLexeme();if(null!=e){t.currentClause.term=e.str.toLowerCase(),-1!=e.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(null!=i)switch(i.type){case k.QueryLexer.TERM:return t.nextClause(),k.QueryParser.parseTerm;case k.QueryLexer.FIELD:return t.nextClause(),k.QueryParser.parseField;case k.QueryLexer.EDIT_DISTANCE:return k.QueryParser.parseEditDistance;case k.QueryLexer.BOOST:return k.QueryParser.parseBoost;case k.QueryLexer.PRESENCE:return t.nextClause(),k.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new k.QueryParseError(n,i.start,i.end)}else t.nextClause()}},k.QueryParser.parseEditDistance=function(t){var e=t.consumeLexeme();if(null!=e){var i=parseInt(e.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new k.QueryParseError(n,e.start,e.end)}t.currentClause.editDistance=i;var o=t.peekLexeme();if(null!=o)switch(o.type){case k.QueryLexer.TERM:return t.nextClause(),k.QueryParser.parseTerm;case k.QueryLexer.FIELD:return t.nextClause(),k.QueryParser.parseField;case k.QueryLexer.EDIT_DISTANCE:return k.QueryParser.parseEditDistance;case k.QueryLexer.BOOST:return k.QueryParser.parseBoost;case k.QueryLexer.PRESENCE:return t.nextClause(),k.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+o.type+"'";throw new k.QueryParseError(n,o.start,o.end)}else t.nextClause()}},k.QueryParser.parseBoost=function(t){var e=t.consumeLexeme();if(null!=e){var i=parseInt(e.str,10);if(isNaN(i)){var n="boost must be numeric";throw new k.QueryParseError(n,e.start,e.end)}t.currentClause.boost=i;var o=t.peekLexeme();if(null!=o)switch(o.type){case k.QueryLexer.TERM:return t.nextClause(),k.QueryParser.parseTerm;case k.QueryLexer.FIELD:return t.nextClause(),k.QueryParser.parseField;case k.QueryLexer.EDIT_DISTANCE:return k.QueryParser.parseEditDistance;case k.QueryLexer.BOOST:return k.QueryParser.parseBoost;case k.QueryLexer.PRESENCE:return t.nextClause(),k.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+o.type+"'";throw new k.QueryParseError(n,o.start,o.end)}else t.nextClause()}},U=this,R=function(){return k},"object"==typeof i?e.exports=R():U.lunr=R()}()},{}],4:[function(t,e,i){e.exports={name:"pict-application",version:"1.0.30",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx mocha -u tdd -R spec",start:"node source/Pict-Application.js",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-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx mocha -u tdd --exit -R spec --grep",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.343","pict-provider":"^1.0.7","pict-view":"^1.0.64",quackage:"^1.0.45",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.15"}}},{}],5:[function(t,e,i){const n=t("fable-serviceproviderbase"),o=t("../package.json"),s={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"};e.exports=class extends n{constructor(t,e,i){let n="object"==typeof t.settings.PictApplicationConfiguration?t.settings.PictApplicationConfiguration:{};super(t,Object.assign({},JSON.parse(JSON.stringify(s)),n,e),i),this.options,this.log,this.fable,this.UUID,this.Hash,this.servicesMap,this.serviceType="PictApplication",this._Package=o,this.pict=this.fable,this.AppData=this.fable.AppData,this.Bundle=this.fable.Bundle,this.initializeTimestamp,this.lastSolvedTimestamp,this.lastLoginTimestamp,this.lastMarshalFromViewsTimestamp,this.lastMarshalToViewsTimestamp,this.lastAutoRenderTimestamp,this.lastLoadDataTimestamp;let r=Object.keys(this.options.Manifests);if(r.length>0)for(let t=0;t<r.length;t++){let e=r[t];this.fable.instantiateServiceProvider("Manifest",this.options.Manifests[e],e)}}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}onPreSolveAsync(t){return this.onPreSolve(),t()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}onBeforeSolveAsync(t){return this.onBeforeSolve(),t()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}onSolveAsync(t){return this.onSolve(),t()}solve(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));let t=Object.keys(this.pict.providers),e=[];for(let i=0;i<t.length;i++){let n=this.pict.providers[t[i]];n.options.AutoSolveWithApp&&e.push(n)}e.sort((t,e)=>t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal);for(let t=0;t<e.length;t++)e[t].solve(e[t]);this.onBeforeSolve();let i=Object.keys(this.pict.views),n=[];for(let t=0;t<i.length;t++){let e=this.pict.views[i[t]];e.options.AutoInitialize&&n.push(e)}n.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let t=0;t<n.length;t++)n[t].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}solveAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");e.anticipate(this.onBeforeSolveAsync.bind(this));let i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});let n=Object.keys(this.pict.providers),o=[];for(let t=0;t<n.length;t++){let e=this.pict.providers[n[t]];e.options.AutoSolveWithApp&&o.push(e)}o.sort((t,e)=>t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal);for(let t=0;t<o.length;t++)e.anticipate(o[t].solveAsync.bind(o[t]));let s=Object.keys(this.pict.views),r=[];for(let t=0;t<s.length;t++){let e=this.pict.views[s[t]];e.options.AutoSolveWithApp&&r.push(e)}r.sort((t,e)=>t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal);for(let t=0;t<r.length;t++)e.anticipate(r[t].solveAsync.bind(r[t]));e.anticipate(this.onSolveAsync.bind(this)),e.anticipate(this.onAfterSolveAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync() complete.")),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),i(t)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}onAfterSolveAsync(t){return this.onAfterSolve(),t()}onBeforeLoginAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}onLoginAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}loginAsync(t){const e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeLoginAsync.bind(this)),e.anticipate(this.onLoginAsync.bind(this)),e.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&e.anticipate(t=>{if(!this.isLoggedIn())return t();this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto loading data after login...")),this.loadDataAsync(e=>{t(e)})}),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync() complete.")),this.lastLoginTimestamp=this.fable.log.getTimeStamp(),i(t)))}isLoggedIn(){return!0}onAfterLoginAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}onBeforeLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}onLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}loadDataAsync(t){const e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeLoadDataAsync.bind(this));let n=Object.keys(this.pict.providers),o=[];for(let t=0;t<n.length;t++){let e=this.pict.providers[n[t]];e.options.AutoLoadDataWithApp&&o.push(e)}o.sort((t,e)=>t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal);for(const t of o)e.anticipate(t.onBeforeLoadDataAsync.bind(t));e.anticipate(this.onLoadDataAsync.bind(this));for(const t of o)e.anticipate(t.onLoadDataAsync.bind(t));e.anticipate(this.onAfterLoadDataAsync.bind(this));for(const t of o)e.anticipate(t.onAfterLoadDataAsync.bind(t));e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync() complete.")),this.lastLoadDataTimestamp=this.fable.log.getTimeStamp(),i(t)))}onAfterLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}onBeforeSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}onSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}saveDataAsync(t){const e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");let i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeSaveDataAsync.bind(this));let n=Object.keys(this.pict.providers),o=[];for(let t=0;t<n.length;t++){let e=this.pict.providers[n[t]];e.options.AutoSaveDataWithApp&&o.push(e)}o.sort((t,e)=>t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal);for(const t of o)e.anticipate(t.onBeforeSaveDataAsync.bind(t));e.anticipate(this.onSaveDataAsync.bind(this));for(const t of o)e.anticipate(t.onSaveDataAsync.bind(t));e.anticipate(this.onAfterSaveDataAsync.bind(this));for(const t of o)e.anticipate(t.onAfterSaveDataAsync.bind(t));e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync() complete.")),this.lastSaveDataTimestamp=this.fable.log.getTimeStamp(),i(t)))}onAfterSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}onBeforeInitializeAsync(t){return this.onBeforeInitialize(),t()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}onInitializeAsync(t){return this.onInitialize(),t()}initialize(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;{if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(let t=0;t<this.options.ConfigurationOnlyViews.length;t++){let e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();let t=Object.keys(this.pict.providers),e=[];for(let i=0;i<t.length;i++){let n=this.pict.providers[t[i]];n.options.AutoInitialize&&e.push(n)}e.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let t=0;t<e.length;t++)e[t].initialize();let i=Object.keys(this.pict.views),n=[];for(let t=0;t<i.length;t++){let e=this.pict.views[i[t]];e.options.AutoInitialize&&n.push(e)}n.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let t=0;t<n.length;t++)n[t].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}}initializeAsync(t){this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));let e="function"==typeof t&&t;if(e||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),e=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(e);{let t=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(let t=0;t<this.options.ConfigurationOnlyViews.length;t++){let e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}t.anticipate(this.onBeforeInitializeAsync.bind(this)),t.anticipate(this.onInitializeAsync.bind(this));let i=Object.keys(this.pict.providers),n=[];for(let t=0;t<i.length;t++){let e=this.pict.providers[i[t]];e.options.AutoInitialize&&n.push(e)}n.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let e=0;e<n.length;e++)t.anticipate(n[e].initializeAsync.bind(n[e]));let o=Object.keys(this.pict.views),s=[];for(let t=0;t<o.length;t++){let e=this.pict.views[o[t]];e.options.AutoInitialize&&s.push(e)}s.sort((t,e)=>t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal);for(let e=0;e<s.length;e++){let i=s[e];t.anticipate(i.initializeAsync.bind(i))}t.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),t.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),t.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),t.anticipate(this.renderMainViewportAsync.bind(this))),t.wait(t=>(t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialization complete.")),e()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}onCompletionOfInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}onCompletionOfInitializeAsync(t){return this.onCompletionOfInitialize(),t()}onBeforeMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}onBeforeMarshalFromViewsAsync(t){return this.onBeforeMarshalFromViews(),t()}onMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}onMarshalFromViewsAsync(t){return this.onMarshalFromViews(),t()}marshalFromViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();let t=Object.keys(this.pict.views),e=[];for(let i=0;i<t.length;i++){let n=this.pict.views[t[i]];e.push(n)}for(let t=0;t<e.length;t++)e[t].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalFromViewsAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));let n=Object.keys(this.pict.views),o=[];for(let t=0;t<n.length;t++){let e=this.pict.views[n[t]];o.push(e)}for(let t=0;t<o.length;t++)e.anticipate(o[t].marshalFromViewAsync.bind(o[t]));e.anticipate(this.onMarshalFromViewsAsync.bind(this)),e.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync() complete.")),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),i(t)))}onAfterMarshalFromViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}onAfterMarshalFromViewsAsync(t){return this.onAfterMarshalFromViews(),t()}onBeforeMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}onBeforeMarshalToViewsAsync(t){return this.onBeforeMarshalToViews(),t()}onMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}onMarshalToViewsAsync(t){return this.onMarshalToViews(),t()}marshalToViews(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();let t=Object.keys(this.pict.views),e=[];for(let i=0;i<t.length;i++){let n=this.pict.views[t[i]];e.push(n)}for(let t=0;t<e.length;t++)e[t].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}marshalToViewsAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));let n=Object.keys(this.pict.views),o=[];for(let t=0;t<n.length;t++){let e=this.pict.views[n[t]];o.push(e)}for(let t=0;t<o.length;t++)e.anticipate(o[t].marshalToViewAsync.bind(o[t]));e.anticipate(this.onMarshalToViewsAsync.bind(this)),e.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync() complete.")),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),i(t)))}onAfterMarshalToViews(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}onAfterMarshalToViewsAsync(t){return this.onAfterMarshalToViews(),t()}onBeforeRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}onBeforeRenderAsync(t){return this.onBeforeRender(),t()}render(t,e,i,n){let o="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,r="string"!=typeof i?this.options.MainViewportDestinationAddress:i,a="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(r,"] TemplateDataAddress[").concat(a,"] render:")),this.onBeforeRender();let c="string"==typeof o&&this.servicesMap.PictView[o];return c?(this.onRender(),c.render(s,r,a),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(o," because it is not a valid view.")),!1)}onRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}onRenderAsync(t){return this.onRender(),t()}renderAsync(t,e,i,n,o){let s="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof i?this.options.MainViewportDestinationAddress:i,c="string"!=typeof n?this.options.MainViewportDefaultDataAddress:n,l="function"==typeof o?o:"function"==typeof n?n:"function"==typeof i?i:"function"==typeof e?e:"function"==typeof t&&t;l||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),l=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(c,"] renderAsync:"));let h=this.fable.newAnticipate();h.anticipate(this.onBeforeRenderAsync.bind(this));let d="string"==typeof s&&this.servicesMap.PictView[s];if(!d){let t="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(s," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(t),l(new Error(t))}return h.anticipate(this.onRenderAsync.bind(this)),h.anticipate(t=>{d.renderAsync.call(d,r,a,c,t)}),h.anticipate(this.onAfterRenderAsync.bind(this)),h.wait(l)}onAfterRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}onAfterRenderAsync(t){return this.onAfterRender(),t()}renderMainViewport(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}renderMainViewportAsync(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}renderAutoViews(){this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));let t=Object.keys(this.pict.views);t.sort((t,e)=>this.pict.views[t].options.AutoRenderOrdinal-this.pict.views[e].options.AutoRenderOrdinal);for(let e=0;e<t.length;e++){let i=this.pict.views[t[e]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}renderAutoViewsAsync(t){let e=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));let n=Object.keys(this.pict.views);n.sort((t,e)=>this.pict.views[t].options.AutoRenderOrdinal-this.pict.views[e].options.AutoRenderOrdinal);for(let t=0;t<n.length;t++){let i=this.pict.views[n[t]];i.options.AutoRender&&e.anticipate(i.renderAsync.bind(i))}e.wait(t=>(this.lastAutoRenderTimestamp=this.fable.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete.")),i(t)))}get isPictApplication(){return!0}}},{"../package.json":4,"fable-serviceproviderbase":2}],6:[function(t,e,i){e.exports={name:"pict-provider",version:"1.0.7",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.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-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.342",quackage:"^1.0.45",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.15"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],7:[function(t,e,i){const n=t("fable-serviceproviderbase"),o=t("../package.json"),s={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]};e.exports=class extends n{constructor(t,e,i){super(t,Object.assign({},JSON.parse(JSON.stringify(s)),e),i),this.fable,this.pict,this.log,this.options,this.UUID,this.Hash,this.options.ProviderIdentifier||(this.options.ProviderIdentifier="AutoProviderID-".concat(this.fable.getUUID())),this.serviceType="PictProvider",this._Package=o,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1;for(let t=0;t<this.options.Templates.length;t++){let e=this.options.Templates[t];e.hasOwnProperty("Postfix")&&e.hasOwnProperty("Template")?(e.Source||(e.Source="PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(e.Prefix,e.Postfix,e.Template,e.Source)):this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," could not load Default Template ").concat(t," in the options array."),e)}}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(t){return this.onBeforeInitialize(),t()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}onInitializeAsync(t){return this.onInitialize(),t()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(t){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();{let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),e.anticipate(this.onBeforeInitializeAsync.bind(this)),e.anticipate(this.onInitializeAsync.bind(this)),e.anticipate(this.onAfterInitializeAsync.bind(this)),e.wait(e=>(this.initializeTimestamp=this.pict.log.getTimeStamp(),e?this.log.error("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization failed: ").concat(e.message||e),{Stack:e.stack}):this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialization complete.")),t()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}onPreRender(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}onPreRenderAsync(t){return this.onPreRender(),t()}render(){return this.onPreRender()}renderAsync(t){return this.onPreRender(),t()}onPreSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}onPreSolveAsync(t){return this.onPreSolve(),t()}solve(){return this.onPreSolve()}solveAsync(t){return this.onPreSolve(),t()}onBeforeLoadDataAsync(t){return t()}onLoadDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}onAfterLoadDataAsync(t){return t()}onBeforeSaveDataAsync(t){return t()}onSaveDataAsync(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}onAfterSaveDataAsync(t){return t()}}},{"../package.json":6,"fable-serviceproviderbase":2}],8:[function(t,e,i){e.exports={name:"pict-view",version:"1.0.64",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"mocha -u tdd -R spec",tests:"mocha -u tdd -R spec -g",start:"node source/Pict-View.js",coverage:"nyc --reporter=lcov --reporter=text-lcov npm test",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.337",quackage:"^1.0.45",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.46","fable-serviceproviderbase":"^3.0.15"}}},{}],9:[function(t,e,i){const n=t("fable-serviceproviderbase"),o=t("../package.json"),s={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};e.exports=class extends n{constructor(t,e,i){super(t,Object.assign({},JSON.parse(JSON.stringify(s)),e),i),this.fable,this.options,this.UUID,this.Hash,this.log;const n=this.Hash===this.UUID;this.UUID="V-".concat(this.UUID),n&&(this.Hash=this.UUID),this.options.ViewIdentifier||(this.options.ViewIdentifier="AutoViewID-".concat(this.fable.getUUID())),this.serviceType="PictView",this._Package=o,this.pict=this.fable,this.AppData=this.pict.AppData,this.Bundle=this.pict.Bundle,this.initializeTimestamp=!1,this.lastSolvedTimestamp=!1,this.lastRenderedTimestamp=!1,this.lastMarshalFromViewTimestamp=!1,this.lastMarshalToViewTimestamp=!1,this.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(let t=0;t<this.options.Templates.length;t++){let e=this.options.Templates[t];"Hash"in e&&"Template"in e?(e.Source||(e.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addTemplate(e.Hash,e.Template,e.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Template ").concat(t," in the options array."),e)}for(let t=0;t<this.options.DefaultTemplates.length;t++){let e=this.options.DefaultTemplates[t];"Postfix"in e&&"Template"in e?(e.Source||(e.Source="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," options object.")),this.pict.TemplateProvider.addDefaultTemplate(e.Prefix,e.Postfix,e.Template,e.Source)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Default Template ").concat(t," in the options array."),e)}if(this.options.CSS){let t=this.options.CSSHash?this.options.CSSHash:"View-".concat(this.options.ViewIdentifier),e=this.options.CSSProvider?this.options.CSSProvider:t;this.pict.CSSMap.addCSS(t,this.options.CSS,e,this.options.CSSPriority)}this.renderables={};for(let t=0;t<this.options.Renderables.length;t++){let e=this.options.Renderables[t];this.addRenderable(e)}}addRenderable(t,e,i,n,o){let s;if("object"==typeof t)s=t;else{s={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:i,ContentDestinationAddress:n,RenderMethod:"string"!=typeof o?o:"replace"}}"string"!=typeof s.RenderableHash||"string"!=typeof s.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),s):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(s.RenderableHash,"] pointed to template ").concat(s.TemplateHash,".")),this.renderables[s.RenderableHash]=s)}onBeforeInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}onBeforeInitializeAsync(t){return this.onBeforeInitialize(),t()}onInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}onInitializeAsync(t){return this.onInitialize(),t()}initialize(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}initializeAsync(t){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();{let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),e.anticipate(this.onBeforeInitializeAsync.bind(this)),e.anticipate(this.onInitializeAsync.bind(this)),e.anticipate(this.onAfterInitializeAsync.bind(this)),e.wait(e=>(e&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization failed: ").concat(e.message||e),{stack:e.stack}),this.initializeTimestamp=this.pict.log.getTimeStamp(),this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialization complete.")),t()))}}onAfterInitialize(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}onAfterInitializeAsync(t){return this.onAfterInitialize(),t()}onBeforeRender(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}onBeforeRenderAsync(t,e){return this.onBeforeRender(e),t()}onBeforeProject(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}onBeforeProjectAsync(t,e){return this.onBeforeProject(e),t()}buildRenderOptions(t,e,i){let n={Valid:!0};return n.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,n.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(n.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),n.Valid=!1),n.Renderable=this.renderables[n.RenderableHash],n.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(t,") because it does not exist.")),n.Valid=!1),n.DestinationAddress="string"==typeof e?e:"string"==typeof n.Renderable.ContentDestinationAddress?n.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,n.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(n.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),n.Valid=!1),"object"==typeof i?(n.RecordAddress="Passed in as object",n.Record=i):(n.RecordAddress="string"==typeof i?i:"string"==typeof n.Renderable.DefaultTemplateRecordAddress?n.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,n.Record="string"==typeof n.RecordAddress?this.pict.DataProvider.getDataByAddress(n.RecordAddress):void 0),n}assignRenderContent(t,e,i){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,i,t.TestAddress)}render(t,e,i,n){return this.renderWithScope(this,t,e,i,n)}renderWithScope(t,e,i,n,o){let s,r,a,c="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return c?("__Virtual"==c?s={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof i?i:"string"==typeof s.ContentDestinationAddress?s.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&o.TransactionHash,RootRenderableViewHash:o&&o.RootRenderableViewHash}:(s=Object.assign({},this.renderables[c]),s.ContentDestinationAddress="string"==typeof i?i:"string"==typeof s.ContentDestinationAddress?s.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),s.TransactionHash||(s.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(c,"-U-").concat(this.pict.getUUID()),s.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(s.TransactionHash)),s?s.ContentDestinationAddress?("object"==typeof n?(a=n,r="Passed in as object"):(r="string"==typeof n?n:"string"==typeof s.DefaultTemplateRecordAddress?s.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,a="string"==typeof r?this.pict.DataProvider.getDataByAddress(r):void 0),this.onBeforeRender(s),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(c,"] Destination[").concat(s.ContentDestinationAddress,"] TemplateRecordAddress[").concat(r,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(c,"] to Destination [").concat(s.ContentDestinationAddress,"]...")),s.Content=this.pict.parseTemplateByHash(s.TemplateHash,a,null,[this],t,{RootRenderable:"object"==typeof o?o:s}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(c,"] content length ").concat(s.Content.length," to Destination [").concat(s.ContentDestinationAddress,"] using render method [").concat(s.RenderMethod,"].")),this.onBeforeProject(s),this.onProject(s),"virtual-assignment"!==s.RenderMethod&&(this.onAfterProject(s),this.onAfterRender(s)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it is not a valid renderable.")),!1)}renderAsync(t,e,i,n,o){return this.renderWithScopeAsync(this,t,e,i,n,o)}renderWithScopeAsync(t,e,i,n,o,s){let r,a,c,l="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,h="function"==typeof s?s:"function"==typeof n?n:"function"==typeof i?i:"function"==typeof e?e:"function"==typeof o?o:null;if(h||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),h=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!l)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(l," (param ").concat(e,"because it is not a valid renderable.")),h(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(l," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==l?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof i?i:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&"function"!=typeof o&&o.TransactionHash,RootRenderableViewHash:o&&"function"!=typeof o&&o.RootRenderableViewHash}:(r=Object.assign({},this.renderables[l]),r.ContentDestinationAddress="string"==typeof i?i:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null),r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),!r)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")),h(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")));if(!r.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not have a valid destination address.")),h(new Error("Could not render ".concat(l)));"object"==typeof n?(c=n,a="Passed in as object"):(a="string"==typeof n?n:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,c="string"==typeof a?this.pict.DataProvider.getDataByAddress(a):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));let d=this.fable.newAnticipate();d.anticipate(t=>{this.onBeforeRenderAsync(t,r)}),d.anticipate(i=>{this.pict.parseTemplateByHash(r.TemplateHash,c,(t,n)=>t?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(l," (param ").concat(e,") because it did not parse the template."),t),i(t)):(r.Content=n,i()),[this],t,{RootRenderable:"object"==typeof o?o:r})}),d.anticipate(t=>{this.onBeforeProjectAsync(t,r)}),d.anticipate(t=>{this.onProjectAsync(t,r)}),"virtual-assignment"!==r.RenderMethod&&(d.anticipate(t=>{this.onAfterProjectAsync(t,r)}),d.anticipate(t=>{this.onAfterRenderAsync(t,r)})),d.wait(h)}renderDefaultAsync(t){this.renderAsync(t)}basicRender(t,e,i){return this.basicRenderWithScope(this,t,e,i)}basicRenderWithScope(t,e,i,n){let o=this.buildRenderOptions(e,i,n);return o.Valid?(this.assignRenderContent(o.Renderable,o.DestinationAddress,this.pict.parseTemplateByHash(o.Renderable.TemplateHash,o.Record,null,[this],t,{RootRenderable:o.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(o.RenderableHash," because it is not valid.")),!1)}basicRenderAsync(t,e,i,n){return this.basicRenderWithScopeAsync(this,t,e,i,n)}basicRenderWithScopeAsync(t,e,i,n,o){let s="function"==typeof o?o:"function"==typeof n?n:"function"==typeof i?i:"function"==typeof e?e:null;s||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),s=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});const r=this.buildRenderOptions(e,i,n);if(!r.Valid){let t="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(r.RenderableHash," because it is not valid.");return this.log.error(t),s(new Error(t))}this.pict.parseTemplateByHash(r.Renderable.TemplateHash,r.Record,(t,e)=>t?(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render (asynchronously) ").concat(r.RenderableHash," because it did not parse the template."),t),s(t)):(this.assignRenderContent(r.Renderable,r.DestinationAddress,e),s()),[this],t,{RootRenderable:r.Renderable})}onProject(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}onProjectAsync(t,e){return this.onProject(e),t()}onAfterRender(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){const e=this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[];for(const i of e){const e=this.pict.views[i.Data.ViewHash];e?(e.onAfterProject(),e.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}return!0}onAfterRenderAsync(t,e){this.onAfterRender(e);const i=this.fable.newAnticipate();if(e&&e.RootRenderableViewHash===this.Hash){const t=this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[];for(const n of t){const t=this.pict.views[n.Data.ViewHash];t?(i.anticipate(t.onAfterProjectAsync.bind(t)),i.anticipate(e=>{t.onAfterRenderAsync(e,n.Data.Renderable)})):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(n.Data.ViewHash,"."))}}return i.wait(t)}onAfterProject(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}onAfterProjectAsync(t,e){return t()}onBeforeSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}onBeforeSolveAsync(t){return this.onBeforeSolve(),t()}onSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}onSolveAsync(t){return this.onSolve(),t()}solve(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}solveAsync(t){let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeSolveAsync.bind(this)),e.anticipate(this.onSolveAsync.bind(this)),e.anticipate(this.onAfterSolveAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," solveAsync() complete.")),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),i(t)))}onAfterSolve(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}onAfterSolveAsync(t){return this.onAfterSolve(),t()}onBeforeMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}onBeforeMarshalFromViewAsync(t){return this.onBeforeMarshalFromView(),t()}onMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}onMarshalFromViewAsync(t){return this.onMarshalFromView(),t()}marshalFromView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalFromViewAsync(t){let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),e.anticipate(this.onMarshalFromViewAsync.bind(this)),e.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalFromViewAsync() complete.")),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),i(t)))}onAfterMarshalFromView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}onAfterMarshalFromViewAsync(t){return this.onAfterMarshalFromView(),t()}onBeforeMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}onBeforeMarshalToViewAsync(t){return this.onBeforeMarshalToView(),t()}onMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}onMarshalToViewAsync(t){return this.onMarshalToView(),t()}marshalToView(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}marshalToViewAsync(t){let e=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=t=>{t&&this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),e.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),e.anticipate(this.onMarshalToViewAsync.bind(this)),e.anticipate(this.onAfterMarshalToViewAsync.bind(this)),e.wait(t=>(this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," marshalToViewAsync() complete.")),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),i(t)))}onAfterMarshalToView(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}onAfterMarshalToViewAsync(t){return this.onAfterMarshalToView(),t()}get isPictView(){return!0}}},{"../package.json":8,"fable-serviceproviderbase":2}],10:[function(t,e,i){e.exports={Name:"Pict Docuserve",Hash:"Docuserve",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"Docuserve-Pict-Application"}}},{}],11:[function(t,e,i){const n=t("pict-application"),o=t("./providers/Pict-Provider-Docuserve-Documentation.js"),s=t("./views/PictView-Docuserve-Layout.js"),r=t("./views/PictView-Docuserve-TopBar.js"),a=t("./views/PictView-Docuserve-Sidebar.js"),c=t("./views/PictView-Docuserve-Splash.js"),l=t("./views/PictView-Docuserve-Content.js"),h=t("./views/PictView-Docuserve-Search.js");e.exports=class extends n{constructor(t,e,i){super(t,e,i),this.pict.addProvider("Docuserve-Documentation",o.default_configuration,o),this.pict.addView("Docuserve-Layout",s.default_configuration,s),this.pict.addView("Docuserve-TopBar",r.default_configuration,r),this.pict.addView("Docuserve-Sidebar",a.default_configuration,a),this.pict.addView("Docuserve-Splash",c.default_configuration,c),this.pict.addView("Docuserve-Content",l.default_configuration,l),this.pict.addView("Docuserve-Search",h.default_configuration,h)}onAfterInitializeAsync(t){this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"",CatalogURL:"retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(()=>{let e=this.pict.AppData.Docuserve;return e.CoverLoaded&&e.Cover&&e.Cover.Title?document.title=e.Cover.Title:e.TopBarLoaded&&e.TopBar&&e.TopBar.Brand&&(document.title=e.TopBar.Brand),this.pict.views["Docuserve-Layout"].render(),super.onAfterInitializeAsync(t)})}resolveHash(){let t=(window.location.hash||"").replace(/^#\/?/,"");if(!t||"Home"===t)return void this.showView("Docuserve-Splash");let e=t.split("/");if("search"===e[0]){let t=decodeURIComponent(e.slice(1).join("/"));return void this.navigateToSearch(t)}if("page"===e[0]&&e.length>=2){let t=e.slice(1).join("/");return void this.navigateToPage(t)}if("doc"===e[0]&&e.length>=3){let t=e[1],i=e[2];if(e.length>=4){let n=e.slice(3).join("/");this.navigateToModulePath(t,i,n)}else this.navigateToModule(t,i);return}this.navigateToPage(t)}navigateTo(t){window.location.hash=t}showView(t){t in this.pict.views&&(this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",this.pict.views[t].render(),this.pict.views["Docuserve-Sidebar"].clearModuleNav(),this.pict.views["Docuserve-Sidebar"].renderSidebarGroups())}navigateToModule(t,e){this.navigateToModulePath(t,e,"README.md")}navigateToModulePath(t,e,i){let n=this.pict.providers["Docuserve-Documentation"],o=this.pict.views["Docuserve-Content"],s=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=t,this.pict.AppData.Docuserve.CurrentModule=e,this.pict.AppData.Docuserve.CurrentPath=i,o.render(),o.showLoading(),s.renderSidebarGroups(),s.renderModuleNav(t,e);let r=n.resolveDocumentURL(t,e,i||"README.md");if(!r)return void o.displayContent(n.getErrorPageHTML(t+"/"+e));let a=i||"README.md";n.fetchDocument(r,(i,s)=>{if(!i)return void o.displayContent(s);let r=t+"/"+e+"/"+a;n.fetchLocalDocument(r,(t,e)=>{o.displayContent(e)},t,e,a)},t,e,a)}navigateToPage(t){let e=this.pict.providers["Docuserve-Documentation"],i=this.pict.views["Docuserve-Content"],n=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath=t,i.render(),i.showLoading(),n.clearModuleNav(),n.renderSidebarGroups();let o=t;o.match(/\.md$/)||(o+=".md"),e.fetchLocalDocument(o,(t,e)=>{i.displayContent(e)})}navigateToSearch(t){let e=this.pict.views["Docuserve-Sidebar"],i=this.pict.views["Docuserve-Search"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",e.clearModuleNav(),e.renderSidebarGroups(),i.render(),i.showSearch(t||"")}},e.exports.default_configuration=t("./Pict-Application-Docuserve-Configuration.json")},{"./Pict-Application-Docuserve-Configuration.json":10,"./providers/Pict-Provider-Docuserve-Documentation.js":12,"./views/PictView-Docuserve-Content.js":13,"./views/PictView-Docuserve-Layout.js":14,"./views/PictView-Docuserve-Search.js":15,"./views/PictView-Docuserve-Sidebar.js":16,"./views/PictView-Docuserve-Splash.js":17,"./views/PictView-Docuserve-TopBar.js":18,"pict-application":5}],12:[function(t,e,i){const n=t("pict-provider"),o=t("lunr");e.exports=class extends n{constructor(t,e,i){super(t,e,i),this._Catalog=null,this._ContentCache={}}loadCatalog(t){let e="function"==typeof t?t:()=>{},i=this.pict.AppData.Docuserve.CatalogURL||"retold-catalog.json";fetch(i).then(t=>t.ok?t.json():(this.log.warn("Docuserve: Could not load catalog from [".concat(i,"].")),null)).then(t=>{t&&(this._Catalog=t,this.pict.AppData.Docuserve.Catalog=t,this.pict.AppData.Docuserve.CatalogLoaded=!0,this.buildSidebarData(t));let i=5,n=()=>{if(i--,i<=0)return e()};this.loadCover(n),this.loadSidebar(n),this.loadTopbar(n),this.loadErrorPage(n),this.loadKeywordIndex(n)}).catch(t=>(this.log.warn("Docuserve: Error loading catalog: ".concat(t)),e()))}loadCover(t){let e="function"==typeof t?t:()=>{},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"cover.md").then(t=>t.ok?t.text():null).then(t=>t?(this.pict.AppData.Docuserve.Cover=this.parseCover(t),this.pict.AppData.Docuserve.CoverLoaded=!0,e()):(this.log.info("Docuserve: No cover.md found; splash will use catalog data."),e())).catch(t=>(this.log.warn("Docuserve: Error loading cover.md: ".concat(t)),e()))}parseCover(t){let e={Title:"",Tagline:"",Description:"",Highlights:[],Actions:[]},i=t.split("\n");for(let t=0;t<i.length;t++){let n=i[t].trim();if(!n)continue;let o=n.match(/^#+\s+(.+)/);if(o){e.Title=o[1].trim();continue}let s=n.match(/^>\s*(.*)/);if(s){e.Tagline=s[1].trim();continue}let r=n.match(/^[-*+]\s+(.*)/);if(r){let t=r[1],i=t.match(/^\*\*([^*]+)\*\*\s*[-—:]\s*(.*)/);i?e.Highlights.push({Label:i[1].trim(),Text:i[2].trim()}):e.Highlights.push({Label:"",Text:t.trim()});continue}let a=n.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);a?e.Actions.push({Text:a[1].trim(),Href:a[2].trim()}):e.Description?e.Description+=" "+n:e.Description=n}return e}loadSidebar(t){let e="function"==typeof t?t:()=>{},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_sidebar.md").then(t=>t.ok?t.text():null).then(t=>{if(!t)return this.log.info("Docuserve: No _sidebar.md found; sidebar will use catalog data."),e();let i=this.parseSidebarMarkdown(t);return i&&i.length>0&&(this.pict.AppData.Docuserve.SidebarGroups=i,this.pict.AppData.Docuserve.SidebarLoaded=!0),e()}).catch(t=>(this.log.warn("Docuserve: Error loading _sidebar.md: ".concat(t)),e()))}loadTopbar(t){let e="function"==typeof t?t:()=>{},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_topbar.md").then(t=>t.ok?t.text():null).then(t=>t?(this.pict.AppData.Docuserve.TopBar=this.parseTopbar(t),this.pict.AppData.Docuserve.TopBarLoaded=!0,e()):(this.log.info("Docuserve: No _topbar.md found; top bar will use defaults."),e())).catch(t=>(this.log.warn("Docuserve: Error loading _topbar.md: ".concat(t)),e()))}parseTopbar(t){let e={Brand:"",NavLinks:[],ExternalLinks:[]},i=t.split("\n");for(let t=0;t<i.length;t++){let n=i[t].trim();if(!n)continue;let o=n.match(/^#+\s+(.+)/);if(o){e.Brand=o[1].trim();continue}let s=n.match(/^[-*+]\s+(.*)/);if(s){let t=s[1].trim().match(/^\[([^\]]+)\]\(([^)]+)\)/);if(t){let i=t[1].trim(),n=t[2].trim();if(n.match(/^https?:\/\//))e.ExternalLinks.push({Text:i,Href:n});else{let t=this.convertSidebarLink(n);e.NavLinks.push({Text:i,Href:t})}}continue}}return e}loadErrorPage(t){let e="function"==typeof t?t:()=>{},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"errorpage.md").then(t=>t.ok?t.text():null).then(t=>t?(this.pict.AppData.Docuserve.ErrorPageHTML=this.parseMarkdown(t),this.pict.AppData.Docuserve.ErrorPageLoaded=!0,e()):(this.log.info("Docuserve: No errorpage.md found; errors will use default page."),e())).catch(t=>(this.log.warn("Docuserve: Error loading errorpage.md: ".concat(t)),e()))}loadKeywordIndex(t){let e="function"==typeof t?t:()=>{},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"retold-keyword-index.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!t.LunrIndex||!t.Documents)return this.log.info("Docuserve: No keyword index found; search will be unavailable."),e();try{this._LunrIndex=o.Index.load(t.LunrIndex),this._KeywordDocuments=t.Documents,this.pict.AppData.Docuserve.KeywordIndexLoaded=!0,this.pict.AppData.Docuserve.KeywordDocumentCount=t.DocumentCount||0,this.log.info("Docuserve: Keyword index loaded (".concat(t.DocumentCount||0," documents)."))}catch(t){this.log.warn("Docuserve: Error hydrating lunr index: ".concat(t))}return e()}).catch(t=>(this.log.warn("Docuserve: Error loading keyword index: ".concat(t)),e()))}isModuleInCatalog(t,e){if(!this._Catalog||!this._Catalog.Groups)return!1;for(let i=0;i<this._Catalog.Groups.length;i++){let n=this._Catalog.Groups[i];if(n.Key===t)for(let t=0;t<n.Modules.length;t++){if(n.Modules[t].Name===e)return!0}}return!1}isGroupInCatalog(t){if(!this._Catalog||!this._Catalog.Groups)return!1;for(let e=0;e<this._Catalog.Groups.length;e++)if(this._Catalog.Groups[e].Key===t)return!0;return!1}search(t){if(!(this._LunrIndex&&this._KeywordDocuments&&t&&t.trim()))return[];let e=[];try{let i=this._LunrIndex.search(t);for(let t=0;t<i.length;t++){let n=i[t].ref,o=i[t].score,s=this._KeywordDocuments[n];if(!s)continue;let r=n.split("/"),a="";if(r.length>=2){let t=r[0],e=r[1];a=this.isModuleInCatalog(t,e)?"#/doc/"+n:"#/page/"+n}e.push({Key:n,Title:s.Title||n,Group:s.Group||"",Module:s.Module||"",DocPath:s.DocPath||"",Score:o,Route:a})}}catch(t){this.log.warn("Docuserve: Search error: ".concat(t))}return e}getErrorPageHTML(t){let e=t||"unknown";return this.pict.AppData.Docuserve.ErrorPageLoaded&&this.pict.AppData.Docuserve.ErrorPageHTML?this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\{\{path\}\}/g,this.escapeHTML(e)):'<div class="docuserve-not-found"><h2>Page Not Found</h2><p>The document <code>'+this.escapeHTML(e)+'</code> could not be loaded.</p><p><a href="#/Home">Return to the home page</a></p></div>'}parseSidebarMarkdown(t){let e=[],i=null,n=t.split("\n");for(let t=0;t<n.length;t++){let o=n[t];if(!o.trim())continue;let s=o.match(/^(\s*)/),r=s?s[1].length:0,a=o.trim().match(/^[-*+]\s+(.*)/);if(!a)continue;let c=a[1].trim(),l=c.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(r<2)if(l){let t=l[1].trim(),n=l[2].trim();i={Name:t,Key:this.deriveGroupKey(t,n),Route:this.convertSidebarLink(n),Modules:[]},e.push(i)}else{let t=c,n=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");i={Name:t,Key:n,Route:"",Modules:[]},e.push(i)}else if(i)if(l){let t=l[1].trim(),e=l[2].trim(),n=this.convertSidebarLink(e);i.Modules.push({Name:t,HasDocs:!0,Group:i.Key,Route:n})}else i.Modules.push({Name:c,HasDocs:!1,Group:i.Key,Route:""})}return e}convertSidebarLink(t){if(!t)return"";if("/"===t)return"#/Home";let e=t.replace(/^\//,"").replace(/\/$/,"");if(!e)return"#/Home";let i=e.split("/");return i.length>=2&&this.isGroupInCatalog(i[0])?"#/doc/"+e:e.match(/\.md$/)?"#/page/"+e.replace(/\.md$/,""):"#/page/"+e}deriveGroupKey(t,e){if(e&&"/"!==e){let t=e.replace(/^\//,"").replace(/\.md$/,"").replace(/\/$/,"");if(t&&!t.includes("/"))return t.toLowerCase()}return t.split(/[\s—\-:]+/)[0].toLowerCase().replace(/[^a-z0-9]/g,"")}buildSidebarData(t){let e=[];for(let i=0;i<t.Groups.length;i++){let n=t.Groups[i],o={Name:n.Name,Key:n.Key,Description:n.Description,Modules:[]};for(let t=0;t<n.Modules.length;t++){let e=n.Modules[t];o.Modules.push({Name:e.Name,HasDocs:e.HasDocs,Group:n.Key,Route:"#/doc/"+n.Key+"/"+e.Name})}e.push(o)}this.pict.AppData.Docuserve.SidebarGroups=e}resolveDocumentURL(t,e,i){if(!this._Catalog)return null;let n=this._Catalog.GitHubOrg||"stevenvelozo",o=this._Catalog.DefaultBranch||"master";for(let s=0;s<this._Catalog.Groups.length;s++){let r=this._Catalog.Groups[s];if(r.Key===t)for(let t=0;t<r.Modules.length;t++){let s=r.Modules[t];if(s.Name!==e)continue;let a=s.Branch||o,c=i||"README.md";return"https://raw.githubusercontent.com/"+n+"/"+s.Repo+"/"+a+"/docs/"+c}}return null}getModuleSidebar(t,e){if(!this._Catalog)return null;for(let i=0;i<this._Catalog.Groups.length;i++){let n=this._Catalog.Groups[i];if(n.Key===t)for(let t=0;t<n.Modules.length;t++){let i=n.Modules[t];if(i.Name===e)return i.Sidebar||null}}return null}fetchDocument(t,e,i,n,o){let s="function"==typeof e?e:()=>{};return t?this._ContentCache[t]?s(null,this._ContentCache[t]):void fetch(t).then(t=>t.ok?t.text():null).then(e=>{if(!e)return s("Document not found",this.getErrorPageHTML(t));let r=this.parseMarkdown(e,i,n,o);return this._ContentCache[t]=r,s(null,r)}).catch(e=>(this.log.warn("Docuserve: Error fetching document [".concat(t,"]: ").concat(e)),s(e,this.getErrorPageHTML(t)))):s("No URL provided","")}fetchLocalDocument(t,e,i,n,o){let s=(this.pict.AppData.Docuserve.DocsBaseURL||"")+t;this.fetchDocument(s,e,i,n,o)}parseMarkdown(t,e,i,n){if(!t)return"";let o=t.split("\n"),s=[],r=!1,a=0,c="",l=[],h=!1,d="",p=!1,u=[],f=!1,g=[];for(let t=0;t<o.length;t++){let m=o[t];if(!r&&m.trim().match(/^\$\$/)){f?(s.push('<div class="docuserve-katex-display">'+g.join("\n")+"</div>"),f=!1,g=[]):(h&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1),p&&(s.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,i,n)+"</blockquote>"),p=!1,u=[]),f=!0);continue}if(f){g.push(m);continue}let v=m.match(/^(`{3,})/);if(v){let t=v[1].length;if(r){if(t>=a&&m.trim()===v[1]){"mermaid"===c?s.push('<pre class="mermaid">'+l.join("\n")+"</pre>"):s.push('<pre><code class="language-'+this.escapeHTML(c)+'">'+this.escapeHTML(l.join("\n"))+"</code></pre>"),r=!1,a=0,c="",l=[];continue}l.push(m);continue}h&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1),p&&(s.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,i,n)+"</blockquote>"),p=!1,u=[]),a=t,c=m.replace(/^`{3,}/,"").trim(),r=!0;continue}if(r){l.push(m);continue}if(m.match(/^>\s?/)){p||(h&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1),p=!0,u=[]),u.push(m.replace(/^>\s?/,""));continue}if(p&&(s.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,i,n)+"</blockquote>"),p=!1,u=[]),m.match(/^(-{3,}|\*{3,}|_{3,})\s*$/)){h&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1),s.push("<hr>");continue}let b=m.match(/^(#{1,6})\s+(.+)/);if(b){h&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1);let t=b[1].length,o=this.parseInline(b[2],e,i,n),r=b[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");s.push("<h"+t+' id="'+r+'">'+o+"</h"+t+">");continue}let y=m.match(/^(\s*)[-*+]\s+(.*)/);if(y){h&&"ul"===d||(h&&s.push("ul"===d?"</ul>":"</ol>"),s.push("<ul>"),h=!0,d="ul"),s.push("<li>"+this.parseInline(y[2],e,i,n)+"</li>");continue}let w=m.match(/^(\s*)\d+\.\s+(.*)/);if(w)h&&"ol"===d||(h&&s.push("ul"===d?"</ul>":"</ol>"),s.push("<ol>"),h=!0,d="ol"),s.push("<li>"+this.parseInline(w[2],e,i,n)+"</li>");else if(h&&""!==m.trim()&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1),""!==m.trim()){if(m.match(/^\|/)&&t+1<o.length&&o[t+1].match(/^\|[\s-:|]+\|/)){h&&(s.push("ul"===d?"</ul>":"</ol>"),h=!1);let r="<table>",a=m.split("|").filter(t=>""!==t.trim());r+="<thead><tr>";for(let t=0;t<a.length;t++)r+="<th>"+this.parseInline(a[t].trim(),e,i,n)+"</th>";for(r+="</tr></thead>",t++,r+="<tbody>";t+1<o.length&&o[t+1].match(/^\|/);){t++;let s=o[t].split("|").filter(t=>""!==t.trim());r+="<tr>";for(let t=0;t<s.length;t++)r+="<td>"+this.parseInline(s[t].trim(),e,i,n)+"</td>";r+="</tr>"}r+="</tbody></table>",s.push(r);continue}s.push("<p>"+this.parseInline(m,e,i,n)+"</p>")}}return h&&s.push("ul"===d?"</ul>":"</ol>"),p&&s.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e,i,n)+"</blockquote>"),r&&s.push("<pre><code>"+this.escapeHTML(l.join("\n"))+"</code></pre>"),s.join("\n")}parseInline(t,e,i,n){if(!t)return"";let o=t;return o=o.replace(/`([^`]+)`/g,"<code>$1</code>"),o=o.replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="docuserve-katex-inline">$1</span>'),o=o.replace(/\$([^\$\s])\$/g,'<span class="docuserve-katex-inline">$1</span>'),o=o.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1">'),o=o.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(t,o,s)=>{if(s.match(/^\//)||s.match(/^[^:]+\.md/)){return'<a href="'+this.convertDocLink(s,e,i,n)+'">'+o+"</a>"}return'<a href="'+s+'" target="_blank" rel="noopener">'+o+"</a>"}),o=o.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),o=o.replace(/__([^_]+)__/g,"<strong>$1</strong>"),o=o.replace(/\*([^*]+)\*/g,"<em>$1</em>"),o=o.replace(/_([^_]+)_/g,"<em>$1</em>"),o}convertDocLink(t,e,i,n){let o=t.replace(/^\.\//,"");o=o.replace(/^\//,"");let s=o.split("/");if(s.length>=2&&this.isGroupInCatalog(s[0]))return"#/doc/"+o;if(e&&i){let t="";if(n){let e=n.split("/");e.length>1&&(e.pop(),t=e.join("/")+"/")}return"#/doc/"+e+"/"+i+"/"+t+o}if(o.match(/\.md$/)){return"#/page/"+o.replace(/\.md$/,"")}return"#/page/"+o}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},e.exports.default_configuration={ProviderIdentifier:"Docuserve-Documentation",AutoInitialize:!0,AutoInitializeOrdinal:0}},{lunr:3,"pict-provider":7}],13:[function(t,e,i){const n=t("pict-view");e.exports=class extends n{constructor(t,e,i){super(t,e,i)}displayContent(t){this.pict.ContentAssignment.assignContent("#Docuserve-Content-Body",t);let e=document.getElementById("Docuserve-Content-Container");e&&(e.scrollTop=0),this.renderMermaidDiagrams(),this.renderKaTeXEquations()}renderMermaidDiagrams(){if("undefined"==typeof mermaid)return;let t=document.getElementById("Docuserve-Content-Body");if(!t)return;let e=t.querySelectorAll("pre.mermaid");if(!(e.length<1))try{mermaid.run({nodes:e})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}renderKaTeXEquations(){if("undefined"==typeof katex)return;let t=document.getElementById("Docuserve-Content-Body");if(!t)return;let e=t.querySelectorAll(".docuserve-katex-inline");for(let t=0;t<e.length;t++)try{katex.render(e[t].textContent,e[t],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}let i=t.querySelectorAll(".docuserve-katex-display");for(let t=0;t<i.length;t++)try{katex.render(i[t].textContent,i[t],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}showLoading(){this.pict.ContentAssignment.assignContent("#Docuserve-Content-Body",'<div class="docuserve-content-loading">Loading documentation...</div>')}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Content",DefaultRenderable:"Docuserve-Content-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder-bottom: 1px solid #eee;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.docuserve-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder-bottom: 1px solid #f0f0f0;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.docuserve-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #333;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.docuserve-content h4, .docuserve-content h5, .docuserve-content h6 {\n\t\t\tcolor: #555;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #444;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.docuserve-content a {\n\t\t\tcolor: #42b983;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-content pre {\n\t\t\tbackground: #2c3e50;\n\t\t\tcolor: #ecf0f1;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.docuserve-content code {\n\t\t\tbackground: #f4f4f5;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #e74c3c;\n\t\t}\n\t\t.docuserve-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.docuserve-content blockquote {\n\t\t\tborder-left: 4px solid #42b983;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #f9f9f9;\n\t\t\tcolor: #666;\n\t\t}\n\t\t.docuserve-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.docuserve-content ul, .docuserve-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.docuserve-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #444;\n\t\t}\n\t\t.docuserve-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #eee;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.docuserve-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.docuserve-content table th {\n\t\t\tbackground: #f5f7fa;\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2c3e50;\n\t\t}\n\t\t.docuserve-content table td {\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #444;\n\t\t}\n\t\t.docuserve-content table tr:nth-child(even) {\n\t\t\tbackground: #fafafa;\n\t\t}\n\t\t.docuserve-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.docuserve-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #333;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.docuserve-content .docuserve-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.docuserve-content .docuserve-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #666;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: #f4f4f5;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #e74c3c;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Content-Template",Template:'\n<div class="docuserve-content" id="Docuserve-Content-Body">\n\t<div class="docuserve-content-loading">Loading documentation...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Content-Display",TemplateHash:"Docuserve-Content-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":9}],14:[function(t,e,i){const n=t("pict-view");e.exports=class extends n{constructor(t,e,i){super(t,e,i)}onAfterRender(t,e,i,n){if(this.pict.views["Docuserve-TopBar"].render(),this.pict.views["Docuserve-Sidebar"].render(),this.pict.views["Docuserve-Splash"].render(),this.pict.CSSMap.injectCSS(),this.pict.PictApplication.resolveHash(),!this._HashChangeListenerBound){this._HashChangeListenerBound=!0;let t=this;window.addEventListener("hashchange",()=>{t.pict.PictApplication.resolveHash()})}return super.onAfterRender(t,e,i,n)}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Layout",DefaultRenderable:"Docuserve-Layout-Shell",DefaultDestinationAddress:"#Docuserve-Application-Container",AutoRender:!1,CSS:"\n\t\t#Docuserve-Application-Container {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#Docuserve-TopBar-Container {\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.docuserve-body {\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#Docuserve-Sidebar-Container {\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 280px;\n\t\t\toverflow-y: auto;\n\t\t}\n\t\t#Docuserve-Content-Container {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow-y: auto;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Layout-Shell-Template",Template:'\n<div id="Docuserve-TopBar-Container"></div>\n<div class="docuserve-body">\n\t<div id="Docuserve-Sidebar-Container"></div>\n\t<div id="Docuserve-Content-Container"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Layout-Shell",TemplateHash:"Docuserve-Layout-Shell-Template",DestinationAddress:"#Docuserve-Application-Container",RenderMethod:"replace"}]}},{"pict-view":9}],15:[function(t,e,i){const n=t("pict-view");e.exports=class extends n{constructor(t,e,i){super(t,e,i),this._SearchDebounceTimer=null}onAfterRender(t,e,i,n){let o=document.getElementById("Docuserve-Search-Input");return o&&o.addEventListener("input",()=>{this._SearchDebounceTimer&&clearTimeout(this._SearchDebounceTimer),this._SearchDebounceTimer=setTimeout(()=>{this.performSearch(o.value)},250)}),super.onAfterRender(t,e,i,n)}showSearch(t){let e=document.getElementById("Docuserve-Search-Input");if(e&&(e.value=t||"",e.focus()),t&&t.trim())this.performSearch(t);else{let t=this.pict.AppData.Docuserve.KeywordDocumentCount||0,e=t>0?"Search across "+t+" documents.":"Enter a search term to find documentation.";this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",e),this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}let i=document.getElementById("Docuserve-Content-Container");i&&(i.scrollTop=0)}performSearch(t){if(!t||!t.trim()){let t=this.pict.AppData.Docuserve.KeywordDocumentCount||0,e=t>0?"Search across "+t+" documents.":"Enter a search term to find documentation.";return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",e),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}let e=this.pict.providers["Docuserve-Documentation"].search(t);if(0===e.length)return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status","No results found for '"+this.escapeHTML(t)+"'."),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","");this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",e.length+" result"+(1!==e.length?"s":"")+" for '"+this.escapeHTML(t)+"'");let i="";for(let t=0;t<e.length;t++){let n=e[t],o="";n.Group&&n.Module&&(o=n.Group+" &rsaquo; "+n.Module),i+='<a class="docuserve-search-result" href="'+n.Route+'">',i+='<div class="docuserve-search-result-title">'+this.escapeHTML(n.Title)+"</div>",o&&(i+='<div class="docuserve-search-result-breadcrumb">'+o+"</div>"),n.DocPath&&(i+='<div class="docuserve-search-result-path">'+this.escapeHTML(n.DocPath)+"</div>"),i+="</a>"}this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results",i)}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Search",DefaultRenderable:"Docuserve-Search-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-search {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: #2c3e50;\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid #ddd;\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: #42b983;\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #888;\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid #e9ecef;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: #42b983;\n\t\t\tbox-shadow: 0 2px 8px rgba(66, 185, 131, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #42b983;\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #888;\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #aaa;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Search-Template",Template:'\n<div class="docuserve-search">\n\t<div class="docuserve-search-header">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type="text" class="docuserve-search-input" id="Docuserve-Search-Input" placeholder="Search across all modules...">\n\t\t<div id="Docuserve-Search-Status" class="docuserve-search-status"></div>\n\t</div>\n\t<div id="Docuserve-Search-Results" class="docuserve-search-results"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Search-Display",TemplateHash:"Docuserve-Search-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":9}],16:[function(t,e,i){const n=t("pict-view");e.exports=class extends n{constructor(t,e,i){super(t,e,i),this._SidebarSearchDebounceTimer=null}onAfterRender(t,e,i,n){this.renderSidebarGroups();let o=document.getElementById("Docuserve-Sidebar-Search");if(o&&this.pict.AppData.Docuserve.KeywordIndexLoaded){o.style.display="";let t=document.getElementById("Docuserve-Sidebar-Search-Input");t&&t.addEventListener("input",()=>{this._SidebarSearchDebounceTimer&&clearTimeout(this._SidebarSearchDebounceTimer),this._SidebarSearchDebounceTimer=setTimeout(()=>{this.performSidebarSearch(t.value)},250)})}return super.onAfterRender(t,e,i,n)}renderSidebarGroups(){let t=this.pict.AppData.Docuserve.SidebarGroups;if(!t||t.length<1)return void this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups",'<p style="padding: 1em; color: #999; font-size: 0.85em;">Loading catalog...</p>');let e="";for(let i=0;i<t.length;i++){let n=t[i];e+='<div class="docuserve-sidebar-group">';let o=n.Route||"";if(!o)for(let t=0;t<n.Modules.length;t++)if(n.Modules[t].HasDocs&&n.Modules[t].Route){o=n.Modules[t].Route;break}e+=o?'<a class="docuserve-sidebar-group-title" href="'+o+'">'+this.escapeHTML(n.Name)+"</a>":'<div class="docuserve-sidebar-group-title">'+this.escapeHTML(n.Name)+"</div>",e+='<ul class="docuserve-sidebar-modules">';for(let t=0;t<n.Modules.length;t++){let i=n.Modules[t];if(i.HasDocs){let t="";this.pict.AppData.Docuserve.CurrentGroup===i.Group&&this.pict.AppData.Docuserve.CurrentModule===i.Name&&(t=' class="active"'),e+="<li><a"+t+' href="'+i.Route+'">'+this.escapeHTML(i.Name)+"</a></li>"}else e+='<li><span class="no-docs">'+this.escapeHTML(i.Name)+"</span></li>"}e+="</ul>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups",e)}renderModuleNav(t,e){let i=this.pict.providers["Docuserve-Documentation"];if(!i)return;let n=i.getModuleSidebar(t,e);if(!n)return void this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","");let o="#/doc/"+t+"/"+e+"/",s='<div class="docuserve-sidebar-module-nav">';for(let t=0;t<n.length;t++){let e=n[t];if(e.Children){s+='<div class="docuserve-sidebar-module-nav-section">'+this.escapeHTML(e.Title)+"</div>";for(let t=0;t<e.Children.length;t++){let i=e.Children[t];i.Path&&(s+='<a href="'+o+i.Path+'">'+this.escapeHTML(i.Title)+"</a>")}}else e.Path&&(s+='<a href="'+o+e.Path+'">'+this.escapeHTML(e.Title)+"</a>")}s+="</div>",this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav",s)}performSidebarSearch(t){let e=document.getElementById("Docuserve-Sidebar-Search-Results");if(!e)return;if(!t||!t.trim())return void(e.innerHTML="");let i=this.pict.providers["Docuserve-Documentation"].search(t);if(0===i.length)return void(e.innerHTML='<div style="padding: 0.4em 0.5em; font-size: 0.82em; color: #999;">No results found.</div>');let n="";for(let t=0;t<i.length&&t<8;t++){let e=i[t],o="";e.Group&&e.Module&&(o=e.Group+" / "+e.Module),n+='<a href="'+e.Route+'">',n+='<div class="docuserve-sidebar-search-result-title">'+this.escapeHTML(e.Title)+"</div>",o&&(n+='<div class="docuserve-sidebar-search-result-meta">'+this.escapeHTML(o)+"</div>"),n+="</a>"}if(i.length>8){n+='<a class="docuserve-sidebar-search-all" href="#/search/'+encodeURIComponent(t)+'">See all '+i.length+" results</a>"}e.innerHTML=n}toggleSidebar(){this.pict.AppData.Docuserve.SidebarVisible=!this.pict.AppData.Docuserve.SidebarVisible;let t=document.getElementById("Docuserve-Sidebar-Container"),e=document.getElementById("Docuserve-TopBar-Toggle");this.pict.AppData.Docuserve.SidebarVisible?(t&&(t.style.display=""),e&&(e.style.display="none")):(t&&(t.style.display="none"),e&&(e.style.display="inline-block"))}clearModuleNav(){this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Sidebar",DefaultRenderable:"Docuserve-Sidebar-Content",DefaultDestinationAddress:"#Docuserve-Sidebar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-sidebar {\n\t\t\tbackground-color: #f8f9fa;\n\t\t\tborder-right: 1px solid #e0e0e0;\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\theight: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1.2em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid #e9ecef;\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder: 1px solid #ddd;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: #444;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: #e9ecef;\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #333;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #999;\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: #42b983;\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid #e9ecef;\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: #666;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: #666;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #555;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: #e9ecef;\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: #42b983;\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: #e8f5e9;\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #bbb;\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid #e9ecef;\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #888;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: #555;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: #e9ecef;\n\t\t\tcolor: #42b983;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Sidebar-Template",Template:'\n<div class="docuserve-sidebar">\n\t<div class="docuserve-sidebar-header">\n\t\t<button class="docuserve-sidebar-close" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">&times;</button>\n\t</div>\n\t<div id="Docuserve-Sidebar-Search" class="docuserve-sidebar-search" style="display:none;">\n\t\t<input type="text" placeholder="Search docs..." id="Docuserve-Sidebar-Search-Input">\n\t\t<div id="Docuserve-Sidebar-Search-Results" class="docuserve-sidebar-search-results"></div>\n\t</div>\n\t<div class="docuserve-sidebar-home">\n\t\t<a onclick="{~P~}.PictApplication.navigateTo(\'/Home\')">Home</a>\n\t</div>\n\t<div id="Docuserve-Sidebar-Groups"></div>\n\t<div id="Docuserve-Sidebar-ModuleNav"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Sidebar-Content",TemplateHash:"Docuserve-Sidebar-Template",DestinationAddress:"#Docuserve-Sidebar-Container",RenderMethod:"replace"}]}},{"pict-view":9}],17:[function(t,e,i){const n=t("pict-view");e.exports=class extends n{constructor(t,e,i){super(t,e,i)}onAfterRender(t,e,i,n){let o=this.pict.AppData.Docuserve;return o.CoverLoaded&&o.Cover?this.renderFromCover(o.Cover):this.renderFromCatalog(o),super.onAfterRender(t,e,i,n)}renderFromCover(t){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.escapeHTML(t.Title)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(t.Tagline)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description",this.escapeHTML(t.Description));let e="";for(let i=0;i<t.Highlights.length;i++){let n=t.Highlights[i];e+='<div class="docuserve-splash-highlight-card">',n.Label&&(e+="<h3>"+this.escapeHTML(n.Label)+"</h3>"),e+="<p>"+this.escapeHTML(n.Text)+"</p>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",e);let i="",n=this.pict.providers["Docuserve-Documentation"];for(let e=0;e<t.Actions.length;e++){let o=t.Actions[e],s=0===e?"primary":"secondary",r=o.Href;if(r.match(/^https?:\/\//))i+='<a class="'+s+'" href="'+this.escapeHTML(r)+'" target="_blank" rel="noopener">'+this.escapeHTML(o.Text)+"</a>";else{let t=n.convertSidebarLink(r);i+='<a class="'+s+'" href="'+this.escapeHTML(t)+'">'+this.escapeHTML(o.Text)+"</a>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions",i)}renderFromCatalog(t){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title","Retold"),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline","Documentation"),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description","");let e="",i=t.SidebarGroups||[];for(let t=0;t<i.length;t++){let n=i[t];if(!n.Modules||n.Modules.length<1)continue;let o=n.Description||n.Modules.length+" modules";e+='<div class="docuserve-splash-highlight-card">',e+="<h3>"+this.escapeHTML(n.Name)+"</h3>",e+="<p>"+this.escapeHTML(o)+"</p>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",e),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions","")}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}},e.exports.default_configuration={ViewIdentifier:"Docuserve-Splash",DefaultRenderable:"Docuserve-Splash-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #2c3e50;\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #666;\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: #555;\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: #fff;\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n\t\t\tborder-color: #42b983;\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: #2c3e50;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: #777;\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: #42b983;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: #38a373;\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: #fff;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder: 1px solid #ddd;\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: #42b983;\n\t\t\tcolor: #42b983;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Splash-Template",Template:'\n<div class="docuserve-splash">\n\t<h1 id="Docuserve-Splash-Title"></h1>\n\t<div class="docuserve-splash-tagline" id="Docuserve-Splash-Tagline"></div>\n\t<div class="docuserve-splash-description" id="Docuserve-Splash-Description"></div>\n\t<div class="docuserve-splash-highlights" id="Docuserve-Splash-Highlights"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":9}],18:[function(t,e,i){const n=t("pict-view");e.exports=class extends n{constructor(t,e,i){super(t,e,i)}onAfterRender(t,e,i,n){return this.renderTopBarContent(),super.onAfterRender(t,e,i,n)}renderTopBarContent(){let t=this.pict.AppData.Docuserve,e=document.getElementById("Docuserve-TopBar-Brand"),i=document.getElementById("Docuserve-TopBar-Nav"),n=document.getElementById("Docuserve-TopBar-Links");if(e&&i&&n)if(t.TopBarLoaded&&t.TopBar){let o=t.TopBar;e.textContent=o.Brand||"Documentation";let s='<a href="#/Home">Home</a>';for(let t=0;t<o.NavLinks.length;t++){let e=o.NavLinks[t];s+='<a href="'+e.Href+'">'+this.escapeHTML(e.Text)+"</a>"}i.innerHTML=s;let r="";t.KeywordIndexLoaded&&(r+='<a href="#/search/">Search</a>');for(let t=0;t<o.ExternalLinks.length;t++){let e=o.ExternalLinks[t];r+='<a href="'+this.escapeHTML(e.Href)+'" target="_blank" rel="noopener">'+this.escapeHTML(e.Text)+"</a>"}n.innerHTML=r}else{let o="Documentation";t.CoverLoaded&&t.Cover&&t.Cover.Title?o=t.Cover.Title:t.CatalogLoaded&&t.Catalog&&t.Catalog.Name&&(o=t.Catalog.Name),e.textContent=o,i.innerHTML='<a href="#/Home">Home</a>',n.innerHTML=t.KeywordIndexLoaded?'<a href="#/search/">Search</a>':""}}escapeHTML(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}},e.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar",DefaultRenderable:"Docuserve-TopBar-Content",DefaultDestinationAddress:"#Docuserve-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-topbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #2c3e50;\n\t\t\tcolor: #ecf0f1;\n\t\t\tpadding: 0 1.5em;\n\t\t\theight: 56px;\n\t\t\tbox-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 100;\n\t\t}\n\t\t.docuserve-topbar-brand {\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t\tcolor: #ecf0f1;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-brand:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-nav {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-topbar-nav a {\n\t\t\tcolor: #bdc3c7;\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-nav a:hover {\n\t\t\tbackground-color: #34495e;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-links {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.docuserve-topbar-links a {\n\t\t\tcolor: #95a5a6;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-topbar-links a:hover {\n\t\t\tbackground-color: #34495e;\n\t\t\tcolor: #ecf0f1;\n\t\t}\n\t\t.docuserve-topbar-toggle {\n\t\t\tdisplay: none;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #bdc3c7;\n\t\t\tfont-size: 1.3em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tmargin-left: 0.5em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-topbar-toggle:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-right {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-Template",Template:'\n<div class="docuserve-topbar">\n\t<a id="Docuserve-TopBar-Brand" class="docuserve-topbar-brand" href="#/Home"></a>\n\t<div id="Docuserve-TopBar-Nav" class="docuserve-topbar-nav"></div>\n\t<div class="docuserve-topbar-right">\n\t\t<div id="Docuserve-TopBar-Links" class="docuserve-topbar-links"></div>\n\t\t<button id="Docuserve-TopBar-Toggle" class="docuserve-topbar-toggle" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">&#9776;</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-TopBar-Content",TemplateHash:"Docuserve-TopBar-Template",DestinationAddress:"#Docuserve-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":9}]},{},[11])(11)});
58
- //# sourceMappingURL=pict-docuserve.min.js.map