retold 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +38 -1
- package/README.md +92 -2
- package/docs/README.md +7 -6
- package/docs/_sidebar.md +36 -21
- package/docs/_topbar.md +2 -2
- package/docs/architecture/comprehensions.md +282 -0
- package/docs/architecture/fluid-models.md +355 -0
- package/docs/architecture/module-architecture.md +234 -0
- package/docs/{modules.md → architecture/modules.md} +25 -22
- package/docs/cover.md +2 -2
- package/docs/css/docuserve.css +6 -6
- package/docs/examples/examples.md +71 -0
- package/docs/examples/todolist/todo-list-cli-client.md +178 -0
- package/docs/examples/todolist/todo-list-console-client.md +152 -0
- package/docs/examples/todolist/todo-list-model.md +114 -0
- package/docs/examples/todolist/todo-list-server.md +128 -0
- package/docs/examples/todolist/todo-list-web-client.md +177 -0
- package/docs/examples/todolist/todo-list.md +162 -0
- package/docs/getting-started.md +8 -7
- package/docs/index.html +4 -4
- package/docs/{meadow.md → modules/meadow.md} +4 -6
- package/docs/{orator.md → modules/orator.md} +1 -0
- package/docs/{pict.md → modules/pict.md} +30 -8
- package/docs/{utility.md → modules/utility.md} +0 -9
- package/docs/retold-catalog.json +1792 -231
- package/docs/retold-keyword-index.json +136439 -64616
- package/examples/todo-list/Dockerfile +45 -0
- package/examples/todo-list/README.md +394 -0
- package/examples/todo-list/cli-client/package-lock.json +418 -0
- package/examples/todo-list/cli-client/package.json +19 -0
- package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
- package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
- package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
- package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
- package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
- package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
- package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
- package/examples/todo-list/console-client/console-client.cjs +913 -0
- package/examples/todo-list/console-client/package-lock.json +426 -0
- package/examples/todo-list/console-client/package.json +19 -0
- package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
- package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
- package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
- package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
- package/examples/todo-list/docker-motd.sh +36 -0
- package/examples/todo-list/docker-run.sh +2 -0
- package/examples/todo-list/docker-shell.sh +2 -0
- package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
- package/examples/todo-list/model/Task-Compiled.json +25 -0
- package/examples/todo-list/model/Task.mddl +15 -0
- package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
- package/examples/todo-list/server/database-initialization-service.cjs +273 -0
- package/examples/todo-list/server/package-lock.json +6113 -0
- package/examples/todo-list/server/package.json +19 -0
- package/examples/todo-list/server/server.cjs +138 -0
- package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
- package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
- package/examples/todo-list/web-client/html/index.html +18 -0
- package/examples/todo-list/web-client/package-lock.json +12030 -0
- package/examples/todo-list/web-client/package.json +43 -0
- package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
- package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
- package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
- package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
- package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
- package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
- package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
- package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
- package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
- package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
- package/modules/Include-Retold-Module-List.sh +2 -2
- package/package.json +5 -5
- package/docs/js/pict.min.js +0 -12
- package/docs/js/pict.min.js.map +0 -1
- package/docs/pict-docuserve.min.js +0 -58
- package/docs/pict-docuserve.min.js.map +0 -1
- /package/docs/{architecture.md → architecture/architecture.md} +0 -0
- /package/docs/{fable.md → modules/fable.md} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["pict-docuserve.min.js","node_modules/browser-pack/_prelude.js","node_modules/fable-serviceproviderbase/package.json","node_modules/fable-serviceproviderbase/source/Fable-ServiceProviderBase.js","node_modules/lunr/lunr.js","node_modules/pict-application/package.json","node_modules/pict-application/source/Pict-Application.js","node_modules/pict-provider/package.json","node_modules/pict-provider/source/Pict-Provider.js","node_modules/pict-view/package.json","node_modules/pict-view/source/Pict-View.js","source/Pict-Application-Docuserve-Configuration.json","source/Pict-Application-Docuserve.js","source/providers/Pict-Provider-Docuserve-Documentation.js","source/views/PictView-Docuserve-Content.js","source/views/PictView-Docuserve-Layout.js","source/views/PictView-Docuserve-Search.js","source/views/PictView-Docuserve-Sidebar.js","source/views/PictView-Docuserve-Splash.js","source/views/PictView-Docuserve-TopBar.js"],"names":["_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","f","exports","module","define","amd","window","global","self","this","PictDocuserve","n","o","c","require","u","a","Error","code","p","length","name","version","description","main","scripts","start","test","tests","coverage","build","mocha","diff","extension","package","reporter","slow","timeout","ui","repository","type","url","keywords","author","license","bugs","homepage","devDependencies","fable","quackage","libPackage","FableServiceProviderBase","constructor","pFable","pOptions","pServiceHash","isFable","connectFable","_PackageFableServiceProvider","UUID","getUUID","options","concat","Math","floor","random","serviceType","Hash","tmpErrorMessage","console","log","Logging","services","servicesMap","CoreServiceProviderBase","step2list","step3list","v","C","V","meq1","mgr1","s_v","re_mgr0","re_mgr1","re_meq1","re_s_v","re_1a","re2_1a","re_1b","re2_1b","re_1b_2","re2_1b_2","re3_1b_2","re4_1b_2","re_1c","re_2","re_3","re_4","re2_4","re_5","re_5_1","re3_5","porterStemmer","root","factory","lunr","config","builder","Builder","pipeline","add","trimmer","stopWordFilter","stemmer","searchPipeline","utils","warn","message","asString","obj","toString","clone","create","keys","key","val","Array","isArray","slice","FieldRef","docRef","fieldName","stringValue","_stringValue","joiner","fromString","s","indexOf","fieldRef","prototype","undefined","Set","elements","complete","intersect","other","union","contains","empty","object","b","intersection","element","push","idf","posting","documentCount","documentsWithTerm","x","abs","Token","str","metadata","update","fn","tokenizer","map","toLowerCase","len","tokens","sliceEnd","sliceStart","sliceLength","charAt","match","separator","tokenMetadata","Pipeline","_stack","registeredFunctions","registerFunction","label","warnIfFunctionNotRegistered","load","serialised","forEach","fnName","arguments","after","existingFn","newFn","pos","splice","before","remove","run","stackLength","memo","j","result","k","runString","token","reset","toJSON","Vector","_magnitude","positionForIndex","index","end","pivotPoint","pivotIndex","insert","insertIdx","upsert","position","magnitude","sumOfSquares","elementsLength","sqrt","dot","otherVector","dotProduct","aLen","bLen","aVal","bVal","similarity","toArray","output","ational","tional","enci","anci","izer","bli","alli","entli","eli","ousli","ization","ation","ator","alism","iveness","fulness","ousness","aliti","iviti","biliti","logi","icate","ative","alize","iciti","ical","ful","ness","RegExp","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","replace","fp","exec","generateStopWordFilter","stopWords","words","reduce","stopWord","TokenSet","final","edges","id","_nextId","fromArray","arr","finish","fromClause","clause","fromFuzzyString","term","editDistance","stack","node","editsRemaining","frame","pop","noEditNode","char","insertionNode","substitutionNode","transposeNode","charA","charB","next","prefix","edge","_str","labels","sort","qNode","qEdges","qLen","nEdges","nLen","q","qEdge","nEdge","previousWord","uncheckedNodes","minimizedNodes","word","commonPrefix","minimize","child","nextNode","parent","downTo","childKey","Index","attrs","invertedIndex","fieldVectors","tokenSet","fields","search","queryString","query","QueryParser","parse","Query","matchingFields","queryVectors","termFieldCache","requiredMatches","prohibitedMatches","clauses","terms","clauseMatches","usePipeline","m","termTokenSet","expandedTerms","presence","REQUIRED","field","expandedTerm","termIndex","_index","fieldPosting","matchingDocumentRefs","termField","matchingDocumentsSet","PROHIBITED","boost","l","fieldMatch","matchingDocumentRef","matchingFieldRef","MatchData","allRequiredMatches","allProhibitedMatches","matchingFieldRefs","results","matches","isNegated","docMatch","fieldVector","score","matchData","combine","ref","serializedIndex","serializedVectors","serializedInvertedIndex","tokenSetBuilder","tuple","_ref","_fields","_documents","fieldTermFrequencies","fieldLengths","_b","_k1","metadataWhitelist","attributes","RangeError","number","k1","doc","extractor","fieldTerms","metadataKey","calculateAverageFieldLengths","fieldRefs","numberOfFields","accumulator","documentsWithField","averageFieldLength","createFieldVectors","fieldRefsLength","termIdfCache","fieldLength","termFrequencies","termsLength","fieldBoost","docBoost","scoreWithPrecision","tf","round","createTokenSet","use","args","unshift","apply","clonedMetadata","metadataKeys","otherMatchData","allFields","wildcard","NONE","LEADING","TRAILING","OPTIONAL","QueryParseError","QueryLexer","lexemes","escapeCharPositions","state","lexText","sliceString","subSlices","join","emit","escapeCharacter","EOS","width","ignore","backup","acceptDigitRun","charCode","charCodeAt","more","FIELD","TERM","EDIT_DISTANCE","BOOST","PRESENCE","lexField","lexer","lexTerm","lexEditDistance","lexBoost","lexEOS","termSeparator","currentClause","lexemeIdx","parseClause","peekLexeme","consumeLexeme","lexeme","nextClause","completedClause","parser","parsePresence","parseField","parseTerm","errorMessage","nextLexeme","possibleFields","parseEditDistance","parseBoost","parseInt","isNaN","lint","types","eslint","pict","typescript","dependencies","libFableServiceBase","defaultPictSettings","Name","MainViewportViewIdentifier","MainViewportRenderableHash","MainViewportDestinationAddress","MainViewportDefaultDataAddress","AutoSolveAfterInitialize","AutoRenderMainViewportViewAfterInitialize","AutoRenderViewsAfterInitialize","AutoLoginAfterInitialize","AutoLoadDataAfterLogin","ConfigurationOnlyViews","Manifests","IdentifierAddressPrefix","tmpCarryOverConfiguration","settings","PictApplicationConfiguration","super","assign","JSON","stringify","_Package","AppData","Bundle","initializeTimestamp","lastSolvedTimestamp","lastLoginTimestamp","lastMarshalFromViewsTimestamp","lastMarshalToViewsTimestamp","lastAutoRenderTimestamp","lastLoadDataTimestamp","tmpManifestKeys","tmpManifestKey","instantiateServiceProvider","onPreSolve","LogNoisiness","trace","onPreSolveAsync","fCallback","onBeforeSolve","onBeforeSolveAsync","onSolve","onSolveAsync","solve","tmpLoadedProviders","providers","tmpProvidersToSolve","tmpProvider","AutoSolveWithApp","AutoSolveOrdinal","tmpLoadedViews","views","tmpViewsToSolve","tmpView","AutoInitialize","AutoInitializeOrdinal","onAfterSolve","getTimeStamp","solveAsync","tmpAnticipate","instantiateServiceProviderWithoutRegistration","anticipate","bind","tmpCallback","pError","error","onAfterSolveAsync","wait","onBeforeLoginAsync","onLoginAsync","loginAsync","onAfterLoginAsync","fNext","isLoggedIn","loadDataAsync","onBeforeLoadDataAsync","onLoadDataAsync","tmpProvidersToLoadData","AutoLoadDataWithApp","AutoLoadDataOrdinal","onAfterLoadDataAsync","onBeforeSaveDataAsync","onSaveDataAsync","saveDataAsync","tmpProvidersToSaveData","AutoSaveDataWithApp","AutoSaveDataOrdinal","onAfterSaveDataAsync","lastSaveDataTimestamp","onBeforeInitialize","onBeforeInitializeAsync","onInitialize","onInitializeAsync","initialize","LogControlFlow","tmpViewIdentifier","ViewIdentifier","info","addView","tmpProvidersToInitialize","tmpViewsToInitialize","onAfterInitialize","render","onCompletionOfInitialize","initializeAsync","onCompletionOfInitializeAsync","onAfterInitializeAsync","renderMainViewportAsync","onBeforeMarshalFromViews","onBeforeMarshalFromViewsAsync","onMarshalFromViews","onMarshalFromViewsAsync","marshalFromViews","tmpViewsToMarshalFromViews","marshalFromView","onAfterMarshalFromViews","marshalFromViewsAsync","marshalFromViewAsync","onAfterMarshalFromViewsAsync","onBeforeMarshalToViews","onBeforeMarshalToViewsAsync","onMarshalToViews","onMarshalToViewsAsync","marshalToViews","tmpViewsToMarshalToViews","marshalToView","onAfterMarshalToViews","marshalToViewsAsync","marshalToViewAsync","onAfterMarshalToViewsAsync","onBeforeRender","onBeforeRenderAsync","pViewIdentifier","pRenderableHash","pRenderDestinationAddress","pTemplateDataAddress","tmpRenderableHash","tmpRenderDestinationAddress","tmpTemplateDataAddress","PictView","onRender","onAfterRender","onRenderAsync","renderAsync","tmpRenderAnticipate","newAnticipate","onAfterRenderAsync","renderMainViewport","renderAutoViews","AutoRenderOrdinal","AutoRender","renderAutoViewsAsync","isPictApplication","defaultPictProviderSettings","ProviderIdentifier","Templates","tmpDefaultTemplate","hasOwnProperty","Source","TemplateProvider","addDefaultTemplate","Prefix","Postfix","Template","Stack","onPreRender","onPreRenderAsync","defaultPictViewSettings","DefaultRenderable","DefaultDestinationAddress","DefaultTemplateRecordAddress","CSSHash","CSS","CSSProvider","CSSPriority","DefaultTemplates","Renderables","tmpHashIsUUID","lastRenderedTimestamp","lastMarshalFromViewTimestamp","lastMarshalToViewTimestamp","instantiateServiceProviderIfNotExists","tmpTemplate","addTemplate","tmpCSSHash","tmpCSSProvider","CSSMap","addCSS","renderables","tmpRenderable","addRenderable","pTemplateHash","pDefaultTemplateRecordAddress","pDefaultDestinationAddress","pRenderMethod","RenderableHash","TemplateHash","ContentDestinationAddress","RenderMethod","pRenderable","onBeforeProject","onBeforeProjectAsync","buildRenderOptions","pTemplateRecordAddress","tmpRenderOptions","Valid","Renderable","DestinationAddress","RecordAddress","Record","DataProvider","getDataByAddress","assignRenderContent","pContent","ContentAssignment","projectContent","TestAddress","pRootRenderable","renderWithScope","pScope","tmpRecordAddress","tmpRecord","TransactionHash","RootRenderableViewHash","TransactionTracking","registerTransaction","Content","parseTemplateByHash","RootRenderable","onProject","onAfterProject","renderWithScopeAsync","fOnBeforeRenderCallback","fAsyncTemplateCallback","onProjectAsync","onAfterProjectAsync","renderDefaultAsync","basicRender","basicRenderWithScope","basicRenderAsync","basicRenderWithScopeAsync","pushToTransactionQueue","ViewHash","tmpTransactionQueue","clearTransactionQueue","tmpEvent","Data","queue","event","onBeforeMarshalFromView","onBeforeMarshalFromViewAsync","onMarshalFromView","onMarshalFromViewAsync","onAfterMarshalFromView","onAfterMarshalFromViewAsync","onBeforeMarshalToView","onBeforeMarshalToViewAsync","onMarshalToView","onMarshalToViewAsync","onAfterMarshalToView","onAfterMarshalToViewAsync","isPictView","pict_configuration","Product","libPictApplication","libDocumentationProvider","libViewLayout","libViewTopBar","libViewSidebar","libViewSplash","libViewContent","libViewSearch","addProvider","default_configuration","Docuserve","CatalogLoaded","Catalog","CoverLoaded","Cover","SidebarLoaded","SidebarGroups","TopBarLoaded","TopBar","ErrorPageLoaded","ErrorPageHTML","KeywordIndexLoaded","KeywordDocumentCount","CurrentGroup","CurrentModule","CurrentPath","SidebarVisible","DocsBaseURL","CatalogURL","loadCatalog","tmpDocuserve","Title","document","title","Brand","resolveHash","tmpHash","location","hash","showView","tmpParts","split","tmpQuery","decodeURIComponent","navigateToSearch","tmpDocPath","navigateToPage","tmpGroup","tmpModule","tmpPath","navigateToModulePath","navigateToModule","navigateTo","pRoute","clearModuleNav","renderSidebarGroups","pGroup","pModule","pPath","tmpDocProvider","tmpContentView","tmpSidebarView","showLoading","renderModuleNav","tmpURL","resolveDocumentURL","displayContent","getErrorPageHTML","fetchDocument","pHTML","tmpLocalPath","fetchLocalDocument","pLocalError","pLocalHTML","pDocPath","pQuery","tmpSearchView","showSearch","libPictProvider","libLunr","_Catalog","_ContentCache","tmpCatalogURL","fetch","then","pResponse","ok","json","pCatalog","buildSidebarData","tmpPending","tmpFinish","loadCover","loadSidebar","loadTopbar","loadErrorPage","loadKeywordIndex","catch","tmpDocsBase","text","pMarkdown","parseCover","tmpCover","Tagline","Description","Highlights","Actions","tmpLines","tmpLine","trim","tmpHeadingMatch","tmpBlockquoteMatch","tmpBulletMatch","tmpBulletContent","tmpLabelMatch","Label","Text","tmpLinkMatch","Href","tmpSidebarData","parseSidebarMarkdown","parseTopbar","tmpTopBar","NavLinks","ExternalLinks","tmpText","tmpHref","tmpRoute","convertSidebarLink","parseMarkdown","pIndexData","LunrIndex","Documents","_LunrIndex","_KeywordDocuments","DocumentCount","isModuleInCatalog","Groups","Key","Modules","isGroupInCatalog","pGroupKey","tmpResults","tmpLunrResults","tmpRef","tmpScore","tmpDoc","Group","Module","DocPath","Score","Route","pRequestedPath","escapeHTML","tmpGroups","tmpCurrentGroup","tmpIndentMatch","tmpIndent","tmpListMatch","tmpItemContent","tmpName","deriveGroupKey","tmpKey","tmpModuleName","tmpModuleHref","tmpModuleRoute","HasDocs","pHref","pName","tmpFromHref","includes","tmpSidebarGroups","tmpGroupEntry","tmpOrg","GitHubOrg","tmpDefaultBranch","DefaultBranch","tmpBranch","Branch","Repo","getModuleSidebar","Sidebar","pURL","pCurrentGroup","pCurrentModule","pCurrentDocPath","tmpHTML","tmpInCodeBlock","tmpCodeFenceLength","tmpCodeLang","tmpCodeLines","tmpInList","tmpListType","tmpInBlockquote","tmpBlockquoteLines","tmpInMathBlock","tmpMathLines","tmpFenceMatch","tmpFenceLen","tmpLevel","parseInline","tmpID","tmpULMatch","tmpOLMatch","tmpTableHTML","tmpHeaders","filter","pCell","h","tmpCells","pText","tmpResult","pMatch","pLinkText","convertDocLink","tmpDocDir","tmpDirParts","libPictView","pHTMLContent","assignContent","tmpContentContainer","getElementById","scrollTop","renderMermaidDiagrams","renderKaTeXEquations","mermaid","tmpContentBody","tmpMermaidElements","querySelectorAll","nodes","katex","tmpInlineElements","textContent","throwOnError","displayMode","tmpDisplayElements","pRecord","injectCSS","PictApplication","_HashChangeListenerBound","tmpSelf","addEventListener","_SearchDebounceTimer","tmpInput","clearTimeout","setTimeout","performSearch","focus","tmpDocCount","tmpStatusMsg","tmpBreadcrumb","_SidebarSearchDebounceTimer","tmpSearchContainer","style","display","performSidebarSearch","tmpGroupRoute","tmpActiveClass","tmpSidebar","tmpRoutePrefix","tmpEntry","Children","tmpChild","Path","tmpResultsEl","innerHTML","tmpMeta","encodeURIComponent","toggleSidebar","tmpContainer","tmpToggle","renderFromCover","renderFromCatalog","pCover","tmpHighlightsHTML","tmpHighlight","tmpActionsHTML","tmpAction","tmpClass","pDocuserve","tmpDescription","renderTopBarContent","tmpBrandEl","tmpNavEl","tmpLinksEl","tmpNavHTML","tmpLink","tmpLinksHTML","tmpBrand"],"mappings":"AAAA,aAEA,SAASA,gBAAgBC,EAAGC,EAAGC,GAAK,OAAQD,EAAIE,eAAeF,MAAOD,EAAII,OAAOC,eAAeL,EAAGC,EAAG,CAAEK,MAAOJ,EAAGK,YAAY,EAAIC,cAAc,EAAIC,UAAU,IAAQT,EAAEC,GAAKC,EAAGF,CAAG,CACnL,SAASG,eAAeD,GAAK,IAAIQ,EAAIC,aAAaT,EAAG,UAAW,MAAO,iBAAmBQ,EAAIA,EAAIA,EAAI,EAAI,CAC1G,SAASC,aAAaT,EAAGD,GAAK,GAAI,iBAAmBC,IAAMA,EAAG,OAAOA,EAAG,IAAIF,EAAIE,EAAEU,OAAOC,aAAc,QAAS,IAAMb,EAAG,CAAE,IAAIU,EAAIV,EAAEc,KAAKZ,EAAGD,GAAK,WAAY,GAAI,iBAAmBS,EAAG,OAAOA,EAAG,MAAM,IAAIK,UAAU,+CAAiD,CAAE,OAAQ,WAAad,EAAIe,OAASC,QAAQf,EAAI,ECJvT,SAAAgB,GAAA,GAAA,iBAAAC,SAAA,oBAAAC,OAAAA,OAAAD,QAAAD,SAAA,GAAA,mBAAAG,QAAAA,OAAAC,IAAAD,OAAA,GAAAH,OAAA,EAAA,oBAAAK,OAAAA,OAAA,oBAAAC,OAAAA,OAAA,oBAAAC,KAAAA,KAAAC,MAAAC,cAAAT,GAAA,CAAA,CAAA,CAAA,WAAA,OAAA,SAAAjB,EAAAD,EAAA4B,EAAA1B,GAAA,SAAA2B,EAAAnB,EAAAQ,GAAA,IAAAU,EAAAlB,GAAA,CAAA,IAAAV,EAAAU,GA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ACA,MACA,MACA,KACA,KACA,KACA,UACA,OACA,MACA,KACA,MACA,SACA,QACA,OACA,MACA,KACA,OACA,SACA,OACA,OACA,QACA,MACA,OACA,MACA,MACA,MACA,MACA,OACA,KACA,MACA,OACA,MACA,MACA,MACA,UACA,IACA,KACA,KACA,OACA,KACA,KACA,MACA,OACA,QACA,MACA,OACA,SACA,MACA,KACA,QACA,OACA,OACA,KACA,UACA,KACA,MACA,MACA,KACA,MACA,QACA,KACA,OACA,KACA,QACA,MACA,MACA,SACA,OACA,MACA,OACA,MACA,SACA,QACA,KACA,OACA,OACA,OACA,MACA,QACA,OACA,OACA,QACA,QACA,OACA,OACA,MACA,KACA,MACA,OACA,KACA,QACA,MACA,KACA,OACA,OACA,OACA,QACA,QACA,QACA,MACA,OACA,MACA,OACA,OACA,QACA,MACA,MACA,SAGAvK,EAAAwE,SAAAG,iBAAA3E,EAAAO,eAAA;;;;;AAqBAP,EAAAM,QAAA,SAAA2F,GACA,OAAAA,EAAAvC,OAAA,SAAA3B,GACA,OAAAA,EAAAqI,QAAA,OAAA,IAAAA,QAAA,OAAA,GACA,EACA,EAEApK,EAAAwE,SAAAG,iBAAA3E,EAAAM,QAAA;;;;;AA2BAN,EAAA4K,SAAA,WACA7Q,KAAA8Q,OAAA,EACA9Q,KAAA+Q,MAAA,CAAA,EACA/Q,KAAAgR,GAAA/K,EAAA4K,SAAAI,QACAhL,EAAA4K,SAAAI,SAAA,CACA,EAUAhL,EAAA4K,SAAAI,QAAA,EASAhL,EAAA4K,SAAAK,UAAA,SAAAC,GAGA,IAFA,IAAAhL,EAAA,IAAAF,EAAA4K,SAAAzK,QAEApH,EAAA,EAAAgL,EAAAmH,EAAAxQ,OAAA3B,EAAAgL,EAAAhL,IACAmH,EAAAyG,OAAAuE,EAAAnS,IAIA,OADAmH,EAAAiL,SACAjL,EAAAJ,IACA,EAWAE,EAAA4K,SAAAQ,WAAA,SAAAC,GACA,MAAA,iBAAAA,EACArL,EAAA4K,SAAAU,gBA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,EAAAxK,MAAA,oCAAA/1B,KAAAk4B,WAAAqI,EAAA1K,MAAA,MACA,CACAwK,EAAAnB,UAAAsB,CACA,KAEA,CAEA,IAAAC,EAAA,gBACAlQ,EAAAjB,aAAAiB,EAAAhB,OAAAgB,EAAAhB,MAAAiB,MAEAiQ,EAAAlQ,EAAAhB,MAAAiB,MAEAD,EAAAnB,eAAAmB,EAAAlB,SAAAkB,EAAAlB,QAAAnR,OAEAuiB,EAAAlQ,EAAAlB,QAAAnR,MAGAiiB,EAAAlD,YAAAwD,EACAL,EAAAlB,UAAA,4BACAmB,EAAAnB,UAAA3O,EAAAT,mBAAA,iCAAA,EACA,CACA,CAKAoI,UAAAA,CAAAyD,GAEA,OAAAA,EAIAA,EACAtrB,QAAA,KAAA,SACAA,QAAA,KAAA,QACAA,QAAA,KAAA,QACAA,QAAA,KAAA,UACAA,QAAA,KAAA,SAPA,EAQA,GAKA3Q,EAAAD,QAAAyvB,sBArNA,CACAjL,eAAA,mBAEAwE,kBAAA,2BACAC,0BAAA,8BAEAnB,YAAA,EAEAsB,IAAA,w3DAgFAjB,UACA,CACA,CACAlkB,KAAA,4BACA0kB,SAAA,+dAaAa,YACA,CACA,CACAmB,eAAA,2BACAC,aAAA,4BACAW,mBAAA,8BACAT,aAAA,YnB+uUA,EAAE,CAAC,YAAY,KAAK,CAAC,EAAE,CAAC,ICj2UxB,CDi2U6B,GAC7B","file":"pict-docuserve.min.js","sourcesContent":["(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.PictDocuserve = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\nmodule.exports={\n \"name\": \"fable-serviceproviderbase\",\n \"version\": \"3.0.15\",\n \"description\": \"Simple base classes for fable services.\",\n \"main\": \"source/Fable-ServiceProviderBase.js\",\n \"scripts\": {\n \"start\": \"node source/Fable-ServiceProviderBase.js\",\n \"test\": \"npx mocha -u tdd -R spec\",\n \"tests\": \"npx mocha -u tdd --exit -R spec --grep\",\n \"coverage\": \"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec\",\n \"build\": \"npx quack build\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/stevenvelozo/fable-serviceproviderbase.git\"\n },\n \"keywords\": [\n \"entity\",\n \"behavior\"\n ],\n \"author\": \"Steven Velozo <steven@velozo.com> (http://velozo.com/)\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/fable-serviceproviderbase/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/fable-serviceproviderbase\",\n \"devDependencies\": {\n \"fable\": \"^3.0.143\",\n \"quackage\": \"^1.0.33\"\n }\n}\n},{}],2:[function(require,module,exports){\n/**\n* Fable Service Base\n* @author <steven@velozo.com>\n*/\n\nconst libPackage = require('../package.json');\n\nclass FableServiceProviderBase\n{\n\t// The constructor can be used in two ways:\n\t// 1) With a fable, options object and service hash (the options object and service hash are optional)\n\t// 2) With an object or nothing as the first parameter, where it will be treated as the options object\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\t// Check if a fable was passed in; connect it if so\n\t\tif ((typeof(pFable) === 'object') && pFable.isFable)\n\t\t{\n\t\t\tthis.connectFable(pFable);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.fable = false;\n\t\t}\n\n\t\t// Initialize the services map if it wasn't passed in\n\t\t/** @type {Object} */\n\t\tthis._PackageFableServiceProvider = libPackage;\n\n\t\t// initialize options and UUID based on whether the fable was passed in or not.\n\t\tif (this.fable)\n\t\t{\n\t\t\tthis.UUID = pFable.getUUID();\n\t\t\tthis.options = (typeof(pOptions) === 'object') ? pOptions\n\t\t\t\t\t\t\t: {};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// With no fable, check to see if there was an object passed into either of the first two\n\t\t\t// Parameters, and if so, treat it as the options object\n\t\t\tthis.options = ((typeof(pFable) === 'object') && !pFable.isFable) ? pFable\n\t\t\t\t\t\t\t: (typeof(pOptions) === 'object') ? pOptions\n\t\t\t\t\t\t\t: {};\n\t\t\tthis.UUID = `CORE-SVC-${Math.floor((Math.random() * (99999 - 10000)) + 10000)}`\n\t\t}\n\n\t\t// It's expected that the deriving class will set this\n\t\tthis.serviceType = `Unknown-${this.UUID}`;\n\n\t\t// The service hash is used to identify the specific instantiation of the service in the services map\n\t\tthis.Hash = (typeof(pServiceHash) === 'string') ? pServiceHash \n\t\t\t\t\t: (!this.fable && (typeof(pOptions) === 'string')) ? pOptions\n\t\t\t\t\t: `${this.UUID}`;\n\t}\n\n\tconnectFable(pFable)\n\t{\n\t\tif ((typeof(pFable) !== 'object') || (!pFable.isFable))\n\t\t{\n\t\t\tlet tmpErrorMessage = `Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [${typeof(pFable)}].}`;\n\t\t\tconsole.log(tmpErrorMessage);\n\t\t\treturn new Error(tmpErrorMessage);\n\t\t}\n\n\t\tif (!this.fable)\n\t\t{\n\t\t\tthis.fable = pFable;\n\t\t}\n\n\t\tif (!this.log)\n\t\t{\n\t\t\tthis.log = this.fable.Logging;\n\t\t}\n\t\tif (!this.services)\n\t\t{\n\t\t\tthis.services = this.fable.services;\n\t\t}\n\n\t\tif (!this.servicesMap)\n\t\t{\n\t\t\tthis.servicesMap = this.fable.servicesMap;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tstatic isFableService = true;\n}\n\nmodule.exports = FableServiceProviderBase;\n\n// This is left here in case we want to go back to having different code/base class for \"core\" services\nmodule.exports.CoreServiceProviderBase = FableServiceProviderBase;\n},{\"../package.json\":1}],3:[function(require,module,exports){\n/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9\n * Copyright (C) 2020 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * A convenience function for configuring and constructing\n * a new lunr Index.\n *\n * A lunr.Builder instance is created and the pipeline setup\n * with a trimmer, stop word filter and stemmer.\n *\n * This builder object is yielded to the configuration function\n * that is passed as a parameter, allowing the list of fields\n * and other builder parameters to be customised.\n *\n * All documents _must_ be added within the passed config function.\n *\n * @example\n * var idx = lunr(function () {\n * this.field('title')\n * this.field('body')\n * this.ref('id')\n *\n * documents.forEach(function (doc) {\n * this.add(doc)\n * }, this)\n * })\n *\n * @see {@link lunr.Builder}\n * @see {@link lunr.Pipeline}\n * @see {@link lunr.trimmer}\n * @see {@link lunr.stopWordFilter}\n * @see {@link lunr.stemmer}\n * @namespace {function} lunr\n */\nvar lunr = function (config) {\n var builder = new lunr.Builder\n\n builder.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n builder.searchPipeline.add(\n lunr.stemmer\n )\n\n config.call(builder, builder)\n return builder.build()\n}\n\nlunr.version = \"2.3.9\"\n/*!\n * lunr.utils\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n * @namespace lunr.utils\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf lunr.utils\n * @function\n */\nlunr.utils.warn = (function (global) {\n /* eslint-disable no-console */\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message)\n }\n }\n /* eslint-enable no-console */\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf lunr.utils\n */\nlunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\"\n } else {\n return obj.toString()\n }\n}\n\n/**\n * Clones an object.\n *\n * Will create a copy of an existing object such that any mutations\n * on the copy cannot affect the original.\n *\n * Only shallow objects are supported, passing a nested object to this\n * function will cause a TypeError.\n *\n * Objects with primitives, and arrays of primitives are supported.\n *\n * @param {Object} obj The object to clone.\n * @return {Object} a clone of the passed object.\n * @throws {TypeError} when a nested object is passed.\n * @memberOf Utils\n */\nlunr.utils.clone = function (obj) {\n if (obj === null || obj === undefined) {\n return obj\n }\n\n var clone = Object.create(null),\n keys = Object.keys(obj)\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i],\n val = obj[key]\n\n if (Array.isArray(val)) {\n clone[key] = val.slice()\n continue\n }\n\n if (typeof val === 'string' ||\n typeof val === 'number' ||\n typeof val === 'boolean') {\n clone[key] = val\n continue\n }\n\n throw new TypeError(\"clone is not deep and does not support nested objects\")\n }\n\n return clone\n}\nlunr.FieldRef = function (docRef, fieldName, stringValue) {\n this.docRef = docRef\n this.fieldName = fieldName\n this._stringValue = stringValue\n}\n\nlunr.FieldRef.joiner = \"/\"\n\nlunr.FieldRef.fromString = function (s) {\n var n = s.indexOf(lunr.FieldRef.joiner)\n\n if (n === -1) {\n throw \"malformed field ref string\"\n }\n\n var fieldRef = s.slice(0, n),\n docRef = s.slice(n + 1)\n\n return new lunr.FieldRef (docRef, fieldRef, s)\n}\n\nlunr.FieldRef.prototype.toString = function () {\n if (this._stringValue == undefined) {\n this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef\n }\n\n return this._stringValue\n}\n/*!\n * lunr.Set\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A lunr set.\n *\n * @constructor\n */\nlunr.Set = function (elements) {\n this.elements = Object.create(null)\n\n if (elements) {\n this.length = elements.length\n\n for (var i = 0; i < this.length; i++) {\n this.elements[elements[i]] = true\n }\n } else {\n this.length = 0\n }\n}\n\n/**\n * A complete set that contains all elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.complete = {\n intersect: function (other) {\n return other\n },\n\n union: function () {\n return this\n },\n\n contains: function () {\n return true\n }\n}\n\n/**\n * An empty set that contains no elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.empty = {\n intersect: function () {\n return this\n },\n\n union: function (other) {\n return other\n },\n\n contains: function () {\n return false\n }\n}\n\n/**\n * Returns true if this set contains the specified object.\n *\n * @param {object} object - Object whose presence in this set is to be tested.\n * @returns {boolean} - True if this set contains the specified object.\n */\nlunr.Set.prototype.contains = function (object) {\n return !!this.elements[object]\n}\n\n/**\n * Returns a new set containing only the elements that are present in both\n * this set and the specified set.\n *\n * @param {lunr.Set} other - set to intersect with this set.\n * @returns {lunr.Set} a new set that is the intersection of this and the specified set.\n */\n\nlunr.Set.prototype.intersect = function (other) {\n var a, b, elements, intersection = []\n\n if (other === lunr.Set.complete) {\n return this\n }\n\n if (other === lunr.Set.empty) {\n return other\n }\n\n if (this.length < other.length) {\n a = this\n b = other\n } else {\n a = other\n b = this\n }\n\n elements = Object.keys(a.elements)\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i]\n if (element in b.elements) {\n intersection.push(element)\n }\n }\n\n return new lunr.Set (intersection)\n}\n\n/**\n * Returns a new set combining the elements of this and the specified set.\n *\n * @param {lunr.Set} other - set to union with this set.\n * @return {lunr.Set} a new set that is the union of this and the specified set.\n */\n\nlunr.Set.prototype.union = function (other) {\n if (other === lunr.Set.complete) {\n return lunr.Set.complete\n }\n\n if (other === lunr.Set.empty) {\n return this\n }\n\n return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements)))\n}\n/**\n * A function to calculate the inverse document frequency for\n * a posting. This is shared between the builder and the index\n *\n * @private\n * @param {object} posting - The posting for a given term\n * @param {number} documentCount - The total number of documents.\n */\nlunr.idf = function (posting, documentCount) {\n var documentsWithTerm = 0\n\n for (var fieldName in posting) {\n if (fieldName == '_index') continue // Ignore the term index, its not a field\n documentsWithTerm += Object.keys(posting[fieldName]).length\n }\n\n var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5)\n\n return Math.log(1 + Math.abs(x))\n}\n\n/**\n * A token wraps a string representation of a token\n * as it is passed through the text processing pipeline.\n *\n * @constructor\n * @param {string} [str=''] - The string token being wrapped.\n * @param {object} [metadata={}] - Metadata associated with this token.\n */\nlunr.Token = function (str, metadata) {\n this.str = str || \"\"\n this.metadata = metadata || {}\n}\n\n/**\n * Returns the token string that is being wrapped by this object.\n *\n * @returns {string}\n */\nlunr.Token.prototype.toString = function () {\n return this.str\n}\n\n/**\n * A token update function is used when updating or optionally\n * when cloning a token.\n *\n * @callback lunr.Token~updateFunction\n * @param {string} str - The string representation of the token.\n * @param {Object} metadata - All metadata associated with this token.\n */\n\n/**\n * Applies the given function to the wrapped string token.\n *\n * @example\n * token.update(function (str, metadata) {\n * return str.toUpperCase()\n * })\n *\n * @param {lunr.Token~updateFunction} fn - A function to apply to the token string.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.update = function (fn) {\n this.str = fn(this.str, this.metadata)\n return this\n}\n\n/**\n * Creates a clone of this token. Optionally a function can be\n * applied to the cloned token.\n *\n * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.clone = function (fn) {\n fn = fn || function (s) { return s }\n return new lunr.Token (fn(this.str, this.metadata), this.metadata)\n}\n/*!\n * lunr.tokenizer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * This tokenizer will convert its parameter to a string by calling `toString` and\n * then will split this string on the character in `lunr.tokenizer.separator`.\n * Arrays will have their elements converted to strings and wrapped in a lunr.Token.\n *\n * Optional metadata can be passed to the tokenizer, this metadata will be cloned and\n * added as metadata to every token that is created from the object to be tokenized.\n *\n * @static\n * @param {?(string|object|object[])} obj - The object to convert into tokens\n * @param {?object} metadata - Optional metadata to associate with every token\n * @returns {lunr.Token[]}\n * @see {@link lunr.Pipeline}\n */\nlunr.tokenizer = function (obj, metadata) {\n if (obj == null || obj == undefined) {\n return []\n }\n\n if (Array.isArray(obj)) {\n return obj.map(function (t) {\n return new lunr.Token(\n lunr.utils.asString(t).toLowerCase(),\n lunr.utils.clone(metadata)\n )\n })\n }\n\n var str = obj.toString().toLowerCase(),\n len = str.length,\n tokens = []\n\n for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {\n var char = str.charAt(sliceEnd),\n sliceLength = sliceEnd - sliceStart\n\n if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) {\n\n if (sliceLength > 0) {\n var tokenMetadata = lunr.utils.clone(metadata) || {}\n tokenMetadata[\"position\"] = [sliceStart, sliceLength]\n tokenMetadata[\"index\"] = tokens.length\n\n tokens.push(\n new lunr.Token (\n str.slice(sliceStart, sliceEnd),\n tokenMetadata\n )\n )\n }\n\n sliceStart = sliceEnd + 1\n }\n\n }\n\n return tokens\n}\n\n/**\n * The separator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n/*!\n * lunr.Pipeline\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = Object.create(null)\n\n/**\n * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token\n * string as well as all known metadata. A pipeline function can mutate the token string\n * or mutate (or add) metadata for a given token.\n *\n * A pipeline function can indicate that the passed token should be discarded by returning\n * null, undefined or an empty string. This token will not be passed to any downstream pipeline\n * functions and will not be added to the index.\n *\n * Multiple tokens can be returned by returning an array of tokens. Each token will be passed\n * to any downstream pipeline functions and all will returned tokens will be added to the index.\n *\n * Any number of pipeline functions may be chained together using a lunr.Pipeline.\n *\n * @interface lunr.PipelineFunction\n * @param {lunr.Token} token - A token from the document being processed.\n * @param {number} i - The index of this token in the complete list of tokens for this document/field.\n * @param {lunr.Token[]} tokens - All tokens for this document/field.\n * @returns {(?lunr.Token|lunr.Token[])}\n */\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @param {String} label - The label to register this function with\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @private\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised - The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n */\nlunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load unregistered function: ' + fnName)\n }\n })\n\n return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.\n */\nlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {lunr.PipelineFunction} fn The function to remove from the pipeline.\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n var stackLength = this._stack.length\n\n for (var i = 0; i < stackLength; i++) {\n var fn = this._stack[i]\n var memo = []\n\n for (var j = 0; j < tokens.length; j++) {\n var result = fn(tokens[j], j, tokens)\n\n if (result === null || result === void 0 || result === '') continue\n\n if (Array.isArray(result)) {\n for (var k = 0; k < result.length; k++) {\n memo.push(result[k])\n }\n } else {\n memo.push(result)\n }\n }\n\n tokens = memo\n }\n\n return tokens\n}\n\n/**\n * Convenience method for passing a string through a pipeline and getting\n * strings out. This method takes care of wrapping the passed string in a\n * token and mapping the resulting tokens back to strings.\n *\n * @param {string} str - The string to pass through the pipeline.\n * @param {?object} metadata - Optional metadata to associate with the token\n * passed to the pipeline.\n * @returns {string[]}\n */\nlunr.Pipeline.prototype.runString = function (str, metadata) {\n var token = new lunr.Token (str, metadata)\n\n return this.run([token]).map(function (t) {\n return t.toString()\n })\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n */\nlunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n */\nlunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A vector is used to construct the vector space of documents and queries. These\n * vectors support operations to determine the similarity between two documents or\n * a document and a query.\n *\n * Normally no parameters are required for initializing a vector, but in the case of\n * loading a previously dumped vector the raw elements can be provided to the constructor.\n *\n * For performance reasons vectors are implemented with a flat array, where an elements\n * index is immediately followed by its value. E.g. [index, value, index, value]. This\n * allows the underlying array to be as sparse as possible and still offer decent\n * performance when being used for vector calculations.\n *\n * @constructor\n * @param {Number[]} [elements] - The flat list of element index and element value pairs.\n */\nlunr.Vector = function (elements) {\n this._magnitude = 0\n this.elements = elements || []\n}\n\n\n/**\n * Calculates the position within the vector to insert a given index.\n *\n * This is used internally by insert and upsert. If there are duplicate indexes then\n * the position is returned as if the value for that index were to be updated, but it\n * is the callers responsibility to check whether there is a duplicate at that index\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @returns {Number}\n */\nlunr.Vector.prototype.positionForIndex = function (index) {\n // For an empty vector the tuple can be inserted at the beginning\n if (this.elements.length == 0) {\n return 0\n }\n\n var start = 0,\n end = this.elements.length / 2,\n sliceLength = end - start,\n pivotPoint = Math.floor(sliceLength / 2),\n pivotIndex = this.elements[pivotPoint * 2]\n\n while (sliceLength > 1) {\n if (pivotIndex < index) {\n start = pivotPoint\n }\n\n if (pivotIndex > index) {\n end = pivotPoint\n }\n\n if (pivotIndex == index) {\n break\n }\n\n sliceLength = end - start\n pivotPoint = start + Math.floor(sliceLength / 2)\n pivotIndex = this.elements[pivotPoint * 2]\n }\n\n if (pivotIndex == index) {\n return pivotPoint * 2\n }\n\n if (pivotIndex > index) {\n return pivotPoint * 2\n }\n\n if (pivotIndex < index) {\n return (pivotPoint + 1) * 2\n }\n}\n\n/**\n * Inserts an element at an index within the vector.\n *\n * Does not allow duplicates, will throw an error if there is already an entry\n * for this index.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n */\nlunr.Vector.prototype.insert = function (insertIdx, val) {\n this.upsert(insertIdx, val, function () {\n throw \"duplicate index\"\n })\n}\n\n/**\n * Inserts or updates an existing index within the vector.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n * @param {function} fn - A function that is called for updates, the existing value and the\n * requested value are passed as arguments\n */\nlunr.Vector.prototype.upsert = function (insertIdx, val, fn) {\n this._magnitude = 0\n var position = this.positionForIndex(insertIdx)\n\n if (this.elements[position] == insertIdx) {\n this.elements[position + 1] = fn(this.elements[position + 1], val)\n } else {\n this.elements.splice(position, 0, insertIdx, val)\n }\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n */\nlunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n\n var sumOfSquares = 0,\n elementsLength = this.elements.length\n\n for (var i = 1; i < elementsLength; i += 2) {\n var val = this.elements[i]\n sumOfSquares += val * val\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The vector to compute the dot product with.\n * @returns {Number}\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n var dotProduct = 0,\n a = this.elements, b = otherVector.elements,\n aLen = a.length, bLen = b.length,\n aVal = 0, bVal = 0,\n i = 0, j = 0\n\n while (i < aLen && j < bLen) {\n aVal = a[i], bVal = b[j]\n if (aVal < bVal) {\n i += 2\n } else if (aVal > bVal) {\n j += 2\n } else if (aVal == bVal) {\n dotProduct += a[i + 1] * b[j + 1]\n i += 2\n j += 2\n }\n }\n\n return dotProduct\n}\n\n/**\n * Calculates the similarity between this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The other vector to calculate the\n * similarity with.\n * @returns {Number}\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / this.magnitude() || 0\n}\n\n/**\n * Converts the vector to an array of the elements within the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toArray = function () {\n var output = new Array (this.elements.length / 2)\n\n for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {\n output[j] = this.elements[i]\n }\n\n return output\n}\n\n/**\n * A JSON serializable representation of the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toJSON = function () {\n return this.elements\n}\n/* eslint-disable */\n/*!\n * lunr.stemmer\n * Copyright (C) 2020 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token - The string to stem\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n * @function\n */\nlunr.stemmer = (function(){\n var step2list = {\n \"ational\" : \"ate\",\n \"tional\" : \"tion\",\n \"enci\" : \"ence\",\n \"anci\" : \"ance\",\n \"izer\" : \"ize\",\n \"bli\" : \"ble\",\n \"alli\" : \"al\",\n \"entli\" : \"ent\",\n \"eli\" : \"e\",\n \"ousli\" : \"ous\",\n \"ization\" : \"ize\",\n \"ation\" : \"ate\",\n \"ator\" : \"ate\",\n \"alism\" : \"al\",\n \"iveness\" : \"ive\",\n \"fulness\" : \"ful\",\n \"ousness\" : \"ous\",\n \"aliti\" : \"al\",\n \"iviti\" : \"ive\",\n \"biliti\" : \"ble\",\n \"logi\" : \"log\"\n },\n\n step3list = {\n \"icate\" : \"ic\",\n \"ative\" : \"\",\n \"alize\" : \"al\",\n \"iciti\" : \"ic\",\n \"ical\" : \"ic\",\n \"ful\" : \"\",\n \"ness\" : \"\"\n },\n\n c = \"[^aeiou]\", // consonant\n v = \"[aeiouy]\", // vowel\n C = c + \"[^aeiouy]*\", // consonant sequence\n V = v + \"[aeiou]*\", // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C, // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\", // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C, // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var porterStemmer = function porterStemmer(w) {\n var stem,\n suffix,\n firstch,\n re,\n re2,\n re3,\n re4;\n\n if (w.length < 3) { return w; }\n\n firstch = w.substr(0,1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a\n re2 = re2_1a;\n\n if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) { w = w + \"e\"; }\n else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n else if (re4.test(w)) { w = w + \"e\"; }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n w = stem;\n }\n }\n\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return function (token) {\n return token.update(porterStemmer);\n }\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @function\n * @param {Array} token The token to pass through the filter\n * @returns {lunr.PipelineFunction}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord\n return memo\n }, {})\n\n return function (token) {\n if (token && words[token.toString()] !== token.toString()) return token\n }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @function\n * @implements {lunr.PipelineFunction}\n * @params {lunr.Token} token - A token to check for being a stop word.\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n 'a',\n 'able',\n 'about',\n 'across',\n 'after',\n 'all',\n 'almost',\n 'also',\n 'am',\n 'among',\n 'an',\n 'and',\n 'any',\n 'are',\n 'as',\n 'at',\n 'be',\n 'because',\n 'been',\n 'but',\n 'by',\n 'can',\n 'cannot',\n 'could',\n 'dear',\n 'did',\n 'do',\n 'does',\n 'either',\n 'else',\n 'ever',\n 'every',\n 'for',\n 'from',\n 'get',\n 'got',\n 'had',\n 'has',\n 'have',\n 'he',\n 'her',\n 'hers',\n 'him',\n 'his',\n 'how',\n 'however',\n 'i',\n 'if',\n 'in',\n 'into',\n 'is',\n 'it',\n 'its',\n 'just',\n 'least',\n 'let',\n 'like',\n 'likely',\n 'may',\n 'me',\n 'might',\n 'most',\n 'must',\n 'my',\n 'neither',\n 'no',\n 'nor',\n 'not',\n 'of',\n 'off',\n 'often',\n 'on',\n 'only',\n 'or',\n 'other',\n 'our',\n 'own',\n 'rather',\n 'said',\n 'say',\n 'says',\n 'she',\n 'should',\n 'since',\n 'so',\n 'some',\n 'than',\n 'that',\n 'the',\n 'their',\n 'them',\n 'then',\n 'there',\n 'these',\n 'they',\n 'this',\n 'tis',\n 'to',\n 'too',\n 'twas',\n 'us',\n 'wants',\n 'was',\n 'we',\n 'were',\n 'what',\n 'when',\n 'where',\n 'which',\n 'while',\n 'who',\n 'whom',\n 'why',\n 'will',\n 'with',\n 'would',\n 'yet',\n 'you',\n 'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the beginning and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token The token to pass through the filter\n * @returns {lunr.Token}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n return token.update(function (s) {\n return s.replace(/^\\W+/, '').replace(/\\W+$/, '')\n })\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.TokenSet\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A token set is used to store the unique list of all tokens\n * within an index. Token sets are also used to represent an\n * incoming query to the index, this query token set and index\n * token set are then intersected to find which tokens to look\n * up in the inverted index.\n *\n * A token set can hold multiple tokens, as in the case of the\n * index token set, or it can hold a single token as in the\n * case of a simple query token set.\n *\n * Additionally token sets are used to perform wildcard matching.\n * Leading, contained and trailing wildcards are supported, and\n * from this edit distance matching can also be provided.\n *\n * Token sets are implemented as a minimal finite state automata,\n * where both common prefixes and suffixes are shared between tokens.\n * This helps to reduce the space used for storing the token set.\n *\n * @constructor\n */\nlunr.TokenSet = function () {\n this.final = false\n this.edges = {}\n this.id = lunr.TokenSet._nextId\n lunr.TokenSet._nextId += 1\n}\n\n/**\n * Keeps track of the next, auto increment, identifier to assign\n * to a new tokenSet.\n *\n * TokenSets require a unique identifier to be correctly minimised.\n *\n * @private\n */\nlunr.TokenSet._nextId = 1\n\n/**\n * Creates a TokenSet instance from the given sorted array of words.\n *\n * @param {String[]} arr - A sorted array of strings to create the set from.\n * @returns {lunr.TokenSet}\n * @throws Will throw an error if the input array is not sorted.\n */\nlunr.TokenSet.fromArray = function (arr) {\n var builder = new lunr.TokenSet.Builder\n\n for (var i = 0, len = arr.length; i < len; i++) {\n builder.insert(arr[i])\n }\n\n builder.finish()\n return builder.root\n}\n\n/**\n * Creates a token set from a query clause.\n *\n * @private\n * @param {Object} clause - A single clause from lunr.Query.\n * @param {string} clause.term - The query clause term.\n * @param {number} [clause.editDistance] - The optional edit distance for the term.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromClause = function (clause) {\n if ('editDistance' in clause) {\n return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance)\n } else {\n return lunr.TokenSet.fromString(clause.term)\n }\n}\n\n/**\n * Creates a token set representing a single string with a specified\n * edit distance.\n *\n * Insertions, deletions, substitutions and transpositions are each\n * treated as an edit distance of 1.\n *\n * Increasing the allowed edit distance will have a dramatic impact\n * on the performance of both creating and intersecting these TokenSets.\n * It is advised to keep the edit distance less than 3.\n *\n * @param {string} str - The string to create the token set from.\n * @param {number} editDistance - The allowed edit distance to match.\n * @returns {lunr.Vector}\n */\nlunr.TokenSet.fromFuzzyString = function (str, editDistance) {\n var root = new lunr.TokenSet\n\n var stack = [{\n node: root,\n editsRemaining: editDistance,\n str: str\n }]\n\n while (stack.length) {\n var frame = stack.pop()\n\n // no edit\n if (frame.str.length > 0) {\n var char = frame.str.charAt(0),\n noEditNode\n\n if (char in frame.node.edges) {\n noEditNode = frame.node.edges[char]\n } else {\n noEditNode = new lunr.TokenSet\n frame.node.edges[char] = noEditNode\n }\n\n if (frame.str.length == 1) {\n noEditNode.final = true\n }\n\n stack.push({\n node: noEditNode,\n editsRemaining: frame.editsRemaining,\n str: frame.str.slice(1)\n })\n }\n\n if (frame.editsRemaining == 0) {\n continue\n }\n\n // insertion\n if (\"*\" in frame.node.edges) {\n var insertionNode = frame.node.edges[\"*\"]\n } else {\n var insertionNode = new lunr.TokenSet\n frame.node.edges[\"*\"] = insertionNode\n }\n\n if (frame.str.length == 0) {\n insertionNode.final = true\n }\n\n stack.push({\n node: insertionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str\n })\n\n // deletion\n // can only do a deletion if we have enough edits remaining\n // and if there are characters left to delete in the string\n if (frame.str.length > 1) {\n stack.push({\n node: frame.node,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n })\n }\n\n // deletion\n // just removing the last character from the str\n if (frame.str.length == 1) {\n frame.node.final = true\n }\n\n // substitution\n // can only do a substitution if we have enough edits remaining\n // and if there are characters left to substitute\n if (frame.str.length >= 1) {\n if (\"*\" in frame.node.edges) {\n var substitutionNode = frame.node.edges[\"*\"]\n } else {\n var substitutionNode = new lunr.TokenSet\n frame.node.edges[\"*\"] = substitutionNode\n }\n\n if (frame.str.length == 1) {\n substitutionNode.final = true\n }\n\n stack.push({\n node: substitutionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n })\n }\n\n // transposition\n // can only do a transposition if there are edits remaining\n // and there are enough characters to transpose\n if (frame.str.length > 1) {\n var charA = frame.str.charAt(0),\n charB = frame.str.charAt(1),\n transposeNode\n\n if (charB in frame.node.edges) {\n transposeNode = frame.node.edges[charB]\n } else {\n transposeNode = new lunr.TokenSet\n frame.node.edges[charB] = transposeNode\n }\n\n if (frame.str.length == 1) {\n transposeNode.final = true\n }\n\n stack.push({\n node: transposeNode,\n editsRemaining: frame.editsRemaining - 1,\n str: charA + frame.str.slice(2)\n })\n }\n }\n\n return root\n}\n\n/**\n * Creates a TokenSet from a string.\n *\n * The string may contain one or more wildcard characters (*)\n * that will allow wildcard matching when intersecting with\n * another TokenSet.\n *\n * @param {string} str - The string to create a TokenSet from.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromString = function (str) {\n var node = new lunr.TokenSet,\n root = node\n\n /*\n * Iterates through all characters within the passed string\n * appending a node for each character.\n *\n * When a wildcard character is found then a self\n * referencing edge is introduced to continually match\n * any number of any characters.\n */\n for (var i = 0, len = str.length; i < len; i++) {\n var char = str[i],\n final = (i == len - 1)\n\n if (char == \"*\") {\n node.edges[char] = node\n node.final = final\n\n } else {\n var next = new lunr.TokenSet\n next.final = final\n\n node.edges[char] = next\n node = next\n }\n }\n\n return root\n}\n\n/**\n * Converts this TokenSet into an array of strings\n * contained within the TokenSet.\n *\n * This is not intended to be used on a TokenSet that\n * contains wildcards, in these cases the results are\n * undefined and are likely to cause an infinite loop.\n *\n * @returns {string[]}\n */\nlunr.TokenSet.prototype.toArray = function () {\n var words = []\n\n var stack = [{\n prefix: \"\",\n node: this\n }]\n\n while (stack.length) {\n var frame = stack.pop(),\n edges = Object.keys(frame.node.edges),\n len = edges.length\n\n if (frame.node.final) {\n /* In Safari, at this point the prefix is sometimes corrupted, see:\n * https://github.com/olivernn/lunr.js/issues/279 Calling any\n * String.prototype method forces Safari to \"cast\" this string to what\n * it's supposed to be, fixing the bug. */\n frame.prefix.charAt(0)\n words.push(frame.prefix)\n }\n\n for (var i = 0; i < len; i++) {\n var edge = edges[i]\n\n stack.push({\n prefix: frame.prefix.concat(edge),\n node: frame.node.edges[edge]\n })\n }\n }\n\n return words\n}\n\n/**\n * Generates a string representation of a TokenSet.\n *\n * This is intended to allow TokenSets to be used as keys\n * in objects, largely to aid the construction and minimisation\n * of a TokenSet. As such it is not designed to be a human\n * friendly representation of the TokenSet.\n *\n * @returns {string}\n */\nlunr.TokenSet.prototype.toString = function () {\n // NOTE: Using Object.keys here as this.edges is very likely\n // to enter 'hash-mode' with many keys being added\n //\n // avoiding a for-in loop here as it leads to the function\n // being de-optimised (at least in V8). From some simple\n // benchmarks the performance is comparable, but allowing\n // V8 to optimize may mean easy performance wins in the future.\n\n if (this._str) {\n return this._str\n }\n\n var str = this.final ? '1' : '0',\n labels = Object.keys(this.edges).sort(),\n len = labels.length\n\n for (var i = 0; i < len; i++) {\n var label = labels[i],\n node = this.edges[label]\n\n str = str + label + node.id\n }\n\n return str\n}\n\n/**\n * Returns a new TokenSet that is the intersection of\n * this TokenSet and the passed TokenSet.\n *\n * This intersection will take into account any wildcards\n * contained within the TokenSet.\n *\n * @param {lunr.TokenSet} b - An other TokenSet to intersect with.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.prototype.intersect = function (b) {\n var output = new lunr.TokenSet,\n frame = undefined\n\n var stack = [{\n qNode: b,\n output: output,\n node: this\n }]\n\n while (stack.length) {\n frame = stack.pop()\n\n // NOTE: As with the #toString method, we are using\n // Object.keys and a for loop instead of a for-in loop\n // as both of these objects enter 'hash' mode, causing\n // the function to be de-optimised in V8\n var qEdges = Object.keys(frame.qNode.edges),\n qLen = qEdges.length,\n nEdges = Object.keys(frame.node.edges),\n nLen = nEdges.length\n\n for (var q = 0; q < qLen; q++) {\n var qEdge = qEdges[q]\n\n for (var n = 0; n < nLen; n++) {\n var nEdge = nEdges[n]\n\n if (nEdge == qEdge || qEdge == '*') {\n var node = frame.node.edges[nEdge],\n qNode = frame.qNode.edges[qEdge],\n final = node.final && qNode.final,\n next = undefined\n\n if (nEdge in frame.output.edges) {\n // an edge already exists for this character\n // no need to create a new node, just set the finality\n // bit unless this node is already final\n next = frame.output.edges[nEdge]\n next.final = next.final || final\n\n } else {\n // no edge exists yet, must create one\n // set the finality bit and insert it\n // into the output\n next = new lunr.TokenSet\n next.final = final\n frame.output.edges[nEdge] = next\n }\n\n stack.push({\n qNode: qNode,\n output: next,\n node: node\n })\n }\n }\n }\n }\n\n return output\n}\nlunr.TokenSet.Builder = function () {\n this.previousWord = \"\"\n this.root = new lunr.TokenSet\n this.uncheckedNodes = []\n this.minimizedNodes = {}\n}\n\nlunr.TokenSet.Builder.prototype.insert = function (word) {\n var node,\n commonPrefix = 0\n\n if (word < this.previousWord) {\n throw new Error (\"Out of order word insertion\")\n }\n\n for (var i = 0; i < word.length && i < this.previousWord.length; i++) {\n if (word[i] != this.previousWord[i]) break\n commonPrefix++\n }\n\n this.minimize(commonPrefix)\n\n if (this.uncheckedNodes.length == 0) {\n node = this.root\n } else {\n node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child\n }\n\n for (var i = commonPrefix; i < word.length; i++) {\n var nextNode = new lunr.TokenSet,\n char = word[i]\n\n node.edges[char] = nextNode\n\n this.uncheckedNodes.push({\n parent: node,\n char: char,\n child: nextNode\n })\n\n node = nextNode\n }\n\n node.final = true\n this.previousWord = word\n}\n\nlunr.TokenSet.Builder.prototype.finish = function () {\n this.minimize(0)\n}\n\nlunr.TokenSet.Builder.prototype.minimize = function (downTo) {\n for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) {\n var node = this.uncheckedNodes[i],\n childKey = node.child.toString()\n\n if (childKey in this.minimizedNodes) {\n node.parent.edges[node.char] = this.minimizedNodes[childKey]\n } else {\n // Cache the key for this node since\n // we know it can't change anymore\n node.child._str = childKey\n\n this.minimizedNodes[childKey] = node.child\n }\n\n this.uncheckedNodes.pop()\n }\n}\n/*!\n * lunr.Index\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * An index contains the built index of all documents and provides a query interface\n * to the index.\n *\n * Usually instances of lunr.Index will not be created using this constructor, instead\n * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be\n * used to load previously built and serialized indexes.\n *\n * @constructor\n * @param {Object} attrs - The attributes of the built search index.\n * @param {Object} attrs.invertedIndex - An index of term/field to document reference.\n * @param {Object<string, lunr.Vector>} attrs.fieldVectors - Field vectors\n * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens.\n * @param {string[]} attrs.fields - The names of indexed document fields.\n * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms.\n */\nlunr.Index = function (attrs) {\n this.invertedIndex = attrs.invertedIndex\n this.fieldVectors = attrs.fieldVectors\n this.tokenSet = attrs.tokenSet\n this.fields = attrs.fields\n this.pipeline = attrs.pipeline\n}\n\n/**\n * A result contains details of a document matching a search query.\n * @typedef {Object} lunr.Index~Result\n * @property {string} ref - The reference of the document this result represents.\n * @property {number} score - A number between 0 and 1 representing how similar this document is to the query.\n * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match.\n */\n\n/**\n * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple\n * query language which itself is parsed into an instance of lunr.Query.\n *\n * For programmatically building queries it is advised to directly use lunr.Query, the query language\n * is best used for human entered text rather than program generated text.\n *\n * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported\n * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello'\n * or 'world', though those that contain both will rank higher in the results.\n *\n * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can\n * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding\n * wildcards will increase the number of documents that will be found but can also have a negative\n * impact on query performance, especially with wildcards at the beginning of a term.\n *\n * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term\n * hello in the title field will match this query. Using a field not present in the index will lead\n * to an error being thrown.\n *\n * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term\n * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported\n * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2.\n * Avoid large values for edit distance to improve query performance.\n *\n * Each term also supports a presence modifier. By default a term's presence in document is optional, however\n * this can be changed to either required or prohibited. For a term's presence to be required in a document the\n * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and\n * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not\n * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'.\n *\n * To escape special characters the backslash character '\\' can be used, this allows searches to include\n * characters that would normally be considered modifiers, e.g. `foo\\~2` will search for a term \"foo~2\" instead\n * of attempting to apply a boost of 2 to the search term \"foo\".\n *\n * @typedef {string} lunr.Index~QueryString\n * @example <caption>Simple single term query</caption>\n * hello\n * @example <caption>Multiple term query</caption>\n * hello world\n * @example <caption>term scoped to a field</caption>\n * title:hello\n * @example <caption>term with a boost of 10</caption>\n * hello^10\n * @example <caption>term with an edit distance of 2</caption>\n * hello~2\n * @example <caption>terms with presence modifiers</caption>\n * -foo +bar baz\n */\n\n/**\n * Performs a search against the index using lunr query syntax.\n *\n * Results will be returned sorted by their score, the most relevant results\n * will be returned first. For details on how the score is calculated, please see\n * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}.\n *\n * For more programmatic querying use lunr.Index#query.\n *\n * @param {lunr.Index~QueryString} queryString - A string containing a lunr query.\n * @throws {lunr.QueryParseError} If the passed query string cannot be parsed.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.search = function (queryString) {\n return this.query(function (query) {\n var parser = new lunr.QueryParser(queryString, query)\n parser.parse()\n })\n}\n\n/**\n * A query builder callback provides a query object to be used to express\n * the query to perform on the index.\n *\n * @callback lunr.Index~queryBuilder\n * @param {lunr.Query} query - The query object to build up.\n * @this lunr.Query\n */\n\n/**\n * Performs a query against the index using the yielded lunr.Query object.\n *\n * If performing programmatic queries against the index, this method is preferred\n * over lunr.Index#search so as to avoid the additional query parsing overhead.\n *\n * A query object is yielded to the supplied function which should be used to\n * express the query to be run against the index.\n *\n * Note that although this function takes a callback parameter it is _not_ an\n * asynchronous operation, the callback is just yielded a query object to be\n * customized.\n *\n * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.query = function (fn) {\n // for each query clause\n // * process terms\n // * expand terms from token set\n // * find matching documents and metadata\n // * get document vectors\n // * score documents\n\n var query = new lunr.Query(this.fields),\n matchingFields = Object.create(null),\n queryVectors = Object.create(null),\n termFieldCache = Object.create(null),\n requiredMatches = Object.create(null),\n prohibitedMatches = Object.create(null)\n\n /*\n * To support field level boosts a query vector is created per\n * field. An empty vector is eagerly created to support negated\n * queries.\n */\n for (var i = 0; i < this.fields.length; i++) {\n queryVectors[this.fields[i]] = new lunr.Vector\n }\n\n fn.call(query, query)\n\n for (var i = 0; i < query.clauses.length; i++) {\n /*\n * Unless the pipeline has been disabled for this term, which is\n * the case for terms with wildcards, we need to pass the clause\n * term through the search pipeline. A pipeline returns an array\n * of processed terms. Pipeline functions may expand the passed\n * term, which means we may end up performing multiple index lookups\n * for a single query term.\n */\n var clause = query.clauses[i],\n terms = null,\n clauseMatches = lunr.Set.empty\n\n if (clause.usePipeline) {\n terms = this.pipeline.runString(clause.term, {\n fields: clause.fields\n })\n } else {\n terms = [clause.term]\n }\n\n for (var m = 0; m < terms.length; m++) {\n var term = terms[m]\n\n /*\n * Each term returned from the pipeline needs to use the same query\n * clause object, e.g. the same boost and or edit distance. The\n * simplest way to do this is to re-use the clause object but mutate\n * its term property.\n */\n clause.term = term\n\n /*\n * From the term in the clause we create a token set which will then\n * be used to intersect the indexes token set to get a list of terms\n * to lookup in the inverted index\n */\n var termTokenSet = lunr.TokenSet.fromClause(clause),\n expandedTerms = this.tokenSet.intersect(termTokenSet).toArray()\n\n /*\n * If a term marked as required does not exist in the tokenSet it is\n * impossible for the search to return any matches. We set all the field\n * scoped required matches set to empty and stop examining any further\n * clauses.\n */\n if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k]\n requiredMatches[field] = lunr.Set.empty\n }\n\n break\n }\n\n for (var j = 0; j < expandedTerms.length; j++) {\n /*\n * For each term get the posting and termIndex, this is required for\n * building the query vector.\n */\n var expandedTerm = expandedTerms[j],\n posting = this.invertedIndex[expandedTerm],\n termIndex = posting._index\n\n for (var k = 0; k < clause.fields.length; k++) {\n /*\n * For each field that this query term is scoped by (by default\n * all fields are in scope) we need to get all the document refs\n * that have this term in that field.\n *\n * The posting is the entry in the invertedIndex for the matching\n * term from above.\n */\n var field = clause.fields[k],\n fieldPosting = posting[field],\n matchingDocumentRefs = Object.keys(fieldPosting),\n termField = expandedTerm + \"/\" + field,\n matchingDocumentsSet = new lunr.Set(matchingDocumentRefs)\n\n /*\n * if the presence of this term is required ensure that the matching\n * documents are added to the set of required matches for this clause.\n *\n */\n if (clause.presence == lunr.Query.presence.REQUIRED) {\n clauseMatches = clauseMatches.union(matchingDocumentsSet)\n\n if (requiredMatches[field] === undefined) {\n requiredMatches[field] = lunr.Set.complete\n }\n }\n\n /*\n * if the presence of this term is prohibited ensure that the matching\n * documents are added to the set of prohibited matches for this field,\n * creating that set if it does not yet exist.\n */\n if (clause.presence == lunr.Query.presence.PROHIBITED) {\n if (prohibitedMatches[field] === undefined) {\n prohibitedMatches[field] = lunr.Set.empty\n }\n\n prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet)\n\n /*\n * Prohibited matches should not be part of the query vector used for\n * similarity scoring and no metadata should be extracted so we continue\n * to the next field\n */\n continue\n }\n\n /*\n * The query field vector is populated using the termIndex found for\n * the term and a unit value with the appropriate boost applied.\n * Using upsert because there could already be an entry in the vector\n * for the term we are working with. In that case we just add the scores\n * together.\n */\n queryVectors[field].upsert(termIndex, clause.boost, function (a, b) { return a + b })\n\n /**\n * If we've already seen this term, field combo then we've already collected\n * the matching documents and metadata, no need to go through all that again\n */\n if (termFieldCache[termField]) {\n continue\n }\n\n for (var l = 0; l < matchingDocumentRefs.length; l++) {\n /*\n * All metadata for this term/field/document triple\n * are then extracted and collected into an instance\n * of lunr.MatchData ready to be returned in the query\n * results\n */\n var matchingDocumentRef = matchingDocumentRefs[l],\n matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field),\n metadata = fieldPosting[matchingDocumentRef],\n fieldMatch\n\n if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) {\n matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata)\n } else {\n fieldMatch.add(expandedTerm, field, metadata)\n }\n\n }\n\n termFieldCache[termField] = true\n }\n }\n }\n\n /**\n * If the presence was required we need to update the requiredMatches field sets.\n * We do this after all fields for the term have collected their matches because\n * the clause terms presence is required in _any_ of the fields not _all_ of the\n * fields.\n */\n if (clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k]\n requiredMatches[field] = requiredMatches[field].intersect(clauseMatches)\n }\n }\n }\n\n /**\n * Need to combine the field scoped required and prohibited\n * matching documents into a global set of required and prohibited\n * matches\n */\n var allRequiredMatches = lunr.Set.complete,\n allProhibitedMatches = lunr.Set.empty\n\n for (var i = 0; i < this.fields.length; i++) {\n var field = this.fields[i]\n\n if (requiredMatches[field]) {\n allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field])\n }\n\n if (prohibitedMatches[field]) {\n allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field])\n }\n }\n\n var matchingFieldRefs = Object.keys(matchingFields),\n results = [],\n matches = Object.create(null)\n\n /*\n * If the query is negated (contains only prohibited terms)\n * we need to get _all_ fieldRefs currently existing in the\n * index. This is only done when we know that the query is\n * entirely prohibited terms to avoid any cost of getting all\n * fieldRefs unnecessarily.\n *\n * Additionally, blank MatchData must be created to correctly\n * populate the results.\n */\n if (query.isNegated()) {\n matchingFieldRefs = Object.keys(this.fieldVectors)\n\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n var matchingFieldRef = matchingFieldRefs[i]\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRef)\n matchingFields[matchingFieldRef] = new lunr.MatchData\n }\n }\n\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n /*\n * Currently we have document fields that match the query, but we\n * need to return documents. The matchData and scores are combined\n * from multiple fields belonging to the same document.\n *\n * Scores are calculated by field, using the query vectors created\n * above, and combined into a final document score using addition.\n */\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]),\n docRef = fieldRef.docRef\n\n if (!allRequiredMatches.contains(docRef)) {\n continue\n }\n\n if (allProhibitedMatches.contains(docRef)) {\n continue\n }\n\n var fieldVector = this.fieldVectors[fieldRef],\n score = queryVectors[fieldRef.fieldName].similarity(fieldVector),\n docMatch\n\n if ((docMatch = matches[docRef]) !== undefined) {\n docMatch.score += score\n docMatch.matchData.combine(matchingFields[fieldRef])\n } else {\n var match = {\n ref: docRef,\n score: score,\n matchData: matchingFields[fieldRef]\n }\n matches[docRef] = match\n results.push(match)\n }\n }\n\n /*\n * Sort the results objects by score, highest first.\n */\n return results.sort(function (a, b) {\n return b.score - a.score\n })\n}\n\n/**\n * Prepares the index for JSON serialization.\n *\n * The schema for this JSON blob will be described in a\n * separate JSON schema file.\n *\n * @returns {Object}\n */\nlunr.Index.prototype.toJSON = function () {\n var invertedIndex = Object.keys(this.invertedIndex)\n .sort()\n .map(function (term) {\n return [term, this.invertedIndex[term]]\n }, this)\n\n var fieldVectors = Object.keys(this.fieldVectors)\n .map(function (ref) {\n return [ref, this.fieldVectors[ref].toJSON()]\n }, this)\n\n return {\n version: lunr.version,\n fields: this.fields,\n fieldVectors: fieldVectors,\n invertedIndex: invertedIndex,\n pipeline: this.pipeline.toJSON()\n }\n}\n\n/**\n * Loads a previously serialized lunr.Index\n *\n * @param {Object} serializedIndex - A previously serialized lunr.Index\n * @returns {lunr.Index}\n */\nlunr.Index.load = function (serializedIndex) {\n var attrs = {},\n fieldVectors = {},\n serializedVectors = serializedIndex.fieldVectors,\n invertedIndex = Object.create(null),\n serializedInvertedIndex = serializedIndex.invertedIndex,\n tokenSetBuilder = new lunr.TokenSet.Builder,\n pipeline = lunr.Pipeline.load(serializedIndex.pipeline)\n\n if (serializedIndex.version != lunr.version) {\n lunr.utils.warn(\"Version mismatch when loading serialised index. Current version of lunr '\" + lunr.version + \"' does not match serialized index '\" + serializedIndex.version + \"'\")\n }\n\n for (var i = 0; i < serializedVectors.length; i++) {\n var tuple = serializedVectors[i],\n ref = tuple[0],\n elements = tuple[1]\n\n fieldVectors[ref] = new lunr.Vector(elements)\n }\n\n for (var i = 0; i < serializedInvertedIndex.length; i++) {\n var tuple = serializedInvertedIndex[i],\n term = tuple[0],\n posting = tuple[1]\n\n tokenSetBuilder.insert(term)\n invertedIndex[term] = posting\n }\n\n tokenSetBuilder.finish()\n\n attrs.fields = serializedIndex.fields\n\n attrs.fieldVectors = fieldVectors\n attrs.invertedIndex = invertedIndex\n attrs.tokenSet = tokenSetBuilder.root\n attrs.pipeline = pipeline\n\n return new lunr.Index(attrs)\n}\n/*!\n * lunr.Builder\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.Builder performs indexing on a set of documents and\n * returns instances of lunr.Index ready for querying.\n *\n * All configuration of the index is done via the builder, the\n * fields to index, the document reference, the text processing\n * pipeline and document scoring parameters are all set on the\n * builder before indexing.\n *\n * @constructor\n * @property {string} _ref - Internal reference to the document reference field.\n * @property {string[]} _fields - Internal reference to the document fields to index.\n * @property {object} invertedIndex - The inverted index maps terms to document fields.\n * @property {object} documentTermFrequencies - Keeps track of document term frequencies.\n * @property {object} documentLengths - Keeps track of the length of documents added to the index.\n * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing.\n * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing.\n * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index.\n * @property {number} documentCount - Keeps track of the total number of documents indexed.\n * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75.\n * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2.\n * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space.\n * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index.\n */\nlunr.Builder = function () {\n this._ref = \"id\"\n this._fields = Object.create(null)\n this._documents = Object.create(null)\n this.invertedIndex = Object.create(null)\n this.fieldTermFrequencies = {}\n this.fieldLengths = {}\n this.tokenizer = lunr.tokenizer\n this.pipeline = new lunr.Pipeline\n this.searchPipeline = new lunr.Pipeline\n this.documentCount = 0\n this._b = 0.75\n this._k1 = 1.2\n this.termIndex = 0\n this.metadataWhitelist = []\n}\n\n/**\n * Sets the document field used as the document reference. Every document must have this field.\n * The type of this field in the document should be a string, if it is not a string it will be\n * coerced into a string by calling toString.\n *\n * The default ref is 'id'.\n *\n * The ref should _not_ be changed during indexing, it should be set before any documents are\n * added to the index. Changing it during indexing can lead to inconsistent results.\n *\n * @param {string} ref - The name of the reference field in the document.\n */\nlunr.Builder.prototype.ref = function (ref) {\n this._ref = ref\n}\n\n/**\n * A function that is used to extract a field from a document.\n *\n * Lunr expects a field to be at the top level of a document, if however the field\n * is deeply nested within a document an extractor function can be used to extract\n * the right field for indexing.\n *\n * @callback fieldExtractor\n * @param {object} doc - The document being added to the index.\n * @returns {?(string|object|object[])} obj - The object that will be indexed for this field.\n * @example <caption>Extracting a nested field</caption>\n * function (doc) { return doc.nested.field }\n */\n\n/**\n * Adds a field to the list of document fields that will be indexed. Every document being\n * indexed should have this field. Null values for this field in indexed documents will\n * not cause errors but will limit the chance of that document being retrieved by searches.\n *\n * All fields should be added before adding documents to the index. Adding fields after\n * a document has been indexed will have no effect on already indexed documents.\n *\n * Fields can be boosted at build time. This allows terms within that field to have more\n * importance when ranking search results. Use a field boost to specify that matches within\n * one field are more important than other fields.\n *\n * @param {string} fieldName - The name of a field to index in all documents.\n * @param {object} attributes - Optional attributes associated with this field.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this field.\n * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document.\n * @throws {RangeError} fieldName cannot contain unsupported characters '/'\n */\nlunr.Builder.prototype.field = function (fieldName, attributes) {\n if (/\\//.test(fieldName)) {\n throw new RangeError (\"Field '\" + fieldName + \"' contains illegal character '/'\")\n }\n\n this._fields[fieldName] = attributes || {}\n}\n\n/**\n * A parameter to tune the amount of field length normalisation that is applied when\n * calculating relevance scores. A value of 0 will completely disable any normalisation\n * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b\n * will be clamped to the range 0 - 1.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.b = function (number) {\n if (number < 0) {\n this._b = 0\n } else if (number > 1) {\n this._b = 1\n } else {\n this._b = number\n }\n}\n\n/**\n * A parameter that controls the speed at which a rise in term frequency results in term\n * frequency saturation. The default value is 1.2. Setting this to a higher value will give\n * slower saturation levels, a lower value will result in quicker saturation.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.k1 = function (number) {\n this._k1 = number\n}\n\n/**\n * Adds a document to the index.\n *\n * Before adding fields to the index the index should have been fully setup, with the document\n * ref and all fields to index already having been specified.\n *\n * The document must have a field name as specified by the ref (by default this is 'id') and\n * it should have all fields defined for indexing, though null or undefined values will not\n * cause errors.\n *\n * Entire documents can be boosted at build time. Applying a boost to a document indicates that\n * this document should rank higher in search results than other documents.\n *\n * @param {object} doc - The document to add to the index.\n * @param {object} attributes - Optional attributes associated with this document.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this document.\n */\nlunr.Builder.prototype.add = function (doc, attributes) {\n var docRef = doc[this._ref],\n fields = Object.keys(this._fields)\n\n this._documents[docRef] = attributes || {}\n this.documentCount += 1\n\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i],\n extractor = this._fields[fieldName].extractor,\n field = extractor ? extractor(doc) : doc[fieldName],\n tokens = this.tokenizer(field, {\n fields: [fieldName]\n }),\n terms = this.pipeline.run(tokens),\n fieldRef = new lunr.FieldRef (docRef, fieldName),\n fieldTerms = Object.create(null)\n\n this.fieldTermFrequencies[fieldRef] = fieldTerms\n this.fieldLengths[fieldRef] = 0\n\n // store the length of this field for this document\n this.fieldLengths[fieldRef] += terms.length\n\n // calculate term frequencies for this field\n for (var j = 0; j < terms.length; j++) {\n var term = terms[j]\n\n if (fieldTerms[term] == undefined) {\n fieldTerms[term] = 0\n }\n\n fieldTerms[term] += 1\n\n // add to inverted index\n // create an initial posting if one doesn't exist\n if (this.invertedIndex[term] == undefined) {\n var posting = Object.create(null)\n posting[\"_index\"] = this.termIndex\n this.termIndex += 1\n\n for (var k = 0; k < fields.length; k++) {\n posting[fields[k]] = Object.create(null)\n }\n\n this.invertedIndex[term] = posting\n }\n\n // add an entry for this term/fieldName/docRef to the invertedIndex\n if (this.invertedIndex[term][fieldName][docRef] == undefined) {\n this.invertedIndex[term][fieldName][docRef] = Object.create(null)\n }\n\n // store all whitelisted metadata about this token in the\n // inverted index\n for (var l = 0; l < this.metadataWhitelist.length; l++) {\n var metadataKey = this.metadataWhitelist[l],\n metadata = term.metadata[metadataKey]\n\n if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) {\n this.invertedIndex[term][fieldName][docRef][metadataKey] = []\n }\n\n this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata)\n }\n }\n\n }\n}\n\n/**\n * Calculates the average document length for this index\n *\n * @private\n */\nlunr.Builder.prototype.calculateAverageFieldLengths = function () {\n\n var fieldRefs = Object.keys(this.fieldLengths),\n numberOfFields = fieldRefs.length,\n accumulator = {},\n documentsWithField = {}\n\n for (var i = 0; i < numberOfFields; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n field = fieldRef.fieldName\n\n documentsWithField[field] || (documentsWithField[field] = 0)\n documentsWithField[field] += 1\n\n accumulator[field] || (accumulator[field] = 0)\n accumulator[field] += this.fieldLengths[fieldRef]\n }\n\n var fields = Object.keys(this._fields)\n\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i]\n accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName]\n }\n\n this.averageFieldLength = accumulator\n}\n\n/**\n * Builds a vector space model of every document using lunr.Vector\n *\n * @private\n */\nlunr.Builder.prototype.createFieldVectors = function () {\n var fieldVectors = {},\n fieldRefs = Object.keys(this.fieldTermFrequencies),\n fieldRefsLength = fieldRefs.length,\n termIdfCache = Object.create(null)\n\n for (var i = 0; i < fieldRefsLength; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n fieldName = fieldRef.fieldName,\n fieldLength = this.fieldLengths[fieldRef],\n fieldVector = new lunr.Vector,\n termFrequencies = this.fieldTermFrequencies[fieldRef],\n terms = Object.keys(termFrequencies),\n termsLength = terms.length\n\n\n var fieldBoost = this._fields[fieldName].boost || 1,\n docBoost = this._documents[fieldRef.docRef].boost || 1\n\n for (var j = 0; j < termsLength; j++) {\n var term = terms[j],\n tf = termFrequencies[term],\n termIndex = this.invertedIndex[term]._index,\n idf, score, scoreWithPrecision\n\n if (termIdfCache[term] === undefined) {\n idf = lunr.idf(this.invertedIndex[term], this.documentCount)\n termIdfCache[term] = idf\n } else {\n idf = termIdfCache[term]\n }\n\n score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf)\n score *= fieldBoost\n score *= docBoost\n scoreWithPrecision = Math.round(score * 1000) / 1000\n // Converts 1.23456789 to 1.234.\n // Reducing the precision so that the vectors take up less\n // space when serialised. Doing it now so that they behave\n // the same before and after serialisation. Also, this is\n // the fastest approach to reducing a number's precision in\n // JavaScript.\n\n fieldVector.insert(termIndex, scoreWithPrecision)\n }\n\n fieldVectors[fieldRef] = fieldVector\n }\n\n this.fieldVectors = fieldVectors\n}\n\n/**\n * Creates a token set of all tokens in the index using lunr.TokenSet\n *\n * @private\n */\nlunr.Builder.prototype.createTokenSet = function () {\n this.tokenSet = lunr.TokenSet.fromArray(\n Object.keys(this.invertedIndex).sort()\n )\n}\n\n/**\n * Builds the index, creating an instance of lunr.Index.\n *\n * This completes the indexing process and should only be called\n * once all documents have been added to the index.\n *\n * @returns {lunr.Index}\n */\nlunr.Builder.prototype.build = function () {\n this.calculateAverageFieldLengths()\n this.createFieldVectors()\n this.createTokenSet()\n\n return new lunr.Index({\n invertedIndex: this.invertedIndex,\n fieldVectors: this.fieldVectors,\n tokenSet: this.tokenSet,\n fields: Object.keys(this._fields),\n pipeline: this.searchPipeline\n })\n}\n\n/**\n * Applies a plugin to the index builder.\n *\n * A plugin is a function that is called with the index builder as its context.\n * Plugins can be used to customise or extend the behaviour of the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied when building the index.\n *\n * The plugin function will be called with the index builder as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index builder as its context.\n *\n * @param {Function} plugin The plugin to apply.\n */\nlunr.Builder.prototype.use = function (fn) {\n var args = Array.prototype.slice.call(arguments, 1)\n args.unshift(this)\n fn.apply(this, args)\n}\n/**\n * Contains and collects metadata about a matching document.\n * A single instance of lunr.MatchData is returned as part of every\n * lunr.Index~Result.\n *\n * @constructor\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n * @property {object} metadata - A cloned collection of metadata associated with this document.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData = function (term, field, metadata) {\n var clonedMetadata = Object.create(null),\n metadataKeys = Object.keys(metadata || {})\n\n // Cloning the metadata to prevent the original\n // being mutated during match data combination.\n // Metadata is kept in an array within the inverted\n // index so cloning the data can be done with\n // Array#slice\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i]\n clonedMetadata[key] = metadata[key].slice()\n }\n\n this.metadata = Object.create(null)\n\n if (term !== undefined) {\n this.metadata[term] = Object.create(null)\n this.metadata[term][field] = clonedMetadata\n }\n}\n\n/**\n * An instance of lunr.MatchData will be created for every term that matches a\n * document. However only one instance is required in a lunr.Index~Result. This\n * method combines metadata from another instance of lunr.MatchData with this\n * objects metadata.\n *\n * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData.prototype.combine = function (otherMatchData) {\n var terms = Object.keys(otherMatchData.metadata)\n\n for (var i = 0; i < terms.length; i++) {\n var term = terms[i],\n fields = Object.keys(otherMatchData.metadata[term])\n\n if (this.metadata[term] == undefined) {\n this.metadata[term] = Object.create(null)\n }\n\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j],\n keys = Object.keys(otherMatchData.metadata[term][field])\n\n if (this.metadata[term][field] == undefined) {\n this.metadata[term][field] = Object.create(null)\n }\n\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k]\n\n if (this.metadata[term][field][key] == undefined) {\n this.metadata[term][field][key] = otherMatchData.metadata[term][field][key]\n } else {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key])\n }\n\n }\n }\n }\n}\n\n/**\n * Add metadata for a term/field pair to this instance of match data.\n *\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n */\nlunr.MatchData.prototype.add = function (term, field, metadata) {\n if (!(term in this.metadata)) {\n this.metadata[term] = Object.create(null)\n this.metadata[term][field] = metadata\n return\n }\n\n if (!(field in this.metadata[term])) {\n this.metadata[term][field] = metadata\n return\n }\n\n var metadataKeys = Object.keys(metadata)\n\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i]\n\n if (key in this.metadata[term][field]) {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key])\n } else {\n this.metadata[term][field][key] = metadata[key]\n }\n }\n}\n/**\n * A lunr.Query provides a programmatic way of defining queries to be performed\n * against a {@link lunr.Index}.\n *\n * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method\n * so the query object is pre-initialized with the right index fields.\n *\n * @constructor\n * @property {lunr.Query~Clause[]} clauses - An array of query clauses.\n * @property {string[]} allFields - An array of all available fields in a lunr.Index.\n */\nlunr.Query = function (allFields) {\n this.clauses = []\n this.allFields = allFields\n}\n\n/**\n * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause.\n *\n * This allows wildcards to be added to the beginning and end of a term without having to manually do any string\n * concatenation.\n *\n * The wildcard constants can be bitwise combined to select both leading and trailing wildcards.\n *\n * @constant\n * @default\n * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour\n * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists\n * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with trailing wildcard</caption>\n * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING })\n * @example <caption>query term with leading and trailing wildcard</caption>\n * query.term('foo', {\n * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING\n * })\n */\n\nlunr.Query.wildcard = new String (\"*\")\nlunr.Query.wildcard.NONE = 0\nlunr.Query.wildcard.LEADING = 1\nlunr.Query.wildcard.TRAILING = 2\n\n/**\n * Constants for indicating what kind of presence a term must have in matching documents.\n *\n * @constant\n * @enum {number}\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with required presence</caption>\n * query.term('foo', { presence: lunr.Query.presence.REQUIRED })\n */\nlunr.Query.presence = {\n /**\n * Term's presence in a document is optional, this is the default value.\n */\n OPTIONAL: 1,\n\n /**\n * Term's presence in a document is required, documents that do not contain\n * this term will not be returned.\n */\n REQUIRED: 2,\n\n /**\n * Term's presence in a document is prohibited, documents that do contain\n * this term will not be returned.\n */\n PROHIBITED: 3\n}\n\n/**\n * A single clause in a {@link lunr.Query} contains a term and details on how to\n * match that term against a {@link lunr.Index}.\n *\n * @typedef {Object} lunr.Query~Clause\n * @property {string[]} fields - The fields in an index this clause should be matched against.\n * @property {number} [boost=1] - Any boost that should be applied when matching this clause.\n * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be.\n * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline.\n * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended.\n * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents.\n */\n\n/**\n * Adds a {@link lunr.Query~Clause} to this query.\n *\n * Unless the clause contains the fields to be matched all fields will be matched. In addition\n * a default boost of 1 is applied to the clause.\n *\n * @param {lunr.Query~Clause} clause - The clause to add to this query.\n * @see lunr.Query~Clause\n * @returns {lunr.Query}\n */\nlunr.Query.prototype.clause = function (clause) {\n if (!('fields' in clause)) {\n clause.fields = this.allFields\n }\n\n if (!('boost' in clause)) {\n clause.boost = 1\n }\n\n if (!('usePipeline' in clause)) {\n clause.usePipeline = true\n }\n\n if (!('wildcard' in clause)) {\n clause.wildcard = lunr.Query.wildcard.NONE\n }\n\n if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) {\n clause.term = \"*\" + clause.term\n }\n\n if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) {\n clause.term = \"\" + clause.term + \"*\"\n }\n\n if (!('presence' in clause)) {\n clause.presence = lunr.Query.presence.OPTIONAL\n }\n\n this.clauses.push(clause)\n\n return this\n}\n\n/**\n * A negated query is one in which every clause has a presence of\n * prohibited. These queries require some special processing to return\n * the expected results.\n *\n * @returns boolean\n */\nlunr.Query.prototype.isNegated = function () {\n for (var i = 0; i < this.clauses.length; i++) {\n if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause}\n * to the list of clauses that make up this query.\n *\n * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion\n * to a token or token-like string should be done before calling this method.\n *\n * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an\n * array, each term in the array will share the same options.\n *\n * @param {object|object[]} term - The term(s) to add to the query.\n * @param {object} [options] - Any additional properties to add to the query clause.\n * @returns {lunr.Query}\n * @see lunr.Query#clause\n * @see lunr.Query~Clause\n * @example <caption>adding a single term to a query</caption>\n * query.term(\"foo\")\n * @example <caption>adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard</caption>\n * query.term(\"foo\", {\n * fields: [\"title\"],\n * boost: 10,\n * wildcard: lunr.Query.wildcard.TRAILING\n * })\n * @example <caption>using lunr.tokenizer to convert a string to tokens before using them as terms</caption>\n * query.term(lunr.tokenizer(\"foo bar\"))\n */\nlunr.Query.prototype.term = function (term, options) {\n if (Array.isArray(term)) {\n term.forEach(function (t) { this.term(t, lunr.utils.clone(options)) }, this)\n return this\n }\n\n var clause = options || {}\n clause.term = term.toString()\n\n this.clause(clause)\n\n return this\n}\nlunr.QueryParseError = function (message, start, end) {\n this.name = \"QueryParseError\"\n this.message = message\n this.start = start\n this.end = end\n}\n\nlunr.QueryParseError.prototype = new Error\nlunr.QueryLexer = function (str) {\n this.lexemes = []\n this.str = str\n this.length = str.length\n this.pos = 0\n this.start = 0\n this.escapeCharPositions = []\n}\n\nlunr.QueryLexer.prototype.run = function () {\n var state = lunr.QueryLexer.lexText\n\n while (state) {\n state = state(this)\n }\n}\n\nlunr.QueryLexer.prototype.sliceString = function () {\n var subSlices = [],\n sliceStart = this.start,\n sliceEnd = this.pos\n\n for (var i = 0; i < this.escapeCharPositions.length; i++) {\n sliceEnd = this.escapeCharPositions[i]\n subSlices.push(this.str.slice(sliceStart, sliceEnd))\n sliceStart = sliceEnd + 1\n }\n\n subSlices.push(this.str.slice(sliceStart, this.pos))\n this.escapeCharPositions.length = 0\n\n return subSlices.join('')\n}\n\nlunr.QueryLexer.prototype.emit = function (type) {\n this.lexemes.push({\n type: type,\n str: this.sliceString(),\n start: this.start,\n end: this.pos\n })\n\n this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.escapeCharacter = function () {\n this.escapeCharPositions.push(this.pos - 1)\n this.pos += 1\n}\n\nlunr.QueryLexer.prototype.next = function () {\n if (this.pos >= this.length) {\n return lunr.QueryLexer.EOS\n }\n\n var char = this.str.charAt(this.pos)\n this.pos += 1\n return char\n}\n\nlunr.QueryLexer.prototype.width = function () {\n return this.pos - this.start\n}\n\nlunr.QueryLexer.prototype.ignore = function () {\n if (this.start == this.pos) {\n this.pos += 1\n }\n\n this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.backup = function () {\n this.pos -= 1\n}\n\nlunr.QueryLexer.prototype.acceptDigitRun = function () {\n var char, charCode\n\n do {\n char = this.next()\n charCode = char.charCodeAt(0)\n } while (charCode > 47 && charCode < 58)\n\n if (char != lunr.QueryLexer.EOS) {\n this.backup()\n }\n}\n\nlunr.QueryLexer.prototype.more = function () {\n return this.pos < this.length\n}\n\nlunr.QueryLexer.EOS = 'EOS'\nlunr.QueryLexer.FIELD = 'FIELD'\nlunr.QueryLexer.TERM = 'TERM'\nlunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'\nlunr.QueryLexer.BOOST = 'BOOST'\nlunr.QueryLexer.PRESENCE = 'PRESENCE'\n\nlunr.QueryLexer.lexField = function (lexer) {\n lexer.backup()\n lexer.emit(lunr.QueryLexer.FIELD)\n lexer.ignore()\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexTerm = function (lexer) {\n if (lexer.width() > 1) {\n lexer.backup()\n lexer.emit(lunr.QueryLexer.TERM)\n }\n\n lexer.ignore()\n\n if (lexer.more()) {\n return lunr.QueryLexer.lexText\n }\n}\n\nlunr.QueryLexer.lexEditDistance = function (lexer) {\n lexer.ignore()\n lexer.acceptDigitRun()\n lexer.emit(lunr.QueryLexer.EDIT_DISTANCE)\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexBoost = function (lexer) {\n lexer.ignore()\n lexer.acceptDigitRun()\n lexer.emit(lunr.QueryLexer.BOOST)\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexEOS = function (lexer) {\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n}\n\n// This matches the separator used when tokenising fields\n// within a document. These should match otherwise it is\n// not possible to search for some tokens within a document.\n//\n// It is possible for the user to change the separator on the\n// tokenizer so it _might_ clash with any other of the special\n// characters already used within the search string, e.g. :.\n//\n// This means that it is possible to change the separator in\n// such a way that makes some words unsearchable using a search\n// string.\nlunr.QueryLexer.termSeparator = lunr.tokenizer.separator\n\nlunr.QueryLexer.lexText = function (lexer) {\n while (true) {\n var char = lexer.next()\n\n if (char == lunr.QueryLexer.EOS) {\n return lunr.QueryLexer.lexEOS\n }\n\n // Escape character is '\\'\n if (char.charCodeAt(0) == 92) {\n lexer.escapeCharacter()\n continue\n }\n\n if (char == \":\") {\n return lunr.QueryLexer.lexField\n }\n\n if (char == \"~\") {\n lexer.backup()\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n return lunr.QueryLexer.lexEditDistance\n }\n\n if (char == \"^\") {\n lexer.backup()\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n return lunr.QueryLexer.lexBoost\n }\n\n // \"+\" indicates term presence is required\n // checking for length to ensure that only\n // leading \"+\" are considered\n if (char == \"+\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE)\n return lunr.QueryLexer.lexText\n }\n\n // \"-\" indicates term presence is prohibited\n // checking for length to ensure that only\n // leading \"-\" are considered\n if (char == \"-\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE)\n return lunr.QueryLexer.lexText\n }\n\n if (char.match(lunr.QueryLexer.termSeparator)) {\n return lunr.QueryLexer.lexTerm\n }\n }\n}\n\nlunr.QueryParser = function (str, query) {\n this.lexer = new lunr.QueryLexer (str)\n this.query = query\n this.currentClause = {}\n this.lexemeIdx = 0\n}\n\nlunr.QueryParser.prototype.parse = function () {\n this.lexer.run()\n this.lexemes = this.lexer.lexemes\n\n var state = lunr.QueryParser.parseClause\n\n while (state) {\n state = state(this)\n }\n\n return this.query\n}\n\nlunr.QueryParser.prototype.peekLexeme = function () {\n return this.lexemes[this.lexemeIdx]\n}\n\nlunr.QueryParser.prototype.consumeLexeme = function () {\n var lexeme = this.peekLexeme()\n this.lexemeIdx += 1\n return lexeme\n}\n\nlunr.QueryParser.prototype.nextClause = function () {\n var completedClause = this.currentClause\n this.query.clause(completedClause)\n this.currentClause = {}\n}\n\nlunr.QueryParser.parseClause = function (parser) {\n var lexeme = parser.peekLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n switch (lexeme.type) {\n case lunr.QueryLexer.PRESENCE:\n return lunr.QueryParser.parsePresence\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expected either a field or a term, found \" + lexeme.type\n\n if (lexeme.str.length >= 1) {\n errorMessage += \" with value '\" + lexeme.str + \"'\"\n }\n\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n}\n\nlunr.QueryParser.parsePresence = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n switch (lexeme.str) {\n case \"-\":\n parser.currentClause.presence = lunr.Query.presence.PROHIBITED\n break\n case \"+\":\n parser.currentClause.presence = lunr.Query.presence.REQUIRED\n break\n default:\n var errorMessage = \"unrecognised presence operator'\" + lexeme.str + \"'\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term or field, found nothing\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expecting term or field, found '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseField = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n if (parser.query.allFields.indexOf(lexeme.str) == -1) {\n var possibleFields = parser.query.allFields.map(function (f) { return \"'\" + f + \"'\" }).join(', '),\n errorMessage = \"unrecognised field '\" + lexeme.str + \"', possible fields: \" + possibleFields\n\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.fields = [lexeme.str]\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term, found nothing\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expecting term, found '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseTerm = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n parser.currentClause.term = lexeme.str.toLowerCase()\n\n if (lexeme.str.indexOf(\"*\") != -1) {\n parser.currentClause.usePipeline = false\n }\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseEditDistance = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n var editDistance = parseInt(lexeme.str, 10)\n\n if (isNaN(editDistance)) {\n var errorMessage = \"edit distance must be numeric\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.editDistance = editDistance\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseBoost = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n var boost = parseInt(lexeme.str, 10)\n\n if (isNaN(boost)) {\n var errorMessage = \"boost must be numeric\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.boost = boost\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory)\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory()\n } else {\n // Browser globals (root is window)\n root.lunr = factory()\n }\n }(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr\n }))\n})();\n\n},{}],4:[function(require,module,exports){\nmodule.exports={\n \"name\": \"pict-application\",\n \"version\": \"1.0.30\",\n \"description\": \"Application base class for a pict view-based application\",\n \"main\": \"source/Pict-Application.js\",\n \"scripts\": {\n \"test\": \"npx mocha -u tdd -R spec\",\n \"start\": \"node source/Pict-Application.js\",\n \"coverage\": \"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec\",\n \"build\": \"npx quack build\",\n \"docker-dev-build\": \"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local\",\n \"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\",\n \"docker-dev-shell\": \"docker exec -it pict-application-dev /bin/bash\",\n \"tests\": \"npx mocha -u tdd --exit -R spec --grep\",\n \"lint\": \"eslint source/**\",\n \"types\": \"tsc -p .\"\n },\n \"types\": \"types/source/Pict-Application.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/stevenvelozo/pict-application.git\"\n },\n \"author\": \"steven velozo <steven@velozo.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/pict-application/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/pict-application#readme\",\n \"devDependencies\": {\n \"@eslint/js\": \"^9.28.0\",\n \"browser-env\": \"^3.3.0\",\n \"eslint\": \"^9.28.0\",\n \"pict\": \"^1.0.343\",\n \"pict-provider\": \"^1.0.7\",\n \"pict-view\": \"^1.0.64\",\n \"quackage\": \"^1.0.45\",\n \"typescript\": \"^5.9.3\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n },\n \"dependencies\": {\n \"fable-serviceproviderbase\": \"^3.0.15\"\n }\n}\n\n},{}],5:[function(require,module,exports){\nconst libFableServiceBase = require('fable-serviceproviderbase')\n\nconst libPackage = require('../package.json');\n\nconst defaultPictSettings = (\n\t{\n\t\tName: 'DefaultPictApplication',\n\n\t\t// The main \"viewport\" is the view that is used to host our application\n\t\tMainViewportViewIdentifier: 'Default-View',\n\t\tMainViewportRenderableHash: false,\n\t\tMainViewportDestinationAddress: false,\n\t\tMainViewportDefaultDataAddress: false,\n\n\t\t// Whether or not we should automatically render the main viewport and other autorender views after we initialize the pict application\n\t\tAutoSolveAfterInitialize: true,\n\t\tAutoRenderMainViewportViewAfterInitialize: true,\n\t\tAutoRenderViewsAfterInitialize: false,\n\t\tAutoLoginAfterInitialize: false,\n\t\tAutoLoadDataAfterLogin: false,\n\n\t\tConfigurationOnlyViews: [],\n\n\t\tManifests: {},\n\t\t// The prefix to prepend on all template destination hashes\n\t\tIdentifierAddressPrefix: 'PICT-'\n\t});\n\n/**\n * Base class for pict applications.\n */\nclass PictApplication extends libFableServiceBase\n{\n\t/**\n\t * @param {import('fable')} pFable\n\t * @param {Record<string, any>} [pOptions]\n\t * @param {string} [pServiceHash]\n\t */\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tlet tmpCarryOverConfiguration = (typeof(pFable.settings.PictApplicationConfiguration) === 'object') ? pFable.settings.PictApplicationConfiguration : {};\n\t\tlet tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(defaultPictSettings)), tmpCarryOverConfiguration, pOptions);\n\t\tsuper(pFable, tmpOptions, pServiceHash);\n\n\t\t/** @type {any} */\n\t\tthis.options;\n\t\t/** @type {any} */\n\t\tthis.log;\n\t\t/** @type {import('pict') & import('fable')} */\n\t\tthis.fable;\n\t\t/** @type {string} */\n\t\tthis.UUID;\n\t\t/** @type {string} */\n\t\tthis.Hash;\n\t\t/**\n\t\t * @type {{ [key: string]: any }}\n\t\t */\n\t\tthis.servicesMap;\n\n\t\tthis.serviceType = 'PictApplication';\n\t\t/** @type {Record<string, any>} */\n\t\tthis._Package = libPackage;\n\n\t\t// Convenience and consistency naming\n\t\tthis.pict = this.fable;\n\t\t// Wire in the essential Pict state\n\t\t/** @type {Record<string, any>} */\n\t\tthis.AppData = this.fable.AppData;\n\t\t/** @type {Record<string, any>} */\n\t\tthis.Bundle = this.fable.Bundle;\n\n\t\t/** @type {number} */\n\t\tthis.initializeTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastSolvedTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastLoginTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastMarshalFromViewsTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastMarshalToViewsTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastAutoRenderTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastLoadDataTimestamp;\n\n\t\t// Load all the manifests for the application\n\t\tlet tmpManifestKeys = Object.keys(this.options.Manifests);\n\t\tif (tmpManifestKeys.length > 0)\n\t\t{\n\t\t\tfor (let i = 0; i < tmpManifestKeys.length; i++)\n\t\t\t{\n\t\t\t\t// Load each manifest\n\t\t\t\tlet tmpManifestKey = tmpManifestKeys[i];\n\t\t\t\tthis.fable.instantiateServiceProvider('Manifest', this.options.Manifests[tmpManifestKey], tmpManifestKey);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Solve All Views */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonPreSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onPreSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonPreSolveAsync(fCallback)\n\t{\n\t\tthis.onPreSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeSolveAsync(fCallback)\n\t{\n\t\tthis.onBeforeSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonSolveAsync(fCallback)\n\t{\n\t\tthis.onSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tsolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} executing solve() function...`)\n\t\t}\n\n\t\t// Walk through any loaded providers and solve them as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoSolveWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToSolve.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToSolve.sort((a, b) => { return a.options.AutoSolveOrdinal - b.options.AutoSolveOrdinal; });\n\t\tfor (let i = 0; i < tmpProvidersToSolve.length; i++)\n\t\t{\n\t\t\ttmpProvidersToSolve[i].solve(tmpProvidersToSolve[i]);\n\t\t}\n\n\t\tthis.onBeforeSolve();\n\t\t// Now walk through any loaded views and initialize them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoInitialize)\n\t\t\t{\n\t\t\t\ttmpViewsToSolve.push(tmpView);\n\t\t\t}\n\t\t}\n\t\t// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpViewsToSolve.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\tfor (let i = 0; i < tmpViewsToSolve.length; i++)\n\t\t{\n\t\t\ttmpViewsToSolve[i].solve();\n\t\t}\n\t\tthis.onSolve();\n\t\tthis.onAfterSolve();\n\t\tthis.lastSolvedTimestamp = this.fable.log.getTimeStamp();\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tsolveAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\ttmpAnticipate.anticipate(this.onBeforeSolveAsync.bind(this));\n\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\t\t// Walk through any loaded providers and solve them as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoSolveWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToSolve.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToSolve.sort((a, b) => { return a.options.AutoSolveOrdinal - b.options.AutoSolveOrdinal; });\n\t\tfor (let i = 0; i < tmpProvidersToSolve.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvidersToSolve[i].solveAsync.bind(tmpProvidersToSolve[i]));\n\t\t}\n\n\t\t// Walk through any loaded views and solve them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoSolveWithApp)\n\t\t\t{\n\t\t\t\ttmpViewsToSolve.push(tmpView);\n\t\t\t}\n\t\t}\n\t\t// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpViewsToSolve.sort((a, b) => { return a.options.AutoSolveOrdinal - b.options.AutoSolveOrdinal; });\n\t\tfor (let i = 0; i < tmpViewsToSolve.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpViewsToSolve[i].solveAsync.bind(tmpViewsToSolve[i]));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onSolveAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastSolvedTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterSolveAsync(fCallback)\n\t{\n\t\tthis.onAfterSolve();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Application Login */\n\t/* -------------------------------------------------------------------------- */\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeLoginAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeLoginAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonLoginAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onLoginAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tloginAsync(fCallback)\n\t{\n\t\tconst tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tlet tmpCallback = fCallback;\n\n\t\tif (typeof(tmpCallback) !== 'function')\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loginAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeLoginAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onLoginAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterLoginAsync.bind(this));\n\n\t\t// check and see if we should automatically trigger a data load\n\t\tif (this.options.AutoLoadDataAfterLogin)\n\t\t{\n\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t{\n\t\t\t\tif (!this.isLoggedIn())\n\t\t\t\t{\n\t\t\t\t\treturn fNext();\n\t\t\t\t}\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto loading data after login...`);\n\t\t\t\t}\n\t\t\t\t//TODO: should data load errors funnel here? this creates a weird coupling between login and data load callbacks\n\t\t\t\tthis.loadDataAsync((pError) =>\n\t\t\t\t{\n\t\t\t\t\tfNext(pError);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loginAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastLoginTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Check if the application state is logged in. Defaults to true. Override this method in your application based on login requirements.\n\t *\n\t * @return {boolean}\n\t */\n\tisLoggedIn()\n\t{\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterLoginAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterLoginAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Application LoadData */\n\t/* -------------------------------------------------------------------------- */\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tloadDataAsync(fCallback)\n\t{\n\t\tconst tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tlet tmpCallback = fCallback;\n\n\t\tif (typeof(tmpCallback) !== 'function')\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loadDataAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeLoadDataAsync.bind(this));\n\n\t\t// Walk through any loaded providers and load their data as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToLoadData = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoLoadDataWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToLoadData.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToLoadData.sort((a, b) => { return a.options.AutoLoadDataOrdinal - b.options.AutoLoadDataOrdinal; });\n\n\t\tfor (const tmpProvider of tmpProvidersToLoadData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onBeforeLoadDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onLoadDataAsync.bind(this));\n\n\t\t//TODO: think about ways to parallelize these\n\t\tfor (const tmpProvider of tmpProvidersToLoadData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onLoadDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onAfterLoadDataAsync.bind(this));\n\n\t\tfor (const tmpProvider of tmpProvidersToLoadData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onAfterLoadDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t/** @param {Error} [pError] */\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loadDataAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastLoadDataTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Application SaveData */\n\t/* -------------------------------------------------------------------------- */\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tsaveDataAsync(fCallback)\n\t{\n\t\tconst tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tlet tmpCallback = fCallback;\n\n\t\tif (typeof(tmpCallback) !== 'function')\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} saveDataAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeSaveDataAsync.bind(this));\n\n\t\t// Walk through any loaded providers and load their data as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToSaveData = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoSaveDataWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToSaveData.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToSaveData.sort((a, b) => { return a.options.AutoSaveDataOrdinal - b.options.AutoSaveDataOrdinal; });\n\n\t\tfor (const tmpProvider of tmpProvidersToSaveData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onBeforeSaveDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onSaveDataAsync.bind(this));\n\n\t\t//TODO: think about ways to parallelize these\n\t\tfor (const tmpProvider of tmpProvidersToSaveData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onSaveDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onAfterSaveDataAsync.bind(this));\n\n\t\tfor (const tmpProvider of tmpProvidersToSaveData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onAfterSaveDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t/** @param {Error} [pError] */\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} saveDataAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastSaveDataTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Initialize Application */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeInitializeAsync(fCallback)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonInitializeAsync(fCallback)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tinitialize()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} initialize:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tthis.onBeforeInitialize();\n\n\t\t\tif ('ConfigurationOnlyViews' in this.options)\n\t\t\t{\n\t\t\t\t// Load all the configuration only views\n\t\t\t\tfor (let i = 0; i < this.options.ConfigurationOnlyViews.length; i++)\n\t\t\t\t{\n\t\t\t\t\tlet tmpViewIdentifier = (typeof(this.options.ConfigurationOnlyViews[i].ViewIdentifier) === 'undefined') ? `AutoView-${this.fable.getUUID()}`\n\t\t\t\t\t\t\t\t\t\t\t: this.options.ConfigurationOnlyViews[i].ViewIdentifier;\n\t\t\t\t\tthis.log.info(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} adding configuration only view: ${tmpViewIdentifier}`);\n\t\t\t\t\tthis.pict.addView(tmpViewIdentifier, this.options.ConfigurationOnlyViews[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.onInitialize();\n\n\t\t\t// Walk through any loaded providers and initialize them as well.\n\t\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\t\tlet tmpProvidersToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\t\tif (tmpProvider.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpProvidersToInitialize.push(tmpProvider);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\t\ttmpProvidersToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpProvidersToInitialize.length; i++)\n\t\t\t{\n\t\t\t\ttmpProvidersToInitialize[i].initialize();\n\t\t\t}\n\n\t\t\t// Now walk through any loaded views and initialize them as well.\n\t\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t\tlet tmpViewsToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\t\tif (tmpView.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpViewsToInitialize.push(tmpView);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\t\ttmpViewsToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpViewsToInitialize.length; i++)\n\t\t\t{\n\t\t\t\ttmpViewsToInitialize[i].initialize();\n\t\t\t}\n\n\t\t\tthis.onAfterInitialize();\n\t\t\tif (this.options.AutoSolveAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto solving after initialization...`);\n\t\t\t\t}\n\t\t\t\t// Solve the template synchronously\n\t\t\t\tthis.solve();\n\t\t\t}\n\t\t\t// Now check and see if we should automatically render as well\n\t\t\tif (this.options.AutoRenderMainViewportViewAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto rendering after initialization...`);\n\t\t\t\t}\n\t\t\t\t// Render the template synchronously\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tthis.initializeTimestamp = this.fable.log.getTimeStamp();\n\t\t\tthis.onCompletionOfInitialize();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initialize called but initialization is already completed. Aborting.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tinitializeAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync:`);\n\t\t}\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.pict.LogNoisiness > 3)\n\t\t\t{\n\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} beginning initialization...`);\n\t\t\t}\n\n\t\t\tif ('ConfigurationOnlyViews' in this.options)\n\t\t\t{\n\t\t\t\t// Load all the configuration only views\n\t\t\t\tfor (let i = 0; i < this.options.ConfigurationOnlyViews.length; i++)\n\t\t\t\t{\n\t\t\t\t\tlet tmpViewIdentifier = (typeof(this.options.ConfigurationOnlyViews[i].ViewIdentifier) === 'undefined') ? `AutoView-${this.fable.getUUID()}`\n\t\t\t\t\t\t\t\t\t\t\t: this.options.ConfigurationOnlyViews[i].ViewIdentifier;\n\t\t\t\t\tthis.log.info(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} adding configuration only view: ${tmpViewIdentifier}`);\n\t\t\t\t\tthis.pict.addView(tmpViewIdentifier, this.options.ConfigurationOnlyViews[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\n\t\t\t// Walk through any loaded providers and solve them as well.\n\t\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\t\tlet tmpProvidersToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\t\tif (tmpProvider.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpProvidersToInitialize.push(tmpProvider);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\t\ttmpProvidersToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpProvidersToInitialize.length; i++)\n\t\t\t{\n\t\t\t\ttmpAnticipate.anticipate(tmpProvidersToInitialize[i].initializeAsync.bind(tmpProvidersToInitialize[i]));\n\t\t\t}\n\n\t\t\t// Now walk through any loaded views and initialize them as well.\n\t\t\t// TODO: Some optimization cleverness could be gained by grouping them into a parallelized async operation, by ordinal.\n\t\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t\tlet tmpViewsToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\t\tif (tmpView.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpViewsToInitialize.push(tmpView);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the views by their priority\n\t\t\t// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff\n\t\t\ttmpViewsToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpViewsToInitialize.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpView = tmpViewsToInitialize[i];\n\t\t\t\ttmpAnticipate.anticipate(tmpView.initializeAsync.bind(tmpView));\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\tif (this.options.AutoLoginAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto login (asynchronously) after initialization...`);\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(this.loginAsync.bind(this));\n\t\t\t}\n\n\t\t\tif (this.options.AutoSolveAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto solving (asynchronously) after initialization...`);\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(this.solveAsync.bind(this));\n\t\t\t}\n\n\t\t\tif (this.options.AutoRenderMainViewportViewAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto rendering (asynchronously) after initialization...`);\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(this.renderMainViewportAsync.bind(this));\n\t\t\t}\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync Error: ${pError.message || pError}`, { stack: pError.stack });\n\t\t\t\t\t}\n\t\t\t\t\tthis.initializeTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initialization complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} async initialize called but initialization is already completed. Aborting.`);\n\t\t\t// TODO: Should this be an error?\n\t\t\treturn this.onCompletionOfInitializeAsync(tmpCallback);\n\t\t}\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fCallback();\n\t}\n\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonCompletionOfInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onCompletionOfInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonCompletionOfInitializeAsync(fCallback)\n\t{\n\t\tthis.onCompletionOfInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal Data From All Views */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeMarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeMarshalFromViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeMarshalFromViewsAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalFromViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonMarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onMarshalFromViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonMarshalFromViewsAsync(fCallback)\n\t{\n\t\tthis.onMarshalFromViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tmarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} executing marshalFromViews() function...`)\n\t\t}\n\t\tthis.onBeforeMarshalFromViews();\n\t\t// Now walk through any loaded views and initialize them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalFromViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalFromViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalFromViews.length; i++)\n\t\t{\n\t\t\ttmpViewsToMarshalFromViews[i].marshalFromView();\n\t\t}\n\t\tthis.onMarshalFromViews();\n\t\tthis.onAfterMarshalFromViews();\n\t\tthis.lastMarshalFromViewsTimestamp = this.fable.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tmarshalFromViewsAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewsAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));\n\t\t// Walk through any loaded views and marshalFromViews them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalFromViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalFromViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalFromViews.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpViewsToMarshalFromViews[i].marshalFromViewAsync.bind(tmpViewsToMarshalFromViews[i]));\n\t\t}\n\t\ttmpAnticipate.anticipate(this.onMarshalFromViewsAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalFromViewsAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewsAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalFromViewsTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterMarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterMarshalFromViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterMarshalFromViewsAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalFromViews();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal Data To All Views */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeMarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeMarshalToViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeMarshalToViewsAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalToViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonMarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onMarshalToViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonMarshalToViewsAsync(fCallback)\n\t{\n\t\tthis.onMarshalToViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tmarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} executing marshalToViews() function...`)\n\t\t}\n\t\tthis.onBeforeMarshalToViews();\n\t\t// Now walk through any loaded views and initialize them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalToViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalToViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalToViews.length; i++)\n\t\t{\n\t\t\ttmpViewsToMarshalToViews[i].marshalToView();\n\t\t}\n\t\tthis.onMarshalToViews();\n\t\tthis.onAfterMarshalToViews();\n\t\tthis.lastMarshalToViewsTimestamp = this.fable.log.getTimeStamp();\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tmarshalToViewsAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewsAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));\n\t\t// Walk through any loaded views and marshalToViews them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalToViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalToViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalToViews.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpViewsToMarshalToViews[i].marshalToViewAsync.bind(tmpViewsToMarshalToViews[i]));\n\t\t}\n\t\ttmpAnticipate.anticipate(this.onMarshalToViewsAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalToViewsAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewsAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalToViewsTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterMarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterMarshalToViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterMarshalToViewsAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalToViews();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Render View */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeRenderAsync(fCallback)\n\t{\n\t\tthis.onBeforeRender();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {string} [pViewIdentifier] - The hash of the view to render. By default, the main viewport view is rendered.\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string} [pTemplateDataAddress] - The address where the data for the template is stored.\n\t *\n\t * TODO: Should we support objects for pTemplateDataAddress for parity with pict-view?\n\t */\n\trender(pViewIdentifier, pRenderableHash, pRenderDestinationAddress, pTemplateDataAddress)\n\t{\n\t\tlet tmpViewIdentifier = (typeof(pViewIdentifier) !== 'string') ? this.options.MainViewportViewIdentifier : pViewIdentifier;\n\t\tlet tmpRenderableHash = (typeof(pRenderableHash) !== 'string') ? this.options.MainViewportRenderableHash : pRenderableHash;\n\t\tlet tmpRenderDestinationAddress = (typeof(pRenderDestinationAddress) !== 'string') ? this.options.MainViewportDestinationAddress : pRenderDestinationAddress;\n\t\tlet tmpTemplateDataAddress = (typeof(pTemplateDataAddress) !== 'string') ? this.options.MainViewportDefaultDataAddress : pTemplateDataAddress;\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} VIEW Renderable[${tmpRenderableHash}] Destination[${tmpRenderDestinationAddress}] TemplateDataAddress[${tmpTemplateDataAddress}] render:`);\n\t\t}\n\n\t\tthis.onBeforeRender();\n\n\t\t// Now get the view (by hash) from the loaded views\n\t\tlet tmpView = (typeof (tmpViewIdentifier) === 'string') ? this.servicesMap.PictView[tmpViewIdentifier] : false;\n\t\tif (!tmpView)\n\t\t{\n\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} could not render from View ${tmpViewIdentifier} because it is not a valid view.`);\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.onRender();\n\n\t\ttmpView.render(tmpRenderableHash, tmpRenderDestinationAddress, tmpTemplateDataAddress);\n\n\t\tthis.onAfterRender();\n\n\t\treturn true;\n\t}\n\t/**\n\t * @return {boolean}\n\t */\n\tonRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonRenderAsync(fCallback)\n\t{\n\t\tthis.onRender();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {string|((error?: Error) => void)} pViewIdentifier - The hash of the view to render. By default, the main viewport view is rendered. (or the callback)\n\t * @param {string|((error?: Error) => void)} [pRenderableHash] - The hash of the renderable to render. (or the callback)\n\t * @param {string|((error?: Error) => void)} [pRenderDestinationAddress] - The address where the renderable will be rendered. (or the callback)\n\t * @param {string|((error?: Error) => void)} [pTemplateDataAddress] - The address where the data for the template is stored. (or the callback)\n\t * @param {(error?: Error) => void} [fCallback] - The callback, if all other parameters are provided.\n\t *\n\t * TODO: Should we support objects for pTemplateDataAddress for parity with pict-view?\n\t */\n\trenderAsync(pViewIdentifier, pRenderableHash, pRenderDestinationAddress, pTemplateDataAddress, fCallback)\n\t{\n\t\tlet tmpViewIdentifier = (typeof(pViewIdentifier) !== 'string') ? this.options.MainViewportViewIdentifier : pViewIdentifier;\n\t\tlet tmpRenderableHash = (typeof(pRenderableHash) !== 'string') ? this.options.MainViewportRenderableHash : pRenderableHash;\n\t\tlet tmpRenderDestinationAddress = (typeof(pRenderDestinationAddress) !== 'string') ? this.options.MainViewportDestinationAddress : pRenderDestinationAddress;\n\t\tlet tmpTemplateDataAddress = (typeof(pTemplateDataAddress) !== 'string') ? this.options.MainViewportDefaultDataAddress : pTemplateDataAddress;\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\t(typeof(pTemplateDataAddress) === 'function') ? pTemplateDataAddress :\n\t\t\t\t\t\t\t(typeof(pRenderDestinationAddress) === 'function') ? pRenderDestinationAddress :\n\t\t\t\t\t\t\t(typeof(pRenderableHash) === 'function') ? pRenderableHash :\n\t\t\t\t\t\t\t(typeof(pViewIdentifier) === 'function') ? pViewIdentifier :\n\t\t\t\t\t\t\tfalse;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} VIEW Renderable[${tmpRenderableHash}] Destination[${tmpRenderDestinationAddress}] TemplateDataAddress[${tmpTemplateDataAddress}] renderAsync:`);\n\t\t}\n\n\t\tlet tmpRenderAnticipate = this.fable.newAnticipate();\n\n\t\ttmpRenderAnticipate.anticipate(this.onBeforeRenderAsync.bind(this));\n\n\t\tlet tmpView = (typeof (tmpViewIdentifier) === 'string') ? this.servicesMap.PictView[tmpViewIdentifier] : false;\n\t\tif (!tmpView)\n\t\t{\n\t\t\tlet tmpErrorMessage = `PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} could not asynchronously render from View ${tmpViewIdentifier} because it is not a valid view.`;\n\t\t\tif (this.pict.LogNoisiness > 3)\n\t\t\t{\n\t\t\t\tthis.log.error(tmpErrorMessage);\n\t\t\t}\n\t\t\treturn tmpCallback(new Error(tmpErrorMessage));\n\t\t}\n\n\t\ttmpRenderAnticipate.anticipate(this.onRenderAsync.bind(this));\n\n\t\ttmpRenderAnticipate.anticipate(\n\t\t\t(fNext) =>\n\t\t\t{\n\t\t\t\ttmpView.renderAsync.call(tmpView, tmpRenderableHash, tmpRenderDestinationAddress, tmpTemplateDataAddress, fNext);\n\t\t\t});\n\n\t\ttmpRenderAnticipate.anticipate(this.onAfterRenderAsync.bind(this));\n\n\t\treturn tmpRenderAnticipate.wait(tmpCallback);\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterRenderAsync(fCallback)\n\t{\n\t\tthis.onAfterRender();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\trenderMainViewport()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderMainViewport:`);\n\t\t}\n\n\t\treturn this.render();\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\trenderMainViewportAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderMainViewportAsync:`);\n\t\t}\n\n\t\treturn this.renderAsync(fCallback);\n\t}\n\t/**\n\t * @return {void}\n\t */\n\trenderAutoViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} beginning renderAutoViews...`);\n\t\t}\n\t\t// Now walk through any loaded views and sort them by the AutoRender ordinal\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t// Sort the views by their priority\n\t\t// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff\n\t\ttmpLoadedViews.sort((a, b) =>\n\t\t{\n\t\t\treturn this.pict.views[a].options.AutoRenderOrdinal - this.pict.views[b].options.AutoRenderOrdinal;\n\t\t});\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoRender)\n\t\t\t{\n\t\t\t\ttmpView.render();\n\t\t\t}\n\t\t}\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync complete.`);\n\t\t}\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\trenderAutoViewsAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\tfalse;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} beginning renderAutoViewsAsync...`);\n\t\t}\n\n\t\t// Now walk through any loaded views and sort them by the AutoRender ordinal\n\t\t// TODO: Some optimization cleverness could be gained by grouping them into a parallelized async operation, by ordinal.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t// Sort the views by their priority\n\t\t// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff\n\t\ttmpLoadedViews.sort((a, b) =>\n\t\t{\n\t\t\treturn this.pict.views[a].options.AutoRenderOrdinal - this.pict.views[b].options.AutoRenderOrdinal;\n\t\t});\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoRender)\n\t\t\t{\n\t\t\t\ttmpAnticipate.anticipate(tmpView.renderAsync.bind(tmpView));\n\t\t\t}\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tthis.lastAutoRenderTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync complete.`);\n\t\t\t\t}\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tget isPictApplication()\n\t{\n\t\treturn true;\n\t}\n}\n\nmodule.exports = PictApplication;\n\n},{\"../package.json\":4,\"fable-serviceproviderbase\":2}],6:[function(require,module,exports){\nmodule.exports={\n \"name\": \"pict-provider\",\n \"version\": \"1.0.7\",\n \"description\": \"Pict Provider Base Class\",\n \"main\": \"source/Pict-Provider.js\",\n \"scripts\": {\n \"start\": \"node source/Pict-Provider.js\",\n \"test\": \"npx mocha -u tdd -R spec\",\n \"tests\": \"npx mocha -u tdd --exit -R spec --grep\",\n \"coverage\": \"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec\",\n \"build\": \"npx quack build\",\n \"docker-dev-build\": \"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local\",\n \"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\",\n \"docker-dev-shell\": \"docker exec -it pict-provider-dev /bin/bash\",\n \"lint\": \"eslint source/**\",\n \"types\": \"tsc -p .\"\n },\n \"types\": \"types/source/Pict-Provider.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/stevenvelozo/pict-provider.git\"\n },\n \"author\": \"steven velozo <steven@velozo.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/pict-provider/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/pict-provider#readme\",\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.1\",\n \"eslint\": \"^9.39.1\",\n \"pict\": \"^1.0.342\",\n \"quackage\": \"^1.0.45\",\n \"typescript\": \"^5.9.3\"\n },\n \"dependencies\": {\n \"fable-serviceproviderbase\": \"^3.0.15\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n }\n}\n\n},{}],7:[function(require,module,exports){\nconst libFableServiceBase = require('fable-serviceproviderbase');\n\nconst libPackage = require('../package.json');\n\nconst defaultPictProviderSettings = (\n\t{\n\t\tProviderIdentifier: false,\n\n\t\t// If this is set to true, when the App initializes this will.\n\t\t// After the App initializes, initialize will be called as soon as it's added.\n\t\tAutoInitialize: true,\n\t\tAutoInitializeOrdinal: 0,\n\n\t\tAutoLoadDataWithApp: true,\n\n\t\tAutoSolveWithApp: true,\n\t\tAutoSolveOrdinal: 0,\n\n\t\tManifests: {},\n\n\t\tTemplates: []\n\t});\n\nclass PictProvider extends libFableServiceBase\n{\n\t/**\n\t * @param {import('fable')} pFable - The Fable instance.\n\t * @param {Record<string, any>} [pOptions] - The options for the provider.\n\t * @param {string} [pServiceHash] - The service hash for the provider.\n\t */\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\t// Intersect default options, parent constructor, service information\n\t\tlet tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(defaultPictProviderSettings)), pOptions);\n\t\tsuper(pFable, tmpOptions, pServiceHash);\n\n\t\t/** @type {import('fable') & import('pict') & { instantiateServiceProviderWithoutRegistration(pServiceType: string, pOptions?: Record<string, any>, pCustomServiceHash?: string): any }} */\n\t\tthis.fable;\n\t\t/** @type {import('fable') & import('pict') & { instantiateServiceProviderWithoutRegistration(pServiceType: string, pOptions?: Record<string, any>, pCustomServiceHash?: string): any }} */\n\t\tthis.pict;\n\t\t/** @type {any} */\n\t\tthis.log;\n\t\t/** @type {Record<string, any>} */\n\t\tthis.options;\n\t\t/** @type {string} */\n\t\tthis.UUID;\n\t\t/** @type {string} */\n\t\tthis.Hash;\n\n\t\tif (!this.options.ProviderIdentifier)\n\t\t{\n\t\t\tthis.options.ProviderIdentifier = `AutoProviderID-${this.fable.getUUID()}`;\n\t\t}\n\n\t\tthis.serviceType = 'PictProvider';\n\t\t/** @type {Record<string, any>} */\n\t\tthis._Package = libPackage;\n\n\t\t// Convenience and consistency naming\n\t\tthis.pict = this.fable;\n\n\t\t// Wire in the essential Pict application state\n\t\t/** @type {Record<string, any>} */\n\t\tthis.AppData = this.pict.AppData;\n\t\t/** @type {Record<string, any>} */\n\t\tthis.Bundle = this.pict.Bundle;\n\n\t\tthis.initializeTimestamp = false;\n\t\tthis.lastSolvedTimestamp = false;\n\n\t\tfor (let i = 0; i < this.options.Templates.length; i++)\n\t\t{\n\t\t\tlet tmpDefaultTemplate = this.options.Templates[i];\n\n\t\t\tif (!tmpDefaultTemplate.hasOwnProperty('Postfix') || !tmpDefaultTemplate.hasOwnProperty('Template'))\n\t\t\t{\n\t\t\t\tthis.log.error(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} could not load Default Template ${i} in the options array.`, tmpDefaultTemplate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!tmpDefaultTemplate.Source)\n\t\t\t\t{\n\t\t\t\t\ttmpDefaultTemplate.Source = `PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} options object.`;\n\t\t\t\t}\n\t\t\t\tthis.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix, tmpDefaultTemplate.Postfix, tmpDefaultTemplate.Template, tmpDefaultTemplate.Source);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Initialization */\n\t/* -------------------------------------------------------------------------- */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onBeforeInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after pre-pinitialization.\n\t *\n\t * @return {void}\n\t */\n\tonBeforeInitializeAsync(fCallback)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\treturn fCallback();\n\t}\n\n\tonInitialize()\n\t{\n\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after initialization.\n\t *\n\t * @return {void}\n\t */\n\tonInitializeAsync(fCallback)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fCallback();\n\t}\n\n\tinitialize()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow PROVIDER [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialize:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tthis.onBeforeInitialize();\n\t\t\tthis.onInitialize();\n\t\t\tthis.onAfterInitialize();\n\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialize called but initialization is already completed. Aborting.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after initialization.\n\t *\n\t * @return {void}\n\t */\n\tinitializeAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow PROVIDER [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initializeAsync:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t{\n\t\t\t\tthis.log.info(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} beginning initialization...`);\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialization failed: ${pError.message || pError}`, { Stack: pError.stack });\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.pict.LogNoisiness > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.info(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialization complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn fCallback();\n\t\t\t\t})\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} async initialize called but initialization is already completed. Aborting.`);\n\t\t\t// TODO: Should this be an error?\n\t\t\treturn fCallback();\n\t\t}\n\t}\n\n\tonAfterInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onAfterInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after initialization.\n\t *\n\t * @return {void}\n\t */\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fCallback();\n\t}\n\n\tonPreRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onPreRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after pre-render.\n\t *\n\t * @return {void}\n\t */\n\tonPreRenderAsync(fCallback)\n\t{\n\t\tthis.onPreRender();\n\t\treturn fCallback();\n\t}\n\n\trender()\n\t{\n\t\treturn this.onPreRender();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after render.\n\t *\n\t * @return {void}\n\t */\n\trenderAsync(fCallback)\n\t{\n\t\tthis.onPreRender();\n\t\treturn fCallback();\n\t}\n\n\tonPreSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onPreSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after pre-solve.\n\t *\n\t * @return {void}\n\t */\n\tonPreSolveAsync(fCallback)\n\t{\n\t\tthis.onPreSolve();\n\t\treturn fCallback();\n\t}\n\n\tsolve()\n\t{\n\t\treturn this.onPreSolve();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after solve.\n\t *\n\t * @return {void}\n\t */\n\tsolveAsync(fCallback)\n\t{\n\t\tthis.onPreSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data pre-load.\n\t */\n\tonBeforeLoadDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Hook to allow the provider to load data during application data load.\n\t *\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data load.\n\t */\n\tonLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data post-load.\n\t */\n\tonAfterLoadDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data pre-load.\n\t *\n\t * @return {void}\n\t */\n\tonBeforeSaveDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Hook to allow the provider to load data during application data load.\n\t *\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data load.\n\t *\n\t * @return {void}\n\t */\n\tonSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data post-load.\n\t *\n\t * @return {void}\n\t */\n\tonAfterSaveDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n}\n\nmodule.exports = PictProvider;\n\n},{\"../package.json\":6,\"fable-serviceproviderbase\":2}],8:[function(require,module,exports){\nmodule.exports={\n \"name\": \"pict-view\",\n \"version\": \"1.0.64\",\n \"description\": \"Pict View Base Class\",\n \"main\": \"source/Pict-View.js\",\n \"scripts\": {\n \"test\": \"mocha -u tdd -R spec\",\n \"tests\": \"mocha -u tdd -R spec -g\",\n \"start\": \"node source/Pict-View.js\",\n \"coverage\": \"nyc --reporter=lcov --reporter=text-lcov npm test\",\n \"build\": \"npx quack build\",\n \"docker-dev-build\": \"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local\",\n \"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\",\n \"docker-dev-shell\": \"docker exec -it pict-view-dev /bin/bash\",\n \"types\": \"tsc -p .\",\n \"lint\": \"eslint source/**\"\n },\n \"types\": \"types/source/Pict-View.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/stevenvelozo/pict-view.git\"\n },\n \"author\": \"steven velozo <steven@velozo.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/pict-view/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/pict-view#readme\",\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.1\",\n \"browser-env\": \"^3.3.0\",\n \"eslint\": \"^9.39.1\",\n \"pict\": \"^1.0.337\",\n \"quackage\": \"^1.0.45\",\n \"typescript\": \"^5.9.3\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n },\n \"dependencies\": {\n \"fable\": \"^3.1.46\",\n \"fable-serviceproviderbase\": \"^3.0.15\"\n }\n}\n\n},{}],9:[function(require,module,exports){\n\nconst libFableServiceBase = require('fable-serviceproviderbase');\n\nconst libPackage = require('../package.json');\n\nconst defaultPictViewSettings = (\n\t{\n\t\tDefaultRenderable: false,\n\t\tDefaultDestinationAddress: false,\n\t\tDefaultTemplateRecordAddress: false,\n\n\t\tViewIdentifier: false,\n\n\t\t// If this is set to true, when the App initializes this will.\n\t\t// After the App initializes, initialize will be called as soon as it's added.\n\t\tAutoInitialize: true,\n\t\tAutoInitializeOrdinal: 0,\n\n\t\t// If this is set to true, when the App autorenders (on load) this will.\n\t\t// After the App initializes, render will be called as soon as it's added.\n\t\tAutoRender: true,\n\t\tAutoRenderOrdinal: 0,\n\n\t\tAutoSolveWithApp: true,\n\t\tAutoSolveOrdinal: 0,\n\n\t\tCSSHash: false,\n\t\tCSS: false,\n\t\tCSSProvider: false,\n\t\tCSSPriority: 500,\n\n\t\tTemplates: [],\n\n\t\tDefaultTemplates: [],\n\n\t\tRenderables: [],\n\n\t\tManifests: {}\n\t});\n\n/** @typedef {(error?: Error) => void} ErrorCallback */\n/** @typedef {number | boolean} PictTimestamp */\n\n/**\n * @typedef {'replace' | 'append' | 'prepend' | 'append_once' | 'virtual-assignment'} RenderMethod\n */\n/**\n * @typedef {Object} Renderable\n *\n * @property {string} RenderableHash - A unique hash for the renderable.\n * @property {string} TemplateHash - The hash of the template to use for rendering this renderable.\n * @property {string} [DefaultTemplateRecordAddress] - The default address for resolving the data record for this renderable.\n * @property {string} [ContentDestinationAddress] - The default address (DOM CSS selector) for rendering the content of this renderable.\n * @property {RenderMethod} [RenderMethod=replace] - The method to use when projecting the renderable to the DOM ('replace', 'append', 'prepend', 'append_once', 'virtual-assignment').\n * @property {string} [TestAddress] - The address to use for testing the renderable.\n * @property {string} [TransactionHash] - The transaction hash for the root renderable.\n * @property {string} [RootRenderableViewHash] - The hash of the root renderable.\n * @property {string} [Content] - The rendered content for this renderable, if applicable.\n */\n\n/**\n * Represents a view in the Pict ecosystem.\n */\nclass PictView extends libFableServiceBase\n{\n\t/**\n\t * @param {any} pFable - The Fable object that this service is attached to.\n\t * @param {any} [pOptions] - (optional) The options for this service.\n\t * @param {string} [pServiceHash] - (optional) The hash of the service.\n\t */\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\t// Intersect default options, parent constructor, service information\n\t\tlet tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(defaultPictViewSettings)), pOptions);\n\t\tsuper(pFable, tmpOptions, pServiceHash);\n\t\t//FIXME: add types to fable and ancillaries\n\t\t/** @type {any} */\n\t\tthis.fable;\n\t\t/** @type {any} */\n\t\tthis.options;\n\t\t/** @type {String} */\n\t\tthis.UUID;\n\t\t/** @type {String} */\n\t\tthis.Hash;\n\t\t/** @type {any} */\n\t\tthis.log;\n\n\t\tconst tmpHashIsUUID = this.Hash === this.UUID;\n\t\t//NOTE: since many places are using the view UUID as the HTML element ID, we prefix it to avoid starting with a number\n\t\tthis.UUID = `V-${this.UUID}`;\n\t\tif (tmpHashIsUUID)\n\t\t{\n\t\t\tthis.Hash = this.UUID;\n\t\t}\n\n\t\tif (!this.options.ViewIdentifier)\n\t\t{\n\t\t\tthis.options.ViewIdentifier = `AutoViewID-${this.fable.getUUID()}`;\n\t\t}\n\t\tthis.serviceType = 'PictView';\n\t\t/** @type {Record<string, any>} */\n\t\tthis._Package = libPackage;\n\t\t// Convenience and consistency naming\n\t\t/** @type {import('pict') & { log: any, instantiateServiceProviderWithoutRegistration: (hash: String) => any, instantiateServiceProviderIfNotExists: (hash: string) => any, TransactionTracking: import('pict/types/source/services/Fable-Service-TransactionTracking') }} */\n\t\tthis.pict = this.fable;\n\t\t// Wire in the essential Pict application state\n\t\tthis.AppData = this.pict.AppData;\n\t\tthis.Bundle = this.pict.Bundle;\n\n\t\t/** @type {PictTimestamp} */\n\t\tthis.initializeTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastSolvedTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastRenderedTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastMarshalFromViewTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastMarshalToViewTimestamp = false;\n\n\t\tthis.pict.instantiateServiceProviderIfNotExists('TransactionTracking');\n\n\t\t// Load all templates from the array in the options\n\t\t// Templates are in the form of {Hash:'Some-Template-Hash',Template:'Template content',Source:'TemplateSource'}\n\t\tfor (let i = 0; i < this.options.Templates.length; i++)\n\t\t{\n\t\t\tlet tmpTemplate = this.options.Templates[i];\n\n\t\t\tif (!('Hash' in tmpTemplate) || !('Template' in tmpTemplate))\n\t\t\t{\n\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not load Template ${i} in the options array.`, tmpTemplate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!tmpTemplate.Source)\n\t\t\t\t{\n\t\t\t\t\ttmpTemplate.Source = `PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} options object.`;\n\t\t\t\t}\n\t\t\t\tthis.pict.TemplateProvider.addTemplate(tmpTemplate.Hash, tmpTemplate.Template, tmpTemplate.Source);\n\t\t\t}\n\t\t}\n\n\t\t// Load all default templates from the array in the options\n\t\t// Templates are in the form of {Prefix:'',Postfix:'-List-Row',Template:'Template content',Source:'TemplateSourceString'}\n\t\tfor (let i = 0; i < this.options.DefaultTemplates.length; i++)\n\t\t{\n\t\t\tlet tmpDefaultTemplate = this.options.DefaultTemplates[i];\n\n\t\t\tif (!('Postfix' in tmpDefaultTemplate) || !('Template' in tmpDefaultTemplate))\n\t\t\t{\n\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not load Default Template ${i} in the options array.`, tmpDefaultTemplate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!tmpDefaultTemplate.Source)\n\t\t\t\t{\n\t\t\t\t\ttmpDefaultTemplate.Source = `PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} options object.`;\n\t\t\t\t}\n\t\t\t\tthis.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix, tmpDefaultTemplate.Postfix, tmpDefaultTemplate.Template, tmpDefaultTemplate.Source);\n\t\t\t}\n\t\t}\n\n\t\t// Load the CSS if it's available\n\t\tif (this.options.CSS)\n\t\t{\n\t\t\tlet tmpCSSHash = this.options.CSSHash ? this.options.CSSHash : `View-${this.options.ViewIdentifier}`;\n\t\t\tlet tmpCSSProvider = this.options.CSSProvider ? this.options.CSSProvider : tmpCSSHash;\n\t\t\tthis.pict.CSSMap.addCSS(tmpCSSHash, this.options.CSS, tmpCSSProvider, this.options.CSSPriority);\n\t\t}\n\n\t\t// Load all renderables\n\t\t// Renderables are launchable renderable instructions with templates\n\t\t// They look as such: {Identifier:'ContentEntry', TemplateHash:'Content-Entry-Section-Main', ContentDestinationAddress:'#ContentSection', RecordAddress:'AppData.Content.DefaultText', ManifestTransformation:'ManyfestHash', ManifestDestinationAddress:'AppData.Content.DataToTransformContent'}\n\t\t// The only parts that are necessary are Identifier and Template\n\t\t// A developer can then do render('ContentEntry') and it just kinda works. Or they can override the ContentDestinationAddress\n\t\t/** @type {Record<String, Renderable>} */\n\t\tthis.renderables = {};\n\t\tfor (let i = 0; i < this.options.Renderables.length; i++)\n\t\t{\n\t\t\t/** @type {Renderable} */\n\t\t\tlet tmpRenderable = this.options.Renderables[i];\n\t\t\tthis.addRenderable(tmpRenderable);\n\t\t}\n\t}\n\n\t/**\n\t * Adds a renderable to the view.\n\t *\n\t * @param {string | Renderable} pRenderableHash - The hash of the renderable, or a renderable object.\n\t * @param {string} [pTemplateHash] - (optional) The hash of the template for the renderable.\n\t * @param {string} [pDefaultTemplateRecordAddress] - (optional) The default data address for the template.\n\t * @param {string} [pDefaultDestinationAddress] - (optional) The default destination address for the renderable.\n\t * @param {RenderMethod} [pRenderMethod=replace] - (optional) The method to use when rendering the renderable (ex. 'replace').\n\t */\n\taddRenderable(pRenderableHash, pTemplateHash, pDefaultTemplateRecordAddress, pDefaultDestinationAddress, pRenderMethod)\n\t{\n\t\t/** @type {Renderable} */\n\t\tlet tmpRenderable;\n\n\t\tif (typeof(pRenderableHash) == 'object')\n\t\t{\n\t\t\t// The developer passed in the renderable as an object.\n\t\t\t// Use theirs instead!\n\t\t\ttmpRenderable = pRenderableHash;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/** @type {RenderMethod} */\n\t\t\tlet tmpRenderMethod = (typeof(pRenderMethod) !== 'string') ? pRenderMethod : 'replace';\n\t\t\ttmpRenderable = (\n\t\t\t\t{\n\t\t\t\t\tRenderableHash: pRenderableHash,\n\t\t\t\t\tTemplateHash: pTemplateHash,\n\t\t\t\t\tDefaultTemplateRecordAddress: pDefaultTemplateRecordAddress,\n\t\t\t\t\tContentDestinationAddress: pDefaultDestinationAddress,\n\t\t\t\t\tRenderMethod: tmpRenderMethod\n\t\t\t\t});\n\t\t}\n\n\t\tif ((typeof(tmpRenderable.RenderableHash) != 'string') || (typeof(tmpRenderable.TemplateHash) != 'string'))\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not load Renderable; RenderableHash or TemplateHash are invalid.`, tmpRenderable);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t{\n\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} adding renderable [${tmpRenderable.RenderableHash}] pointed to template ${tmpRenderable.TemplateHash}.`);\n\t\t\t}\n\n\t\t\tthis.renderables[tmpRenderable.RenderableHash] = tmpRenderable;\n\t\t}\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Initialization */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before the view is initialized.\n\t */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is initialized (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeInitializeAsync(fCallback)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is initialized.\n\t */\n\tonInitialize()\n\t{\n\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is initialized (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonInitializeAsync(fCallback)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Performs view initialization.\n\t */\n\tinitialize()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialize:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tthis.onBeforeInitialize();\n\t\t\tthis.onInitialize();\n\t\t\tthis.onAfterInitialize();\n\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialize called but initialization is already completed. Aborting.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Performs view initialization (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tinitializeAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initializeAsync:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t{\n\t\t\t\tthis.log.info(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} beginning initialization...`);\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t/** @param {Error} pError */\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialization failed: ${pError.message || pError}`, { stack: pError.stack });\n\t\t\t\t\t}\n\t\t\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.info(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialization complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn fCallback();\n\t\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} async initialize called but initialization is already completed. Aborting.`);\n\t\t\t// TODO: Should this be an error?\n\t\t\treturn fCallback();\n\t\t}\n\t}\n\n\tonAfterInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is initialized (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Render */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before the view is rendered.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that will be rendered.\n\t */\n\tonBeforeRender(pRenderable)\n\t{\n\t\t// Overload this to mess with stuff before the content gets generated from the template\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is rendered (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that will be rendered.\n\t */\n\tonBeforeRenderAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onBeforeRender(pRenderable);\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is projected into the DOM.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that will be projected.\n\t */\n\tonBeforeProject(pRenderable)\n\t{\n\t\t// Overload this to mess with stuff before the content gets generated from the template\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeProject:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is projected into the DOM (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that will be projected.\n\t */\n\tonBeforeProjectAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onBeforeProject(pRenderable);\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Builds the render options for a renderable.\n\t *\n\t * For DRY purposes on the three flavors of render.\n\t *\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t */\n\tbuildRenderOptions(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress)\n\t{\n\t\tlet tmpRenderOptions = {Valid: true};\n\t\ttmpRenderOptions.RenderableHash = (typeof (pRenderableHash) === 'string') ? pRenderableHash :\n\t\t\t\t\t\t\t\t(typeof (this.options.DefaultRenderable) == 'string') ?\n\t\t\t\t\t\t\t\tthis.options.DefaultRenderable : false;\n\t\tif (!tmpRenderOptions.RenderableHash)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not find a suitable RenderableHash ${tmpRenderOptions.RenderableHash} (param ${pRenderableHash}because it is not a valid renderable.`);\n\t\t\ttmpRenderOptions.Valid = false;\n\t\t}\n\n\t\ttmpRenderOptions.Renderable = this.renderables[tmpRenderOptions.RenderableHash];\n\t\tif (!tmpRenderOptions.Renderable)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderOptions.RenderableHash} (param ${pRenderableHash}) because it does not exist.`);\n\t\t\ttmpRenderOptions.Valid = false;\n\t\t}\n\n\t\ttmpRenderOptions.DestinationAddress = (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t(typeof (tmpRenderOptions.Renderable.ContentDestinationAddress) === 'string') ? tmpRenderOptions.Renderable.ContentDestinationAddress :\n\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : false;\n\t\tif (!tmpRenderOptions.DestinationAddress)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderOptions.RenderableHash} (param ${pRenderableHash}) because it does not have a valid destination address (param ${pRenderDestinationAddress}).`);\n\t\t\ttmpRenderOptions.Valid = false;\n\t\t}\n\n\t\tif (typeof(pTemplateRecordAddress) === 'object')\n\t\t{\n\t\t\ttmpRenderOptions.RecordAddress = 'Passed in as object';\n\t\t\ttmpRenderOptions.Record = pTemplateRecordAddress;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRenderOptions.RecordAddress = (typeof (pTemplateRecordAddress) === 'string') ? pTemplateRecordAddress :\n\t\t\t\t(typeof (tmpRenderOptions.Renderable.DefaultTemplateRecordAddress) === 'string') ? tmpRenderOptions.Renderable.DefaultTemplateRecordAddress :\n\t\t\t\t(typeof (this.options.DefaultTemplateRecordAddress) === 'string') ? this.options.DefaultTemplateRecordAddress : false;\n\t\t\ttmpRenderOptions.Record = (typeof (tmpRenderOptions.RecordAddress) === 'string') ? this.pict.DataProvider.getDataByAddress(tmpRenderOptions.RecordAddress) : undefined;\n\t\t}\n\n\t\treturn tmpRenderOptions;\n\t}\n\n\t/**\n\t * Assigns the content to the destination address.\n\t *\n\t * For DRY purposes on the three flavors of render.\n\t *\n\t * @param {Renderable} pRenderable - The renderable to render.\n\t * @param {string} pRenderDestinationAddress - The address where the renderable will be rendered.\n\t * @param {string} pContent - The content to render.\n\t * @returns {boolean} - Returns true if the content was assigned successfully.\n\t * @memberof PictView\n\t */\n\tassignRenderContent(pRenderable, pRenderDestinationAddress, pContent)\n\t{\n\t\treturn this.pict.ContentAssignment.projectContent(pRenderable.RenderMethod, pRenderDestinationAddress, pContent, pRenderable.TestAddress);\n\t}\n\n\t/**\n\t * Render a renderable from this view.\n\t *\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @return {boolean}\n\t */\n\trender(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable)\n\t{\n\t\treturn this.renderWithScope(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable);\n\t}\n\n\t/**\n\t * Render a renderable from this view, providing a specifici scope for the template.\n\t *\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @return {boolean}\n\t */\n\trenderWithScope(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable)\n\t{\n\t\tlet tmpRenderableHash = (typeof (pRenderableHash) === 'string') ? pRenderableHash :\n\t\t\t(typeof (this.options.DefaultRenderable) == 'string') ? this.options.DefaultRenderable : false;\n\t\tif (!tmpRenderableHash)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it is not a valid renderable.`);\n\t\t\treturn false;\n\t\t}\n\n\t\t/** @type {Renderable} */\n\t\tlet tmpRenderable;\n\t\tif (tmpRenderableHash == '__Virtual')\n\t\t{\n\t\t\ttmpRenderable = {\n\t\t\t\tRenderableHash: '__Virtual',\n\t\t\t\tTemplateHash: this.renderables[this.options.DefaultRenderable].TemplateHash,\n\t\t\t\tContentDestinationAddress: (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t\t\t(typeof (tmpRenderable.ContentDestinationAddress) === 'string') ? tmpRenderable.ContentDestinationAddress :\n\t\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null,\n\t\t\t\tRenderMethod: 'virtual-assignment',\n\t\t\t\tTransactionHash: pRootRenderable && pRootRenderable.TransactionHash,\n\t\t\t\tRootRenderableViewHash: pRootRenderable && pRootRenderable.RootRenderableViewHash,\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRenderable = Object.assign({}, this.renderables[tmpRenderableHash]);\n\t\t\ttmpRenderable.ContentDestinationAddress = (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t\t(typeof (tmpRenderable.ContentDestinationAddress) === 'string') ? tmpRenderable.ContentDestinationAddress :\n\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null;\n\t\t}\n\n\t\tif (!tmpRenderable.TransactionHash)\n\t\t{\n\t\t\ttmpRenderable.TransactionHash = `ViewRender-V-${this.options.ViewIdentifier}-R-${tmpRenderableHash}-U-${this.pict.getUUID()}`;\n\t\t\ttmpRenderable.RootRenderableViewHash = this.Hash;\n\t\t\tthis.pict.TransactionTracking.registerTransaction(tmpRenderable.TransactionHash);\n\t\t}\n\n\t\tif (!tmpRenderable)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not exist.`);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!tmpRenderable.ContentDestinationAddress)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not have a valid destination address.`);\n\t\t\treturn false;\n\t\t}\n\n\t\tlet tmpRecordAddress;\n\t\tlet tmpRecord;\n\n\t\tif (typeof(pTemplateRecordAddress) === 'object')\n\t\t{\n\t\t\ttmpRecord = pTemplateRecordAddress;\n\t\t\ttmpRecordAddress = 'Passed in as object';\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRecordAddress = (typeof (pTemplateRecordAddress) === 'string') ? pTemplateRecordAddress :\n\t\t\t\t(typeof (tmpRenderable.DefaultTemplateRecordAddress) === 'string') ? tmpRenderable.DefaultTemplateRecordAddress :\n\t\t\t\t\t(typeof (this.options.DefaultTemplateRecordAddress) === 'string') ? this.options.DefaultTemplateRecordAddress : false;\n\n\t\t\ttmpRecord = (typeof (tmpRecordAddress) === 'string') ? this.pict.DataProvider.getDataByAddress(tmpRecordAddress) : undefined;\n\t\t}\n\n\t\t// Execute the developer-overridable pre-render behavior\n\t\tthis.onBeforeRender(tmpRenderable);\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] Renderable[${tmpRenderableHash}] Destination[${tmpRenderable.ContentDestinationAddress}] TemplateRecordAddress[${tmpRecordAddress}] render:`);\n\t\t}\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Beginning Render of Renderable[${tmpRenderableHash}] to Destination [${tmpRenderable.ContentDestinationAddress}]...`);\n\t\t}\n\t\t// Generate the content output from the template and data\n\t\ttmpRenderable.Content = this.pict.parseTemplateByHash(tmpRenderable.TemplateHash, tmpRecord, null, [this], pScope, { RootRenderable: typeof pRootRenderable === 'object' ? pRootRenderable : tmpRenderable });\n\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Assigning Renderable[${tmpRenderableHash}] content length ${tmpRenderable.Content.length} to Destination [${tmpRenderable.ContentDestinationAddress}] using render method [${tmpRenderable.RenderMethod}].`);\n\t\t}\n\n\t\tthis.onBeforeProject(tmpRenderable);\n\t\tthis.onProject(tmpRenderable);\n\n\t\tif (tmpRenderable.RenderMethod !== 'virtual-assignment')\n\t\t{\n\t\t\tthis.onAfterProject(tmpRenderable);\n\n\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\tthis.onAfterRender(tmpRenderable);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Render a renderable from this view.\n\t *\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable|ErrorCallback} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t *\n\t * @return {void}\n\t */\n\trenderAsync(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable, fCallback)\n\t{\n\t\treturn this.renderWithScopeAsync(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable, fCallback);\n\t}\n\n\t/**\n\t * Render a renderable from this view.\n\t *\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable|ErrorCallback} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t *\n\t * @return {void}\n\t */\n\trenderWithScopeAsync(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable, fCallback)\n\t{\n\t\tlet tmpRenderableHash = (typeof (pRenderableHash) === 'string') ? pRenderableHash :\n\t\t\t(typeof (this.options.DefaultRenderable) == 'string') ? this.options.DefaultRenderable : false;\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\t(typeof(pTemplateRecordAddress) === 'function') ? pTemplateRecordAddress :\n\t\t\t\t\t\t\t(typeof(pRenderDestinationAddress) === 'function') ? pRenderDestinationAddress :\n\t\t\t\t\t\t\t(typeof(pRenderableHash) === 'function') ? pRenderableHash :\n\t\t\t\t\t\t\t(typeof(pRootRenderable) === 'function') ? pRootRenderable :\n\t\t\t\t\t\t\tnull;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (!tmpRenderableHash)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not asynchronously render ${tmpRenderableHash} (param ${pRenderableHash}because it is not a valid renderable.`);\n\t\t\treturn tmpCallback(new Error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not asynchronously render ${tmpRenderableHash} (param ${pRenderableHash}because it is not a valid renderable.`));\n\t\t}\n\n\t\t/** @type {Renderable} */\n\t\tlet tmpRenderable;\n\t\tif (tmpRenderableHash == '__Virtual')\n\t\t{\n\t\t\ttmpRenderable = {\n\t\t\t\tRenderableHash: '__Virtual',\n\t\t\t\tTemplateHash: this.renderables[this.options.DefaultRenderable].TemplateHash,\n\t\t\t\tContentDestinationAddress: (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress : (typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null,\n\t\t\t\tRenderMethod: 'virtual-assignment',\n\t\t\t\tTransactionHash: pRootRenderable && typeof pRootRenderable !== 'function' && pRootRenderable.TransactionHash,\n\t\t\t\tRootRenderableViewHash: pRootRenderable && typeof pRootRenderable !== 'function' && pRootRenderable.RootRenderableViewHash,\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRenderable = Object.assign({}, this.renderables[tmpRenderableHash]);\n\t\t\ttmpRenderable.ContentDestinationAddress = (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t\t(typeof (tmpRenderable.ContentDestinationAddress) === 'string') ? tmpRenderable.ContentDestinationAddress :\n\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null;\n\t\t}\n\n\t\tif (!tmpRenderable.TransactionHash)\n\t\t{\n\t\t\ttmpRenderable.TransactionHash = `ViewRender-V-${this.options.ViewIdentifier}-R-${tmpRenderableHash}-U-${this.pict.getUUID()}`;\n\t\t\ttmpRenderable.RootRenderableViewHash = this.Hash;\n\t\t\tthis.pict.TransactionTracking.registerTransaction(tmpRenderable.TransactionHash);\n\t\t}\n\n\t\tif (!tmpRenderable)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not exist.`);\n\t\t\treturn tmpCallback(new Error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not exist.`));\n\t\t}\n\n\t\tif (!tmpRenderable.ContentDestinationAddress)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not have a valid destination address.`);\n\t\t\treturn tmpCallback(new Error(`Could not render ${tmpRenderableHash}`));\n\t\t}\n\n\t\tlet tmpRecordAddress;\n\t\tlet tmpRecord;\n\n\t\tif (typeof(pTemplateRecordAddress) === 'object')\n\t\t{\n\t\t\ttmpRecord = pTemplateRecordAddress;\n\t\t\ttmpRecordAddress = 'Passed in as object';\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRecordAddress = (typeof (pTemplateRecordAddress) === 'string') ? pTemplateRecordAddress :\n\t\t\t\t(typeof (tmpRenderable.DefaultTemplateRecordAddress) === 'string') ? tmpRenderable.DefaultTemplateRecordAddress :\n\t\t\t\t\t(typeof (this.options.DefaultTemplateRecordAddress) === 'string') ? this.options.DefaultTemplateRecordAddress : false;\n\n\t\t\ttmpRecord = (typeof (tmpRecordAddress) === 'string') ? this.pict.DataProvider.getDataByAddress(tmpRecordAddress) : undefined;\n\t\t}\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] Renderable[${tmpRenderableHash}] Destination[${tmpRenderable.ContentDestinationAddress}] TemplateRecordAddress[${tmpRecordAddress}] renderAsync:`);\n\t\t}\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Beginning Asynchronous Render (callback-style)...`);\n\t\t}\n\n\t\tlet tmpAnticipate = this.fable.newAnticipate();\n\n\t\ttmpAnticipate.anticipate(\n\t\t\t(fOnBeforeRenderCallback) =>\n\t\t\t{\n\t\t\t\tthis.onBeforeRenderAsync(fOnBeforeRenderCallback, tmpRenderable);\n\t\t\t});\n\n\t\ttmpAnticipate.anticipate(\n\t\t\t(fAsyncTemplateCallback) =>\n\t\t\t{\n\t\t\t\t// Render the template (asynchronously)\n\t\t\t\tthis.pict.parseTemplateByHash(tmpRenderable.TemplateHash, tmpRecord,\n\t\t\t\t\t(pError, pContent) =>\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pError)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render (asynchronously) ${tmpRenderableHash} (param ${pRenderableHash}) because it did not parse the template.`, pError);\n\t\t\t\t\t\t\treturn fAsyncTemplateCallback(pError);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmpRenderable.Content = pContent;\n\n\t\t\t\t\t\treturn fAsyncTemplateCallback();\n\t\t\t\t\t}, [this], pScope, { RootRenderable: typeof pRootRenderable === 'object' ? pRootRenderable : tmpRenderable });\n\t\t\t});\n\n\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t{\n\t\t\tthis.onBeforeProjectAsync(fNext, tmpRenderable);\n\t\t});\n\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t{\n\t\t\tthis.onProjectAsync(fNext, tmpRenderable);\n\t\t});\n\n\t\tif (tmpRenderable.RenderMethod !== 'virtual-assignment')\n\t\t{\n\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t{\n\t\t\t\tthis.onAfterProjectAsync(fNext, tmpRenderable);\n\t\t\t});\n\n\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t{\n\t\t\t\tthis.onAfterRenderAsync(fNext, tmpRenderable);\n\t\t\t});\n\t\t}\n\n\t\ttmpAnticipate.wait(tmpCallback);\n\t}\n\n\t/**\n\t * Renders the default renderable.\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\trenderDefaultAsync(fCallback)\n\t{\n\t\t// Render the default renderable\n\t\tthis.renderAsync(fCallback);\n\t}\n\n\t/**\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t */\n\tbasicRender(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress)\n\t{\n\t\treturn this.basicRenderWithScope(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress);\n\t}\n\n\t/**\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t */\n\tbasicRenderWithScope(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress)\n\t{\n\t\tlet tmpRenderOptions = this.buildRenderOptions(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress);\n\t\tif (tmpRenderOptions.Valid)\n\t\t{\n\t\t\tthis.assignRenderContent(tmpRenderOptions.Renderable, tmpRenderOptions.DestinationAddress, this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash, tmpRenderOptions.Record, null, [this], pScope, { RootRenderable: tmpRenderOptions.Renderable }));\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not perform a basic render of ${tmpRenderOptions.RenderableHash} because it is not valid.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|Object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t */\n\tbasicRenderAsync(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, fCallback)\n\t{\n\t\treturn this.basicRenderWithScopeAsync(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, fCallback);\n\t}\n\n\t/**\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|Object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t */\n\tbasicRenderWithScopeAsync(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, fCallback)\n\t{\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\t(typeof(pTemplateRecordAddress) === 'function') ? pTemplateRecordAddress :\n\t\t\t\t\t\t\t(typeof(pRenderDestinationAddress) === 'function') ? pRenderDestinationAddress :\n\t\t\t\t\t\t\t(typeof(pRenderableHash) === 'function') ? pRenderableHash :\n\t\t\t\t\t\t\tnull;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} basicRenderAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tconst tmpRenderOptions = this.buildRenderOptions(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress);\n\t\tif (tmpRenderOptions.Valid)\n\t\t{\n\t\t\tthis.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash, tmpRenderOptions.Record,\n\t\t\t\t/**\n\t\t\t\t * @param {Error} [pError] - The error that occurred during template parsing.\n\t\t\t\t * @param {string} [pContent] - The content that was rendered from the template.\n\t\t\t\t */\n\t\t\t\t(pError, pContent) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render (asynchronously) ${tmpRenderOptions.RenderableHash} because it did not parse the template.`, pError);\n\t\t\t\t\t\treturn tmpCallback(pError);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.assignRenderContent(tmpRenderOptions.Renderable, tmpRenderOptions.DestinationAddress, pContent);\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}, [this], pScope, { RootRenderable: tmpRenderOptions.Renderable });\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlet tmpErrorMessage = `PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not perform a basic render of ${tmpRenderOptions.RenderableHash} because it is not valid.`;\n\t\t\tthis.log.error(tmpErrorMessage);\n\t\t\treturn tmpCallback(new Error(tmpErrorMessage));\n\t\t}\n\t}\n\n\t/**\n\t * @param {Renderable} pRenderable - The renderable that was rendered.\n\t */\n\tonProject(pRenderable)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onProject:`);\n\t\t}\n\t\tif (pRenderable.RenderMethod === 'virtual-assignment')\n\t\t{\n\t\t\tthis.pict.TransactionTracking.pushToTransactionQueue(pRenderable.TransactionHash, { ViewHash: this.Hash, Renderable: pRenderable }, 'Deferred-Post-Content-Assignment');\n\t\t}\n\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Assigning Renderable[${pRenderable.RenderableHash}] content length ${pRenderable.Content.length} to Destination [${pRenderable.ContentDestinationAddress}] using Async render method ${pRenderable.RenderMethod}.`);\n\t\t}\n\n\t\t// Assign the content to the destination address\n\t\tthis.pict.ContentAssignment.projectContent(pRenderable.RenderMethod, pRenderable.ContentDestinationAddress, pRenderable.Content, pRenderable.TestAddress);\n\n\t\tthis.lastRenderedTimestamp = this.pict.log.getTimeStamp();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is projected into the DOM (async flow).\n\t *\n\t * @param {(error?: Error, content?: string) => void} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that is being projected.\n\t */\n\tonProjectAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onProject(pRenderable);\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is rendered.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that was rendered.\n\t */\n\tonAfterRender(pRenderable)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterRender:`);\n\t\t}\n\t\tif (pRenderable && pRenderable.RootRenderableViewHash === this.Hash)\n\t\t{\n\t\t\tconst tmpTransactionQueue = this.pict.TransactionTracking.clearTransactionQueue(pRenderable.TransactionHash) || [];\n\t\t\tfor (const tmpEvent of tmpTransactionQueue)\n\t\t\t{\n\t\t\t\tconst tmpView = this.pict.views[tmpEvent.Data.ViewHash];\n\t\t\t\tif (!tmpView)\n\t\t\t\t{\n\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterRender: Could not find view for transaction hash ${pRenderable.TransactionHash} and ViewHash ${tmpEvent.Data.ViewHash}.`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttmpView.onAfterProject();\n\n\t\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\t\ttmpView.onAfterRender(tmpEvent.Data.Renderable);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is rendered (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that was rendered.\n\t */\n\tonAfterRenderAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onAfterRender(pRenderable);\n\t\tconst tmpAnticipate = this.fable.newAnticipate();\n\t\tif (pRenderable && pRenderable.RootRenderableViewHash === this.Hash)\n\t\t{\n\t\t\tconst queue = this.pict.TransactionTracking.clearTransactionQueue(pRenderable.TransactionHash) || [];\n\t\t\tfor (const event of queue)\n\t\t\t{\n\t\t\t\t/** @type {PictView} */\n\t\t\t\tconst tmpView = this.pict.views[event.Data.ViewHash];\n\t\t\t\tif (!tmpView)\n\t\t\t\t{\n\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterRenderAsync: Could not find view for transaction hash ${pRenderable.TransactionHash} and ViewHash ${event.Data.ViewHash}.`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(tmpView.onAfterProjectAsync.bind(tmpView));\n\t\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t\t{\n\t\t\t\t\ttmpView.onAfterRenderAsync(fNext, event.Data.Renderable);\n\t\t\t\t});\n\n\t\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\t}\n\t\t}\n\t\treturn tmpAnticipate.wait(fCallback);\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is projected into the DOM.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that was projected.\n\t */\n\tonAfterProject(pRenderable)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterProject:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is projected into the DOM (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that was projected.\n\t */\n\tonAfterProjectAsync(fCallback, pRenderable)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Solver */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before the view is solved.\n\t */\n\tonBeforeSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is solved (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeSolveAsync(fCallback)\n\t{\n\t\tthis.onBeforeSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is solved.\n\t */\n\tonSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is solved (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonSolveAsync(fCallback)\n\t{\n\t\tthis.onSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Performs view solving and triggers lifecycle hooks.\n\t *\n\t * @return {boolean} - True if the view was solved successfully, false otherwise.\n\t */\n\tsolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} executing solve() function...`);\n\t\t}\n\t\tthis.onBeforeSolve();\n\t\tthis.onSolve();\n\t\tthis.onAfterSolve();\n\t\tthis.lastSolvedTimestamp = this.pict.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Performs view solving and triggers lifecycle hooks (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tsolveAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : null;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeSolveAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onSolveAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} solveAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastSolvedTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is solved.\n\t */\n\tonAfterSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is solved (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterSolveAsync(fCallback)\n\t{\n\t\tthis.onAfterSolve();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal From View */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled from the view.\n\t *\n\t * @return {boolean} - True if the operation was successful, false otherwise.\n\t */\n\tonBeforeMarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeMarshalFromView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeMarshalFromViewAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalFromView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled from the view.\n\t */\n\tonMarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onMarshalFromView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonMarshalFromViewAsync(fCallback)\n\t{\n\n\t\tthis.onMarshalFromView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Marshals data from the view.\n\t *\n\t * @return {boolean} - True if the operation was successful, false otherwise.\n\t */\n\tmarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} executing solve() function...`);\n\t\t}\n\t\tthis.onBeforeMarshalFromView();\n\t\tthis.onMarshalFromView();\n\t\tthis.onAfterMarshalFromView();\n\t\tthis.lastMarshalFromViewTimestamp = this.pict.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Marshals data from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tmarshalFromViewAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : null;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalFromViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onMarshalFromViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalFromViewAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} marshalFromViewAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalFromViewTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled from the view.\n\t */\n\tonAfterMarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterMarshalFromView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterMarshalFromViewAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalFromView();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal To View */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled into the view.\n\t */\n\tonBeforeMarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeMarshalToView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeMarshalToViewAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalToView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled into the view.\n\t */\n\tonMarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onMarshalToView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonMarshalToViewAsync(fCallback)\n\t{\n\t\tthis.onMarshalToView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Marshals data into the view.\n\t *\n\t * @return {boolean} - True if the operation was successful, false otherwise.\n\t */\n\tmarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} executing solve() function...`);\n\t\t}\n\t\tthis.onBeforeMarshalToView();\n\t\tthis.onMarshalToView();\n\t\tthis.onAfterMarshalToView();\n\t\tthis.lastMarshalToViewTimestamp = this.pict.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Marshals data into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tmarshalToViewAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : null;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalToViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onMarshalToViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalToViewAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} marshalToViewAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalToViewTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled into the view.\n\t */\n\tonAfterMarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterMarshalToView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterMarshalToViewAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalToView();\n\t\treturn fCallback();\n\t}\n\n\t/** @return {boolean} - True if the object is a PictView. */\n\tget isPictView()\n\t{\n\t\treturn true;\n\t}\n}\n\nmodule.exports = PictView;\n\n},{\"../package.json\":8,\"fable-serviceproviderbase\":2}],10:[function(require,module,exports){\nmodule.exports={\n\t\"Name\": \"Pict Docuserve\",\n\t\"Hash\": \"Docuserve\",\n\n\t\"MainViewportViewIdentifier\": \"Docuserve-Layout\",\n\n\t\"AutoSolveAfterInitialize\": true,\n\t\"AutoRenderMainViewportViewAfterInitialize\": false,\n\t\"AutoRenderViewsAfterInitialize\": false,\n\n\t\"pict_configuration\":\n\t\t{\n\t\t\t\"Product\": \"Docuserve-Pict-Application\"\n\t\t}\n}\n\n},{}],11:[function(require,module,exports){\nconst libPictApplication = require('pict-application');\n\n// Provider\nconst libDocumentationProvider = require('./providers/Pict-Provider-Docuserve-Documentation.js');\n\n// Views\nconst libViewLayout = require('./views/PictView-Docuserve-Layout.js');\nconst libViewTopBar = require('./views/PictView-Docuserve-TopBar.js');\nconst libViewSidebar = require('./views/PictView-Docuserve-Sidebar.js');\nconst libViewSplash = require('./views/PictView-Docuserve-Splash.js');\nconst libViewContent = require('./views/PictView-Docuserve-Content.js');\nconst libViewSearch = require('./views/PictView-Docuserve-Search.js');\n\nclass DocuserveApplication extends libPictApplication\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\t// Add the documentation provider\n\t\tthis.pict.addProvider('Docuserve-Documentation', libDocumentationProvider.default_configuration, libDocumentationProvider);\n\n\t\t// Add views\n\t\tthis.pict.addView('Docuserve-Layout', libViewLayout.default_configuration, libViewLayout);\n\t\tthis.pict.addView('Docuserve-TopBar', libViewTopBar.default_configuration, libViewTopBar);\n\t\tthis.pict.addView('Docuserve-Sidebar', libViewSidebar.default_configuration, libViewSidebar);\n\t\tthis.pict.addView('Docuserve-Splash', libViewSplash.default_configuration, libViewSplash);\n\t\tthis.pict.addView('Docuserve-Content', libViewContent.default_configuration, libViewContent);\n\t\tthis.pict.addView('Docuserve-Search', libViewSearch.default_configuration, libViewSearch);\n\t}\n\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\t// Initialize application state\n\t\tthis.pict.AppData.Docuserve =\n\t\t{\n\t\t\tCatalogLoaded: false,\n\t\t\tCatalog: null,\n\t\t\tCoverLoaded: false,\n\t\t\tCover: null,\n\t\t\tSidebarLoaded: false,\n\t\t\tSidebarGroups: [],\n\t\t\tTopBarLoaded: false,\n\t\t\tTopBar: null,\n\t\t\tErrorPageLoaded: false,\n\t\t\tErrorPageHTML: null,\n\t\t\tKeywordIndexLoaded: false,\n\t\t\tKeywordDocumentCount: 0,\n\t\t\tCurrentGroup: '',\n\t\t\tCurrentModule: '',\n\t\t\tCurrentPath: '',\n\t\t\t// Whether the sidebar is currently visible\n\t\t\tSidebarVisible: true,\n\t\t\t// Base URL for local docs (relative to where the app is served)\n\t\t\tDocsBaseURL: '',\n\t\t\t// URL for the catalog JSON\n\t\t\tCatalogURL: 'retold-catalog.json'\n\t\t};\n\n\t\t// Load the catalog, then render the layout\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\ttmpDocProvider.loadCatalog(() =>\n\t\t{\n\t\t\t// Set the page title from cover.md or _topbar.md\n\t\t\tlet tmpDocuserve = this.pict.AppData.Docuserve;\n\t\t\tif (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover && tmpDocuserve.Cover.Title)\n\t\t\t{\n\t\t\t\tdocument.title = tmpDocuserve.Cover.Title;\n\t\t\t}\n\t\t\telse if (tmpDocuserve.TopBarLoaded && tmpDocuserve.TopBar && tmpDocuserve.TopBar.Brand)\n\t\t\t{\n\t\t\t\tdocument.title = tmpDocuserve.TopBar.Brand;\n\t\t\t}\n\n\t\t\t// Render the layout shell, which triggers child view rendering\n\t\t\tthis.pict.views['Docuserve-Layout'].render();\n\n\t\t\treturn super.onAfterInitializeAsync(fCallback);\n\t\t});\n\t}\n\n\t/**\n\t * Read the current window.location.hash and dispatch to the correct handler.\n\t *\n\t * Route patterns:\n\t * #/Home -> showView('Docuserve-Splash')\n\t * #/search/<query> -> navigateToSearch(query)\n\t * #/page/<docpath> -> navigateToPage(docpath)\n\t * #/doc/<group>/<module> -> navigateToModule(group, module)\n\t * #/doc/<group>/<module>/<path> -> navigateToModulePath(group, module, path)\n\t */\n\tresolveHash()\n\t{\n\t\tlet tmpHash = (window.location.hash || '').replace(/^#\\/?/, '');\n\n\t\tif (!tmpHash || tmpHash === 'Home')\n\t\t{\n\t\t\tthis.showView('Docuserve-Splash');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpParts = tmpHash.split('/');\n\n\t\tif (tmpParts[0] === 'search')\n\t\t{\n\t\t\tlet tmpQuery = decodeURIComponent(tmpParts.slice(1).join('/'));\n\t\t\tthis.navigateToSearch(tmpQuery);\n\t\t\treturn;\n\t\t}\n\n\t\tif (tmpParts[0] === 'page' && tmpParts.length >= 2)\n\t\t{\n\t\t\t// Rejoin everything after 'page/' in case the path has slashes\n\t\t\tlet tmpDocPath = tmpParts.slice(1).join('/');\n\t\t\tthis.navigateToPage(tmpDocPath);\n\t\t\treturn;\n\t\t}\n\n\t\tif (tmpParts[0] === 'doc' && tmpParts.length >= 3)\n\t\t{\n\t\t\tlet tmpGroup = tmpParts[1];\n\t\t\tlet tmpModule = tmpParts[2];\n\t\t\tif (tmpParts.length >= 4)\n\t\t\t{\n\t\t\t\tlet tmpPath = tmpParts.slice(3).join('/');\n\t\t\t\tthis.navigateToModulePath(tmpGroup, tmpModule, tmpPath);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.navigateToModule(tmpGroup, tmpModule);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Unknown route — treat as a page\n\t\tthis.navigateToPage(tmpHash);\n\t}\n\n\t/**\n\t * Navigate to a hash route.\n\t *\n\t * Sets window.location.hash, which triggers the hashchange listener in the\n\t * layout view, which calls resolveHash() automatically.\n\t *\n\t * @param {string} pRoute - The route path (e.g. '/Home', '/page/quick-start')\n\t */\n\tnavigateTo(pRoute)\n\t{\n\t\twindow.location.hash = pRoute;\n\t}\n\n\t/**\n\t * Show a specific view in the content area.\n\t *\n\t * @param {string} pViewIdentifier - The view identifier to render\n\t */\n\tshowView(pViewIdentifier)\n\t{\n\t\tif (pViewIdentifier in this.pict.views)\n\t\t{\n\t\t\tthis.pict.AppData.Docuserve.CurrentGroup = '';\n\t\t\tthis.pict.AppData.Docuserve.CurrentModule = '';\n\t\t\tthis.pict.AppData.Docuserve.CurrentPath = '';\n\n\t\t\tthis.pict.views[pViewIdentifier].render();\n\n\t\t\t// Update sidebar to clear module nav and refresh active states\n\t\t\tthis.pict.views['Docuserve-Sidebar'].clearModuleNav();\n\t\t\tthis.pict.views['Docuserve-Sidebar'].renderSidebarGroups();\n\t\t}\n\t}\n\n\t/**\n\t * Navigate to a module's documentation.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t */\n\tnavigateToModule(pGroup, pModule)\n\t{\n\t\tthis.navigateToModulePath(pGroup, pModule, 'README.md');\n\t}\n\n\t/**\n\t * Navigate to a specific path within a module's documentation.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t * @param {string} pPath - The document path\n\t */\n\tnavigateToModulePath(pGroup, pModule, pPath)\n\t{\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpContentView = this.pict.views['Docuserve-Content'];\n\t\tlet tmpSidebarView = this.pict.views['Docuserve-Sidebar'];\n\n\t\t// Update current navigation state\n\t\tthis.pict.AppData.Docuserve.CurrentGroup = pGroup;\n\t\tthis.pict.AppData.Docuserve.CurrentModule = pModule;\n\t\tthis.pict.AppData.Docuserve.CurrentPath = pPath;\n\n\t\t// Render the content view shell and show loading\n\t\ttmpContentView.render();\n\t\ttmpContentView.showLoading();\n\n\t\t// Update sidebar to show active module and module-specific nav\n\t\ttmpSidebarView.renderSidebarGroups();\n\t\ttmpSidebarView.renderModuleNav(pGroup, pModule);\n\n\t\t// Resolve the document URL and fetch it\n\t\tlet tmpURL = tmpDocProvider.resolveDocumentURL(pGroup, pModule, pPath || 'README.md');\n\n\t\tif (!tmpURL)\n\t\t{\n\t\t\ttmpContentView.displayContent(tmpDocProvider.getErrorPageHTML(pGroup + '/' + pModule));\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpDocPath = pPath || 'README.md';\n\t\ttmpDocProvider.fetchDocument(tmpURL, (pError, pHTML) =>\n\t\t{\n\t\t\tif (!pError)\n\t\t\t{\n\t\t\t\ttmpContentView.displayContent(pHTML);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Remote fetch failed — try a local fallback using the\n\t\t\t// group/module/path as a relative path. This handles cases\n\t\t\t// where the catalog contains entries (e.g. example apps)\n\t\t\t// that don't correspond to real GitHub repositories.\n\t\t\tlet tmpLocalPath = pGroup + '/' + pModule + '/' + tmpDocPath;\n\t\t\ttmpDocProvider.fetchLocalDocument(tmpLocalPath, (pLocalError, pLocalHTML) =>\n\t\t\t{\n\t\t\t\ttmpContentView.displayContent(pLocalHTML);\n\t\t\t}, pGroup, pModule, tmpDocPath);\n\t\t}, pGroup, pModule, tmpDocPath);\n\t}\n\n\t/**\n\t * Navigate to a local documentation page (e.g. architecture.md).\n\t *\n\t * @param {string} pDocPath - The doc path without extension\n\t */\n\tnavigateToPage(pDocPath)\n\t{\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpContentView = this.pict.views['Docuserve-Content'];\n\t\tlet tmpSidebarView = this.pict.views['Docuserve-Sidebar'];\n\n\t\t// Update state\n\t\tthis.pict.AppData.Docuserve.CurrentGroup = '';\n\t\tthis.pict.AppData.Docuserve.CurrentModule = '';\n\t\tthis.pict.AppData.Docuserve.CurrentPath = pDocPath;\n\n\t\t// Render the content view shell and show loading\n\t\ttmpContentView.render();\n\t\ttmpContentView.showLoading();\n\n\t\t// Clear module-specific sidebar nav\n\t\ttmpSidebarView.clearModuleNav();\n\t\ttmpSidebarView.renderSidebarGroups();\n\n\t\t// Fetch the local document\n\t\tlet tmpPath = pDocPath;\n\t\tif (!tmpPath.match(/\\.md$/))\n\t\t{\n\t\t\ttmpPath = tmpPath + '.md';\n\t\t}\n\n\t\ttmpDocProvider.fetchLocalDocument(tmpPath, (pError, pHTML) =>\n\t\t{\n\t\t\t// fetchDocument always provides displayable HTML in pHTML,\n\t\t\t// even on error, so we can use it directly.\n\t\t\ttmpContentView.displayContent(pHTML);\n\t\t});\n\t}\n\n\t/**\n\t * Navigate to the search page with an optional query.\n\t *\n\t * @param {string} pQuery - The search query (may be empty for blank search page)\n\t */\n\tnavigateToSearch(pQuery)\n\t{\n\t\tlet tmpSidebarView = this.pict.views['Docuserve-Sidebar'];\n\t\tlet tmpSearchView = this.pict.views['Docuserve-Search'];\n\n\t\t// Update state\n\t\tthis.pict.AppData.Docuserve.CurrentGroup = '';\n\t\tthis.pict.AppData.Docuserve.CurrentModule = '';\n\t\tthis.pict.AppData.Docuserve.CurrentPath = '';\n\n\t\t// Clear module-specific sidebar nav\n\t\ttmpSidebarView.clearModuleNav();\n\t\ttmpSidebarView.renderSidebarGroups();\n\n\t\t// Render the search view with the query\n\t\ttmpSearchView.render();\n\t\ttmpSearchView.showSearch(pQuery || '');\n\t}\n}\n\nmodule.exports = DocuserveApplication;\n\nmodule.exports.default_configuration = require('./Pict-Application-Docuserve-Configuration.json');\n\n},{\"./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(require,module,exports){\nconst libPictProvider = require('pict-provider');\nconst libLunr = require('lunr');\n\n/**\n * Documentation Provider for Docuserve\n *\n * Loads the Indoctrinate-generated catalog and keyword index,\n * fetches markdown documents from local paths or raw GitHub URLs,\n * and parses them into HTML for rendering.\n */\nclass DocuserveDocumentationProvider extends libPictProvider\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\tthis._Catalog = null;\n\t\tthis._ContentCache = {};\n\t}\n\n\t/**\n\t * Load all documentation data sources: catalog, cover.md, _sidebar.md.\n\t *\n\t * Loads the catalog first (it provides the fallback data), then attempts\n\t * to load cover.md and _sidebar.md in parallel. If those markdown files\n\t * exist they drive the splash and sidebar views; otherwise the catalog\n\t * data is used as a fallback.\n\t *\n\t * @param {Function} fCallback - Callback when all loading is complete\n\t */\n\tloadCatalog(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\n\t\tlet tmpCatalogURL = this.pict.AppData.Docuserve.CatalogURL || 'retold-catalog.json';\n\n\t\tfetch(tmpCatalogURL)\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\tthis.log.warn(`Docuserve: Could not load catalog from [${tmpCatalogURL}].`);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.json();\n\t\t\t})\n\t\t\t.then((pCatalog) =>\n\t\t\t{\n\t\t\t\tif (pCatalog)\n\t\t\t\t{\n\t\t\t\t\tthis._Catalog = pCatalog;\n\t\t\t\t\tthis.pict.AppData.Docuserve.Catalog = pCatalog;\n\t\t\t\t\tthis.pict.AppData.Docuserve.CatalogLoaded = true;\n\n\t\t\t\t\t// Build sidebar navigation data from the catalog as default\n\t\t\t\t\tthis.buildSidebarData(pCatalog);\n\t\t\t\t}\n\n\t\t\t\t// Now try to load cover.md, _sidebar.md, _topbar.md, errorpage.md, and keyword index in parallel\n\t\t\t\tlet tmpPending = 5;\n\t\t\t\tlet tmpFinish = () =>\n\t\t\t\t{\n\t\t\t\t\ttmpPending--;\n\t\t\t\t\tif (tmpPending <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn tmpCallback();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.loadCover(tmpFinish);\n\t\t\t\tthis.loadSidebar(tmpFinish);\n\t\t\t\tthis.loadTopbar(tmpFinish);\n\t\t\t\tthis.loadErrorPage(tmpFinish);\n\t\t\t\tthis.loadKeywordIndex(tmpFinish);\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading catalog: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Fetch and parse cover.md into structured data for the splash view.\n\t *\n\t * The expected cover.md format follows the docsify convention:\n\t * # Title\n\t * > Tagline\n\t * Description paragraph text.\n\t * - **Group** — description\n\t * [Link Text](url)\n\t *\n\t * Parsed result stored in this.pict.AppData.Docuserve.Cover:\n\t * { Title, Tagline, Description, Highlights: [{Label, Text}], Actions: [{Text, Href}] }\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadCover(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + 'cover.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No cover.md found; splash will use catalog data.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tthis.pict.AppData.Docuserve.Cover = this.parseCover(pMarkdown);\n\t\t\t\tthis.pict.AppData.Docuserve.CoverLoaded = true;\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading cover.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Parse cover.md markdown text into a structured object.\n\t *\n\t * @param {string} pMarkdown - Raw cover.md content\n\t * @returns {Object} Parsed cover data\n\t */\n\tparseCover(pMarkdown)\n\t{\n\t\tlet tmpCover = {\n\t\t\tTitle: '',\n\t\t\tTagline: '',\n\t\t\tDescription: '',\n\t\t\tHighlights: [],\n\t\t\tActions: []\n\t\t};\n\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i].trim();\n\n\t\t\tif (!tmpLine)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Heading — the title\n\t\t\tlet tmpHeadingMatch = tmpLine.match(/^#+\\s+(.+)/);\n\t\t\tif (tmpHeadingMatch)\n\t\t\t{\n\t\t\t\ttmpCover.Title = tmpHeadingMatch[1].trim();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Blockquote — the tagline\n\t\t\tlet tmpBlockquoteMatch = tmpLine.match(/^>\\s*(.*)/);\n\t\t\tif (tmpBlockquoteMatch)\n\t\t\t{\n\t\t\t\ttmpCover.Tagline = tmpBlockquoteMatch[1].trim();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bullet list — highlights (e.g. \"- **Fable** — Core ecosystem, DI, config\")\n\t\t\tlet tmpBulletMatch = tmpLine.match(/^[-*+]\\s+(.*)/);\n\t\t\tif (tmpBulletMatch)\n\t\t\t{\n\t\t\t\tlet tmpBulletContent = tmpBulletMatch[1];\n\t\t\t\t// Try to split on bold label: **Label** — rest\n\t\t\t\tlet tmpLabelMatch = tmpBulletContent.match(/^\\*\\*([^*]+)\\*\\*\\s*[-—:]\\s*(.*)/);\n\t\t\t\tif (tmpLabelMatch)\n\t\t\t\t{\n\t\t\t\t\ttmpCover.Highlights.push({ Label: tmpLabelMatch[1].trim(), Text: tmpLabelMatch[2].trim() });\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmpCover.Highlights.push({ Label: '', Text: tmpBulletContent.trim() });\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bare link — action button (e.g. \"[Get Started](getting-started.md)\")\n\t\t\tlet tmpLinkMatch = tmpLine.match(/^\\[([^\\]]+)\\]\\(([^)]+)\\)\\s*$/);\n\t\t\tif (tmpLinkMatch)\n\t\t\t{\n\t\t\t\ttmpCover.Actions.push({ Text: tmpLinkMatch[1].trim(), Href: tmpLinkMatch[2].trim() });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Otherwise it's description text\n\t\t\tif (!tmpCover.Description)\n\t\t\t{\n\t\t\t\ttmpCover.Description = tmpLine;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmpCover.Description += ' ' + tmpLine;\n\t\t\t}\n\t\t}\n\n\t\treturn tmpCover;\n\t}\n\n\t/**\n\t * Fetch and parse _sidebar.md into structured navigation data.\n\t *\n\t * The expected _sidebar.md format follows the docsify convention:\n\t * - [Home](/)\n\t * - Group Title\n\t * - [module-name](/group/module/)\n\t * - [Group Title](group.md)\n\t * - [module-name](/group/module/)\n\t *\n\t * If _sidebar.md is successfully loaded and parsed, its data replaces\n\t * the catalog-inferred SidebarGroups in AppData.\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadSidebar(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + '_sidebar.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No _sidebar.md found; sidebar will use catalog data.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tlet tmpSidebarData = this.parseSidebarMarkdown(pMarkdown);\n\t\t\t\tif (tmpSidebarData && tmpSidebarData.length > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.pict.AppData.Docuserve.SidebarGroups = tmpSidebarData;\n\t\t\t\t\tthis.pict.AppData.Docuserve.SidebarLoaded = true;\n\t\t\t\t}\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading _sidebar.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Fetch and parse _topbar.md into structured data for the top bar view.\n\t *\n\t * The expected _topbar.md format:\n\t * # Brand Name\n\t * - [Link Text](url)\n\t * - [Link Text](url)\n\t *\n\t * The heading becomes the brand/title shown on the left. List items become\n\t * navigation links. External links (starting with http) render on the\n\t * right side; internal links render in the centre nav area.\n\t *\n\t * Parsed result stored in this.pict.AppData.Docuserve.TopBar:\n\t * { Brand, NavLinks: [{Text, Href, External}], ExternalLinks: [{Text, Href}] }\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadTopbar(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + '_topbar.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No _topbar.md found; top bar will use defaults.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tthis.pict.AppData.Docuserve.TopBar = this.parseTopbar(pMarkdown);\n\t\t\t\tthis.pict.AppData.Docuserve.TopBarLoaded = true;\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading _topbar.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Parse _topbar.md markdown text into a structured object.\n\t *\n\t * @param {string} pMarkdown - Raw _topbar.md content\n\t * @returns {Object} Parsed top bar data { Brand, NavLinks, ExternalLinks }\n\t */\n\tparseTopbar(pMarkdown)\n\t{\n\t\tlet tmpTopBar = {\n\t\t\tBrand: '',\n\t\t\tNavLinks: [],\n\t\t\tExternalLinks: []\n\t\t};\n\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i].trim();\n\n\t\t\tif (!tmpLine)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Heading — the brand name\n\t\t\tlet tmpHeadingMatch = tmpLine.match(/^#+\\s+(.+)/);\n\t\t\tif (tmpHeadingMatch)\n\t\t\t{\n\t\t\t\ttmpTopBar.Brand = tmpHeadingMatch[1].trim();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bullet list item with link\n\t\t\tlet tmpBulletMatch = tmpLine.match(/^[-*+]\\s+(.*)/);\n\t\t\tif (tmpBulletMatch)\n\t\t\t{\n\t\t\t\tlet tmpContent = tmpBulletMatch[1].trim();\n\t\t\t\tlet tmpLinkMatch = tmpContent.match(/^\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n\n\t\t\t\tif (tmpLinkMatch)\n\t\t\t\t{\n\t\t\t\t\tlet tmpText = tmpLinkMatch[1].trim();\n\t\t\t\t\tlet tmpHref = tmpLinkMatch[2].trim();\n\n\t\t\t\t\t// External links (http/https) go to the right side\n\t\t\t\t\tif (tmpHref.match(/^https?:\\/\\//))\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpTopBar.ExternalLinks.push({ Text: tmpText, Href: tmpHref });\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Internal link — convert to hash route\n\t\t\t\t\t\tlet tmpRoute = this.convertSidebarLink(tmpHref);\n\t\t\t\t\t\ttmpTopBar.NavLinks.push({ Text: tmpText, Href: tmpRoute });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn tmpTopBar;\n\t}\n\n\t/**\n\t * Fetch and parse errorpage.md into HTML for use as a custom error page.\n\t *\n\t * The errorpage.md is a standard markdown file. If it contains the\n\t * placeholder `{{path}}` anywhere in its source, that token will be\n\t * replaced with the actual requested path at display time (via\n\t * getErrorPageHTML).\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadErrorPage(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + 'errorpage.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No errorpage.md found; errors will use default page.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tthis.pict.AppData.Docuserve.ErrorPageHTML = this.parseMarkdown(pMarkdown);\n\t\t\t\tthis.pict.AppData.Docuserve.ErrorPageLoaded = true;\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading errorpage.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Load the keyword search index (retold-keyword-index.json).\n\t *\n\t * If the index file exists, hydrates a lunr.Index for client-side search\n\t * and stores the document metadata map. If the file is not found, search\n\t * features will simply not appear in the UI.\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadKeywordIndex(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + 'retold-keyword-index.json')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.json();\n\t\t\t})\n\t\t\t.then((pIndexData) =>\n\t\t\t{\n\t\t\t\tif (!pIndexData || !pIndexData.LunrIndex || !pIndexData.Documents)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No keyword index found; search will be unavailable.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tthis._LunrIndex = libLunr.Index.load(pIndexData.LunrIndex);\n\t\t\t\t\tthis._KeywordDocuments = pIndexData.Documents;\n\t\t\t\t\tthis.pict.AppData.Docuserve.KeywordIndexLoaded = true;\n\t\t\t\t\tthis.pict.AppData.Docuserve.KeywordDocumentCount = pIndexData.DocumentCount || 0;\n\t\t\t\t\tthis.log.info(`Docuserve: Keyword index loaded (${pIndexData.DocumentCount || 0} documents).`);\n\t\t\t\t}\n\t\t\t\tcatch (pError)\n\t\t\t\t{\n\t\t\t\t\tthis.log.warn(`Docuserve: Error hydrating lunr index: ${pError}`);\n\t\t\t\t}\n\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading keyword index: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Check whether a group/module pair exists in the loaded catalog.\n\t *\n\t * Used by search() to decide whether a result should route to\n\t * #/doc/ (catalog module → GitHub raw URL) or #/page/ (local doc).\n\t *\n\t * @param {string} pGroup - The group key (e.g. \"fable\")\n\t * @param {string} pModule - The module name (e.g. \"fable\")\n\t * @returns {boolean} True if the module is found in the catalog\n\t */\n\tisModuleInCatalog(pGroup, pModule)\n\t{\n\t\tif (!this._Catalog || !this._Catalog.Groups)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = this._Catalog.Groups[i];\n\t\t\tif (tmpGroup.Key !== pGroup)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.Name === pModule)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Check whether a group key exists in the loaded catalog.\n\t *\n\t * Used to dynamically validate group keys instead of hardcoding them.\n\t *\n\t * @param {string} pGroupKey - The group key (e.g. \"fable\", \"example_applications\")\n\t * @returns {boolean} True if the group is found in the catalog\n\t */\n\tisGroupInCatalog(pGroupKey)\n\t{\n\t\tif (!this._Catalog || !this._Catalog.Groups)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tif (this._Catalog.Groups[i].Key === pGroupKey)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Search the keyword index for documents matching a query.\n\t *\n\t * Returns an array of result objects sorted by relevance:\n\t * [{ Key, Title, Group, Module, DocPath, Score, Route }]\n\t *\n\t * @param {string} pQuery - The search query\n\t * @returns {Array} Search results (empty if no index or no matches)\n\t */\n\tsearch(pQuery)\n\t{\n\t\tif (!this._LunrIndex || !this._KeywordDocuments || !pQuery || !pQuery.trim())\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tmpResults = [];\n\n\t\ttry\n\t\t{\n\t\t\tlet tmpLunrResults = this._LunrIndex.search(pQuery);\n\n\t\t\tfor (let i = 0; i < tmpLunrResults.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpRef = tmpLunrResults[i].ref;\n\t\t\t\tlet tmpScore = tmpLunrResults[i].score;\n\t\t\t\tlet tmpDoc = this._KeywordDocuments[tmpRef];\n\n\t\t\t\tif (!tmpDoc)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Build the hash route from the document key (group/module/docpath)\n\t\t\t\tlet tmpParts = tmpRef.split('/');\n\t\t\t\tlet tmpRoute = '';\n\t\t\t\tif (tmpParts.length >= 2)\n\t\t\t\t{\n\t\t\t\t\t// Check whether this group/module exists in the catalog.\n\t\t\t\t\t// If it does, route to #/doc/ which fetches from GitHub.\n\t\t\t\t\t// If not, fall back to #/page/ which fetches locally.\n\t\t\t\t\tlet tmpGroup = tmpParts[0];\n\t\t\t\t\tlet tmpModule = tmpParts[1];\n\n\t\t\t\t\tif (this.isModuleInCatalog(tmpGroup, tmpModule))\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpRoute = '#/doc/' + tmpRef;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Local document — route via #/page/ using the full ref path\n\t\t\t\t\t\ttmpRoute = '#/page/' + tmpRef;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttmpResults.push({\n\t\t\t\t\tKey: tmpRef,\n\t\t\t\t\tTitle: tmpDoc.Title || tmpRef,\n\t\t\t\t\tGroup: tmpDoc.Group || '',\n\t\t\t\t\tModule: tmpDoc.Module || '',\n\t\t\t\t\tDocPath: tmpDoc.DocPath || '',\n\t\t\t\t\tScore: tmpScore,\n\t\t\t\t\tRoute: tmpRoute\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tcatch (pError)\n\t\t{\n\t\t\tthis.log.warn(`Docuserve: Search error: ${pError}`);\n\t\t}\n\n\t\treturn tmpResults;\n\t}\n\n\t/**\n\t * Get the error page HTML for a given requested path.\n\t *\n\t * If a custom errorpage.md was loaded, its parsed HTML is returned with\n\t * the `{{path}}` placeholder replaced by the actual requested path.\n\t * Otherwise a default not-found HTML block is returned.\n\t *\n\t * @param {string} pRequestedPath - The path that was not found\n\t * @returns {string} HTML to display\n\t */\n\tgetErrorPageHTML(pRequestedPath)\n\t{\n\t\tlet tmpPath = pRequestedPath || 'unknown';\n\n\t\tif (this.pict.AppData.Docuserve.ErrorPageLoaded && this.pict.AppData.Docuserve.ErrorPageHTML)\n\t\t{\n\t\t\t// Replace the {{path}} placeholder with the actual requested path\n\t\t\treturn this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\\{\\{path\\}\\}/g, this.escapeHTML(tmpPath));\n\t\t}\n\n\t\t// Default fallback\n\t\treturn '<div class=\"docuserve-not-found\">'\n\t\t\t+ '<h2>Page Not Found</h2>'\n\t\t\t+ '<p>The document <code>' + this.escapeHTML(tmpPath) + '</code> could not be loaded.</p>'\n\t\t\t+ '<p><a href=\"#/Home\">Return to the home page</a></p>'\n\t\t\t+ '</div>';\n\t}\n\n\t/**\n\t * Parse _sidebar.md into the SidebarGroups format the sidebar view consumes.\n\t *\n\t * Returns an array of group objects:\n\t * [{ Name, Key, Route, Modules: [{ Name, HasDocs, Group, Route }] }]\n\t *\n\t * Top-level items (no indent) become groups. Indented child items become\n\t * modules within the preceding group. The special \"Home\" entry is stored\n\t * as a group with no modules.\n\t *\n\t * @param {string} pMarkdown - Raw _sidebar.md content\n\t * @returns {Array} Parsed sidebar groups\n\t */\n\tparseSidebarMarkdown(pMarkdown)\n\t{\n\t\tlet tmpGroups = [];\n\t\tlet tmpCurrentGroup = null;\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i];\n\n\t\t\tif (!tmpLine.trim())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Detect indent level: child items have 2+ leading spaces\n\t\t\tlet tmpIndentMatch = tmpLine.match(/^(\\s*)/);\n\t\t\tlet tmpIndent = tmpIndentMatch ? tmpIndentMatch[1].length : 0;\n\t\t\tlet tmpContent = tmpLine.trim();\n\n\t\t\t// Must start with a list marker\n\t\t\tlet tmpListMatch = tmpContent.match(/^[-*+]\\s+(.*)/);\n\t\t\tif (!tmpListMatch)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet tmpItemContent = tmpListMatch[1].trim();\n\n\t\t\t// Parse link if present: [Text](href)\n\t\t\tlet tmpLinkMatch = tmpItemContent.match(/^\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n\n\t\t\tif (tmpIndent < 2)\n\t\t\t{\n\t\t\t\t// Top-level item — this is a group header or standalone link\n\t\t\t\tif (tmpLinkMatch)\n\t\t\t\t{\n\t\t\t\t\tlet tmpName = tmpLinkMatch[1].trim();\n\t\t\t\t\tlet tmpHref = tmpLinkMatch[2].trim();\n\n\t\t\t\t\t// Derive a group key from the href or name\n\t\t\t\t\tlet tmpKey = this.deriveGroupKey(tmpName, tmpHref);\n\t\t\t\t\tlet tmpRoute = this.convertSidebarLink(tmpHref);\n\n\t\t\t\t\ttmpCurrentGroup = {\n\t\t\t\t\t\tName: tmpName,\n\t\t\t\t\t\tKey: tmpKey,\n\t\t\t\t\t\tRoute: tmpRoute,\n\t\t\t\t\t\tModules: []\n\t\t\t\t\t};\n\t\t\t\t\ttmpGroups.push(tmpCurrentGroup);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Plain text group header (no link)\n\t\t\t\t\tlet tmpName = tmpItemContent;\n\t\t\t\t\tlet tmpKey = tmpName.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');\n\n\t\t\t\t\ttmpCurrentGroup = {\n\t\t\t\t\t\tName: tmpName,\n\t\t\t\t\t\tKey: tmpKey,\n\t\t\t\t\t\tRoute: '',\n\t\t\t\t\t\tModules: []\n\t\t\t\t\t};\n\t\t\t\t\ttmpGroups.push(tmpCurrentGroup);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tmpCurrentGroup)\n\t\t\t{\n\t\t\t\t// Indented item — this is a module within the current group\n\t\t\t\tif (tmpLinkMatch)\n\t\t\t\t{\n\t\t\t\t\tlet tmpModuleName = tmpLinkMatch[1].trim();\n\t\t\t\t\tlet tmpModuleHref = tmpLinkMatch[2].trim();\n\t\t\t\t\tlet tmpModuleRoute = this.convertSidebarLink(tmpModuleHref);\n\n\t\t\t\t\ttmpCurrentGroup.Modules.push({\n\t\t\t\t\t\tName: tmpModuleName,\n\t\t\t\t\t\tHasDocs: true,\n\t\t\t\t\t\tGroup: tmpCurrentGroup.Key,\n\t\t\t\t\t\tRoute: tmpModuleRoute\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Plain text child entry (no docs link)\n\t\t\t\t\ttmpCurrentGroup.Modules.push({\n\t\t\t\t\t\tName: tmpItemContent,\n\t\t\t\t\t\tHasDocs: false,\n\t\t\t\t\t\tGroup: tmpCurrentGroup.Key,\n\t\t\t\t\t\tRoute: ''\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn tmpGroups;\n\t}\n\n\t/**\n\t * Convert a docsify-style sidebar link href into a docuserve hash route.\n\t *\n\t * Handles these forms:\n\t * / -> #/Home\n\t * /group/module/ -> #/doc/group/module\n\t * /group/module/path.md -> #/doc/group/module/path.md\n\t * something.md -> #/page/something\n\t *\n\t * @param {string} pHref - The original sidebar link href\n\t * @returns {string} The converted hash route\n\t */\n\tconvertSidebarLink(pHref)\n\t{\n\t\tif (!pHref)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Root home link\n\t\tif (pHref === '/')\n\t\t{\n\t\t\treturn '#/Home';\n\t\t}\n\n\t\t// Strip leading/trailing slashes for parsing\n\t\tlet tmpPath = pHref.replace(/^\\//, '').replace(/\\/$/, '');\n\n\t\tif (!tmpPath)\n\t\t{\n\t\t\treturn '#/Home';\n\t\t}\n\n\t\tlet tmpParts = tmpPath.split('/');\n\n\t\t// Check if it's a module path (group/module)\n\t\tif (tmpParts.length >= 2)\n\t\t{\n\t\t\tif (this.isGroupInCatalog(tmpParts[0]))\n\t\t\t{\n\t\t\t\treturn '#/doc/' + tmpPath;\n\t\t\t}\n\t\t}\n\n\t\t// Local page reference\n\t\tif (tmpPath.match(/\\.md$/))\n\t\t{\n\t\t\treturn '#/page/' + tmpPath.replace(/\\.md$/, '');\n\t\t}\n\n\t\treturn '#/page/' + tmpPath;\n\t}\n\n\t/**\n\t * Derive a short group key from a sidebar group name or href.\n\t *\n\t * @param {string} pName - The display name (e.g. \"Fable — Core Ecosystem\")\n\t * @param {string} pHref - The link href (e.g. \"fable.md\")\n\t * @returns {string} A short key (e.g. \"fable\")\n\t */\n\tderiveGroupKey(pName, pHref)\n\t{\n\t\t// Try href first — \"fable.md\" -> \"fable\"\n\t\tif (pHref && pHref !== '/')\n\t\t{\n\t\t\tlet tmpFromHref = pHref.replace(/^\\//, '').replace(/\\.md$/, '').replace(/\\/$/, '');\n\t\t\tif (tmpFromHref && !tmpFromHref.includes('/'))\n\t\t\t{\n\t\t\t\treturn tmpFromHref.toLowerCase();\n\t\t\t}\n\t\t}\n\n\t\t// Fall back to first word of name lowercased\n\t\tlet tmpFirstWord = pName.split(/[\\s—\\-:]+/)[0];\n\t\treturn tmpFirstWord.toLowerCase().replace(/[^a-z0-9]/g, '');\n\t}\n\n\t/**\n\t * Build structured sidebar data from the catalog for the sidebar view.\n\t *\n\t * @param {Object} pCatalog - The parsed retold-catalog.json\n\t */\n\tbuildSidebarData(pCatalog)\n\t{\n\t\tlet tmpSidebarGroups = [];\n\n\t\tfor (let i = 0; i < pCatalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = pCatalog.Groups[i];\n\t\t\tlet tmpGroupEntry = {\n\t\t\t\tName: tmpGroup.Name,\n\t\t\t\tKey: tmpGroup.Key,\n\t\t\t\tDescription: tmpGroup.Description,\n\t\t\t\tModules: []\n\t\t\t};\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\ttmpGroupEntry.Modules.push({\n\t\t\t\t\tName: tmpModule.Name,\n\t\t\t\t\tHasDocs: tmpModule.HasDocs,\n\t\t\t\t\tGroup: tmpGroup.Key,\n\t\t\t\t\tRoute: '#/doc/' + tmpGroup.Key + '/' + tmpModule.Name\n\t\t\t\t});\n\t\t\t}\n\n\t\t\ttmpSidebarGroups.push(tmpGroupEntry);\n\t\t}\n\n\t\tthis.pict.AppData.Docuserve.SidebarGroups = tmpSidebarGroups;\n\t}\n\n\t/**\n\t * Resolve a document URL from group/module/path to a fetchable URL.\n\t *\n\t * @param {string} pGroup - The group key (e.g. 'fable')\n\t * @param {string} pModule - The module name (e.g. 'fable')\n\t * @param {string} pPath - The document path within the module docs (e.g. 'README.md')\n\t * @returns {string} The resolved URL\n\t */\n\tresolveDocumentURL(pGroup, pModule, pPath)\n\t{\n\t\tif (!this._Catalog)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tlet tmpOrg = this._Catalog.GitHubOrg || 'stevenvelozo';\n\t\tlet tmpDefaultBranch = this._Catalog.DefaultBranch || 'master';\n\n\t\t// Find the module in the catalog\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = this._Catalog.Groups[i];\n\t\t\tif (tmpGroup.Key !== pGroup)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.Name !== pModule)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet tmpBranch = tmpModule.Branch || tmpDefaultBranch;\n\t\t\t\tlet tmpDocPath = pPath || 'README.md';\n\t\t\t\treturn 'https://raw.githubusercontent.com/' + tmpOrg + '/' + tmpModule.Repo + '/' + tmpBranch + '/docs/' + tmpDocPath;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Get the module-specific sidebar entries for a given group/module.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t * @returns {Array|null} The sidebar entries or null\n\t */\n\tgetModuleSidebar(pGroup, pModule)\n\t{\n\t\tif (!this._Catalog)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = this._Catalog.Groups[i];\n\t\t\tif (tmpGroup.Key !== pGroup)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.Name !== pModule)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treturn tmpModule.Sidebar || null;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Fetch a markdown document and convert it to HTML.\n\t *\n\t * @param {string} pURL - The URL to fetch\n\t * @param {Function} fCallback - Callback receiving (error, htmlContent)\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t */\n\tfetchDocument(pURL, fCallback, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\n\t\tif (!pURL)\n\t\t{\n\t\t\treturn tmpCallback('No URL provided', '');\n\t\t}\n\n\t\t// Check cache\n\t\tif (this._ContentCache[pURL])\n\t\t{\n\t\t\treturn tmpCallback(null, this._ContentCache[pURL]);\n\t\t}\n\n\t\tfetch(pURL)\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\treturn tmpCallback('Document not found', this.getErrorPageHTML(pURL));\n\t\t\t\t}\n\n\t\t\t\tlet tmpHTML = this.parseMarkdown(pMarkdown, pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t\t\t\tthis._ContentCache[pURL] = tmpHTML;\n\t\t\t\treturn tmpCallback(null, tmpHTML);\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error fetching document [${pURL}]: ${pError}`);\n\t\t\t\treturn tmpCallback(pError, this.getErrorPageHTML(pURL));\n\t\t\t});\n\t}\n\n\t/**\n\t * Fetch a local document relative to the docs folder.\n\t *\n\t * @param {string} pPath - The relative path (e.g. 'architecture.md')\n\t * @param {Function} fCallback - Callback receiving (error, htmlContent)\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t */\n\tfetchLocalDocument(pPath, fCallback, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\t\tlet tmpURL = tmpDocsBase + pPath;\n\t\tthis.fetchDocument(tmpURL, fCallback, pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t}\n\n\t/**\n\t * Parse a markdown string into HTML.\n\t *\n\t * This is a basic markdown parser that handles the most common constructs:\n\t * headings, paragraphs, code blocks, inline code, links, bold, italic,\n\t * lists, blockquotes, and horizontal rules.\n\t *\n\t * @param {string} pMarkdown - The raw markdown text\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t * @returns {string} The parsed HTML\n\t */\n\tparseMarkdown(pMarkdown, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tif (!pMarkdown)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\t\tlet tmpHTML = [];\n\t\tlet tmpInCodeBlock = false;\n\t\tlet tmpCodeFenceLength = 0;\n\t\tlet tmpCodeLang = '';\n\t\tlet tmpCodeLines = [];\n\t\tlet tmpInList = false;\n\t\tlet tmpListType = '';\n\t\tlet tmpInBlockquote = false;\n\t\tlet tmpBlockquoteLines = [];\n\t\tlet tmpInMathBlock = false;\n\t\tlet tmpMathLines = [];\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i];\n\n\t\t\t// Display math blocks ($$...$$) — skip if inside a code block\n\t\t\tif (!tmpInCodeBlock && tmpLine.trim().match(/^\\$\\$/))\n\t\t\t{\n\t\t\t\tif (tmpInMathBlock)\n\t\t\t\t{\n\t\t\t\t\t// End math block\n\t\t\t\t\ttmpHTML.push('<div class=\"docuserve-katex-display\">' + tmpMathLines.join('\\n') + '</div>');\n\t\t\t\t\ttmpInMathBlock = false;\n\t\t\t\t\ttmpMathLines = [];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Close any open list or blockquote\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t\ttmpInList = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (tmpInBlockquote)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t\t\t\t\ttmpInBlockquote = false;\n\t\t\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t\t\t}\n\t\t\t\t\ttmpInMathBlock = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (tmpInMathBlock)\n\t\t\t{\n\t\t\t\ttmpMathLines.push(tmpLine);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Code blocks (fenced) — track fence length so ````x```` nests around ```y```\n\t\t\tlet tmpFenceMatch = tmpLine.match(/^(`{3,})/);\n\t\t\tif (tmpFenceMatch)\n\t\t\t{\n\t\t\t\tlet tmpFenceLen = tmpFenceMatch[1].length;\n\n\t\t\t\tif (tmpInCodeBlock)\n\t\t\t\t{\n\t\t\t\t\t// Only close if the closing fence is at least as long as the opening\n\t\t\t\t\tif (tmpFenceLen >= tmpCodeFenceLength && tmpLine.trim() === tmpFenceMatch[1])\n\t\t\t\t\t{\n\t\t\t\t\t\t// End code block\n\t\t\t\t\t\tif (tmpCodeLang === 'mermaid')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Mermaid diagrams: output raw content for client-side rendering\n\t\t\t\t\t\t\ttmpHTML.push('<pre class=\"mermaid\">' + tmpCodeLines.join('\\n') + '</pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmpHTML.push('<pre><code class=\"language-' + this.escapeHTML(tmpCodeLang) + '\">' + this.escapeHTML(tmpCodeLines.join('\\n')) + '</code></pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmpInCodeBlock = false;\n\t\t\t\t\t\ttmpCodeFenceLength = 0;\n\t\t\t\t\t\ttmpCodeLang = '';\n\t\t\t\t\t\ttmpCodeLines = [];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Inner fence with fewer backticks — treat as content\n\t\t\t\t\t\ttmpCodeLines.push(tmpLine);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Close any open list or blockquote\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t\ttmpInList = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (tmpInBlockquote)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t\t\t\t\ttmpInBlockquote = false;\n\t\t\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t\t\t}\n\t\t\t\t\t// Start code block — record fence length\n\t\t\t\t\ttmpCodeFenceLength = tmpFenceLen;\n\t\t\t\t\ttmpCodeLang = tmpLine.replace(/^`{3,}/, '').trim();\n\t\t\t\t\ttmpInCodeBlock = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tmpInCodeBlock)\n\t\t\t{\n\t\t\t\ttmpCodeLines.push(tmpLine);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Blockquotes\n\t\t\tif (tmpLine.match(/^>\\s?/))\n\t\t\t{\n\t\t\t\tif (!tmpInBlockquote)\n\t\t\t\t{\n\t\t\t\t\t// Close any open list\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t\ttmpInList = false;\n\t\t\t\t\t}\n\t\t\t\t\ttmpInBlockquote = true;\n\t\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t\t}\n\t\t\t\ttmpBlockquoteLines.push(tmpLine.replace(/^>\\s?/, ''));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (tmpInBlockquote)\n\t\t\t{\n\t\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t\t\ttmpInBlockquote = false;\n\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t}\n\n\t\t\t// Horizontal rule\n\t\t\tif (tmpLine.match(/^(-{3,}|\\*{3,}|_{3,})\\s*$/))\n\t\t\t{\n\t\t\t\tif (tmpInList)\n\t\t\t\t{\n\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\ttmpInList = false;\n\t\t\t\t}\n\t\t\t\ttmpHTML.push('<hr>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Headings\n\t\t\tlet tmpHeadingMatch = tmpLine.match(/^(#{1,6})\\s+(.+)/);\n\t\t\tif (tmpHeadingMatch)\n\t\t\t{\n\t\t\t\tif (tmpInList)\n\t\t\t\t{\n\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\ttmpInList = false;\n\t\t\t\t}\n\t\t\t\tlet tmpLevel = tmpHeadingMatch[1].length;\n\t\t\t\tlet tmpText = this.parseInline(tmpHeadingMatch[2], pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t\t\t\tlet tmpID = tmpHeadingMatch[2].toLowerCase().replace(/[^\\w\\s-]/g, '').replace(/\\s+/g, '-');\n\t\t\t\ttmpHTML.push('<h' + tmpLevel + ' id=\"' + tmpID + '\">' + tmpText + '</h' + tmpLevel + '>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Unordered list items\n\t\t\tlet tmpULMatch = tmpLine.match(/^(\\s*)[-*+]\\s+(.*)/);\n\t\t\tif (tmpULMatch)\n\t\t\t{\n\t\t\t\tif (!tmpInList || tmpListType !== 'ul')\n\t\t\t\t{\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t}\n\t\t\t\t\ttmpHTML.push('<ul>');\n\t\t\t\t\ttmpInList = true;\n\t\t\t\t\ttmpListType = 'ul';\n\t\t\t\t}\n\t\t\t\ttmpHTML.push('<li>' + this.parseInline(tmpULMatch[2], pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</li>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Ordered list items\n\t\t\tlet tmpOLMatch = tmpLine.match(/^(\\s*)\\d+\\.\\s+(.*)/);\n\t\t\tif (tmpOLMatch)\n\t\t\t{\n\t\t\t\tif (!tmpInList || tmpListType !== 'ol')\n\t\t\t\t{\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t}\n\t\t\t\t\ttmpHTML.push('<ol>');\n\t\t\t\t\ttmpInList = true;\n\t\t\t\t\ttmpListType = 'ol';\n\t\t\t\t}\n\t\t\t\ttmpHTML.push('<li>' + this.parseInline(tmpOLMatch[2], pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</li>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Close list if we've left list items\n\t\t\tif (tmpInList && tmpLine.trim() !== '')\n\t\t\t{\n\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\ttmpInList = false;\n\t\t\t}\n\n\t\t\t// Empty line\n\t\t\tif (tmpLine.trim() === '')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Table detection\n\t\t\tif (tmpLine.match(/^\\|/) && i + 1 < tmpLines.length && tmpLines[i + 1].match(/^\\|[\\s-:|]+\\|/))\n\t\t\t{\n\t\t\t\t// Close any open list\n\t\t\t\tif (tmpInList)\n\t\t\t\t{\n\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\ttmpInList = false;\n\t\t\t\t}\n\n\t\t\t\tlet tmpTableHTML = '<table>';\n\n\t\t\t\t// Header row\n\t\t\t\tlet tmpHeaders = tmpLine.split('|').filter((pCell) => { return pCell.trim() !== ''; });\n\t\t\t\ttmpTableHTML += '<thead><tr>';\n\t\t\t\tfor (let h = 0; h < tmpHeaders.length; h++)\n\t\t\t\t{\n\t\t\t\t\ttmpTableHTML += '<th>' + this.parseInline(tmpHeaders[h].trim(), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</th>';\n\t\t\t\t}\n\t\t\t\ttmpTableHTML += '</tr></thead>';\n\n\t\t\t\t// Skip separator row\n\t\t\t\ti++;\n\n\t\t\t\t// Body rows\n\t\t\t\ttmpTableHTML += '<tbody>';\n\t\t\t\twhile (i + 1 < tmpLines.length && tmpLines[i + 1].match(/^\\|/))\n\t\t\t\t{\n\t\t\t\t\ti++;\n\t\t\t\t\tlet tmpCells = tmpLines[i].split('|').filter((pCell) => { return pCell.trim() !== ''; });\n\t\t\t\t\ttmpTableHTML += '<tr>';\n\t\t\t\t\tfor (let c = 0; c < tmpCells.length; c++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpTableHTML += '<td>' + this.parseInline(tmpCells[c].trim(), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</td>';\n\t\t\t\t\t}\n\t\t\t\t\ttmpTableHTML += '</tr>';\n\t\t\t\t}\n\t\t\t\ttmpTableHTML += '</tbody></table>';\n\t\t\t\ttmpHTML.push(tmpTableHTML);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Regular paragraph\n\t\t\ttmpHTML.push('<p>' + this.parseInline(tmpLine, pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</p>');\n\t\t}\n\n\t\t// Close any trailing open elements\n\t\tif (tmpInList)\n\t\t{\n\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t}\n\t\tif (tmpInBlockquote)\n\t\t{\n\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t}\n\t\tif (tmpInCodeBlock)\n\t\t{\n\t\t\ttmpHTML.push('<pre><code>' + this.escapeHTML(tmpCodeLines.join('\\n')) + '</code></pre>');\n\t\t}\n\n\t\treturn tmpHTML.join('\\n');\n\t}\n\n\t/**\n\t * Parse inline markdown elements (bold, italic, code, links, images).\n\t *\n\t * @param {string} pText - The text to parse\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t * @returns {string} HTML with inline elements\n\t */\n\tparseInline(pText, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tlet tmpResult = pText;\n\n\t\t// Inline code (backticks) - handle first to avoid interfering with other patterns\n\t\ttmpResult = tmpResult.replace(/`([^`]+)`/g, '<code>$1</code>');\n\n\t\t// Inline LaTeX equations ($...$) — must be processed before other inline patterns\n\t\t// Match single $ delimiters that aren't adjacent to spaces (to avoid false positives with currency)\n\t\ttmpResult = tmpResult.replace(/\\$([^\\$\\s][^\\$]*?[^\\$\\s])\\$/g, '<span class=\"docuserve-katex-inline\">$1</span>');\n\t\t// Also match single-character inline math like $x$\n\t\ttmpResult = tmpResult.replace(/\\$([^\\$\\s])\\$/g, '<span class=\"docuserve-katex-inline\">$1</span>');\n\n\t\t// Images\n\t\ttmpResult = tmpResult.replace(/!\\[([^\\]]*)\\]\\(([^)]+)\\)/g, '<img src=\"$2\" alt=\"$1\">');\n\n\t\t// Links\n\t\ttmpResult = tmpResult.replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, (pMatch, pLinkText, pHref) =>\n\t\t{\n\t\t\t// Convert internal doc links to hash routes\n\t\t\tif (pHref.match(/^\\//) || pHref.match(/^[^:]+\\.md/))\n\t\t\t{\n\t\t\t\tlet tmpRoute = this.convertDocLink(pHref, pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t\t\t\treturn '<a href=\"' + tmpRoute + '\">' + pLinkText + '</a>';\n\t\t\t}\n\t\t\treturn '<a href=\"' + pHref + '\" target=\"_blank\" rel=\"noopener\">' + pLinkText + '</a>';\n\t\t});\n\n\t\t// Bold\n\t\ttmpResult = tmpResult.replace(/\\*\\*([^*]+)\\*\\*/g, '<strong>$1</strong>');\n\t\ttmpResult = tmpResult.replace(/__([^_]+)__/g, '<strong>$1</strong>');\n\n\t\t// Italic\n\t\ttmpResult = tmpResult.replace(/\\*([^*]+)\\*/g, '<em>$1</em>');\n\t\ttmpResult = tmpResult.replace(/_([^_]+)_/g, '<em>$1</em>');\n\n\t\treturn tmpResult;\n\t}\n\n\t/**\n\t * Convert a docsify-style internal link to a hash route for docuserve.\n\t *\n\t * When module context is provided, relative links (e.g. \"api.md\" or\n\t * \"./settings-manager.md\") are resolved within the current module and\n\t * document directory rather than falling back to the docs root.\n\t *\n\t * @param {string} pHref - The original link href\n\t * @param {string} [pCurrentGroup] - The current group key (e.g. \"fable\")\n\t * @param {string} [pCurrentModule] - The current module name (e.g. \"fable\")\n\t * @param {string} [pCurrentDocPath] - The current document path within the module (e.g. \"services/README.md\")\n\t * @returns {string} The converted hash route\n\t */\n\tconvertDocLink(pHref, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\t// Strip leading ./ prefix for relative paths\n\t\tlet tmpPath = pHref.replace(/^\\.\\//, '');\n\t\t// Remove leading slash\n\t\ttmpPath = tmpPath.replace(/^\\//, '');\n\n\t\t// If it looks like an absolute module path (group/module/...), route directly\n\t\tlet tmpParts = tmpPath.split('/');\n\t\tif (tmpParts.length >= 2)\n\t\t{\n\t\t\tif (this.isGroupInCatalog(tmpParts[0]))\n\t\t\t{\n\t\t\t\treturn '#/doc/' + tmpPath;\n\t\t\t}\n\t\t}\n\n\t\t// If we have module context, resolve relative to current document's directory\n\t\tif (pCurrentGroup && pCurrentModule)\n\t\t{\n\t\t\t// Determine the directory of the current document\n\t\t\tlet tmpDocDir = '';\n\t\t\tif (pCurrentDocPath)\n\t\t\t{\n\t\t\t\tlet tmpDirParts = pCurrentDocPath.split('/');\n\t\t\t\tif (tmpDirParts.length > 1)\n\t\t\t\t{\n\t\t\t\t\ttmpDirParts.pop(); // Remove filename\n\t\t\t\t\ttmpDocDir = tmpDirParts.join('/') + '/';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn '#/doc/' + pCurrentGroup + '/' + pCurrentModule + '/' + tmpDocDir + tmpPath;\n\t\t}\n\n\t\t// Local doc page (no module context)\n\t\tif (tmpPath.match(/\\.md$/))\n\t\t{\n\t\t\tlet tmpPageKey = tmpPath.replace(/\\.md$/, '');\n\t\t\treturn '#/page/' + tmpPageKey;\n\t\t}\n\n\t\treturn '#/page/' + tmpPath;\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\t}\n}\n\nmodule.exports = DocuserveDocumentationProvider;\n\nmodule.exports.default_configuration =\n{\n\tProviderIdentifier: \"Docuserve-Documentation\",\n\n\tAutoInitialize: true,\n\tAutoInitializeOrdinal: 0\n};\n\n},{\"lunr\":3,\"pict-provider\":7}],13:[function(require,module,exports){\nconst libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Content\",\n\n\tDefaultRenderable: \"Docuserve-Content-Display\",\n\tDefaultDestinationAddress: \"#Docuserve-Content-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Content-Template\",\n\t\t\tTemplate: /*html*/`\n<div class=\"docuserve-content\" id=\"Docuserve-Content-Body\">\n\t<div class=\"docuserve-content-loading\">Loading documentation...</div>\n</div>\n`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Content-Display\",\n\t\t\tTemplateHash: \"Docuserve-Content-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Content-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveContentView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\t/**\n\t * Display parsed HTML content in the content area.\n\t *\n\t * @param {string} pHTMLContent - The HTML to display\n\t */\n\tdisplayContent(pHTMLContent)\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Content-Body', pHTMLContent);\n\n\t\t// Scroll to top of content area\n\t\tlet tmpContentContainer = document.getElementById('Docuserve-Content-Container');\n\t\tif (tmpContentContainer)\n\t\t{\n\t\t\ttmpContentContainer.scrollTop = 0;\n\t\t}\n\n\t\t// Post-render: initialize Mermaid diagrams if mermaid is available\n\t\tthis.renderMermaidDiagrams();\n\n\t\t// Post-render: render KaTeX equations if katex is available\n\t\tthis.renderKaTeXEquations();\n\t}\n\n\t/**\n\t * Render any Mermaid diagram blocks in the content area.\n\t * Mermaid blocks are `<pre class=\"mermaid\">` elements produced by parseMarkdown.\n\t */\n\trenderMermaidDiagrams()\n\t{\n\t\tif (typeof mermaid === 'undefined')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpContentBody = document.getElementById('Docuserve-Content-Body');\n\t\tif (!tmpContentBody)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpMermaidElements = tmpContentBody.querySelectorAll('pre.mermaid');\n\t\tif (tmpMermaidElements.length < 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// mermaid.run() will process all pre.mermaid elements in the container\n\t\ttry\n\t\t{\n\t\t\tmermaid.run({ nodes: tmpMermaidElements });\n\t\t}\n\t\tcatch (pError)\n\t\t{\n\t\t\tthis.log.error('Mermaid rendering error: ' + pError.message);\n\t\t}\n\t}\n\n\t/**\n\t * Render KaTeX inline and display math elements in the content area.\n\t * Inline: `<span class=\"docuserve-katex-inline\">`\n\t * Display: `<div class=\"docuserve-katex-display\">`\n\t */\n\trenderKaTeXEquations()\n\t{\n\t\tif (typeof katex === 'undefined')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpContentBody = document.getElementById('Docuserve-Content-Body');\n\t\tif (!tmpContentBody)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Render inline math\n\t\tlet tmpInlineElements = tmpContentBody.querySelectorAll('.docuserve-katex-inline');\n\t\tfor (let i = 0; i < tmpInlineElements.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tkatex.render(tmpInlineElements[i].textContent, tmpInlineElements[i], { throwOnError: false, displayMode: false });\n\t\t\t}\n\t\t\tcatch (pError)\n\t\t\t{\n\t\t\t\tthis.log.warn('KaTeX inline error: ' + pError.message);\n\t\t\t}\n\t\t}\n\n\t\t// Render display math\n\t\tlet tmpDisplayElements = tmpContentBody.querySelectorAll('.docuserve-katex-display');\n\t\tfor (let i = 0; i < tmpDisplayElements.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tkatex.render(tmpDisplayElements[i].textContent, tmpDisplayElements[i], { throwOnError: false, displayMode: true });\n\t\t\t}\n\t\t\tcatch (pError)\n\t\t\t{\n\t\t\t\tthis.log.warn('KaTeX display error: ' + pError.message);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Show a loading indicator.\n\t */\n\tshowLoading()\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Content-Body', '<div class=\"docuserve-content-loading\">Loading documentation...</div>');\n\t}\n}\n\nmodule.exports = DocuserveContentView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n\n},{\"pict-view\":9}],14:[function(require,module,exports){\nconst libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Layout\",\n\n\tDefaultRenderable: \"Docuserve-Layout-Shell\",\n\tDefaultDestinationAddress: \"#Docuserve-Application-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Layout-Shell-Template\",\n\t\t\tTemplate: /*html*/`\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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Layout-Shell\",\n\t\t\tTemplateHash: \"Docuserve-Layout-Shell-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Application-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveLayoutView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\t// After the layout shell is rendered, render the child views into their containers\n\t\tthis.pict.views['Docuserve-TopBar'].render();\n\t\tthis.pict.views['Docuserve-Sidebar'].render();\n\n\t\t// Show the splash screen initially\n\t\tthis.pict.views['Docuserve-Splash'].render();\n\n\t\t// Inject all view CSS into the PICT-CSS style element\n\t\tthis.pict.CSSMap.injectCSS();\n\n\t\t// Resolve the current hash on initial load\n\t\tthis.pict.PictApplication.resolveHash();\n\n\t\t// Listen for hash changes so that plain <a href=\"#/...\"> links trigger\n\t\t// navigation. This covers sidebar links, splash action buttons,\n\t\t// in-content links, and browser back/forward navigation.\n\t\tif (!this._HashChangeListenerBound)\n\t\t{\n\t\t\tthis._HashChangeListenerBound = true;\n\t\t\tlet tmpSelf = this;\n\t\t\twindow.addEventListener('hashchange', () =>\n\t\t\t{\n\t\t\t\ttmpSelf.pict.PictApplication.resolveHash();\n\t\t\t});\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n}\n\nmodule.exports = DocuserveLayoutView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n\n},{\"pict-view\":9}],15:[function(require,module,exports){\nconst libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Search\",\n\n\tDefaultRenderable: \"Docuserve-Search-Display\",\n\tDefaultDestinationAddress: \"#Docuserve-Content-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Search-Template\",\n\t\t\tTemplate: /*html*/`\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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Search-Display\",\n\t\t\tTemplateHash: \"Docuserve-Search-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Content-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveSearchView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\tthis._SearchDebounceTimer = null;\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\t// Attach the search input listener\n\t\tlet tmpInput = document.getElementById('Docuserve-Search-Input');\n\t\tif (tmpInput)\n\t\t{\n\t\t\ttmpInput.addEventListener('input', () =>\n\t\t\t{\n\t\t\t\tif (this._SearchDebounceTimer)\n\t\t\t\t{\n\t\t\t\t\tclearTimeout(this._SearchDebounceTimer);\n\t\t\t\t}\n\n\t\t\t\tthis._SearchDebounceTimer = setTimeout(() =>\n\t\t\t\t{\n\t\t\t\t\tthis.performSearch(tmpInput.value);\n\t\t\t\t}, 250);\n\t\t\t});\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Show the search page with an optional initial query.\n\t *\n\t * @param {string} pQuery - The initial search query\n\t */\n\tshowSearch(pQuery)\n\t{\n\t\tlet tmpInput = document.getElementById('Docuserve-Search-Input');\n\t\tif (tmpInput)\n\t\t{\n\t\t\ttmpInput.value = pQuery || '';\n\t\t\ttmpInput.focus();\n\t\t}\n\n\t\tif (pQuery && pQuery.trim())\n\t\t{\n\t\t\tthis.performSearch(pQuery);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlet tmpDocCount = this.pict.AppData.Docuserve.KeywordDocumentCount || 0;\n\t\t\tlet tmpStatusMsg = tmpDocCount > 0\n\t\t\t\t? 'Search across ' + tmpDocCount + ' documents.'\n\t\t\t\t: 'Enter a search term to find documentation.';\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status', tmpStatusMsg);\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', '');\n\t\t}\n\n\t\t// Scroll to top\n\t\tlet tmpContentContainer = document.getElementById('Docuserve-Content-Container');\n\t\tif (tmpContentContainer)\n\t\t{\n\t\t\ttmpContentContainer.scrollTop = 0;\n\t\t}\n\t}\n\n\t/**\n\t * Perform a search and render the results.\n\t *\n\t * @param {string} pQuery - The search query\n\t */\n\tperformSearch(pQuery)\n\t{\n\t\tif (!pQuery || !pQuery.trim())\n\t\t{\n\t\t\tlet tmpDocCount = this.pict.AppData.Docuserve.KeywordDocumentCount || 0;\n\t\t\tlet tmpStatusMsg = tmpDocCount > 0\n\t\t\t\t? 'Search across ' + tmpDocCount + ' documents.'\n\t\t\t\t: 'Enter a search term to find documentation.';\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status', tmpStatusMsg);\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', '');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpResults = tmpDocProvider.search(pQuery);\n\n\t\t// Update status\n\t\tif (tmpResults.length === 0)\n\t\t{\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status',\n\t\t\t\t'No results found for \\'' + this.escapeHTML(pQuery) + '\\'.');\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', '');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status',\n\t\t\ttmpResults.length + ' result' + (tmpResults.length !== 1 ? 's' : '') + ' for \\'' + this.escapeHTML(pQuery) + '\\'');\n\n\t\t// Render results\n\t\tlet tmpHTML = '';\n\n\t\tfor (let i = 0; i < tmpResults.length; i++)\n\t\t{\n\t\t\tlet tmpResult = tmpResults[i];\n\t\t\tlet tmpBreadcrumb = '';\n\t\t\tif (tmpResult.Group && tmpResult.Module)\n\t\t\t{\n\t\t\t\ttmpBreadcrumb = tmpResult.Group + ' › ' + tmpResult.Module;\n\t\t\t}\n\n\t\t\ttmpHTML += '<a class=\"docuserve-search-result\" href=\"' + tmpResult.Route + '\">';\n\t\t\ttmpHTML += '<div class=\"docuserve-search-result-title\">' + this.escapeHTML(tmpResult.Title) + '</div>';\n\t\t\tif (tmpBreadcrumb)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-search-result-breadcrumb\">' + tmpBreadcrumb + '</div>';\n\t\t\t}\n\t\t\tif (tmpResult.DocPath)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-search-result-path\">' + this.escapeHTML(tmpResult.DocPath) + '</div>';\n\t\t\t}\n\t\t\ttmpHTML += '</a>';\n\t\t}\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', tmpHTML);\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\t}\n}\n\nmodule.exports = DocuserveSearchView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n\n},{\"pict-view\":9}],16:[function(require,module,exports){\nconst libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Sidebar\",\n\n\tDefaultRenderable: \"Docuserve-Sidebar-Content\",\n\tDefaultDestinationAddress: \"#Docuserve-Sidebar-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Sidebar-Template\",\n\t\t\tTemplate: /*html*/`\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()\">×</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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Sidebar-Content\",\n\t\t\tTemplateHash: \"Docuserve-Sidebar-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Sidebar-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocusserveSidebarView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\tthis._SidebarSearchDebounceTimer = null;\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\tthis.renderSidebarGroups();\n\n\t\t// Conditionally show the search box if the keyword index is loaded\n\t\tlet tmpSearchContainer = document.getElementById('Docuserve-Sidebar-Search');\n\t\tif (tmpSearchContainer && this.pict.AppData.Docuserve.KeywordIndexLoaded)\n\t\t{\n\t\t\ttmpSearchContainer.style.display = '';\n\n\t\t\tlet tmpInput = document.getElementById('Docuserve-Sidebar-Search-Input');\n\t\t\tif (tmpInput)\n\t\t\t{\n\t\t\t\ttmpInput.addEventListener('input', () =>\n\t\t\t\t{\n\t\t\t\t\tif (this._SidebarSearchDebounceTimer)\n\t\t\t\t\t{\n\t\t\t\t\t\tclearTimeout(this._SidebarSearchDebounceTimer);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._SidebarSearchDebounceTimer = setTimeout(() =>\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.performSidebarSearch(tmpInput.value);\n\t\t\t\t\t}, 250);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Render the sidebar group navigation from catalog data.\n\t */\n\trenderSidebarGroups()\n\t{\n\t\tlet tmpGroups = this.pict.AppData.Docuserve.SidebarGroups;\n\n\t\tif (!tmpGroups || tmpGroups.length < 1)\n\t\t{\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-Groups', '<p style=\"padding: 1em; color: #999; font-size: 0.85em;\">Loading catalog...</p>');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpHTML = '';\n\n\t\tfor (let i = 0; i < tmpGroups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = tmpGroups[i];\n\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-group\">';\n\n\t\t\t// Determine the route for the group title: use the group's own route,\n\t\t\t// or fall back to the first module with docs.\n\t\t\tlet tmpGroupRoute = tmpGroup.Route || '';\n\t\t\tif (!tmpGroupRoute)\n\t\t\t{\n\t\t\t\tfor (let k = 0; k < tmpGroup.Modules.length; k++)\n\t\t\t\t{\n\t\t\t\t\tif (tmpGroup.Modules[k].HasDocs && tmpGroup.Modules[k].Route)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpGroupRoute = tmpGroup.Modules[k].Route;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tmpGroupRoute)\n\t\t\t{\n\t\t\t\ttmpHTML += '<a class=\"docuserve-sidebar-group-title\" href=\"' + tmpGroupRoute + '\">' + this.escapeHTML(tmpGroup.Name) + '</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-group-title\">' + this.escapeHTML(tmpGroup.Name) + '</div>';\n\t\t\t}\n\t\t\ttmpHTML += '<ul class=\"docuserve-sidebar-modules\">';\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.HasDocs)\n\t\t\t\t{\n\t\t\t\t\tlet tmpActiveClass = '';\n\t\t\t\t\tif (this.pict.AppData.Docuserve.CurrentGroup === tmpModule.Group && this.pict.AppData.Docuserve.CurrentModule === tmpModule.Name)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpActiveClass = ' class=\"active\"';\n\t\t\t\t\t}\n\t\t\t\t\ttmpHTML += '<li><a' + tmpActiveClass + ' href=\"' + tmpModule.Route + '\">' + this.escapeHTML(tmpModule.Name) + '</a></li>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmpHTML += '<li><span class=\"no-docs\">' + this.escapeHTML(tmpModule.Name) + '</span></li>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttmpHTML += '</ul>';\n\t\t\ttmpHTML += '</div>';\n\t\t}\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-Groups', tmpHTML);\n\t}\n\n\t/**\n\t * Render module-specific sub-navigation when viewing a module.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t */\n\trenderModuleNav(pGroup, pModule)\n\t{\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tif (!tmpDocProvider)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpSidebar = tmpDocProvider.getModuleSidebar(pGroup, pModule);\n\t\tif (!tmpSidebar)\n\t\t{\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-ModuleNav', '');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpRoutePrefix = '#/doc/' + pGroup + '/' + pModule + '/';\n\t\tlet tmpHTML = '<div class=\"docuserve-sidebar-module-nav\">';\n\n\t\tfor (let i = 0; i < tmpSidebar.length; i++)\n\t\t{\n\t\t\tlet tmpEntry = tmpSidebar[i];\n\n\t\t\tif (tmpEntry.Children)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-module-nav-section\">' + this.escapeHTML(tmpEntry.Title) + '</div>';\n\n\t\t\t\tfor (let j = 0; j < tmpEntry.Children.length; j++)\n\t\t\t\t{\n\t\t\t\t\tlet tmpChild = tmpEntry.Children[j];\n\t\t\t\t\tif (tmpChild.Path)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML += '<a href=\"' + tmpRoutePrefix + tmpChild.Path + '\">' + this.escapeHTML(tmpChild.Title) + '</a>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tmpEntry.Path)\n\t\t\t{\n\t\t\t\ttmpHTML += '<a href=\"' + tmpRoutePrefix + tmpEntry.Path + '\">' + this.escapeHTML(tmpEntry.Title) + '</a>';\n\t\t\t}\n\t\t}\n\n\t\ttmpHTML += '</div>';\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-ModuleNav', tmpHTML);\n\t}\n\n\t/**\n\t * Perform a sidebar search and render inline results.\n\t *\n\t * Shows up to 8 results as compact links. If there are results, also\n\t * shows a \"See all results\" link to the dedicated search page.\n\t *\n\t * @param {string} pQuery - The search query\n\t */\n\tperformSidebarSearch(pQuery)\n\t{\n\t\tlet tmpResultsEl = document.getElementById('Docuserve-Sidebar-Search-Results');\n\t\tif (!tmpResultsEl)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!pQuery || !pQuery.trim())\n\t\t{\n\t\t\ttmpResultsEl.innerHTML = '';\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpResults = tmpDocProvider.search(pQuery);\n\n\t\tif (tmpResults.length === 0)\n\t\t{\n\t\t\ttmpResultsEl.innerHTML = '<div style=\"padding: 0.4em 0.5em; font-size: 0.82em; color: #999;\">No results found.</div>';\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpMaxResults = 8;\n\t\tlet tmpHTML = '';\n\n\t\tfor (let i = 0; i < tmpResults.length && i < tmpMaxResults; i++)\n\t\t{\n\t\t\tlet tmpResult = tmpResults[i];\n\t\t\tlet tmpMeta = '';\n\t\t\tif (tmpResult.Group && tmpResult.Module)\n\t\t\t{\n\t\t\t\ttmpMeta = tmpResult.Group + ' / ' + tmpResult.Module;\n\t\t\t}\n\n\t\t\ttmpHTML += '<a href=\"' + tmpResult.Route + '\">';\n\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-search-result-title\">' + this.escapeHTML(tmpResult.Title) + '</div>';\n\t\t\tif (tmpMeta)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-search-result-meta\">' + this.escapeHTML(tmpMeta) + '</div>';\n\t\t\t}\n\t\t\ttmpHTML += '</a>';\n\t\t}\n\n\t\tif (tmpResults.length > tmpMaxResults)\n\t\t{\n\t\t\tlet tmpEncodedQuery = encodeURIComponent(pQuery);\n\t\t\ttmpHTML += '<a class=\"docuserve-sidebar-search-all\" href=\"#/search/' + tmpEncodedQuery + '\">See all ' + tmpResults.length + ' results</a>';\n\t\t}\n\n\t\ttmpResultsEl.innerHTML = tmpHTML;\n\t}\n\n\t/**\n\t * Toggle the sidebar visibility and update the top bar hamburger button.\n\t */\n\ttoggleSidebar()\n\t{\n\t\tthis.pict.AppData.Docuserve.SidebarVisible = !this.pict.AppData.Docuserve.SidebarVisible;\n\n\t\tlet tmpContainer = document.getElementById('Docuserve-Sidebar-Container');\n\t\tlet tmpToggle = document.getElementById('Docuserve-TopBar-Toggle');\n\n\t\tif (this.pict.AppData.Docuserve.SidebarVisible)\n\t\t{\n\t\t\tif (tmpContainer) tmpContainer.style.display = '';\n\t\t\tif (tmpToggle) tmpToggle.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (tmpContainer) tmpContainer.style.display = 'none';\n\t\t\tif (tmpToggle) tmpToggle.style.display = 'inline-block';\n\t\t}\n\t}\n\n\t/**\n\t * Clear the module-specific sub-navigation.\n\t */\n\tclearModuleNav()\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-ModuleNav', '');\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"');\n\t}\n}\n\nmodule.exports = DocusserveSidebarView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n\n},{\"pict-view\":9}],17:[function(require,module,exports){\nconst libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Splash\",\n\n\tDefaultRenderable: \"Docuserve-Splash-Content\",\n\tDefaultDestinationAddress: \"#Docuserve-Content-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Splash-Template\",\n\t\t\tTemplate: /*html*/`\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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Splash-Content\",\n\t\t\tTemplateHash: \"Docuserve-Splash-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Content-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocusserveSplashView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\tlet tmpDocuserve = this.pict.AppData.Docuserve;\n\n\t\tif (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover)\n\t\t{\n\t\t\tthis.renderFromCover(tmpDocuserve.Cover);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.renderFromCatalog(tmpDocuserve);\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Render the splash screen from parsed cover.md data.\n\t *\n\t * @param {Object} pCover - The parsed cover data { Title, Tagline, Description, Highlights, Actions }\n\t */\n\trenderFromCover(pCover)\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Title', this.escapeHTML(pCover.Title));\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Tagline', this.escapeHTML(pCover.Tagline));\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Description', this.escapeHTML(pCover.Description));\n\n\t\t// Render highlight cards\n\t\tlet tmpHighlightsHTML = '';\n\t\tfor (let i = 0; i < pCover.Highlights.length; i++)\n\t\t{\n\t\t\tlet tmpHighlight = pCover.Highlights[i];\n\t\t\ttmpHighlightsHTML += '<div class=\"docuserve-splash-highlight-card\">';\n\t\t\tif (tmpHighlight.Label)\n\t\t\t{\n\t\t\t\ttmpHighlightsHTML += '<h3>' + this.escapeHTML(tmpHighlight.Label) + '</h3>';\n\t\t\t}\n\t\t\ttmpHighlightsHTML += '<p>' + this.escapeHTML(tmpHighlight.Text) + '</p>';\n\t\t\ttmpHighlightsHTML += '</div>';\n\t\t}\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Highlights', tmpHighlightsHTML);\n\n\t\t// Render action buttons\n\t\tlet tmpActionsHTML = '';\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tfor (let i = 0; i < pCover.Actions.length; i++)\n\t\t{\n\t\t\tlet tmpAction = pCover.Actions[i];\n\t\t\tlet tmpClass = (i === 0) ? 'primary' : 'secondary';\n\t\t\tlet tmpHref = tmpAction.Href;\n\n\t\t\t// External links open in new tab\n\t\t\tif (tmpHref.match(/^https?:\\/\\//))\n\t\t\t{\n\t\t\t\ttmpActionsHTML += '<a class=\"' + tmpClass + '\" href=\"' + this.escapeHTML(tmpHref) + '\" target=\"_blank\" rel=\"noopener\">' + this.escapeHTML(tmpAction.Text) + '</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Internal links go through the app router\n\t\t\t\tlet tmpRoute = tmpDocProvider.convertSidebarLink(tmpHref);\n\t\t\t\ttmpActionsHTML += '<a class=\"' + tmpClass + '\" href=\"' + this.escapeHTML(tmpRoute) + '\">' + this.escapeHTML(tmpAction.Text) + '</a>';\n\t\t\t}\n\t\t}\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Actions', tmpActionsHTML);\n\t}\n\n\t/**\n\t * Render the splash screen from catalog data as a fallback when cover.md\n\t * is not available.\n\t *\n\t * @param {Object} pDocuserve - The AppData.Docuserve state\n\t */\n\trenderFromCatalog(pDocuserve)\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Title', 'Retold');\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Tagline', 'Documentation');\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Description', '');\n\n\t\t// Build highlight cards from catalog groups\n\t\tlet tmpHighlightsHTML = '';\n\t\tlet tmpGroups = pDocuserve.SidebarGroups || [];\n\t\tfor (let i = 0; i < tmpGroups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = tmpGroups[i];\n\t\t\t// Skip groups with no modules (like \"Home\" or \"Getting Started\")\n\t\t\tif (!tmpGroup.Modules || tmpGroup.Modules.length < 1)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet tmpDescription = tmpGroup.Description || (tmpGroup.Modules.length + ' modules');\n\t\t\ttmpHighlightsHTML += '<div class=\"docuserve-splash-highlight-card\">';\n\t\t\ttmpHighlightsHTML += '<h3>' + this.escapeHTML(tmpGroup.Name) + '</h3>';\n\t\t\ttmpHighlightsHTML += '<p>' + this.escapeHTML(tmpDescription) + '</p>';\n\t\t\ttmpHighlightsHTML += '</div>';\n\t\t}\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Highlights', tmpHighlightsHTML);\n\n\t\t// Default action buttons\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Actions', '');\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"');\n\t}\n}\n\nmodule.exports = DocusserveSplashView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n\n},{\"pict-view\":9}],18:[function(require,module,exports){\nconst libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-TopBar\",\n\n\tDefaultRenderable: \"Docuserve-TopBar-Content\",\n\tDefaultDestinationAddress: \"#Docuserve-TopBar-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-TopBar-Template\",\n\t\t\tTemplate: /*html*/`\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()\">☰</button>\n\t</div>\n</div>\n`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-TopBar-Content\",\n\t\t\tTemplateHash: \"Docuserve-TopBar-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-TopBar-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveTopBarView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\tthis.renderTopBarContent();\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Populate the top bar from _topbar.md data or fall back to defaults.\n\t */\n\trenderTopBarContent()\n\t{\n\t\tlet tmpDocuserve = this.pict.AppData.Docuserve;\n\t\tlet tmpBrandEl = document.getElementById('Docuserve-TopBar-Brand');\n\t\tlet tmpNavEl = document.getElementById('Docuserve-TopBar-Nav');\n\t\tlet tmpLinksEl = document.getElementById('Docuserve-TopBar-Links');\n\n\t\tif (!tmpBrandEl || !tmpNavEl || !tmpLinksEl)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (tmpDocuserve.TopBarLoaded && tmpDocuserve.TopBar)\n\t\t{\n\t\t\t// Data-driven from _topbar.md\n\t\t\tlet tmpTopBar = tmpDocuserve.TopBar;\n\n\t\t\t// Brand\n\t\t\ttmpBrandEl.textContent = tmpTopBar.Brand || 'Documentation';\n\n\t\t\t// Navigation links (centre)\n\t\t\tlet tmpNavHTML = '<a href=\"#/Home\">Home</a>';\n\t\t\tfor (let i = 0; i < tmpTopBar.NavLinks.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpLink = tmpTopBar.NavLinks[i];\n\t\t\t\ttmpNavHTML += '<a href=\"' + tmpLink.Href + '\">' + this.escapeHTML(tmpLink.Text) + '</a>';\n\t\t\t}\n\t\t\ttmpNavEl.innerHTML = tmpNavHTML;\n\n\t\t\t// External links (right side) — search link first if keyword index is available\n\t\t\tlet tmpLinksHTML = '';\n\t\t\tif (tmpDocuserve.KeywordIndexLoaded)\n\t\t\t{\n\t\t\t\ttmpLinksHTML += '<a href=\"#/search/\">Search</a>';\n\t\t\t}\n\t\t\tfor (let i = 0; i < tmpTopBar.ExternalLinks.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpLink = tmpTopBar.ExternalLinks[i];\n\t\t\t\ttmpLinksHTML += '<a href=\"' + this.escapeHTML(tmpLink.Href) + '\" target=\"_blank\" rel=\"noopener\">' + this.escapeHTML(tmpLink.Text) + '</a>';\n\t\t\t}\n\t\t\ttmpLinksEl.innerHTML = tmpLinksHTML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Fallback: use brand from cover or a default, and just show Home\n\t\t\tlet tmpBrand = 'Documentation';\n\t\t\tif (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover && tmpDocuserve.Cover.Title)\n\t\t\t{\n\t\t\t\ttmpBrand = tmpDocuserve.Cover.Title;\n\t\t\t}\n\t\t\telse if (tmpDocuserve.CatalogLoaded && tmpDocuserve.Catalog && tmpDocuserve.Catalog.Name)\n\t\t\t{\n\t\t\t\ttmpBrand = tmpDocuserve.Catalog.Name;\n\t\t\t}\n\n\t\t\ttmpBrandEl.textContent = tmpBrand;\n\t\t\ttmpNavEl.innerHTML = '<a href=\"#/Home\">Home</a>';\n\t\t\ttmpLinksEl.innerHTML = tmpDocuserve.KeywordIndexLoaded ? '<a href=\"#/search/\">Search</a>' : '';\n\t\t}\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\t}\n}\n\nmodule.exports = DocuserveTopBarView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n\n},{\"pict-view\":9}]},{},[11])(11)\n});\n\n","(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","module.exports={\n \"name\": \"fable-serviceproviderbase\",\n \"version\": \"3.0.15\",\n \"description\": \"Simple base classes for fable services.\",\n \"main\": \"source/Fable-ServiceProviderBase.js\",\n \"scripts\": {\n \"start\": \"node source/Fable-ServiceProviderBase.js\",\n \"test\": \"npx mocha -u tdd -R spec\",\n \"tests\": \"npx mocha -u tdd --exit -R spec --grep\",\n \"coverage\": \"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec\",\n \"build\": \"npx quack build\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/stevenvelozo/fable-serviceproviderbase.git\"\n },\n \"keywords\": [\n \"entity\",\n \"behavior\"\n ],\n \"author\": \"Steven Velozo <steven@velozo.com> (http://velozo.com/)\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/fable-serviceproviderbase/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/fable-serviceproviderbase\",\n \"devDependencies\": {\n \"fable\": \"^3.0.143\",\n \"quackage\": \"^1.0.33\"\n }\n}","/**\n* Fable Service Base\n* @author <steven@velozo.com>\n*/\n\nconst libPackage = require('../package.json');\n\nclass FableServiceProviderBase\n{\n\t// The constructor can be used in two ways:\n\t// 1) With a fable, options object and service hash (the options object and service hash are optional)\n\t// 2) With an object or nothing as the first parameter, where it will be treated as the options object\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\t// Check if a fable was passed in; connect it if so\n\t\tif ((typeof(pFable) === 'object') && pFable.isFable)\n\t\t{\n\t\t\tthis.connectFable(pFable);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.fable = false;\n\t\t}\n\n\t\t// Initialize the services map if it wasn't passed in\n\t\t/** @type {Object} */\n\t\tthis._PackageFableServiceProvider = libPackage;\n\n\t\t// initialize options and UUID based on whether the fable was passed in or not.\n\t\tif (this.fable)\n\t\t{\n\t\t\tthis.UUID = pFable.getUUID();\n\t\t\tthis.options = (typeof(pOptions) === 'object') ? pOptions\n\t\t\t\t\t\t\t: {};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// With no fable, check to see if there was an object passed into either of the first two\n\t\t\t// Parameters, and if so, treat it as the options object\n\t\t\tthis.options = ((typeof(pFable) === 'object') && !pFable.isFable) ? pFable\n\t\t\t\t\t\t\t: (typeof(pOptions) === 'object') ? pOptions\n\t\t\t\t\t\t\t: {};\n\t\t\tthis.UUID = `CORE-SVC-${Math.floor((Math.random() * (99999 - 10000)) + 10000)}`\n\t\t}\n\n\t\t// It's expected that the deriving class will set this\n\t\tthis.serviceType = `Unknown-${this.UUID}`;\n\n\t\t// The service hash is used to identify the specific instantiation of the service in the services map\n\t\tthis.Hash = (typeof(pServiceHash) === 'string') ? pServiceHash \n\t\t\t\t\t: (!this.fable && (typeof(pOptions) === 'string')) ? pOptions\n\t\t\t\t\t: `${this.UUID}`;\n\t}\n\n\tconnectFable(pFable)\n\t{\n\t\tif ((typeof(pFable) !== 'object') || (!pFable.isFable))\n\t\t{\n\t\t\tlet tmpErrorMessage = `Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [${typeof(pFable)}].}`;\n\t\t\tconsole.log(tmpErrorMessage);\n\t\t\treturn new Error(tmpErrorMessage);\n\t\t}\n\n\t\tif (!this.fable)\n\t\t{\n\t\t\tthis.fable = pFable;\n\t\t}\n\n\t\tif (!this.log)\n\t\t{\n\t\t\tthis.log = this.fable.Logging;\n\t\t}\n\t\tif (!this.services)\n\t\t{\n\t\t\tthis.services = this.fable.services;\n\t\t}\n\n\t\tif (!this.servicesMap)\n\t\t{\n\t\t\tthis.servicesMap = this.fable.servicesMap;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tstatic isFableService = true;\n}\n\nmodule.exports = FableServiceProviderBase;\n\n// This is left here in case we want to go back to having different code/base class for \"core\" services\nmodule.exports.CoreServiceProviderBase = FableServiceProviderBase;","/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9\n * Copyright (C) 2020 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * A convenience function for configuring and constructing\n * a new lunr Index.\n *\n * A lunr.Builder instance is created and the pipeline setup\n * with a trimmer, stop word filter and stemmer.\n *\n * This builder object is yielded to the configuration function\n * that is passed as a parameter, allowing the list of fields\n * and other builder parameters to be customised.\n *\n * All documents _must_ be added within the passed config function.\n *\n * @example\n * var idx = lunr(function () {\n * this.field('title')\n * this.field('body')\n * this.ref('id')\n *\n * documents.forEach(function (doc) {\n * this.add(doc)\n * }, this)\n * })\n *\n * @see {@link lunr.Builder}\n * @see {@link lunr.Pipeline}\n * @see {@link lunr.trimmer}\n * @see {@link lunr.stopWordFilter}\n * @see {@link lunr.stemmer}\n * @namespace {function} lunr\n */\nvar lunr = function (config) {\n var builder = new lunr.Builder\n\n builder.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n builder.searchPipeline.add(\n lunr.stemmer\n )\n\n config.call(builder, builder)\n return builder.build()\n}\n\nlunr.version = \"2.3.9\"\n/*!\n * lunr.utils\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n * @namespace lunr.utils\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf lunr.utils\n * @function\n */\nlunr.utils.warn = (function (global) {\n /* eslint-disable no-console */\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message)\n }\n }\n /* eslint-enable no-console */\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf lunr.utils\n */\nlunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\"\n } else {\n return obj.toString()\n }\n}\n\n/**\n * Clones an object.\n *\n * Will create a copy of an existing object such that any mutations\n * on the copy cannot affect the original.\n *\n * Only shallow objects are supported, passing a nested object to this\n * function will cause a TypeError.\n *\n * Objects with primitives, and arrays of primitives are supported.\n *\n * @param {Object} obj The object to clone.\n * @return {Object} a clone of the passed object.\n * @throws {TypeError} when a nested object is passed.\n * @memberOf Utils\n */\nlunr.utils.clone = function (obj) {\n if (obj === null || obj === undefined) {\n return obj\n }\n\n var clone = Object.create(null),\n keys = Object.keys(obj)\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i],\n val = obj[key]\n\n if (Array.isArray(val)) {\n clone[key] = val.slice()\n continue\n }\n\n if (typeof val === 'string' ||\n typeof val === 'number' ||\n typeof val === 'boolean') {\n clone[key] = val\n continue\n }\n\n throw new TypeError(\"clone is not deep and does not support nested objects\")\n }\n\n return clone\n}\nlunr.FieldRef = function (docRef, fieldName, stringValue) {\n this.docRef = docRef\n this.fieldName = fieldName\n this._stringValue = stringValue\n}\n\nlunr.FieldRef.joiner = \"/\"\n\nlunr.FieldRef.fromString = function (s) {\n var n = s.indexOf(lunr.FieldRef.joiner)\n\n if (n === -1) {\n throw \"malformed field ref string\"\n }\n\n var fieldRef = s.slice(0, n),\n docRef = s.slice(n + 1)\n\n return new lunr.FieldRef (docRef, fieldRef, s)\n}\n\nlunr.FieldRef.prototype.toString = function () {\n if (this._stringValue == undefined) {\n this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef\n }\n\n return this._stringValue\n}\n/*!\n * lunr.Set\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A lunr set.\n *\n * @constructor\n */\nlunr.Set = function (elements) {\n this.elements = Object.create(null)\n\n if (elements) {\n this.length = elements.length\n\n for (var i = 0; i < this.length; i++) {\n this.elements[elements[i]] = true\n }\n } else {\n this.length = 0\n }\n}\n\n/**\n * A complete set that contains all elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.complete = {\n intersect: function (other) {\n return other\n },\n\n union: function () {\n return this\n },\n\n contains: function () {\n return true\n }\n}\n\n/**\n * An empty set that contains no elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.empty = {\n intersect: function () {\n return this\n },\n\n union: function (other) {\n return other\n },\n\n contains: function () {\n return false\n }\n}\n\n/**\n * Returns true if this set contains the specified object.\n *\n * @param {object} object - Object whose presence in this set is to be tested.\n * @returns {boolean} - True if this set contains the specified object.\n */\nlunr.Set.prototype.contains = function (object) {\n return !!this.elements[object]\n}\n\n/**\n * Returns a new set containing only the elements that are present in both\n * this set and the specified set.\n *\n * @param {lunr.Set} other - set to intersect with this set.\n * @returns {lunr.Set} a new set that is the intersection of this and the specified set.\n */\n\nlunr.Set.prototype.intersect = function (other) {\n var a, b, elements, intersection = []\n\n if (other === lunr.Set.complete) {\n return this\n }\n\n if (other === lunr.Set.empty) {\n return other\n }\n\n if (this.length < other.length) {\n a = this\n b = other\n } else {\n a = other\n b = this\n }\n\n elements = Object.keys(a.elements)\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i]\n if (element in b.elements) {\n intersection.push(element)\n }\n }\n\n return new lunr.Set (intersection)\n}\n\n/**\n * Returns a new set combining the elements of this and the specified set.\n *\n * @param {lunr.Set} other - set to union with this set.\n * @return {lunr.Set} a new set that is the union of this and the specified set.\n */\n\nlunr.Set.prototype.union = function (other) {\n if (other === lunr.Set.complete) {\n return lunr.Set.complete\n }\n\n if (other === lunr.Set.empty) {\n return this\n }\n\n return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements)))\n}\n/**\n * A function to calculate the inverse document frequency for\n * a posting. This is shared between the builder and the index\n *\n * @private\n * @param {object} posting - The posting for a given term\n * @param {number} documentCount - The total number of documents.\n */\nlunr.idf = function (posting, documentCount) {\n var documentsWithTerm = 0\n\n for (var fieldName in posting) {\n if (fieldName == '_index') continue // Ignore the term index, its not a field\n documentsWithTerm += Object.keys(posting[fieldName]).length\n }\n\n var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5)\n\n return Math.log(1 + Math.abs(x))\n}\n\n/**\n * A token wraps a string representation of a token\n * as it is passed through the text processing pipeline.\n *\n * @constructor\n * @param {string} [str=''] - The string token being wrapped.\n * @param {object} [metadata={}] - Metadata associated with this token.\n */\nlunr.Token = function (str, metadata) {\n this.str = str || \"\"\n this.metadata = metadata || {}\n}\n\n/**\n * Returns the token string that is being wrapped by this object.\n *\n * @returns {string}\n */\nlunr.Token.prototype.toString = function () {\n return this.str\n}\n\n/**\n * A token update function is used when updating or optionally\n * when cloning a token.\n *\n * @callback lunr.Token~updateFunction\n * @param {string} str - The string representation of the token.\n * @param {Object} metadata - All metadata associated with this token.\n */\n\n/**\n * Applies the given function to the wrapped string token.\n *\n * @example\n * token.update(function (str, metadata) {\n * return str.toUpperCase()\n * })\n *\n * @param {lunr.Token~updateFunction} fn - A function to apply to the token string.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.update = function (fn) {\n this.str = fn(this.str, this.metadata)\n return this\n}\n\n/**\n * Creates a clone of this token. Optionally a function can be\n * applied to the cloned token.\n *\n * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.clone = function (fn) {\n fn = fn || function (s) { return s }\n return new lunr.Token (fn(this.str, this.metadata), this.metadata)\n}\n/*!\n * lunr.tokenizer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * This tokenizer will convert its parameter to a string by calling `toString` and\n * then will split this string on the character in `lunr.tokenizer.separator`.\n * Arrays will have their elements converted to strings and wrapped in a lunr.Token.\n *\n * Optional metadata can be passed to the tokenizer, this metadata will be cloned and\n * added as metadata to every token that is created from the object to be tokenized.\n *\n * @static\n * @param {?(string|object|object[])} obj - The object to convert into tokens\n * @param {?object} metadata - Optional metadata to associate with every token\n * @returns {lunr.Token[]}\n * @see {@link lunr.Pipeline}\n */\nlunr.tokenizer = function (obj, metadata) {\n if (obj == null || obj == undefined) {\n return []\n }\n\n if (Array.isArray(obj)) {\n return obj.map(function (t) {\n return new lunr.Token(\n lunr.utils.asString(t).toLowerCase(),\n lunr.utils.clone(metadata)\n )\n })\n }\n\n var str = obj.toString().toLowerCase(),\n len = str.length,\n tokens = []\n\n for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {\n var char = str.charAt(sliceEnd),\n sliceLength = sliceEnd - sliceStart\n\n if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) {\n\n if (sliceLength > 0) {\n var tokenMetadata = lunr.utils.clone(metadata) || {}\n tokenMetadata[\"position\"] = [sliceStart, sliceLength]\n tokenMetadata[\"index\"] = tokens.length\n\n tokens.push(\n new lunr.Token (\n str.slice(sliceStart, sliceEnd),\n tokenMetadata\n )\n )\n }\n\n sliceStart = sliceEnd + 1\n }\n\n }\n\n return tokens\n}\n\n/**\n * The separator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n/*!\n * lunr.Pipeline\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = Object.create(null)\n\n/**\n * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token\n * string as well as all known metadata. A pipeline function can mutate the token string\n * or mutate (or add) metadata for a given token.\n *\n * A pipeline function can indicate that the passed token should be discarded by returning\n * null, undefined or an empty string. This token will not be passed to any downstream pipeline\n * functions and will not be added to the index.\n *\n * Multiple tokens can be returned by returning an array of tokens. Each token will be passed\n * to any downstream pipeline functions and all will returned tokens will be added to the index.\n *\n * Any number of pipeline functions may be chained together using a lunr.Pipeline.\n *\n * @interface lunr.PipelineFunction\n * @param {lunr.Token} token - A token from the document being processed.\n * @param {number} i - The index of this token in the complete list of tokens for this document/field.\n * @param {lunr.Token[]} tokens - All tokens for this document/field.\n * @returns {(?lunr.Token|lunr.Token[])}\n */\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @param {String} label - The label to register this function with\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @private\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised - The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n */\nlunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load unregistered function: ' + fnName)\n }\n })\n\n return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.\n */\nlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {lunr.PipelineFunction} fn The function to remove from the pipeline.\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n var stackLength = this._stack.length\n\n for (var i = 0; i < stackLength; i++) {\n var fn = this._stack[i]\n var memo = []\n\n for (var j = 0; j < tokens.length; j++) {\n var result = fn(tokens[j], j, tokens)\n\n if (result === null || result === void 0 || result === '') continue\n\n if (Array.isArray(result)) {\n for (var k = 0; k < result.length; k++) {\n memo.push(result[k])\n }\n } else {\n memo.push(result)\n }\n }\n\n tokens = memo\n }\n\n return tokens\n}\n\n/**\n * Convenience method for passing a string through a pipeline and getting\n * strings out. This method takes care of wrapping the passed string in a\n * token and mapping the resulting tokens back to strings.\n *\n * @param {string} str - The string to pass through the pipeline.\n * @param {?object} metadata - Optional metadata to associate with the token\n * passed to the pipeline.\n * @returns {string[]}\n */\nlunr.Pipeline.prototype.runString = function (str, metadata) {\n var token = new lunr.Token (str, metadata)\n\n return this.run([token]).map(function (t) {\n return t.toString()\n })\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n */\nlunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n */\nlunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A vector is used to construct the vector space of documents and queries. These\n * vectors support operations to determine the similarity between two documents or\n * a document and a query.\n *\n * Normally no parameters are required for initializing a vector, but in the case of\n * loading a previously dumped vector the raw elements can be provided to the constructor.\n *\n * For performance reasons vectors are implemented with a flat array, where an elements\n * index is immediately followed by its value. E.g. [index, value, index, value]. This\n * allows the underlying array to be as sparse as possible and still offer decent\n * performance when being used for vector calculations.\n *\n * @constructor\n * @param {Number[]} [elements] - The flat list of element index and element value pairs.\n */\nlunr.Vector = function (elements) {\n this._magnitude = 0\n this.elements = elements || []\n}\n\n\n/**\n * Calculates the position within the vector to insert a given index.\n *\n * This is used internally by insert and upsert. If there are duplicate indexes then\n * the position is returned as if the value for that index were to be updated, but it\n * is the callers responsibility to check whether there is a duplicate at that index\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @returns {Number}\n */\nlunr.Vector.prototype.positionForIndex = function (index) {\n // For an empty vector the tuple can be inserted at the beginning\n if (this.elements.length == 0) {\n return 0\n }\n\n var start = 0,\n end = this.elements.length / 2,\n sliceLength = end - start,\n pivotPoint = Math.floor(sliceLength / 2),\n pivotIndex = this.elements[pivotPoint * 2]\n\n while (sliceLength > 1) {\n if (pivotIndex < index) {\n start = pivotPoint\n }\n\n if (pivotIndex > index) {\n end = pivotPoint\n }\n\n if (pivotIndex == index) {\n break\n }\n\n sliceLength = end - start\n pivotPoint = start + Math.floor(sliceLength / 2)\n pivotIndex = this.elements[pivotPoint * 2]\n }\n\n if (pivotIndex == index) {\n return pivotPoint * 2\n }\n\n if (pivotIndex > index) {\n return pivotPoint * 2\n }\n\n if (pivotIndex < index) {\n return (pivotPoint + 1) * 2\n }\n}\n\n/**\n * Inserts an element at an index within the vector.\n *\n * Does not allow duplicates, will throw an error if there is already an entry\n * for this index.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n */\nlunr.Vector.prototype.insert = function (insertIdx, val) {\n this.upsert(insertIdx, val, function () {\n throw \"duplicate index\"\n })\n}\n\n/**\n * Inserts or updates an existing index within the vector.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n * @param {function} fn - A function that is called for updates, the existing value and the\n * requested value are passed as arguments\n */\nlunr.Vector.prototype.upsert = function (insertIdx, val, fn) {\n this._magnitude = 0\n var position = this.positionForIndex(insertIdx)\n\n if (this.elements[position] == insertIdx) {\n this.elements[position + 1] = fn(this.elements[position + 1], val)\n } else {\n this.elements.splice(position, 0, insertIdx, val)\n }\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n */\nlunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n\n var sumOfSquares = 0,\n elementsLength = this.elements.length\n\n for (var i = 1; i < elementsLength; i += 2) {\n var val = this.elements[i]\n sumOfSquares += val * val\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The vector to compute the dot product with.\n * @returns {Number}\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n var dotProduct = 0,\n a = this.elements, b = otherVector.elements,\n aLen = a.length, bLen = b.length,\n aVal = 0, bVal = 0,\n i = 0, j = 0\n\n while (i < aLen && j < bLen) {\n aVal = a[i], bVal = b[j]\n if (aVal < bVal) {\n i += 2\n } else if (aVal > bVal) {\n j += 2\n } else if (aVal == bVal) {\n dotProduct += a[i + 1] * b[j + 1]\n i += 2\n j += 2\n }\n }\n\n return dotProduct\n}\n\n/**\n * Calculates the similarity between this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The other vector to calculate the\n * similarity with.\n * @returns {Number}\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / this.magnitude() || 0\n}\n\n/**\n * Converts the vector to an array of the elements within the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toArray = function () {\n var output = new Array (this.elements.length / 2)\n\n for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {\n output[j] = this.elements[i]\n }\n\n return output\n}\n\n/**\n * A JSON serializable representation of the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toJSON = function () {\n return this.elements\n}\n/* eslint-disable */\n/*!\n * lunr.stemmer\n * Copyright (C) 2020 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token - The string to stem\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n * @function\n */\nlunr.stemmer = (function(){\n var step2list = {\n \"ational\" : \"ate\",\n \"tional\" : \"tion\",\n \"enci\" : \"ence\",\n \"anci\" : \"ance\",\n \"izer\" : \"ize\",\n \"bli\" : \"ble\",\n \"alli\" : \"al\",\n \"entli\" : \"ent\",\n \"eli\" : \"e\",\n \"ousli\" : \"ous\",\n \"ization\" : \"ize\",\n \"ation\" : \"ate\",\n \"ator\" : \"ate\",\n \"alism\" : \"al\",\n \"iveness\" : \"ive\",\n \"fulness\" : \"ful\",\n \"ousness\" : \"ous\",\n \"aliti\" : \"al\",\n \"iviti\" : \"ive\",\n \"biliti\" : \"ble\",\n \"logi\" : \"log\"\n },\n\n step3list = {\n \"icate\" : \"ic\",\n \"ative\" : \"\",\n \"alize\" : \"al\",\n \"iciti\" : \"ic\",\n \"ical\" : \"ic\",\n \"ful\" : \"\",\n \"ness\" : \"\"\n },\n\n c = \"[^aeiou]\", // consonant\n v = \"[aeiouy]\", // vowel\n C = c + \"[^aeiouy]*\", // consonant sequence\n V = v + \"[aeiou]*\", // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C, // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\", // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C, // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var porterStemmer = function porterStemmer(w) {\n var stem,\n suffix,\n firstch,\n re,\n re2,\n re3,\n re4;\n\n if (w.length < 3) { return w; }\n\n firstch = w.substr(0,1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a\n re2 = re2_1a;\n\n if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) { w = w + \"e\"; }\n else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n else if (re4.test(w)) { w = w + \"e\"; }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n w = stem;\n }\n }\n\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return function (token) {\n return token.update(porterStemmer);\n }\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @function\n * @param {Array} token The token to pass through the filter\n * @returns {lunr.PipelineFunction}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord\n return memo\n }, {})\n\n return function (token) {\n if (token && words[token.toString()] !== token.toString()) return token\n }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @function\n * @implements {lunr.PipelineFunction}\n * @params {lunr.Token} token - A token to check for being a stop word.\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n 'a',\n 'able',\n 'about',\n 'across',\n 'after',\n 'all',\n 'almost',\n 'also',\n 'am',\n 'among',\n 'an',\n 'and',\n 'any',\n 'are',\n 'as',\n 'at',\n 'be',\n 'because',\n 'been',\n 'but',\n 'by',\n 'can',\n 'cannot',\n 'could',\n 'dear',\n 'did',\n 'do',\n 'does',\n 'either',\n 'else',\n 'ever',\n 'every',\n 'for',\n 'from',\n 'get',\n 'got',\n 'had',\n 'has',\n 'have',\n 'he',\n 'her',\n 'hers',\n 'him',\n 'his',\n 'how',\n 'however',\n 'i',\n 'if',\n 'in',\n 'into',\n 'is',\n 'it',\n 'its',\n 'just',\n 'least',\n 'let',\n 'like',\n 'likely',\n 'may',\n 'me',\n 'might',\n 'most',\n 'must',\n 'my',\n 'neither',\n 'no',\n 'nor',\n 'not',\n 'of',\n 'off',\n 'often',\n 'on',\n 'only',\n 'or',\n 'other',\n 'our',\n 'own',\n 'rather',\n 'said',\n 'say',\n 'says',\n 'she',\n 'should',\n 'since',\n 'so',\n 'some',\n 'than',\n 'that',\n 'the',\n 'their',\n 'them',\n 'then',\n 'there',\n 'these',\n 'they',\n 'this',\n 'tis',\n 'to',\n 'too',\n 'twas',\n 'us',\n 'wants',\n 'was',\n 'we',\n 'were',\n 'what',\n 'when',\n 'where',\n 'which',\n 'while',\n 'who',\n 'whom',\n 'why',\n 'will',\n 'with',\n 'would',\n 'yet',\n 'you',\n 'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the beginning and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token The token to pass through the filter\n * @returns {lunr.Token}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n return token.update(function (s) {\n return s.replace(/^\\W+/, '').replace(/\\W+$/, '')\n })\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.TokenSet\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * A token set is used to store the unique list of all tokens\n * within an index. Token sets are also used to represent an\n * incoming query to the index, this query token set and index\n * token set are then intersected to find which tokens to look\n * up in the inverted index.\n *\n * A token set can hold multiple tokens, as in the case of the\n * index token set, or it can hold a single token as in the\n * case of a simple query token set.\n *\n * Additionally token sets are used to perform wildcard matching.\n * Leading, contained and trailing wildcards are supported, and\n * from this edit distance matching can also be provided.\n *\n * Token sets are implemented as a minimal finite state automata,\n * where both common prefixes and suffixes are shared between tokens.\n * This helps to reduce the space used for storing the token set.\n *\n * @constructor\n */\nlunr.TokenSet = function () {\n this.final = false\n this.edges = {}\n this.id = lunr.TokenSet._nextId\n lunr.TokenSet._nextId += 1\n}\n\n/**\n * Keeps track of the next, auto increment, identifier to assign\n * to a new tokenSet.\n *\n * TokenSets require a unique identifier to be correctly minimised.\n *\n * @private\n */\nlunr.TokenSet._nextId = 1\n\n/**\n * Creates a TokenSet instance from the given sorted array of words.\n *\n * @param {String[]} arr - A sorted array of strings to create the set from.\n * @returns {lunr.TokenSet}\n * @throws Will throw an error if the input array is not sorted.\n */\nlunr.TokenSet.fromArray = function (arr) {\n var builder = new lunr.TokenSet.Builder\n\n for (var i = 0, len = arr.length; i < len; i++) {\n builder.insert(arr[i])\n }\n\n builder.finish()\n return builder.root\n}\n\n/**\n * Creates a token set from a query clause.\n *\n * @private\n * @param {Object} clause - A single clause from lunr.Query.\n * @param {string} clause.term - The query clause term.\n * @param {number} [clause.editDistance] - The optional edit distance for the term.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromClause = function (clause) {\n if ('editDistance' in clause) {\n return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance)\n } else {\n return lunr.TokenSet.fromString(clause.term)\n }\n}\n\n/**\n * Creates a token set representing a single string with a specified\n * edit distance.\n *\n * Insertions, deletions, substitutions and transpositions are each\n * treated as an edit distance of 1.\n *\n * Increasing the allowed edit distance will have a dramatic impact\n * on the performance of both creating and intersecting these TokenSets.\n * It is advised to keep the edit distance less than 3.\n *\n * @param {string} str - The string to create the token set from.\n * @param {number} editDistance - The allowed edit distance to match.\n * @returns {lunr.Vector}\n */\nlunr.TokenSet.fromFuzzyString = function (str, editDistance) {\n var root = new lunr.TokenSet\n\n var stack = [{\n node: root,\n editsRemaining: editDistance,\n str: str\n }]\n\n while (stack.length) {\n var frame = stack.pop()\n\n // no edit\n if (frame.str.length > 0) {\n var char = frame.str.charAt(0),\n noEditNode\n\n if (char in frame.node.edges) {\n noEditNode = frame.node.edges[char]\n } else {\n noEditNode = new lunr.TokenSet\n frame.node.edges[char] = noEditNode\n }\n\n if (frame.str.length == 1) {\n noEditNode.final = true\n }\n\n stack.push({\n node: noEditNode,\n editsRemaining: frame.editsRemaining,\n str: frame.str.slice(1)\n })\n }\n\n if (frame.editsRemaining == 0) {\n continue\n }\n\n // insertion\n if (\"*\" in frame.node.edges) {\n var insertionNode = frame.node.edges[\"*\"]\n } else {\n var insertionNode = new lunr.TokenSet\n frame.node.edges[\"*\"] = insertionNode\n }\n\n if (frame.str.length == 0) {\n insertionNode.final = true\n }\n\n stack.push({\n node: insertionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str\n })\n\n // deletion\n // can only do a deletion if we have enough edits remaining\n // and if there are characters left to delete in the string\n if (frame.str.length > 1) {\n stack.push({\n node: frame.node,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n })\n }\n\n // deletion\n // just removing the last character from the str\n if (frame.str.length == 1) {\n frame.node.final = true\n }\n\n // substitution\n // can only do a substitution if we have enough edits remaining\n // and if there are characters left to substitute\n if (frame.str.length >= 1) {\n if (\"*\" in frame.node.edges) {\n var substitutionNode = frame.node.edges[\"*\"]\n } else {\n var substitutionNode = new lunr.TokenSet\n frame.node.edges[\"*\"] = substitutionNode\n }\n\n if (frame.str.length == 1) {\n substitutionNode.final = true\n }\n\n stack.push({\n node: substitutionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n })\n }\n\n // transposition\n // can only do a transposition if there are edits remaining\n // and there are enough characters to transpose\n if (frame.str.length > 1) {\n var charA = frame.str.charAt(0),\n charB = frame.str.charAt(1),\n transposeNode\n\n if (charB in frame.node.edges) {\n transposeNode = frame.node.edges[charB]\n } else {\n transposeNode = new lunr.TokenSet\n frame.node.edges[charB] = transposeNode\n }\n\n if (frame.str.length == 1) {\n transposeNode.final = true\n }\n\n stack.push({\n node: transposeNode,\n editsRemaining: frame.editsRemaining - 1,\n str: charA + frame.str.slice(2)\n })\n }\n }\n\n return root\n}\n\n/**\n * Creates a TokenSet from a string.\n *\n * The string may contain one or more wildcard characters (*)\n * that will allow wildcard matching when intersecting with\n * another TokenSet.\n *\n * @param {string} str - The string to create a TokenSet from.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromString = function (str) {\n var node = new lunr.TokenSet,\n root = node\n\n /*\n * Iterates through all characters within the passed string\n * appending a node for each character.\n *\n * When a wildcard character is found then a self\n * referencing edge is introduced to continually match\n * any number of any characters.\n */\n for (var i = 0, len = str.length; i < len; i++) {\n var char = str[i],\n final = (i == len - 1)\n\n if (char == \"*\") {\n node.edges[char] = node\n node.final = final\n\n } else {\n var next = new lunr.TokenSet\n next.final = final\n\n node.edges[char] = next\n node = next\n }\n }\n\n return root\n}\n\n/**\n * Converts this TokenSet into an array of strings\n * contained within the TokenSet.\n *\n * This is not intended to be used on a TokenSet that\n * contains wildcards, in these cases the results are\n * undefined and are likely to cause an infinite loop.\n *\n * @returns {string[]}\n */\nlunr.TokenSet.prototype.toArray = function () {\n var words = []\n\n var stack = [{\n prefix: \"\",\n node: this\n }]\n\n while (stack.length) {\n var frame = stack.pop(),\n edges = Object.keys(frame.node.edges),\n len = edges.length\n\n if (frame.node.final) {\n /* In Safari, at this point the prefix is sometimes corrupted, see:\n * https://github.com/olivernn/lunr.js/issues/279 Calling any\n * String.prototype method forces Safari to \"cast\" this string to what\n * it's supposed to be, fixing the bug. */\n frame.prefix.charAt(0)\n words.push(frame.prefix)\n }\n\n for (var i = 0; i < len; i++) {\n var edge = edges[i]\n\n stack.push({\n prefix: frame.prefix.concat(edge),\n node: frame.node.edges[edge]\n })\n }\n }\n\n return words\n}\n\n/**\n * Generates a string representation of a TokenSet.\n *\n * This is intended to allow TokenSets to be used as keys\n * in objects, largely to aid the construction and minimisation\n * of a TokenSet. As such it is not designed to be a human\n * friendly representation of the TokenSet.\n *\n * @returns {string}\n */\nlunr.TokenSet.prototype.toString = function () {\n // NOTE: Using Object.keys here as this.edges is very likely\n // to enter 'hash-mode' with many keys being added\n //\n // avoiding a for-in loop here as it leads to the function\n // being de-optimised (at least in V8). From some simple\n // benchmarks the performance is comparable, but allowing\n // V8 to optimize may mean easy performance wins in the future.\n\n if (this._str) {\n return this._str\n }\n\n var str = this.final ? '1' : '0',\n labels = Object.keys(this.edges).sort(),\n len = labels.length\n\n for (var i = 0; i < len; i++) {\n var label = labels[i],\n node = this.edges[label]\n\n str = str + label + node.id\n }\n\n return str\n}\n\n/**\n * Returns a new TokenSet that is the intersection of\n * this TokenSet and the passed TokenSet.\n *\n * This intersection will take into account any wildcards\n * contained within the TokenSet.\n *\n * @param {lunr.TokenSet} b - An other TokenSet to intersect with.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.prototype.intersect = function (b) {\n var output = new lunr.TokenSet,\n frame = undefined\n\n var stack = [{\n qNode: b,\n output: output,\n node: this\n }]\n\n while (stack.length) {\n frame = stack.pop()\n\n // NOTE: As with the #toString method, we are using\n // Object.keys and a for loop instead of a for-in loop\n // as both of these objects enter 'hash' mode, causing\n // the function to be de-optimised in V8\n var qEdges = Object.keys(frame.qNode.edges),\n qLen = qEdges.length,\n nEdges = Object.keys(frame.node.edges),\n nLen = nEdges.length\n\n for (var q = 0; q < qLen; q++) {\n var qEdge = qEdges[q]\n\n for (var n = 0; n < nLen; n++) {\n var nEdge = nEdges[n]\n\n if (nEdge == qEdge || qEdge == '*') {\n var node = frame.node.edges[nEdge],\n qNode = frame.qNode.edges[qEdge],\n final = node.final && qNode.final,\n next = undefined\n\n if (nEdge in frame.output.edges) {\n // an edge already exists for this character\n // no need to create a new node, just set the finality\n // bit unless this node is already final\n next = frame.output.edges[nEdge]\n next.final = next.final || final\n\n } else {\n // no edge exists yet, must create one\n // set the finality bit and insert it\n // into the output\n next = new lunr.TokenSet\n next.final = final\n frame.output.edges[nEdge] = next\n }\n\n stack.push({\n qNode: qNode,\n output: next,\n node: node\n })\n }\n }\n }\n }\n\n return output\n}\nlunr.TokenSet.Builder = function () {\n this.previousWord = \"\"\n this.root = new lunr.TokenSet\n this.uncheckedNodes = []\n this.minimizedNodes = {}\n}\n\nlunr.TokenSet.Builder.prototype.insert = function (word) {\n var node,\n commonPrefix = 0\n\n if (word < this.previousWord) {\n throw new Error (\"Out of order word insertion\")\n }\n\n for (var i = 0; i < word.length && i < this.previousWord.length; i++) {\n if (word[i] != this.previousWord[i]) break\n commonPrefix++\n }\n\n this.minimize(commonPrefix)\n\n if (this.uncheckedNodes.length == 0) {\n node = this.root\n } else {\n node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child\n }\n\n for (var i = commonPrefix; i < word.length; i++) {\n var nextNode = new lunr.TokenSet,\n char = word[i]\n\n node.edges[char] = nextNode\n\n this.uncheckedNodes.push({\n parent: node,\n char: char,\n child: nextNode\n })\n\n node = nextNode\n }\n\n node.final = true\n this.previousWord = word\n}\n\nlunr.TokenSet.Builder.prototype.finish = function () {\n this.minimize(0)\n}\n\nlunr.TokenSet.Builder.prototype.minimize = function (downTo) {\n for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) {\n var node = this.uncheckedNodes[i],\n childKey = node.child.toString()\n\n if (childKey in this.minimizedNodes) {\n node.parent.edges[node.char] = this.minimizedNodes[childKey]\n } else {\n // Cache the key for this node since\n // we know it can't change anymore\n node.child._str = childKey\n\n this.minimizedNodes[childKey] = node.child\n }\n\n this.uncheckedNodes.pop()\n }\n}\n/*!\n * lunr.Index\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * An index contains the built index of all documents and provides a query interface\n * to the index.\n *\n * Usually instances of lunr.Index will not be created using this constructor, instead\n * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be\n * used to load previously built and serialized indexes.\n *\n * @constructor\n * @param {Object} attrs - The attributes of the built search index.\n * @param {Object} attrs.invertedIndex - An index of term/field to document reference.\n * @param {Object<string, lunr.Vector>} attrs.fieldVectors - Field vectors\n * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens.\n * @param {string[]} attrs.fields - The names of indexed document fields.\n * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms.\n */\nlunr.Index = function (attrs) {\n this.invertedIndex = attrs.invertedIndex\n this.fieldVectors = attrs.fieldVectors\n this.tokenSet = attrs.tokenSet\n this.fields = attrs.fields\n this.pipeline = attrs.pipeline\n}\n\n/**\n * A result contains details of a document matching a search query.\n * @typedef {Object} lunr.Index~Result\n * @property {string} ref - The reference of the document this result represents.\n * @property {number} score - A number between 0 and 1 representing how similar this document is to the query.\n * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match.\n */\n\n/**\n * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple\n * query language which itself is parsed into an instance of lunr.Query.\n *\n * For programmatically building queries it is advised to directly use lunr.Query, the query language\n * is best used for human entered text rather than program generated text.\n *\n * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported\n * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello'\n * or 'world', though those that contain both will rank higher in the results.\n *\n * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can\n * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding\n * wildcards will increase the number of documents that will be found but can also have a negative\n * impact on query performance, especially with wildcards at the beginning of a term.\n *\n * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term\n * hello in the title field will match this query. Using a field not present in the index will lead\n * to an error being thrown.\n *\n * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term\n * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported\n * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2.\n * Avoid large values for edit distance to improve query performance.\n *\n * Each term also supports a presence modifier. By default a term's presence in document is optional, however\n * this can be changed to either required or prohibited. For a term's presence to be required in a document the\n * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and\n * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not\n * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'.\n *\n * To escape special characters the backslash character '\\' can be used, this allows searches to include\n * characters that would normally be considered modifiers, e.g. `foo\\~2` will search for a term \"foo~2\" instead\n * of attempting to apply a boost of 2 to the search term \"foo\".\n *\n * @typedef {string} lunr.Index~QueryString\n * @example <caption>Simple single term query</caption>\n * hello\n * @example <caption>Multiple term query</caption>\n * hello world\n * @example <caption>term scoped to a field</caption>\n * title:hello\n * @example <caption>term with a boost of 10</caption>\n * hello^10\n * @example <caption>term with an edit distance of 2</caption>\n * hello~2\n * @example <caption>terms with presence modifiers</caption>\n * -foo +bar baz\n */\n\n/**\n * Performs a search against the index using lunr query syntax.\n *\n * Results will be returned sorted by their score, the most relevant results\n * will be returned first. For details on how the score is calculated, please see\n * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}.\n *\n * For more programmatic querying use lunr.Index#query.\n *\n * @param {lunr.Index~QueryString} queryString - A string containing a lunr query.\n * @throws {lunr.QueryParseError} If the passed query string cannot be parsed.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.search = function (queryString) {\n return this.query(function (query) {\n var parser = new lunr.QueryParser(queryString, query)\n parser.parse()\n })\n}\n\n/**\n * A query builder callback provides a query object to be used to express\n * the query to perform on the index.\n *\n * @callback lunr.Index~queryBuilder\n * @param {lunr.Query} query - The query object to build up.\n * @this lunr.Query\n */\n\n/**\n * Performs a query against the index using the yielded lunr.Query object.\n *\n * If performing programmatic queries against the index, this method is preferred\n * over lunr.Index#search so as to avoid the additional query parsing overhead.\n *\n * A query object is yielded to the supplied function which should be used to\n * express the query to be run against the index.\n *\n * Note that although this function takes a callback parameter it is _not_ an\n * asynchronous operation, the callback is just yielded a query object to be\n * customized.\n *\n * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.query = function (fn) {\n // for each query clause\n // * process terms\n // * expand terms from token set\n // * find matching documents and metadata\n // * get document vectors\n // * score documents\n\n var query = new lunr.Query(this.fields),\n matchingFields = Object.create(null),\n queryVectors = Object.create(null),\n termFieldCache = Object.create(null),\n requiredMatches = Object.create(null),\n prohibitedMatches = Object.create(null)\n\n /*\n * To support field level boosts a query vector is created per\n * field. An empty vector is eagerly created to support negated\n * queries.\n */\n for (var i = 0; i < this.fields.length; i++) {\n queryVectors[this.fields[i]] = new lunr.Vector\n }\n\n fn.call(query, query)\n\n for (var i = 0; i < query.clauses.length; i++) {\n /*\n * Unless the pipeline has been disabled for this term, which is\n * the case for terms with wildcards, we need to pass the clause\n * term through the search pipeline. A pipeline returns an array\n * of processed terms. Pipeline functions may expand the passed\n * term, which means we may end up performing multiple index lookups\n * for a single query term.\n */\n var clause = query.clauses[i],\n terms = null,\n clauseMatches = lunr.Set.empty\n\n if (clause.usePipeline) {\n terms = this.pipeline.runString(clause.term, {\n fields: clause.fields\n })\n } else {\n terms = [clause.term]\n }\n\n for (var m = 0; m < terms.length; m++) {\n var term = terms[m]\n\n /*\n * Each term returned from the pipeline needs to use the same query\n * clause object, e.g. the same boost and or edit distance. The\n * simplest way to do this is to re-use the clause object but mutate\n * its term property.\n */\n clause.term = term\n\n /*\n * From the term in the clause we create a token set which will then\n * be used to intersect the indexes token set to get a list of terms\n * to lookup in the inverted index\n */\n var termTokenSet = lunr.TokenSet.fromClause(clause),\n expandedTerms = this.tokenSet.intersect(termTokenSet).toArray()\n\n /*\n * If a term marked as required does not exist in the tokenSet it is\n * impossible for the search to return any matches. We set all the field\n * scoped required matches set to empty and stop examining any further\n * clauses.\n */\n if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k]\n requiredMatches[field] = lunr.Set.empty\n }\n\n break\n }\n\n for (var j = 0; j < expandedTerms.length; j++) {\n /*\n * For each term get the posting and termIndex, this is required for\n * building the query vector.\n */\n var expandedTerm = expandedTerms[j],\n posting = this.invertedIndex[expandedTerm],\n termIndex = posting._index\n\n for (var k = 0; k < clause.fields.length; k++) {\n /*\n * For each field that this query term is scoped by (by default\n * all fields are in scope) we need to get all the document refs\n * that have this term in that field.\n *\n * The posting is the entry in the invertedIndex for the matching\n * term from above.\n */\n var field = clause.fields[k],\n fieldPosting = posting[field],\n matchingDocumentRefs = Object.keys(fieldPosting),\n termField = expandedTerm + \"/\" + field,\n matchingDocumentsSet = new lunr.Set(matchingDocumentRefs)\n\n /*\n * if the presence of this term is required ensure that the matching\n * documents are added to the set of required matches for this clause.\n *\n */\n if (clause.presence == lunr.Query.presence.REQUIRED) {\n clauseMatches = clauseMatches.union(matchingDocumentsSet)\n\n if (requiredMatches[field] === undefined) {\n requiredMatches[field] = lunr.Set.complete\n }\n }\n\n /*\n * if the presence of this term is prohibited ensure that the matching\n * documents are added to the set of prohibited matches for this field,\n * creating that set if it does not yet exist.\n */\n if (clause.presence == lunr.Query.presence.PROHIBITED) {\n if (prohibitedMatches[field] === undefined) {\n prohibitedMatches[field] = lunr.Set.empty\n }\n\n prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet)\n\n /*\n * Prohibited matches should not be part of the query vector used for\n * similarity scoring and no metadata should be extracted so we continue\n * to the next field\n */\n continue\n }\n\n /*\n * The query field vector is populated using the termIndex found for\n * the term and a unit value with the appropriate boost applied.\n * Using upsert because there could already be an entry in the vector\n * for the term we are working with. In that case we just add the scores\n * together.\n */\n queryVectors[field].upsert(termIndex, clause.boost, function (a, b) { return a + b })\n\n /**\n * If we've already seen this term, field combo then we've already collected\n * the matching documents and metadata, no need to go through all that again\n */\n if (termFieldCache[termField]) {\n continue\n }\n\n for (var l = 0; l < matchingDocumentRefs.length; l++) {\n /*\n * All metadata for this term/field/document triple\n * are then extracted and collected into an instance\n * of lunr.MatchData ready to be returned in the query\n * results\n */\n var matchingDocumentRef = matchingDocumentRefs[l],\n matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field),\n metadata = fieldPosting[matchingDocumentRef],\n fieldMatch\n\n if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) {\n matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata)\n } else {\n fieldMatch.add(expandedTerm, field, metadata)\n }\n\n }\n\n termFieldCache[termField] = true\n }\n }\n }\n\n /**\n * If the presence was required we need to update the requiredMatches field sets.\n * We do this after all fields for the term have collected their matches because\n * the clause terms presence is required in _any_ of the fields not _all_ of the\n * fields.\n */\n if (clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k]\n requiredMatches[field] = requiredMatches[field].intersect(clauseMatches)\n }\n }\n }\n\n /**\n * Need to combine the field scoped required and prohibited\n * matching documents into a global set of required and prohibited\n * matches\n */\n var allRequiredMatches = lunr.Set.complete,\n allProhibitedMatches = lunr.Set.empty\n\n for (var i = 0; i < this.fields.length; i++) {\n var field = this.fields[i]\n\n if (requiredMatches[field]) {\n allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field])\n }\n\n if (prohibitedMatches[field]) {\n allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field])\n }\n }\n\n var matchingFieldRefs = Object.keys(matchingFields),\n results = [],\n matches = Object.create(null)\n\n /*\n * If the query is negated (contains only prohibited terms)\n * we need to get _all_ fieldRefs currently existing in the\n * index. This is only done when we know that the query is\n * entirely prohibited terms to avoid any cost of getting all\n * fieldRefs unnecessarily.\n *\n * Additionally, blank MatchData must be created to correctly\n * populate the results.\n */\n if (query.isNegated()) {\n matchingFieldRefs = Object.keys(this.fieldVectors)\n\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n var matchingFieldRef = matchingFieldRefs[i]\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRef)\n matchingFields[matchingFieldRef] = new lunr.MatchData\n }\n }\n\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n /*\n * Currently we have document fields that match the query, but we\n * need to return documents. The matchData and scores are combined\n * from multiple fields belonging to the same document.\n *\n * Scores are calculated by field, using the query vectors created\n * above, and combined into a final document score using addition.\n */\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]),\n docRef = fieldRef.docRef\n\n if (!allRequiredMatches.contains(docRef)) {\n continue\n }\n\n if (allProhibitedMatches.contains(docRef)) {\n continue\n }\n\n var fieldVector = this.fieldVectors[fieldRef],\n score = queryVectors[fieldRef.fieldName].similarity(fieldVector),\n docMatch\n\n if ((docMatch = matches[docRef]) !== undefined) {\n docMatch.score += score\n docMatch.matchData.combine(matchingFields[fieldRef])\n } else {\n var match = {\n ref: docRef,\n score: score,\n matchData: matchingFields[fieldRef]\n }\n matches[docRef] = match\n results.push(match)\n }\n }\n\n /*\n * Sort the results objects by score, highest first.\n */\n return results.sort(function (a, b) {\n return b.score - a.score\n })\n}\n\n/**\n * Prepares the index for JSON serialization.\n *\n * The schema for this JSON blob will be described in a\n * separate JSON schema file.\n *\n * @returns {Object}\n */\nlunr.Index.prototype.toJSON = function () {\n var invertedIndex = Object.keys(this.invertedIndex)\n .sort()\n .map(function (term) {\n return [term, this.invertedIndex[term]]\n }, this)\n\n var fieldVectors = Object.keys(this.fieldVectors)\n .map(function (ref) {\n return [ref, this.fieldVectors[ref].toJSON()]\n }, this)\n\n return {\n version: lunr.version,\n fields: this.fields,\n fieldVectors: fieldVectors,\n invertedIndex: invertedIndex,\n pipeline: this.pipeline.toJSON()\n }\n}\n\n/**\n * Loads a previously serialized lunr.Index\n *\n * @param {Object} serializedIndex - A previously serialized lunr.Index\n * @returns {lunr.Index}\n */\nlunr.Index.load = function (serializedIndex) {\n var attrs = {},\n fieldVectors = {},\n serializedVectors = serializedIndex.fieldVectors,\n invertedIndex = Object.create(null),\n serializedInvertedIndex = serializedIndex.invertedIndex,\n tokenSetBuilder = new lunr.TokenSet.Builder,\n pipeline = lunr.Pipeline.load(serializedIndex.pipeline)\n\n if (serializedIndex.version != lunr.version) {\n lunr.utils.warn(\"Version mismatch when loading serialised index. Current version of lunr '\" + lunr.version + \"' does not match serialized index '\" + serializedIndex.version + \"'\")\n }\n\n for (var i = 0; i < serializedVectors.length; i++) {\n var tuple = serializedVectors[i],\n ref = tuple[0],\n elements = tuple[1]\n\n fieldVectors[ref] = new lunr.Vector(elements)\n }\n\n for (var i = 0; i < serializedInvertedIndex.length; i++) {\n var tuple = serializedInvertedIndex[i],\n term = tuple[0],\n posting = tuple[1]\n\n tokenSetBuilder.insert(term)\n invertedIndex[term] = posting\n }\n\n tokenSetBuilder.finish()\n\n attrs.fields = serializedIndex.fields\n\n attrs.fieldVectors = fieldVectors\n attrs.invertedIndex = invertedIndex\n attrs.tokenSet = tokenSetBuilder.root\n attrs.pipeline = pipeline\n\n return new lunr.Index(attrs)\n}\n/*!\n * lunr.Builder\n * Copyright (C) 2020 Oliver Nightingale\n */\n\n/**\n * lunr.Builder performs indexing on a set of documents and\n * returns instances of lunr.Index ready for querying.\n *\n * All configuration of the index is done via the builder, the\n * fields to index, the document reference, the text processing\n * pipeline and document scoring parameters are all set on the\n * builder before indexing.\n *\n * @constructor\n * @property {string} _ref - Internal reference to the document reference field.\n * @property {string[]} _fields - Internal reference to the document fields to index.\n * @property {object} invertedIndex - The inverted index maps terms to document fields.\n * @property {object} documentTermFrequencies - Keeps track of document term frequencies.\n * @property {object} documentLengths - Keeps track of the length of documents added to the index.\n * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing.\n * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing.\n * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index.\n * @property {number} documentCount - Keeps track of the total number of documents indexed.\n * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75.\n * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2.\n * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space.\n * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index.\n */\nlunr.Builder = function () {\n this._ref = \"id\"\n this._fields = Object.create(null)\n this._documents = Object.create(null)\n this.invertedIndex = Object.create(null)\n this.fieldTermFrequencies = {}\n this.fieldLengths = {}\n this.tokenizer = lunr.tokenizer\n this.pipeline = new lunr.Pipeline\n this.searchPipeline = new lunr.Pipeline\n this.documentCount = 0\n this._b = 0.75\n this._k1 = 1.2\n this.termIndex = 0\n this.metadataWhitelist = []\n}\n\n/**\n * Sets the document field used as the document reference. Every document must have this field.\n * The type of this field in the document should be a string, if it is not a string it will be\n * coerced into a string by calling toString.\n *\n * The default ref is 'id'.\n *\n * The ref should _not_ be changed during indexing, it should be set before any documents are\n * added to the index. Changing it during indexing can lead to inconsistent results.\n *\n * @param {string} ref - The name of the reference field in the document.\n */\nlunr.Builder.prototype.ref = function (ref) {\n this._ref = ref\n}\n\n/**\n * A function that is used to extract a field from a document.\n *\n * Lunr expects a field to be at the top level of a document, if however the field\n * is deeply nested within a document an extractor function can be used to extract\n * the right field for indexing.\n *\n * @callback fieldExtractor\n * @param {object} doc - The document being added to the index.\n * @returns {?(string|object|object[])} obj - The object that will be indexed for this field.\n * @example <caption>Extracting a nested field</caption>\n * function (doc) { return doc.nested.field }\n */\n\n/**\n * Adds a field to the list of document fields that will be indexed. Every document being\n * indexed should have this field. Null values for this field in indexed documents will\n * not cause errors but will limit the chance of that document being retrieved by searches.\n *\n * All fields should be added before adding documents to the index. Adding fields after\n * a document has been indexed will have no effect on already indexed documents.\n *\n * Fields can be boosted at build time. This allows terms within that field to have more\n * importance when ranking search results. Use a field boost to specify that matches within\n * one field are more important than other fields.\n *\n * @param {string} fieldName - The name of a field to index in all documents.\n * @param {object} attributes - Optional attributes associated with this field.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this field.\n * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document.\n * @throws {RangeError} fieldName cannot contain unsupported characters '/'\n */\nlunr.Builder.prototype.field = function (fieldName, attributes) {\n if (/\\//.test(fieldName)) {\n throw new RangeError (\"Field '\" + fieldName + \"' contains illegal character '/'\")\n }\n\n this._fields[fieldName] = attributes || {}\n}\n\n/**\n * A parameter to tune the amount of field length normalisation that is applied when\n * calculating relevance scores. A value of 0 will completely disable any normalisation\n * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b\n * will be clamped to the range 0 - 1.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.b = function (number) {\n if (number < 0) {\n this._b = 0\n } else if (number > 1) {\n this._b = 1\n } else {\n this._b = number\n }\n}\n\n/**\n * A parameter that controls the speed at which a rise in term frequency results in term\n * frequency saturation. The default value is 1.2. Setting this to a higher value will give\n * slower saturation levels, a lower value will result in quicker saturation.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.k1 = function (number) {\n this._k1 = number\n}\n\n/**\n * Adds a document to the index.\n *\n * Before adding fields to the index the index should have been fully setup, with the document\n * ref and all fields to index already having been specified.\n *\n * The document must have a field name as specified by the ref (by default this is 'id') and\n * it should have all fields defined for indexing, though null or undefined values will not\n * cause errors.\n *\n * Entire documents can be boosted at build time. Applying a boost to a document indicates that\n * this document should rank higher in search results than other documents.\n *\n * @param {object} doc - The document to add to the index.\n * @param {object} attributes - Optional attributes associated with this document.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this document.\n */\nlunr.Builder.prototype.add = function (doc, attributes) {\n var docRef = doc[this._ref],\n fields = Object.keys(this._fields)\n\n this._documents[docRef] = attributes || {}\n this.documentCount += 1\n\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i],\n extractor = this._fields[fieldName].extractor,\n field = extractor ? extractor(doc) : doc[fieldName],\n tokens = this.tokenizer(field, {\n fields: [fieldName]\n }),\n terms = this.pipeline.run(tokens),\n fieldRef = new lunr.FieldRef (docRef, fieldName),\n fieldTerms = Object.create(null)\n\n this.fieldTermFrequencies[fieldRef] = fieldTerms\n this.fieldLengths[fieldRef] = 0\n\n // store the length of this field for this document\n this.fieldLengths[fieldRef] += terms.length\n\n // calculate term frequencies for this field\n for (var j = 0; j < terms.length; j++) {\n var term = terms[j]\n\n if (fieldTerms[term] == undefined) {\n fieldTerms[term] = 0\n }\n\n fieldTerms[term] += 1\n\n // add to inverted index\n // create an initial posting if one doesn't exist\n if (this.invertedIndex[term] == undefined) {\n var posting = Object.create(null)\n posting[\"_index\"] = this.termIndex\n this.termIndex += 1\n\n for (var k = 0; k < fields.length; k++) {\n posting[fields[k]] = Object.create(null)\n }\n\n this.invertedIndex[term] = posting\n }\n\n // add an entry for this term/fieldName/docRef to the invertedIndex\n if (this.invertedIndex[term][fieldName][docRef] == undefined) {\n this.invertedIndex[term][fieldName][docRef] = Object.create(null)\n }\n\n // store all whitelisted metadata about this token in the\n // inverted index\n for (var l = 0; l < this.metadataWhitelist.length; l++) {\n var metadataKey = this.metadataWhitelist[l],\n metadata = term.metadata[metadataKey]\n\n if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) {\n this.invertedIndex[term][fieldName][docRef][metadataKey] = []\n }\n\n this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata)\n }\n }\n\n }\n}\n\n/**\n * Calculates the average document length for this index\n *\n * @private\n */\nlunr.Builder.prototype.calculateAverageFieldLengths = function () {\n\n var fieldRefs = Object.keys(this.fieldLengths),\n numberOfFields = fieldRefs.length,\n accumulator = {},\n documentsWithField = {}\n\n for (var i = 0; i < numberOfFields; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n field = fieldRef.fieldName\n\n documentsWithField[field] || (documentsWithField[field] = 0)\n documentsWithField[field] += 1\n\n accumulator[field] || (accumulator[field] = 0)\n accumulator[field] += this.fieldLengths[fieldRef]\n }\n\n var fields = Object.keys(this._fields)\n\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i]\n accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName]\n }\n\n this.averageFieldLength = accumulator\n}\n\n/**\n * Builds a vector space model of every document using lunr.Vector\n *\n * @private\n */\nlunr.Builder.prototype.createFieldVectors = function () {\n var fieldVectors = {},\n fieldRefs = Object.keys(this.fieldTermFrequencies),\n fieldRefsLength = fieldRefs.length,\n termIdfCache = Object.create(null)\n\n for (var i = 0; i < fieldRefsLength; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n fieldName = fieldRef.fieldName,\n fieldLength = this.fieldLengths[fieldRef],\n fieldVector = new lunr.Vector,\n termFrequencies = this.fieldTermFrequencies[fieldRef],\n terms = Object.keys(termFrequencies),\n termsLength = terms.length\n\n\n var fieldBoost = this._fields[fieldName].boost || 1,\n docBoost = this._documents[fieldRef.docRef].boost || 1\n\n for (var j = 0; j < termsLength; j++) {\n var term = terms[j],\n tf = termFrequencies[term],\n termIndex = this.invertedIndex[term]._index,\n idf, score, scoreWithPrecision\n\n if (termIdfCache[term] === undefined) {\n idf = lunr.idf(this.invertedIndex[term], this.documentCount)\n termIdfCache[term] = idf\n } else {\n idf = termIdfCache[term]\n }\n\n score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf)\n score *= fieldBoost\n score *= docBoost\n scoreWithPrecision = Math.round(score * 1000) / 1000\n // Converts 1.23456789 to 1.234.\n // Reducing the precision so that the vectors take up less\n // space when serialised. Doing it now so that they behave\n // the same before and after serialisation. Also, this is\n // the fastest approach to reducing a number's precision in\n // JavaScript.\n\n fieldVector.insert(termIndex, scoreWithPrecision)\n }\n\n fieldVectors[fieldRef] = fieldVector\n }\n\n this.fieldVectors = fieldVectors\n}\n\n/**\n * Creates a token set of all tokens in the index using lunr.TokenSet\n *\n * @private\n */\nlunr.Builder.prototype.createTokenSet = function () {\n this.tokenSet = lunr.TokenSet.fromArray(\n Object.keys(this.invertedIndex).sort()\n )\n}\n\n/**\n * Builds the index, creating an instance of lunr.Index.\n *\n * This completes the indexing process and should only be called\n * once all documents have been added to the index.\n *\n * @returns {lunr.Index}\n */\nlunr.Builder.prototype.build = function () {\n this.calculateAverageFieldLengths()\n this.createFieldVectors()\n this.createTokenSet()\n\n return new lunr.Index({\n invertedIndex: this.invertedIndex,\n fieldVectors: this.fieldVectors,\n tokenSet: this.tokenSet,\n fields: Object.keys(this._fields),\n pipeline: this.searchPipeline\n })\n}\n\n/**\n * Applies a plugin to the index builder.\n *\n * A plugin is a function that is called with the index builder as its context.\n * Plugins can be used to customise or extend the behaviour of the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied when building the index.\n *\n * The plugin function will be called with the index builder as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index builder as its context.\n *\n * @param {Function} plugin The plugin to apply.\n */\nlunr.Builder.prototype.use = function (fn) {\n var args = Array.prototype.slice.call(arguments, 1)\n args.unshift(this)\n fn.apply(this, args)\n}\n/**\n * Contains and collects metadata about a matching document.\n * A single instance of lunr.MatchData is returned as part of every\n * lunr.Index~Result.\n *\n * @constructor\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n * @property {object} metadata - A cloned collection of metadata associated with this document.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData = function (term, field, metadata) {\n var clonedMetadata = Object.create(null),\n metadataKeys = Object.keys(metadata || {})\n\n // Cloning the metadata to prevent the original\n // being mutated during match data combination.\n // Metadata is kept in an array within the inverted\n // index so cloning the data can be done with\n // Array#slice\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i]\n clonedMetadata[key] = metadata[key].slice()\n }\n\n this.metadata = Object.create(null)\n\n if (term !== undefined) {\n this.metadata[term] = Object.create(null)\n this.metadata[term][field] = clonedMetadata\n }\n}\n\n/**\n * An instance of lunr.MatchData will be created for every term that matches a\n * document. However only one instance is required in a lunr.Index~Result. This\n * method combines metadata from another instance of lunr.MatchData with this\n * objects metadata.\n *\n * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData.prototype.combine = function (otherMatchData) {\n var terms = Object.keys(otherMatchData.metadata)\n\n for (var i = 0; i < terms.length; i++) {\n var term = terms[i],\n fields = Object.keys(otherMatchData.metadata[term])\n\n if (this.metadata[term] == undefined) {\n this.metadata[term] = Object.create(null)\n }\n\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j],\n keys = Object.keys(otherMatchData.metadata[term][field])\n\n if (this.metadata[term][field] == undefined) {\n this.metadata[term][field] = Object.create(null)\n }\n\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k]\n\n if (this.metadata[term][field][key] == undefined) {\n this.metadata[term][field][key] = otherMatchData.metadata[term][field][key]\n } else {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key])\n }\n\n }\n }\n }\n}\n\n/**\n * Add metadata for a term/field pair to this instance of match data.\n *\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n */\nlunr.MatchData.prototype.add = function (term, field, metadata) {\n if (!(term in this.metadata)) {\n this.metadata[term] = Object.create(null)\n this.metadata[term][field] = metadata\n return\n }\n\n if (!(field in this.metadata[term])) {\n this.metadata[term][field] = metadata\n return\n }\n\n var metadataKeys = Object.keys(metadata)\n\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i]\n\n if (key in this.metadata[term][field]) {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key])\n } else {\n this.metadata[term][field][key] = metadata[key]\n }\n }\n}\n/**\n * A lunr.Query provides a programmatic way of defining queries to be performed\n * against a {@link lunr.Index}.\n *\n * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method\n * so the query object is pre-initialized with the right index fields.\n *\n * @constructor\n * @property {lunr.Query~Clause[]} clauses - An array of query clauses.\n * @property {string[]} allFields - An array of all available fields in a lunr.Index.\n */\nlunr.Query = function (allFields) {\n this.clauses = []\n this.allFields = allFields\n}\n\n/**\n * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause.\n *\n * This allows wildcards to be added to the beginning and end of a term without having to manually do any string\n * concatenation.\n *\n * The wildcard constants can be bitwise combined to select both leading and trailing wildcards.\n *\n * @constant\n * @default\n * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour\n * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists\n * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with trailing wildcard</caption>\n * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING })\n * @example <caption>query term with leading and trailing wildcard</caption>\n * query.term('foo', {\n * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING\n * })\n */\n\nlunr.Query.wildcard = new String (\"*\")\nlunr.Query.wildcard.NONE = 0\nlunr.Query.wildcard.LEADING = 1\nlunr.Query.wildcard.TRAILING = 2\n\n/**\n * Constants for indicating what kind of presence a term must have in matching documents.\n *\n * @constant\n * @enum {number}\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example <caption>query term with required presence</caption>\n * query.term('foo', { presence: lunr.Query.presence.REQUIRED })\n */\nlunr.Query.presence = {\n /**\n * Term's presence in a document is optional, this is the default value.\n */\n OPTIONAL: 1,\n\n /**\n * Term's presence in a document is required, documents that do not contain\n * this term will not be returned.\n */\n REQUIRED: 2,\n\n /**\n * Term's presence in a document is prohibited, documents that do contain\n * this term will not be returned.\n */\n PROHIBITED: 3\n}\n\n/**\n * A single clause in a {@link lunr.Query} contains a term and details on how to\n * match that term against a {@link lunr.Index}.\n *\n * @typedef {Object} lunr.Query~Clause\n * @property {string[]} fields - The fields in an index this clause should be matched against.\n * @property {number} [boost=1] - Any boost that should be applied when matching this clause.\n * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be.\n * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline.\n * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended.\n * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents.\n */\n\n/**\n * Adds a {@link lunr.Query~Clause} to this query.\n *\n * Unless the clause contains the fields to be matched all fields will be matched. In addition\n * a default boost of 1 is applied to the clause.\n *\n * @param {lunr.Query~Clause} clause - The clause to add to this query.\n * @see lunr.Query~Clause\n * @returns {lunr.Query}\n */\nlunr.Query.prototype.clause = function (clause) {\n if (!('fields' in clause)) {\n clause.fields = this.allFields\n }\n\n if (!('boost' in clause)) {\n clause.boost = 1\n }\n\n if (!('usePipeline' in clause)) {\n clause.usePipeline = true\n }\n\n if (!('wildcard' in clause)) {\n clause.wildcard = lunr.Query.wildcard.NONE\n }\n\n if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) {\n clause.term = \"*\" + clause.term\n }\n\n if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) {\n clause.term = \"\" + clause.term + \"*\"\n }\n\n if (!('presence' in clause)) {\n clause.presence = lunr.Query.presence.OPTIONAL\n }\n\n this.clauses.push(clause)\n\n return this\n}\n\n/**\n * A negated query is one in which every clause has a presence of\n * prohibited. These queries require some special processing to return\n * the expected results.\n *\n * @returns boolean\n */\nlunr.Query.prototype.isNegated = function () {\n for (var i = 0; i < this.clauses.length; i++) {\n if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause}\n * to the list of clauses that make up this query.\n *\n * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion\n * to a token or token-like string should be done before calling this method.\n *\n * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an\n * array, each term in the array will share the same options.\n *\n * @param {object|object[]} term - The term(s) to add to the query.\n * @param {object} [options] - Any additional properties to add to the query clause.\n * @returns {lunr.Query}\n * @see lunr.Query#clause\n * @see lunr.Query~Clause\n * @example <caption>adding a single term to a query</caption>\n * query.term(\"foo\")\n * @example <caption>adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard</caption>\n * query.term(\"foo\", {\n * fields: [\"title\"],\n * boost: 10,\n * wildcard: lunr.Query.wildcard.TRAILING\n * })\n * @example <caption>using lunr.tokenizer to convert a string to tokens before using them as terms</caption>\n * query.term(lunr.tokenizer(\"foo bar\"))\n */\nlunr.Query.prototype.term = function (term, options) {\n if (Array.isArray(term)) {\n term.forEach(function (t) { this.term(t, lunr.utils.clone(options)) }, this)\n return this\n }\n\n var clause = options || {}\n clause.term = term.toString()\n\n this.clause(clause)\n\n return this\n}\nlunr.QueryParseError = function (message, start, end) {\n this.name = \"QueryParseError\"\n this.message = message\n this.start = start\n this.end = end\n}\n\nlunr.QueryParseError.prototype = new Error\nlunr.QueryLexer = function (str) {\n this.lexemes = []\n this.str = str\n this.length = str.length\n this.pos = 0\n this.start = 0\n this.escapeCharPositions = []\n}\n\nlunr.QueryLexer.prototype.run = function () {\n var state = lunr.QueryLexer.lexText\n\n while (state) {\n state = state(this)\n }\n}\n\nlunr.QueryLexer.prototype.sliceString = function () {\n var subSlices = [],\n sliceStart = this.start,\n sliceEnd = this.pos\n\n for (var i = 0; i < this.escapeCharPositions.length; i++) {\n sliceEnd = this.escapeCharPositions[i]\n subSlices.push(this.str.slice(sliceStart, sliceEnd))\n sliceStart = sliceEnd + 1\n }\n\n subSlices.push(this.str.slice(sliceStart, this.pos))\n this.escapeCharPositions.length = 0\n\n return subSlices.join('')\n}\n\nlunr.QueryLexer.prototype.emit = function (type) {\n this.lexemes.push({\n type: type,\n str: this.sliceString(),\n start: this.start,\n end: this.pos\n })\n\n this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.escapeCharacter = function () {\n this.escapeCharPositions.push(this.pos - 1)\n this.pos += 1\n}\n\nlunr.QueryLexer.prototype.next = function () {\n if (this.pos >= this.length) {\n return lunr.QueryLexer.EOS\n }\n\n var char = this.str.charAt(this.pos)\n this.pos += 1\n return char\n}\n\nlunr.QueryLexer.prototype.width = function () {\n return this.pos - this.start\n}\n\nlunr.QueryLexer.prototype.ignore = function () {\n if (this.start == this.pos) {\n this.pos += 1\n }\n\n this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.backup = function () {\n this.pos -= 1\n}\n\nlunr.QueryLexer.prototype.acceptDigitRun = function () {\n var char, charCode\n\n do {\n char = this.next()\n charCode = char.charCodeAt(0)\n } while (charCode > 47 && charCode < 58)\n\n if (char != lunr.QueryLexer.EOS) {\n this.backup()\n }\n}\n\nlunr.QueryLexer.prototype.more = function () {\n return this.pos < this.length\n}\n\nlunr.QueryLexer.EOS = 'EOS'\nlunr.QueryLexer.FIELD = 'FIELD'\nlunr.QueryLexer.TERM = 'TERM'\nlunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'\nlunr.QueryLexer.BOOST = 'BOOST'\nlunr.QueryLexer.PRESENCE = 'PRESENCE'\n\nlunr.QueryLexer.lexField = function (lexer) {\n lexer.backup()\n lexer.emit(lunr.QueryLexer.FIELD)\n lexer.ignore()\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexTerm = function (lexer) {\n if (lexer.width() > 1) {\n lexer.backup()\n lexer.emit(lunr.QueryLexer.TERM)\n }\n\n lexer.ignore()\n\n if (lexer.more()) {\n return lunr.QueryLexer.lexText\n }\n}\n\nlunr.QueryLexer.lexEditDistance = function (lexer) {\n lexer.ignore()\n lexer.acceptDigitRun()\n lexer.emit(lunr.QueryLexer.EDIT_DISTANCE)\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexBoost = function (lexer) {\n lexer.ignore()\n lexer.acceptDigitRun()\n lexer.emit(lunr.QueryLexer.BOOST)\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexEOS = function (lexer) {\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n}\n\n// This matches the separator used when tokenising fields\n// within a document. These should match otherwise it is\n// not possible to search for some tokens within a document.\n//\n// It is possible for the user to change the separator on the\n// tokenizer so it _might_ clash with any other of the special\n// characters already used within the search string, e.g. :.\n//\n// This means that it is possible to change the separator in\n// such a way that makes some words unsearchable using a search\n// string.\nlunr.QueryLexer.termSeparator = lunr.tokenizer.separator\n\nlunr.QueryLexer.lexText = function (lexer) {\n while (true) {\n var char = lexer.next()\n\n if (char == lunr.QueryLexer.EOS) {\n return lunr.QueryLexer.lexEOS\n }\n\n // Escape character is '\\'\n if (char.charCodeAt(0) == 92) {\n lexer.escapeCharacter()\n continue\n }\n\n if (char == \":\") {\n return lunr.QueryLexer.lexField\n }\n\n if (char == \"~\") {\n lexer.backup()\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n return lunr.QueryLexer.lexEditDistance\n }\n\n if (char == \"^\") {\n lexer.backup()\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n return lunr.QueryLexer.lexBoost\n }\n\n // \"+\" indicates term presence is required\n // checking for length to ensure that only\n // leading \"+\" are considered\n if (char == \"+\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE)\n return lunr.QueryLexer.lexText\n }\n\n // \"-\" indicates term presence is prohibited\n // checking for length to ensure that only\n // leading \"-\" are considered\n if (char == \"-\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE)\n return lunr.QueryLexer.lexText\n }\n\n if (char.match(lunr.QueryLexer.termSeparator)) {\n return lunr.QueryLexer.lexTerm\n }\n }\n}\n\nlunr.QueryParser = function (str, query) {\n this.lexer = new lunr.QueryLexer (str)\n this.query = query\n this.currentClause = {}\n this.lexemeIdx = 0\n}\n\nlunr.QueryParser.prototype.parse = function () {\n this.lexer.run()\n this.lexemes = this.lexer.lexemes\n\n var state = lunr.QueryParser.parseClause\n\n while (state) {\n state = state(this)\n }\n\n return this.query\n}\n\nlunr.QueryParser.prototype.peekLexeme = function () {\n return this.lexemes[this.lexemeIdx]\n}\n\nlunr.QueryParser.prototype.consumeLexeme = function () {\n var lexeme = this.peekLexeme()\n this.lexemeIdx += 1\n return lexeme\n}\n\nlunr.QueryParser.prototype.nextClause = function () {\n var completedClause = this.currentClause\n this.query.clause(completedClause)\n this.currentClause = {}\n}\n\nlunr.QueryParser.parseClause = function (parser) {\n var lexeme = parser.peekLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n switch (lexeme.type) {\n case lunr.QueryLexer.PRESENCE:\n return lunr.QueryParser.parsePresence\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expected either a field or a term, found \" + lexeme.type\n\n if (lexeme.str.length >= 1) {\n errorMessage += \" with value '\" + lexeme.str + \"'\"\n }\n\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n}\n\nlunr.QueryParser.parsePresence = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n switch (lexeme.str) {\n case \"-\":\n parser.currentClause.presence = lunr.Query.presence.PROHIBITED\n break\n case \"+\":\n parser.currentClause.presence = lunr.Query.presence.REQUIRED\n break\n default:\n var errorMessage = \"unrecognised presence operator'\" + lexeme.str + \"'\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term or field, found nothing\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expecting term or field, found '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseField = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n if (parser.query.allFields.indexOf(lexeme.str) == -1) {\n var possibleFields = parser.query.allFields.map(function (f) { return \"'\" + f + \"'\" }).join(', '),\n errorMessage = \"unrecognised field '\" + lexeme.str + \"', possible fields: \" + possibleFields\n\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.fields = [lexeme.str]\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term, found nothing\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expecting term, found '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseTerm = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n parser.currentClause.term = lexeme.str.toLowerCase()\n\n if (lexeme.str.indexOf(\"*\") != -1) {\n parser.currentClause.usePipeline = false\n }\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseEditDistance = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n var editDistance = parseInt(lexeme.str, 10)\n\n if (isNaN(editDistance)) {\n var errorMessage = \"edit distance must be numeric\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.editDistance = editDistance\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseBoost = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n var boost = parseInt(lexeme.str, 10)\n\n if (isNaN(boost)) {\n var errorMessage = \"boost must be numeric\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.boost = boost\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory)\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory()\n } else {\n // Browser globals (root is window)\n root.lunr = factory()\n }\n }(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr\n }))\n})();\n","module.exports={\n \"name\": \"pict-application\",\n \"version\": \"1.0.30\",\n \"description\": \"Application base class for a pict view-based application\",\n \"main\": \"source/Pict-Application.js\",\n \"scripts\": {\n \"test\": \"npx mocha -u tdd -R spec\",\n \"start\": \"node source/Pict-Application.js\",\n \"coverage\": \"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec\",\n \"build\": \"npx quack build\",\n \"docker-dev-build\": \"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local\",\n \"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\",\n \"docker-dev-shell\": \"docker exec -it pict-application-dev /bin/bash\",\n \"tests\": \"npx mocha -u tdd --exit -R spec --grep\",\n \"lint\": \"eslint source/**\",\n \"types\": \"tsc -p .\"\n },\n \"types\": \"types/source/Pict-Application.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/stevenvelozo/pict-application.git\"\n },\n \"author\": \"steven velozo <steven@velozo.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/pict-application/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/pict-application#readme\",\n \"devDependencies\": {\n \"@eslint/js\": \"^9.28.0\",\n \"browser-env\": \"^3.3.0\",\n \"eslint\": \"^9.28.0\",\n \"pict\": \"^1.0.343\",\n \"pict-provider\": \"^1.0.7\",\n \"pict-view\": \"^1.0.64\",\n \"quackage\": \"^1.0.45\",\n \"typescript\": \"^5.9.3\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n },\n \"dependencies\": {\n \"fable-serviceproviderbase\": \"^3.0.15\"\n }\n}\n","const libFableServiceBase = require('fable-serviceproviderbase')\n\nconst libPackage = require('../package.json');\n\nconst defaultPictSettings = (\n\t{\n\t\tName: 'DefaultPictApplication',\n\n\t\t// The main \"viewport\" is the view that is used to host our application\n\t\tMainViewportViewIdentifier: 'Default-View',\n\t\tMainViewportRenderableHash: false,\n\t\tMainViewportDestinationAddress: false,\n\t\tMainViewportDefaultDataAddress: false,\n\n\t\t// Whether or not we should automatically render the main viewport and other autorender views after we initialize the pict application\n\t\tAutoSolveAfterInitialize: true,\n\t\tAutoRenderMainViewportViewAfterInitialize: true,\n\t\tAutoRenderViewsAfterInitialize: false,\n\t\tAutoLoginAfterInitialize: false,\n\t\tAutoLoadDataAfterLogin: false,\n\n\t\tConfigurationOnlyViews: [],\n\n\t\tManifests: {},\n\t\t// The prefix to prepend on all template destination hashes\n\t\tIdentifierAddressPrefix: 'PICT-'\n\t});\n\n/**\n * Base class for pict applications.\n */\nclass PictApplication extends libFableServiceBase\n{\n\t/**\n\t * @param {import('fable')} pFable\n\t * @param {Record<string, any>} [pOptions]\n\t * @param {string} [pServiceHash]\n\t */\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tlet tmpCarryOverConfiguration = (typeof(pFable.settings.PictApplicationConfiguration) === 'object') ? pFable.settings.PictApplicationConfiguration : {};\n\t\tlet tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(defaultPictSettings)), tmpCarryOverConfiguration, pOptions);\n\t\tsuper(pFable, tmpOptions, pServiceHash);\n\n\t\t/** @type {any} */\n\t\tthis.options;\n\t\t/** @type {any} */\n\t\tthis.log;\n\t\t/** @type {import('pict') & import('fable')} */\n\t\tthis.fable;\n\t\t/** @type {string} */\n\t\tthis.UUID;\n\t\t/** @type {string} */\n\t\tthis.Hash;\n\t\t/**\n\t\t * @type {{ [key: string]: any }}\n\t\t */\n\t\tthis.servicesMap;\n\n\t\tthis.serviceType = 'PictApplication';\n\t\t/** @type {Record<string, any>} */\n\t\tthis._Package = libPackage;\n\n\t\t// Convenience and consistency naming\n\t\tthis.pict = this.fable;\n\t\t// Wire in the essential Pict state\n\t\t/** @type {Record<string, any>} */\n\t\tthis.AppData = this.fable.AppData;\n\t\t/** @type {Record<string, any>} */\n\t\tthis.Bundle = this.fable.Bundle;\n\n\t\t/** @type {number} */\n\t\tthis.initializeTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastSolvedTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastLoginTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastMarshalFromViewsTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastMarshalToViewsTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastAutoRenderTimestamp;\n\t\t/** @type {number} */\n\t\tthis.lastLoadDataTimestamp;\n\n\t\t// Load all the manifests for the application\n\t\tlet tmpManifestKeys = Object.keys(this.options.Manifests);\n\t\tif (tmpManifestKeys.length > 0)\n\t\t{\n\t\t\tfor (let i = 0; i < tmpManifestKeys.length; i++)\n\t\t\t{\n\t\t\t\t// Load each manifest\n\t\t\t\tlet tmpManifestKey = tmpManifestKeys[i];\n\t\t\t\tthis.fable.instantiateServiceProvider('Manifest', this.options.Manifests[tmpManifestKey], tmpManifestKey);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Solve All Views */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonPreSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onPreSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonPreSolveAsync(fCallback)\n\t{\n\t\tthis.onPreSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeSolveAsync(fCallback)\n\t{\n\t\tthis.onBeforeSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonSolveAsync(fCallback)\n\t{\n\t\tthis.onSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tsolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} executing solve() function...`)\n\t\t}\n\n\t\t// Walk through any loaded providers and solve them as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoSolveWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToSolve.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToSolve.sort((a, b) => { return a.options.AutoSolveOrdinal - b.options.AutoSolveOrdinal; });\n\t\tfor (let i = 0; i < tmpProvidersToSolve.length; i++)\n\t\t{\n\t\t\ttmpProvidersToSolve[i].solve(tmpProvidersToSolve[i]);\n\t\t}\n\n\t\tthis.onBeforeSolve();\n\t\t// Now walk through any loaded views and initialize them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoInitialize)\n\t\t\t{\n\t\t\t\ttmpViewsToSolve.push(tmpView);\n\t\t\t}\n\t\t}\n\t\t// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpViewsToSolve.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\tfor (let i = 0; i < tmpViewsToSolve.length; i++)\n\t\t{\n\t\t\ttmpViewsToSolve[i].solve();\n\t\t}\n\t\tthis.onSolve();\n\t\tthis.onAfterSolve();\n\t\tthis.lastSolvedTimestamp = this.fable.log.getTimeStamp();\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tsolveAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\ttmpAnticipate.anticipate(this.onBeforeSolveAsync.bind(this));\n\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\t\t// Walk through any loaded providers and solve them as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoSolveWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToSolve.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToSolve.sort((a, b) => { return a.options.AutoSolveOrdinal - b.options.AutoSolveOrdinal; });\n\t\tfor (let i = 0; i < tmpProvidersToSolve.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvidersToSolve[i].solveAsync.bind(tmpProvidersToSolve[i]));\n\t\t}\n\n\t\t// Walk through any loaded views and solve them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToSolve = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoSolveWithApp)\n\t\t\t{\n\t\t\t\ttmpViewsToSolve.push(tmpView);\n\t\t\t}\n\t\t}\n\t\t// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpViewsToSolve.sort((a, b) => { return a.options.AutoSolveOrdinal - b.options.AutoSolveOrdinal; });\n\t\tfor (let i = 0; i < tmpViewsToSolve.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpViewsToSolve[i].solveAsync.bind(tmpViewsToSolve[i]));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onSolveAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastSolvedTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterSolveAsync(fCallback)\n\t{\n\t\tthis.onAfterSolve();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Application Login */\n\t/* -------------------------------------------------------------------------- */\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeLoginAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeLoginAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonLoginAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onLoginAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tloginAsync(fCallback)\n\t{\n\t\tconst tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tlet tmpCallback = fCallback;\n\n\t\tif (typeof(tmpCallback) !== 'function')\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loginAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeLoginAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onLoginAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterLoginAsync.bind(this));\n\n\t\t// check and see if we should automatically trigger a data load\n\t\tif (this.options.AutoLoadDataAfterLogin)\n\t\t{\n\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t{\n\t\t\t\tif (!this.isLoggedIn())\n\t\t\t\t{\n\t\t\t\t\treturn fNext();\n\t\t\t\t}\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto loading data after login...`);\n\t\t\t\t}\n\t\t\t\t//TODO: should data load errors funnel here? this creates a weird coupling between login and data load callbacks\n\t\t\t\tthis.loadDataAsync((pError) =>\n\t\t\t\t{\n\t\t\t\t\tfNext(pError);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loginAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastLoginTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Check if the application state is logged in. Defaults to true. Override this method in your application based on login requirements.\n\t *\n\t * @return {boolean}\n\t */\n\tisLoggedIn()\n\t{\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterLoginAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterLoginAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Application LoadData */\n\t/* -------------------------------------------------------------------------- */\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tloadDataAsync(fCallback)\n\t{\n\t\tconst tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tlet tmpCallback = fCallback;\n\n\t\tif (typeof(tmpCallback) !== 'function')\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loadDataAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeLoadDataAsync.bind(this));\n\n\t\t// Walk through any loaded providers and load their data as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToLoadData = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoLoadDataWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToLoadData.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToLoadData.sort((a, b) => { return a.options.AutoLoadDataOrdinal - b.options.AutoLoadDataOrdinal; });\n\n\t\tfor (const tmpProvider of tmpProvidersToLoadData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onBeforeLoadDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onLoadDataAsync.bind(this));\n\n\t\t//TODO: think about ways to parallelize these\n\t\tfor (const tmpProvider of tmpProvidersToLoadData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onLoadDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onAfterLoadDataAsync.bind(this));\n\n\t\tfor (const tmpProvider of tmpProvidersToLoadData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onAfterLoadDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t/** @param {Error} [pError] */\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} loadDataAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastLoadDataTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Application SaveData */\n\t/* -------------------------------------------------------------------------- */\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tsaveDataAsync(fCallback)\n\t{\n\t\tconst tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\tlet tmpCallback = fCallback;\n\n\t\tif (typeof(tmpCallback) !== 'function')\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} saveDataAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeSaveDataAsync.bind(this));\n\n\t\t// Walk through any loaded providers and load their data as well.\n\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\tlet tmpProvidersToSaveData = [];\n\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t{\n\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\tif (tmpProvider.options.AutoSaveDataWithApp)\n\t\t\t{\n\t\t\t\ttmpProvidersToSaveData.push(tmpProvider);\n\t\t\t}\n\t\t}\n\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\ttmpProvidersToSaveData.sort((a, b) => { return a.options.AutoSaveDataOrdinal - b.options.AutoSaveDataOrdinal; });\n\n\t\tfor (const tmpProvider of tmpProvidersToSaveData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onBeforeSaveDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onSaveDataAsync.bind(this));\n\n\t\t//TODO: think about ways to parallelize these\n\t\tfor (const tmpProvider of tmpProvidersToSaveData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onSaveDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onAfterSaveDataAsync.bind(this));\n\n\t\tfor (const tmpProvider of tmpProvidersToSaveData)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpProvider.onAfterSaveDataAsync.bind(tmpProvider));\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t/** @param {Error} [pError] */\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} saveDataAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastSaveDataTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Initialize Application */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeInitializeAsync(fCallback)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonInitializeAsync(fCallback)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tinitialize()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} initialize:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tthis.onBeforeInitialize();\n\n\t\t\tif ('ConfigurationOnlyViews' in this.options)\n\t\t\t{\n\t\t\t\t// Load all the configuration only views\n\t\t\t\tfor (let i = 0; i < this.options.ConfigurationOnlyViews.length; i++)\n\t\t\t\t{\n\t\t\t\t\tlet tmpViewIdentifier = (typeof(this.options.ConfigurationOnlyViews[i].ViewIdentifier) === 'undefined') ? `AutoView-${this.fable.getUUID()}`\n\t\t\t\t\t\t\t\t\t\t\t: this.options.ConfigurationOnlyViews[i].ViewIdentifier;\n\t\t\t\t\tthis.log.info(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} adding configuration only view: ${tmpViewIdentifier}`);\n\t\t\t\t\tthis.pict.addView(tmpViewIdentifier, this.options.ConfigurationOnlyViews[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.onInitialize();\n\n\t\t\t// Walk through any loaded providers and initialize them as well.\n\t\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\t\tlet tmpProvidersToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\t\tif (tmpProvider.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpProvidersToInitialize.push(tmpProvider);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\t\ttmpProvidersToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpProvidersToInitialize.length; i++)\n\t\t\t{\n\t\t\t\ttmpProvidersToInitialize[i].initialize();\n\t\t\t}\n\n\t\t\t// Now walk through any loaded views and initialize them as well.\n\t\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t\tlet tmpViewsToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\t\tif (tmpView.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpViewsToInitialize.push(tmpView);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the views by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\t\ttmpViewsToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpViewsToInitialize.length; i++)\n\t\t\t{\n\t\t\t\ttmpViewsToInitialize[i].initialize();\n\t\t\t}\n\n\t\t\tthis.onAfterInitialize();\n\t\t\tif (this.options.AutoSolveAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto solving after initialization...`);\n\t\t\t\t}\n\t\t\t\t// Solve the template synchronously\n\t\t\t\tthis.solve();\n\t\t\t}\n\t\t\t// Now check and see if we should automatically render as well\n\t\t\tif (this.options.AutoRenderMainViewportViewAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto rendering after initialization...`);\n\t\t\t\t}\n\t\t\t\t// Render the template synchronously\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tthis.initializeTimestamp = this.fable.log.getTimeStamp();\n\t\t\tthis.onCompletionOfInitialize();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initialize called but initialization is already completed. Aborting.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tinitializeAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync:`);\n\t\t}\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.pict.LogNoisiness > 3)\n\t\t\t{\n\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} beginning initialization...`);\n\t\t\t}\n\n\t\t\tif ('ConfigurationOnlyViews' in this.options)\n\t\t\t{\n\t\t\t\t// Load all the configuration only views\n\t\t\t\tfor (let i = 0; i < this.options.ConfigurationOnlyViews.length; i++)\n\t\t\t\t{\n\t\t\t\t\tlet tmpViewIdentifier = (typeof(this.options.ConfigurationOnlyViews[i].ViewIdentifier) === 'undefined') ? `AutoView-${this.fable.getUUID()}`\n\t\t\t\t\t\t\t\t\t\t\t: this.options.ConfigurationOnlyViews[i].ViewIdentifier;\n\t\t\t\t\tthis.log.info(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} adding configuration only view: ${tmpViewIdentifier}`);\n\t\t\t\t\tthis.pict.addView(tmpViewIdentifier, this.options.ConfigurationOnlyViews[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\n\t\t\t// Walk through any loaded providers and solve them as well.\n\t\t\tlet tmpLoadedProviders = Object.keys(this.pict.providers);\n\t\t\tlet tmpProvidersToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedProviders.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpProvider = this.pict.providers[tmpLoadedProviders[i]];\n\t\t\t\tif (tmpProvider.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpProvidersToInitialize.push(tmpProvider);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the providers by their priority (if they are all priority 0, it will end up being add order due to JSON Object Property Key order stuff)\n\t\t\ttmpProvidersToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpProvidersToInitialize.length; i++)\n\t\t\t{\n\t\t\t\ttmpAnticipate.anticipate(tmpProvidersToInitialize[i].initializeAsync.bind(tmpProvidersToInitialize[i]));\n\t\t\t}\n\n\t\t\t// Now walk through any loaded views and initialize them as well.\n\t\t\t// TODO: Some optimization cleverness could be gained by grouping them into a parallelized async operation, by ordinal.\n\t\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t\tlet tmpViewsToInitialize = [];\n\t\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\t\tif (tmpView.options.AutoInitialize)\n\t\t\t\t{\n\t\t\t\t\ttmpViewsToInitialize.push(tmpView);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sort the views by their priority\n\t\t\t// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff\n\t\t\ttmpViewsToInitialize.sort((a, b) => { return a.options.AutoInitializeOrdinal - b.options.AutoInitializeOrdinal; });\n\t\t\tfor (let i = 0; i < tmpViewsToInitialize.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpView = tmpViewsToInitialize[i];\n\t\t\t\ttmpAnticipate.anticipate(tmpView.initializeAsync.bind(tmpView));\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\tif (this.options.AutoLoginAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto login (asynchronously) after initialization...`);\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(this.loginAsync.bind(this));\n\t\t\t}\n\n\t\t\tif (this.options.AutoSolveAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto solving (asynchronously) after initialization...`);\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(this.solveAsync.bind(this));\n\t\t\t}\n\n\t\t\tif (this.options.AutoRenderMainViewportViewAfterInitialize)\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 1)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} auto rendering (asynchronously) after initialization...`);\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(this.renderMainViewportAsync.bind(this));\n\t\t\t}\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initializeAsync Error: ${pError.message || pError}`, { stack: pError.stack });\n\t\t\t\t\t}\n\t\t\t\t\tthis.initializeTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} initialization complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} async initialize called but initialization is already completed. Aborting.`);\n\t\t\t// TODO: Should this be an error?\n\t\t\treturn this.onCompletionOfInitializeAsync(tmpCallback);\n\t\t}\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fCallback();\n\t}\n\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonCompletionOfInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onCompletionOfInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonCompletionOfInitializeAsync(fCallback)\n\t{\n\t\tthis.onCompletionOfInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal Data From All Views */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeMarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeMarshalFromViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeMarshalFromViewsAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalFromViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonMarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onMarshalFromViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonMarshalFromViewsAsync(fCallback)\n\t{\n\t\tthis.onMarshalFromViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tmarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} executing marshalFromViews() function...`)\n\t\t}\n\t\tthis.onBeforeMarshalFromViews();\n\t\t// Now walk through any loaded views and initialize them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalFromViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalFromViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalFromViews.length; i++)\n\t\t{\n\t\t\ttmpViewsToMarshalFromViews[i].marshalFromView();\n\t\t}\n\t\tthis.onMarshalFromViews();\n\t\tthis.onAfterMarshalFromViews();\n\t\tthis.lastMarshalFromViewsTimestamp = this.fable.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tmarshalFromViewsAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewsAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));\n\t\t// Walk through any loaded views and marshalFromViews them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalFromViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalFromViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalFromViews.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpViewsToMarshalFromViews[i].marshalFromViewAsync.bind(tmpViewsToMarshalFromViews[i]));\n\t\t}\n\t\ttmpAnticipate.anticipate(this.onMarshalFromViewsAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalFromViewsAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewsAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalFromViewsTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterMarshalFromViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterMarshalFromViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterMarshalFromViewsAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalFromViews();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal Data To All Views */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeMarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeMarshalToViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeMarshalToViewsAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalToViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonMarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onMarshalToViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonMarshalToViewsAsync(fCallback)\n\t{\n\t\tthis.onMarshalToViews();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tmarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} executing marshalToViews() function...`)\n\t\t}\n\t\tthis.onBeforeMarshalToViews();\n\t\t// Now walk through any loaded views and initialize them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalToViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalToViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalToViews.length; i++)\n\t\t{\n\t\t\ttmpViewsToMarshalToViews[i].marshalToView();\n\t\t}\n\t\tthis.onMarshalToViews();\n\t\tthis.onAfterMarshalToViews();\n\t\tthis.lastMarshalToViewsTimestamp = this.fable.log.getTimeStamp();\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tmarshalToViewsAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : false;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewsAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));\n\t\t// Walk through any loaded views and marshalToViews them as well.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\tlet tmpViewsToMarshalToViews = [];\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\ttmpViewsToMarshalToViews.push(tmpView);\n\t\t}\n\t\tfor (let i = 0; i < tmpViewsToMarshalToViews.length; i++)\n\t\t{\n\t\t\ttmpAnticipate.anticipate(tmpViewsToMarshalToViews[i].marshalToViewAsync.bind(tmpViewsToMarshalToViews[i]));\n\t\t}\n\t\ttmpAnticipate.anticipate(this.onMarshalToViewsAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalToViewsAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewsAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalToViewsTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterMarshalToViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterMarshalToViews:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterMarshalToViewsAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalToViews();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Render View */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * @return {boolean}\n\t */\n\tonBeforeRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onBeforeRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonBeforeRenderAsync(fCallback)\n\t{\n\t\tthis.onBeforeRender();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {string} [pViewIdentifier] - The hash of the view to render. By default, the main viewport view is rendered.\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string} [pTemplateDataAddress] - The address where the data for the template is stored.\n\t *\n\t * TODO: Should we support objects for pTemplateDataAddress for parity with pict-view?\n\t */\n\trender(pViewIdentifier, pRenderableHash, pRenderDestinationAddress, pTemplateDataAddress)\n\t{\n\t\tlet tmpViewIdentifier = (typeof(pViewIdentifier) !== 'string') ? this.options.MainViewportViewIdentifier : pViewIdentifier;\n\t\tlet tmpRenderableHash = (typeof(pRenderableHash) !== 'string') ? this.options.MainViewportRenderableHash : pRenderableHash;\n\t\tlet tmpRenderDestinationAddress = (typeof(pRenderDestinationAddress) !== 'string') ? this.options.MainViewportDestinationAddress : pRenderDestinationAddress;\n\t\tlet tmpTemplateDataAddress = (typeof(pTemplateDataAddress) !== 'string') ? this.options.MainViewportDefaultDataAddress : pTemplateDataAddress;\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} VIEW Renderable[${tmpRenderableHash}] Destination[${tmpRenderDestinationAddress}] TemplateDataAddress[${tmpTemplateDataAddress}] render:`);\n\t\t}\n\n\t\tthis.onBeforeRender();\n\n\t\t// Now get the view (by hash) from the loaded views\n\t\tlet tmpView = (typeof (tmpViewIdentifier) === 'string') ? this.servicesMap.PictView[tmpViewIdentifier] : false;\n\t\tif (!tmpView)\n\t\t{\n\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} could not render from View ${tmpViewIdentifier} because it is not a valid view.`);\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.onRender();\n\n\t\ttmpView.render(tmpRenderableHash, tmpRenderDestinationAddress, tmpTemplateDataAddress);\n\n\t\tthis.onAfterRender();\n\n\t\treturn true;\n\t}\n\t/**\n\t * @return {boolean}\n\t */\n\tonRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonRenderAsync(fCallback)\n\t{\n\t\tthis.onRender();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {string|((error?: Error) => void)} pViewIdentifier - The hash of the view to render. By default, the main viewport view is rendered. (or the callback)\n\t * @param {string|((error?: Error) => void)} [pRenderableHash] - The hash of the renderable to render. (or the callback)\n\t * @param {string|((error?: Error) => void)} [pRenderDestinationAddress] - The address where the renderable will be rendered. (or the callback)\n\t * @param {string|((error?: Error) => void)} [pTemplateDataAddress] - The address where the data for the template is stored. (or the callback)\n\t * @param {(error?: Error) => void} [fCallback] - The callback, if all other parameters are provided.\n\t *\n\t * TODO: Should we support objects for pTemplateDataAddress for parity with pict-view?\n\t */\n\trenderAsync(pViewIdentifier, pRenderableHash, pRenderDestinationAddress, pTemplateDataAddress, fCallback)\n\t{\n\t\tlet tmpViewIdentifier = (typeof(pViewIdentifier) !== 'string') ? this.options.MainViewportViewIdentifier : pViewIdentifier;\n\t\tlet tmpRenderableHash = (typeof(pRenderableHash) !== 'string') ? this.options.MainViewportRenderableHash : pRenderableHash;\n\t\tlet tmpRenderDestinationAddress = (typeof(pRenderDestinationAddress) !== 'string') ? this.options.MainViewportDestinationAddress : pRenderDestinationAddress;\n\t\tlet tmpTemplateDataAddress = (typeof(pTemplateDataAddress) !== 'string') ? this.options.MainViewportDefaultDataAddress : pTemplateDataAddress;\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\t(typeof(pTemplateDataAddress) === 'function') ? pTemplateDataAddress :\n\t\t\t\t\t\t\t(typeof(pRenderDestinationAddress) === 'function') ? pRenderDestinationAddress :\n\t\t\t\t\t\t\t(typeof(pRenderableHash) === 'function') ? pRenderableHash :\n\t\t\t\t\t\t\t(typeof(pViewIdentifier) === 'function') ? pViewIdentifier :\n\t\t\t\t\t\t\tfalse;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} VIEW Renderable[${tmpRenderableHash}] Destination[${tmpRenderDestinationAddress}] TemplateDataAddress[${tmpTemplateDataAddress}] renderAsync:`);\n\t\t}\n\n\t\tlet tmpRenderAnticipate = this.fable.newAnticipate();\n\n\t\ttmpRenderAnticipate.anticipate(this.onBeforeRenderAsync.bind(this));\n\n\t\tlet tmpView = (typeof (tmpViewIdentifier) === 'string') ? this.servicesMap.PictView[tmpViewIdentifier] : false;\n\t\tif (!tmpView)\n\t\t{\n\t\t\tlet tmpErrorMessage = `PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} could not asynchronously render from View ${tmpViewIdentifier} because it is not a valid view.`;\n\t\t\tif (this.pict.LogNoisiness > 3)\n\t\t\t{\n\t\t\t\tthis.log.error(tmpErrorMessage);\n\t\t\t}\n\t\t\treturn tmpCallback(new Error(tmpErrorMessage));\n\t\t}\n\n\t\ttmpRenderAnticipate.anticipate(this.onRenderAsync.bind(this));\n\n\t\ttmpRenderAnticipate.anticipate(\n\t\t\t(fNext) =>\n\t\t\t{\n\t\t\t\ttmpView.renderAsync.call(tmpView, tmpRenderableHash, tmpRenderDestinationAddress, tmpTemplateDataAddress, fNext);\n\t\t\t});\n\n\t\ttmpRenderAnticipate.anticipate(this.onAfterRenderAsync.bind(this));\n\n\t\treturn tmpRenderAnticipate.wait(tmpCallback);\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tonAfterRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} onAfterRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\tonAfterRenderAsync(fCallback)\n\t{\n\t\tthis.onAfterRender();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\trenderMainViewport()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderMainViewport:`);\n\t\t}\n\n\t\treturn this.render();\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\trenderMainViewportAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow APPLICATION [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderMainViewportAsync:`);\n\t\t}\n\n\t\treturn this.renderAsync(fCallback);\n\t}\n\t/**\n\t * @return {void}\n\t */\n\trenderAutoViews()\n\t{\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} beginning renderAutoViews...`);\n\t\t}\n\t\t// Now walk through any loaded views and sort them by the AutoRender ordinal\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t// Sort the views by their priority\n\t\t// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff\n\t\ttmpLoadedViews.sort((a, b) =>\n\t\t{\n\t\t\treturn this.pict.views[a].options.AutoRenderOrdinal - this.pict.views[b].options.AutoRenderOrdinal;\n\t\t});\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoRender)\n\t\t\t{\n\t\t\t\ttmpView.render();\n\t\t\t}\n\t\t}\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync complete.`);\n\t\t}\n\t}\n\t/**\n\t * @param {(error?: Error) => void} fCallback\n\t */\n\trenderAutoViewsAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.fable.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\tfalse;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync Auto Callback Error: ${pError}`, pError)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} beginning renderAutoViewsAsync...`);\n\t\t}\n\n\t\t// Now walk through any loaded views and sort them by the AutoRender ordinal\n\t\t// TODO: Some optimization cleverness could be gained by grouping them into a parallelized async operation, by ordinal.\n\t\tlet tmpLoadedViews = Object.keys(this.pict.views);\n\t\t// Sort the views by their priority\n\t\t// If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff\n\t\ttmpLoadedViews.sort((a, b) =>\n\t\t{\n\t\t\treturn this.pict.views[a].options.AutoRenderOrdinal - this.pict.views[b].options.AutoRenderOrdinal;\n\t\t});\n\t\tfor (let i = 0; i < tmpLoadedViews.length; i++)\n\t\t{\n\t\t\tlet tmpView = this.pict.views[tmpLoadedViews[i]];\n\t\t\tif (tmpView.options.AutoRender)\n\t\t\t{\n\t\t\t\ttmpAnticipate.anticipate(tmpView.renderAsync.bind(tmpView));\n\t\t\t}\n\t\t}\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tthis.lastAutoRenderTimestamp = this.fable.log.getTimeStamp();\n\t\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync complete.`);\n\t\t\t\t}\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {boolean}\n\t */\n\tget isPictApplication()\n\t{\n\t\treturn true;\n\t}\n}\n\nmodule.exports = PictApplication;\n","module.exports={\n \"name\": \"pict-provider\",\n \"version\": \"1.0.7\",\n \"description\": \"Pict Provider Base Class\",\n \"main\": \"source/Pict-Provider.js\",\n \"scripts\": {\n \"start\": \"node source/Pict-Provider.js\",\n \"test\": \"npx mocha -u tdd -R spec\",\n \"tests\": \"npx mocha -u tdd --exit -R spec --grep\",\n \"coverage\": \"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec\",\n \"build\": \"npx quack build\",\n \"docker-dev-build\": \"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local\",\n \"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\",\n \"docker-dev-shell\": \"docker exec -it pict-provider-dev /bin/bash\",\n \"lint\": \"eslint source/**\",\n \"types\": \"tsc -p .\"\n },\n \"types\": \"types/source/Pict-Provider.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/stevenvelozo/pict-provider.git\"\n },\n \"author\": \"steven velozo <steven@velozo.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/pict-provider/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/pict-provider#readme\",\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.1\",\n \"eslint\": \"^9.39.1\",\n \"pict\": \"^1.0.342\",\n \"quackage\": \"^1.0.45\",\n \"typescript\": \"^5.9.3\"\n },\n \"dependencies\": {\n \"fable-serviceproviderbase\": \"^3.0.15\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n }\n}\n","const libFableServiceBase = require('fable-serviceproviderbase');\n\nconst libPackage = require('../package.json');\n\nconst defaultPictProviderSettings = (\n\t{\n\t\tProviderIdentifier: false,\n\n\t\t// If this is set to true, when the App initializes this will.\n\t\t// After the App initializes, initialize will be called as soon as it's added.\n\t\tAutoInitialize: true,\n\t\tAutoInitializeOrdinal: 0,\n\n\t\tAutoLoadDataWithApp: true,\n\n\t\tAutoSolveWithApp: true,\n\t\tAutoSolveOrdinal: 0,\n\n\t\tManifests: {},\n\n\t\tTemplates: []\n\t});\n\nclass PictProvider extends libFableServiceBase\n{\n\t/**\n\t * @param {import('fable')} pFable - The Fable instance.\n\t * @param {Record<string, any>} [pOptions] - The options for the provider.\n\t * @param {string} [pServiceHash] - The service hash for the provider.\n\t */\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\t// Intersect default options, parent constructor, service information\n\t\tlet tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(defaultPictProviderSettings)), pOptions);\n\t\tsuper(pFable, tmpOptions, pServiceHash);\n\n\t\t/** @type {import('fable') & import('pict') & { instantiateServiceProviderWithoutRegistration(pServiceType: string, pOptions?: Record<string, any>, pCustomServiceHash?: string): any }} */\n\t\tthis.fable;\n\t\t/** @type {import('fable') & import('pict') & { instantiateServiceProviderWithoutRegistration(pServiceType: string, pOptions?: Record<string, any>, pCustomServiceHash?: string): any }} */\n\t\tthis.pict;\n\t\t/** @type {any} */\n\t\tthis.log;\n\t\t/** @type {Record<string, any>} */\n\t\tthis.options;\n\t\t/** @type {string} */\n\t\tthis.UUID;\n\t\t/** @type {string} */\n\t\tthis.Hash;\n\n\t\tif (!this.options.ProviderIdentifier)\n\t\t{\n\t\t\tthis.options.ProviderIdentifier = `AutoProviderID-${this.fable.getUUID()}`;\n\t\t}\n\n\t\tthis.serviceType = 'PictProvider';\n\t\t/** @type {Record<string, any>} */\n\t\tthis._Package = libPackage;\n\n\t\t// Convenience and consistency naming\n\t\tthis.pict = this.fable;\n\n\t\t// Wire in the essential Pict application state\n\t\t/** @type {Record<string, any>} */\n\t\tthis.AppData = this.pict.AppData;\n\t\t/** @type {Record<string, any>} */\n\t\tthis.Bundle = this.pict.Bundle;\n\n\t\tthis.initializeTimestamp = false;\n\t\tthis.lastSolvedTimestamp = false;\n\n\t\tfor (let i = 0; i < this.options.Templates.length; i++)\n\t\t{\n\t\t\tlet tmpDefaultTemplate = this.options.Templates[i];\n\n\t\t\tif (!tmpDefaultTemplate.hasOwnProperty('Postfix') || !tmpDefaultTemplate.hasOwnProperty('Template'))\n\t\t\t{\n\t\t\t\tthis.log.error(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} could not load Default Template ${i} in the options array.`, tmpDefaultTemplate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!tmpDefaultTemplate.Source)\n\t\t\t\t{\n\t\t\t\t\ttmpDefaultTemplate.Source = `PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} options object.`;\n\t\t\t\t}\n\t\t\t\tthis.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix, tmpDefaultTemplate.Postfix, tmpDefaultTemplate.Template, tmpDefaultTemplate.Source);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Initialization */\n\t/* -------------------------------------------------------------------------- */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onBeforeInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after pre-pinitialization.\n\t *\n\t * @return {void}\n\t */\n\tonBeforeInitializeAsync(fCallback)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\treturn fCallback();\n\t}\n\n\tonInitialize()\n\t{\n\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after initialization.\n\t *\n\t * @return {void}\n\t */\n\tonInitializeAsync(fCallback)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fCallback();\n\t}\n\n\tinitialize()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow PROVIDER [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialize:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tthis.onBeforeInitialize();\n\t\t\tthis.onInitialize();\n\t\t\tthis.onAfterInitialize();\n\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialize called but initialization is already completed. Aborting.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after initialization.\n\t *\n\t * @return {void}\n\t */\n\tinitializeAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow PROVIDER [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initializeAsync:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t{\n\t\t\t\tthis.log.info(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} beginning initialization...`);\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialization failed: ${pError.message || pError}`, { Stack: pError.stack });\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.pict.LogNoisiness > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.info(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} initialization complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn fCallback();\n\t\t\t\t})\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} async initialize called but initialization is already completed. Aborting.`);\n\t\t\t// TODO: Should this be an error?\n\t\t\treturn fCallback();\n\t\t}\n\t}\n\n\tonAfterInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onAfterInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after initialization.\n\t *\n\t * @return {void}\n\t */\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fCallback();\n\t}\n\n\tonPreRender()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onPreRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after pre-render.\n\t *\n\t * @return {void}\n\t */\n\tonPreRenderAsync(fCallback)\n\t{\n\t\tthis.onPreRender();\n\t\treturn fCallback();\n\t}\n\n\trender()\n\t{\n\t\treturn this.onPreRender();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after render.\n\t *\n\t * @return {void}\n\t */\n\trenderAsync(fCallback)\n\t{\n\t\tthis.onPreRender();\n\t\treturn fCallback();\n\t}\n\n\tonPreSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onPreSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after pre-solve.\n\t *\n\t * @return {void}\n\t */\n\tonPreSolveAsync(fCallback)\n\t{\n\t\tthis.onPreSolve();\n\t\treturn fCallback();\n\t}\n\n\tsolve()\n\t{\n\t\treturn this.onPreSolve();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after solve.\n\t *\n\t * @return {void}\n\t */\n\tsolveAsync(fCallback)\n\t{\n\t\tthis.onPreSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data pre-load.\n\t */\n\tonBeforeLoadDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Hook to allow the provider to load data during application data load.\n\t *\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data load.\n\t */\n\tonLoadDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onLoadDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data post-load.\n\t */\n\tonAfterLoadDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data pre-load.\n\t *\n\t * @return {void}\n\t */\n\tonBeforeSaveDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Hook to allow the provider to load data during application data load.\n\t *\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data load.\n\t *\n\t * @return {void}\n\t */\n\tonSaveDataAsync(fCallback)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictProvider [${this.UUID}]::[${this.Hash}] ${this.options.ProviderIdentifier} onSaveDataAsync:`);\n\t\t}\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * @param {(pError?: Error) => void} fCallback - The callback to call after the data post-load.\n\t *\n\t * @return {void}\n\t */\n\tonAfterSaveDataAsync(fCallback)\n\t{\n\t\treturn fCallback();\n\t}\n}\n\nmodule.exports = PictProvider;\n","module.exports={\n \"name\": \"pict-view\",\n \"version\": \"1.0.64\",\n \"description\": \"Pict View Base Class\",\n \"main\": \"source/Pict-View.js\",\n \"scripts\": {\n \"test\": \"mocha -u tdd -R spec\",\n \"tests\": \"mocha -u tdd -R spec -g\",\n \"start\": \"node source/Pict-View.js\",\n \"coverage\": \"nyc --reporter=lcov --reporter=text-lcov npm test\",\n \"build\": \"npx quack build\",\n \"docker-dev-build\": \"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local\",\n \"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\",\n \"docker-dev-shell\": \"docker exec -it pict-view-dev /bin/bash\",\n \"types\": \"tsc -p .\",\n \"lint\": \"eslint source/**\"\n },\n \"types\": \"types/source/Pict-View.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/stevenvelozo/pict-view.git\"\n },\n \"author\": \"steven velozo <steven@velozo.com>\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/stevenvelozo/pict-view/issues\"\n },\n \"homepage\": \"https://github.com/stevenvelozo/pict-view#readme\",\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.1\",\n \"browser-env\": \"^3.3.0\",\n \"eslint\": \"^9.39.1\",\n \"pict\": \"^1.0.337\",\n \"quackage\": \"^1.0.45\",\n \"typescript\": \"^5.9.3\"\n },\n \"mocha\": {\n \"diff\": true,\n \"extension\": [\n \"js\"\n ],\n \"package\": \"./package.json\",\n \"reporter\": \"spec\",\n \"slow\": \"75\",\n \"timeout\": \"5000\",\n \"ui\": \"tdd\",\n \"watch-files\": [\n \"source/**/*.js\",\n \"test/**/*.js\"\n ],\n \"watch-ignore\": [\n \"lib/vendor\"\n ]\n },\n \"dependencies\": {\n \"fable\": \"^3.1.46\",\n \"fable-serviceproviderbase\": \"^3.0.15\"\n }\n}\n","\nconst libFableServiceBase = require('fable-serviceproviderbase');\n\nconst libPackage = require('../package.json');\n\nconst defaultPictViewSettings = (\n\t{\n\t\tDefaultRenderable: false,\n\t\tDefaultDestinationAddress: false,\n\t\tDefaultTemplateRecordAddress: false,\n\n\t\tViewIdentifier: false,\n\n\t\t// If this is set to true, when the App initializes this will.\n\t\t// After the App initializes, initialize will be called as soon as it's added.\n\t\tAutoInitialize: true,\n\t\tAutoInitializeOrdinal: 0,\n\n\t\t// If this is set to true, when the App autorenders (on load) this will.\n\t\t// After the App initializes, render will be called as soon as it's added.\n\t\tAutoRender: true,\n\t\tAutoRenderOrdinal: 0,\n\n\t\tAutoSolveWithApp: true,\n\t\tAutoSolveOrdinal: 0,\n\n\t\tCSSHash: false,\n\t\tCSS: false,\n\t\tCSSProvider: false,\n\t\tCSSPriority: 500,\n\n\t\tTemplates: [],\n\n\t\tDefaultTemplates: [],\n\n\t\tRenderables: [],\n\n\t\tManifests: {}\n\t});\n\n/** @typedef {(error?: Error) => void} ErrorCallback */\n/** @typedef {number | boolean} PictTimestamp */\n\n/**\n * @typedef {'replace' | 'append' | 'prepend' | 'append_once' | 'virtual-assignment'} RenderMethod\n */\n/**\n * @typedef {Object} Renderable\n *\n * @property {string} RenderableHash - A unique hash for the renderable.\n * @property {string} TemplateHash - The hash of the template to use for rendering this renderable.\n * @property {string} [DefaultTemplateRecordAddress] - The default address for resolving the data record for this renderable.\n * @property {string} [ContentDestinationAddress] - The default address (DOM CSS selector) for rendering the content of this renderable.\n * @property {RenderMethod} [RenderMethod=replace] - The method to use when projecting the renderable to the DOM ('replace', 'append', 'prepend', 'append_once', 'virtual-assignment').\n * @property {string} [TestAddress] - The address to use for testing the renderable.\n * @property {string} [TransactionHash] - The transaction hash for the root renderable.\n * @property {string} [RootRenderableViewHash] - The hash of the root renderable.\n * @property {string} [Content] - The rendered content for this renderable, if applicable.\n */\n\n/**\n * Represents a view in the Pict ecosystem.\n */\nclass PictView extends libFableServiceBase\n{\n\t/**\n\t * @param {any} pFable - The Fable object that this service is attached to.\n\t * @param {any} [pOptions] - (optional) The options for this service.\n\t * @param {string} [pServiceHash] - (optional) The hash of the service.\n\t */\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\t// Intersect default options, parent constructor, service information\n\t\tlet tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(defaultPictViewSettings)), pOptions);\n\t\tsuper(pFable, tmpOptions, pServiceHash);\n\t\t//FIXME: add types to fable and ancillaries\n\t\t/** @type {any} */\n\t\tthis.fable;\n\t\t/** @type {any} */\n\t\tthis.options;\n\t\t/** @type {String} */\n\t\tthis.UUID;\n\t\t/** @type {String} */\n\t\tthis.Hash;\n\t\t/** @type {any} */\n\t\tthis.log;\n\n\t\tconst tmpHashIsUUID = this.Hash === this.UUID;\n\t\t//NOTE: since many places are using the view UUID as the HTML element ID, we prefix it to avoid starting with a number\n\t\tthis.UUID = `V-${this.UUID}`;\n\t\tif (tmpHashIsUUID)\n\t\t{\n\t\t\tthis.Hash = this.UUID;\n\t\t}\n\n\t\tif (!this.options.ViewIdentifier)\n\t\t{\n\t\t\tthis.options.ViewIdentifier = `AutoViewID-${this.fable.getUUID()}`;\n\t\t}\n\t\tthis.serviceType = 'PictView';\n\t\t/** @type {Record<string, any>} */\n\t\tthis._Package = libPackage;\n\t\t// Convenience and consistency naming\n\t\t/** @type {import('pict') & { log: any, instantiateServiceProviderWithoutRegistration: (hash: String) => any, instantiateServiceProviderIfNotExists: (hash: string) => any, TransactionTracking: import('pict/types/source/services/Fable-Service-TransactionTracking') }} */\n\t\tthis.pict = this.fable;\n\t\t// Wire in the essential Pict application state\n\t\tthis.AppData = this.pict.AppData;\n\t\tthis.Bundle = this.pict.Bundle;\n\n\t\t/** @type {PictTimestamp} */\n\t\tthis.initializeTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastSolvedTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastRenderedTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastMarshalFromViewTimestamp = false;\n\t\t/** @type {PictTimestamp} */\n\t\tthis.lastMarshalToViewTimestamp = false;\n\n\t\tthis.pict.instantiateServiceProviderIfNotExists('TransactionTracking');\n\n\t\t// Load all templates from the array in the options\n\t\t// Templates are in the form of {Hash:'Some-Template-Hash',Template:'Template content',Source:'TemplateSource'}\n\t\tfor (let i = 0; i < this.options.Templates.length; i++)\n\t\t{\n\t\t\tlet tmpTemplate = this.options.Templates[i];\n\n\t\t\tif (!('Hash' in tmpTemplate) || !('Template' in tmpTemplate))\n\t\t\t{\n\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not load Template ${i} in the options array.`, tmpTemplate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!tmpTemplate.Source)\n\t\t\t\t{\n\t\t\t\t\ttmpTemplate.Source = `PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} options object.`;\n\t\t\t\t}\n\t\t\t\tthis.pict.TemplateProvider.addTemplate(tmpTemplate.Hash, tmpTemplate.Template, tmpTemplate.Source);\n\t\t\t}\n\t\t}\n\n\t\t// Load all default templates from the array in the options\n\t\t// Templates are in the form of {Prefix:'',Postfix:'-List-Row',Template:'Template content',Source:'TemplateSourceString'}\n\t\tfor (let i = 0; i < this.options.DefaultTemplates.length; i++)\n\t\t{\n\t\t\tlet tmpDefaultTemplate = this.options.DefaultTemplates[i];\n\n\t\t\tif (!('Postfix' in tmpDefaultTemplate) || !('Template' in tmpDefaultTemplate))\n\t\t\t{\n\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not load Default Template ${i} in the options array.`, tmpDefaultTemplate);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!tmpDefaultTemplate.Source)\n\t\t\t\t{\n\t\t\t\t\ttmpDefaultTemplate.Source = `PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} options object.`;\n\t\t\t\t}\n\t\t\t\tthis.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix, tmpDefaultTemplate.Postfix, tmpDefaultTemplate.Template, tmpDefaultTemplate.Source);\n\t\t\t}\n\t\t}\n\n\t\t// Load the CSS if it's available\n\t\tif (this.options.CSS)\n\t\t{\n\t\t\tlet tmpCSSHash = this.options.CSSHash ? this.options.CSSHash : `View-${this.options.ViewIdentifier}`;\n\t\t\tlet tmpCSSProvider = this.options.CSSProvider ? this.options.CSSProvider : tmpCSSHash;\n\t\t\tthis.pict.CSSMap.addCSS(tmpCSSHash, this.options.CSS, tmpCSSProvider, this.options.CSSPriority);\n\t\t}\n\n\t\t// Load all renderables\n\t\t// Renderables are launchable renderable instructions with templates\n\t\t// They look as such: {Identifier:'ContentEntry', TemplateHash:'Content-Entry-Section-Main', ContentDestinationAddress:'#ContentSection', RecordAddress:'AppData.Content.DefaultText', ManifestTransformation:'ManyfestHash', ManifestDestinationAddress:'AppData.Content.DataToTransformContent'}\n\t\t// The only parts that are necessary are Identifier and Template\n\t\t// A developer can then do render('ContentEntry') and it just kinda works. Or they can override the ContentDestinationAddress\n\t\t/** @type {Record<String, Renderable>} */\n\t\tthis.renderables = {};\n\t\tfor (let i = 0; i < this.options.Renderables.length; i++)\n\t\t{\n\t\t\t/** @type {Renderable} */\n\t\t\tlet tmpRenderable = this.options.Renderables[i];\n\t\t\tthis.addRenderable(tmpRenderable);\n\t\t}\n\t}\n\n\t/**\n\t * Adds a renderable to the view.\n\t *\n\t * @param {string | Renderable} pRenderableHash - The hash of the renderable, or a renderable object.\n\t * @param {string} [pTemplateHash] - (optional) The hash of the template for the renderable.\n\t * @param {string} [pDefaultTemplateRecordAddress] - (optional) The default data address for the template.\n\t * @param {string} [pDefaultDestinationAddress] - (optional) The default destination address for the renderable.\n\t * @param {RenderMethod} [pRenderMethod=replace] - (optional) The method to use when rendering the renderable (ex. 'replace').\n\t */\n\taddRenderable(pRenderableHash, pTemplateHash, pDefaultTemplateRecordAddress, pDefaultDestinationAddress, pRenderMethod)\n\t{\n\t\t/** @type {Renderable} */\n\t\tlet tmpRenderable;\n\n\t\tif (typeof(pRenderableHash) == 'object')\n\t\t{\n\t\t\t// The developer passed in the renderable as an object.\n\t\t\t// Use theirs instead!\n\t\t\ttmpRenderable = pRenderableHash;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/** @type {RenderMethod} */\n\t\t\tlet tmpRenderMethod = (typeof(pRenderMethod) !== 'string') ? pRenderMethod : 'replace';\n\t\t\ttmpRenderable = (\n\t\t\t\t{\n\t\t\t\t\tRenderableHash: pRenderableHash,\n\t\t\t\t\tTemplateHash: pTemplateHash,\n\t\t\t\t\tDefaultTemplateRecordAddress: pDefaultTemplateRecordAddress,\n\t\t\t\t\tContentDestinationAddress: pDefaultDestinationAddress,\n\t\t\t\t\tRenderMethod: tmpRenderMethod\n\t\t\t\t});\n\t\t}\n\n\t\tif ((typeof(tmpRenderable.RenderableHash) != 'string') || (typeof(tmpRenderable.TemplateHash) != 'string'))\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not load Renderable; RenderableHash or TemplateHash are invalid.`, tmpRenderable);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t{\n\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} adding renderable [${tmpRenderable.RenderableHash}] pointed to template ${tmpRenderable.TemplateHash}.`);\n\t\t\t}\n\n\t\t\tthis.renderables[tmpRenderable.RenderableHash] = tmpRenderable;\n\t\t}\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Initialization */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before the view is initialized.\n\t */\n\tonBeforeInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is initialized (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeInitializeAsync(fCallback)\n\t{\n\t\tthis.onBeforeInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is initialized.\n\t */\n\tonInitialize()\n\t{\n\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is initialized (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonInitializeAsync(fCallback)\n\t{\n\t\tthis.onInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Performs view initialization.\n\t */\n\tinitialize()\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialize:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tthis.onBeforeInitialize();\n\t\t\tthis.onInitialize();\n\t\t\tthis.onAfterInitialize();\n\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialize called but initialization is already completed. Aborting.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Performs view initialization (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tinitializeAsync(fCallback)\n\t{\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initializeAsync:`);\n\t\t}\n\n\t\tif (!this.initializeTimestamp)\n\t\t{\n\t\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t{\n\t\t\t\tthis.log.info(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} beginning initialization...`);\n\t\t\t}\n\n\t\t\ttmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onInitializeAsync.bind(this));\n\t\t\ttmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));\n\n\t\t\ttmpAnticipate.wait(\n\t\t\t\t/** @param {Error} pError */\n\t\t\t\t(pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialization failed: ${pError.message || pError}`, { stack: pError.stack });\n\t\t\t\t\t}\n\t\t\t\t\tthis.initializeTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\t\tif (this.pict.LogNoisiness > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.info(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} initialization complete.`);\n\t\t\t\t\t}\n\t\t\t\t\treturn fCallback();\n\t\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} async initialize called but initialization is already completed. Aborting.`);\n\t\t\t// TODO: Should this be an error?\n\t\t\treturn fCallback();\n\t\t}\n\t}\n\n\tonAfterInitialize()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterInitialize:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is initialized (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\tthis.onAfterInitialize();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Render */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before the view is rendered.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that will be rendered.\n\t */\n\tonBeforeRender(pRenderable)\n\t{\n\t\t// Overload this to mess with stuff before the content gets generated from the template\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeRender:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is rendered (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that will be rendered.\n\t */\n\tonBeforeRenderAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onBeforeRender(pRenderable);\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is projected into the DOM.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that will be projected.\n\t */\n\tonBeforeProject(pRenderable)\n\t{\n\t\t// Overload this to mess with stuff before the content gets generated from the template\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeProject:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is projected into the DOM (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that will be projected.\n\t */\n\tonBeforeProjectAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onBeforeProject(pRenderable);\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Builds the render options for a renderable.\n\t *\n\t * For DRY purposes on the three flavors of render.\n\t *\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t */\n\tbuildRenderOptions(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress)\n\t{\n\t\tlet tmpRenderOptions = {Valid: true};\n\t\ttmpRenderOptions.RenderableHash = (typeof (pRenderableHash) === 'string') ? pRenderableHash :\n\t\t\t\t\t\t\t\t(typeof (this.options.DefaultRenderable) == 'string') ?\n\t\t\t\t\t\t\t\tthis.options.DefaultRenderable : false;\n\t\tif (!tmpRenderOptions.RenderableHash)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not find a suitable RenderableHash ${tmpRenderOptions.RenderableHash} (param ${pRenderableHash}because it is not a valid renderable.`);\n\t\t\ttmpRenderOptions.Valid = false;\n\t\t}\n\n\t\ttmpRenderOptions.Renderable = this.renderables[tmpRenderOptions.RenderableHash];\n\t\tif (!tmpRenderOptions.Renderable)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderOptions.RenderableHash} (param ${pRenderableHash}) because it does not exist.`);\n\t\t\ttmpRenderOptions.Valid = false;\n\t\t}\n\n\t\ttmpRenderOptions.DestinationAddress = (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t(typeof (tmpRenderOptions.Renderable.ContentDestinationAddress) === 'string') ? tmpRenderOptions.Renderable.ContentDestinationAddress :\n\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : false;\n\t\tif (!tmpRenderOptions.DestinationAddress)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderOptions.RenderableHash} (param ${pRenderableHash}) because it does not have a valid destination address (param ${pRenderDestinationAddress}).`);\n\t\t\ttmpRenderOptions.Valid = false;\n\t\t}\n\n\t\tif (typeof(pTemplateRecordAddress) === 'object')\n\t\t{\n\t\t\ttmpRenderOptions.RecordAddress = 'Passed in as object';\n\t\t\ttmpRenderOptions.Record = pTemplateRecordAddress;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRenderOptions.RecordAddress = (typeof (pTemplateRecordAddress) === 'string') ? pTemplateRecordAddress :\n\t\t\t\t(typeof (tmpRenderOptions.Renderable.DefaultTemplateRecordAddress) === 'string') ? tmpRenderOptions.Renderable.DefaultTemplateRecordAddress :\n\t\t\t\t(typeof (this.options.DefaultTemplateRecordAddress) === 'string') ? this.options.DefaultTemplateRecordAddress : false;\n\t\t\ttmpRenderOptions.Record = (typeof (tmpRenderOptions.RecordAddress) === 'string') ? this.pict.DataProvider.getDataByAddress(tmpRenderOptions.RecordAddress) : undefined;\n\t\t}\n\n\t\treturn tmpRenderOptions;\n\t}\n\n\t/**\n\t * Assigns the content to the destination address.\n\t *\n\t * For DRY purposes on the three flavors of render.\n\t *\n\t * @param {Renderable} pRenderable - The renderable to render.\n\t * @param {string} pRenderDestinationAddress - The address where the renderable will be rendered.\n\t * @param {string} pContent - The content to render.\n\t * @returns {boolean} - Returns true if the content was assigned successfully.\n\t * @memberof PictView\n\t */\n\tassignRenderContent(pRenderable, pRenderDestinationAddress, pContent)\n\t{\n\t\treturn this.pict.ContentAssignment.projectContent(pRenderable.RenderMethod, pRenderDestinationAddress, pContent, pRenderable.TestAddress);\n\t}\n\n\t/**\n\t * Render a renderable from this view.\n\t *\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @return {boolean}\n\t */\n\trender(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable)\n\t{\n\t\treturn this.renderWithScope(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable);\n\t}\n\n\t/**\n\t * Render a renderable from this view, providing a specifici scope for the template.\n\t *\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @return {boolean}\n\t */\n\trenderWithScope(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable)\n\t{\n\t\tlet tmpRenderableHash = (typeof (pRenderableHash) === 'string') ? pRenderableHash :\n\t\t\t(typeof (this.options.DefaultRenderable) == 'string') ? this.options.DefaultRenderable : false;\n\t\tif (!tmpRenderableHash)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it is not a valid renderable.`);\n\t\t\treturn false;\n\t\t}\n\n\t\t/** @type {Renderable} */\n\t\tlet tmpRenderable;\n\t\tif (tmpRenderableHash == '__Virtual')\n\t\t{\n\t\t\ttmpRenderable = {\n\t\t\t\tRenderableHash: '__Virtual',\n\t\t\t\tTemplateHash: this.renderables[this.options.DefaultRenderable].TemplateHash,\n\t\t\t\tContentDestinationAddress: (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t\t\t(typeof (tmpRenderable.ContentDestinationAddress) === 'string') ? tmpRenderable.ContentDestinationAddress :\n\t\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null,\n\t\t\t\tRenderMethod: 'virtual-assignment',\n\t\t\t\tTransactionHash: pRootRenderable && pRootRenderable.TransactionHash,\n\t\t\t\tRootRenderableViewHash: pRootRenderable && pRootRenderable.RootRenderableViewHash,\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRenderable = Object.assign({}, this.renderables[tmpRenderableHash]);\n\t\t\ttmpRenderable.ContentDestinationAddress = (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t\t(typeof (tmpRenderable.ContentDestinationAddress) === 'string') ? tmpRenderable.ContentDestinationAddress :\n\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null;\n\t\t}\n\n\t\tif (!tmpRenderable.TransactionHash)\n\t\t{\n\t\t\ttmpRenderable.TransactionHash = `ViewRender-V-${this.options.ViewIdentifier}-R-${tmpRenderableHash}-U-${this.pict.getUUID()}`;\n\t\t\ttmpRenderable.RootRenderableViewHash = this.Hash;\n\t\t\tthis.pict.TransactionTracking.registerTransaction(tmpRenderable.TransactionHash);\n\t\t}\n\n\t\tif (!tmpRenderable)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not exist.`);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!tmpRenderable.ContentDestinationAddress)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not have a valid destination address.`);\n\t\t\treturn false;\n\t\t}\n\n\t\tlet tmpRecordAddress;\n\t\tlet tmpRecord;\n\n\t\tif (typeof(pTemplateRecordAddress) === 'object')\n\t\t{\n\t\t\ttmpRecord = pTemplateRecordAddress;\n\t\t\ttmpRecordAddress = 'Passed in as object';\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRecordAddress = (typeof (pTemplateRecordAddress) === 'string') ? pTemplateRecordAddress :\n\t\t\t\t(typeof (tmpRenderable.DefaultTemplateRecordAddress) === 'string') ? tmpRenderable.DefaultTemplateRecordAddress :\n\t\t\t\t\t(typeof (this.options.DefaultTemplateRecordAddress) === 'string') ? this.options.DefaultTemplateRecordAddress : false;\n\n\t\t\ttmpRecord = (typeof (tmpRecordAddress) === 'string') ? this.pict.DataProvider.getDataByAddress(tmpRecordAddress) : undefined;\n\t\t}\n\n\t\t// Execute the developer-overridable pre-render behavior\n\t\tthis.onBeforeRender(tmpRenderable);\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] Renderable[${tmpRenderableHash}] Destination[${tmpRenderable.ContentDestinationAddress}] TemplateRecordAddress[${tmpRecordAddress}] render:`);\n\t\t}\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Beginning Render of Renderable[${tmpRenderableHash}] to Destination [${tmpRenderable.ContentDestinationAddress}]...`);\n\t\t}\n\t\t// Generate the content output from the template and data\n\t\ttmpRenderable.Content = this.pict.parseTemplateByHash(tmpRenderable.TemplateHash, tmpRecord, null, [this], pScope, { RootRenderable: typeof pRootRenderable === 'object' ? pRootRenderable : tmpRenderable });\n\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Assigning Renderable[${tmpRenderableHash}] content length ${tmpRenderable.Content.length} to Destination [${tmpRenderable.ContentDestinationAddress}] using render method [${tmpRenderable.RenderMethod}].`);\n\t\t}\n\n\t\tthis.onBeforeProject(tmpRenderable);\n\t\tthis.onProject(tmpRenderable);\n\n\t\tif (tmpRenderable.RenderMethod !== 'virtual-assignment')\n\t\t{\n\t\t\tthis.onAfterProject(tmpRenderable);\n\n\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\tthis.onAfterRender(tmpRenderable);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Render a renderable from this view.\n\t *\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable|ErrorCallback} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t *\n\t * @return {void}\n\t */\n\trenderAsync(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable, fCallback)\n\t{\n\t\treturn this.renderWithScopeAsync(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable, fCallback);\n\t}\n\n\t/**\n\t * Render a renderable from this view.\n\t *\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.\n\t * @param {Renderable|ErrorCallback} [pRootRenderable] - The root renderable for the render operation, if applicable.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t *\n\t * @return {void}\n\t */\n\trenderWithScopeAsync(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, pRootRenderable, fCallback)\n\t{\n\t\tlet tmpRenderableHash = (typeof (pRenderableHash) === 'string') ? pRenderableHash :\n\t\t\t(typeof (this.options.DefaultRenderable) == 'string') ? this.options.DefaultRenderable : false;\n\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\t(typeof(pTemplateRecordAddress) === 'function') ? pTemplateRecordAddress :\n\t\t\t\t\t\t\t(typeof(pRenderDestinationAddress) === 'function') ? pRenderDestinationAddress :\n\t\t\t\t\t\t\t(typeof(pRenderableHash) === 'function') ? pRenderableHash :\n\t\t\t\t\t\t\t(typeof(pRootRenderable) === 'function') ? pRootRenderable :\n\t\t\t\t\t\t\tnull;\n\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tif (!tmpRenderableHash)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not asynchronously render ${tmpRenderableHash} (param ${pRenderableHash}because it is not a valid renderable.`);\n\t\t\treturn tmpCallback(new Error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not asynchronously render ${tmpRenderableHash} (param ${pRenderableHash}because it is not a valid renderable.`));\n\t\t}\n\n\t\t/** @type {Renderable} */\n\t\tlet tmpRenderable;\n\t\tif (tmpRenderableHash == '__Virtual')\n\t\t{\n\t\t\ttmpRenderable = {\n\t\t\t\tRenderableHash: '__Virtual',\n\t\t\t\tTemplateHash: this.renderables[this.options.DefaultRenderable].TemplateHash,\n\t\t\t\tContentDestinationAddress: (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress : (typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null,\n\t\t\t\tRenderMethod: 'virtual-assignment',\n\t\t\t\tTransactionHash: pRootRenderable && typeof pRootRenderable !== 'function' && pRootRenderable.TransactionHash,\n\t\t\t\tRootRenderableViewHash: pRootRenderable && typeof pRootRenderable !== 'function' && pRootRenderable.RootRenderableViewHash,\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRenderable = Object.assign({}, this.renderables[tmpRenderableHash]);\n\t\t\ttmpRenderable.ContentDestinationAddress = (typeof (pRenderDestinationAddress) === 'string') ? pRenderDestinationAddress :\n\t\t\t\t(typeof (tmpRenderable.ContentDestinationAddress) === 'string') ? tmpRenderable.ContentDestinationAddress :\n\t\t\t\t(typeof (this.options.DefaultDestinationAddress) === 'string') ? this.options.DefaultDestinationAddress : null;\n\t\t}\n\n\t\tif (!tmpRenderable.TransactionHash)\n\t\t{\n\t\t\ttmpRenderable.TransactionHash = `ViewRender-V-${this.options.ViewIdentifier}-R-${tmpRenderableHash}-U-${this.pict.getUUID()}`;\n\t\t\ttmpRenderable.RootRenderableViewHash = this.Hash;\n\t\t\tthis.pict.TransactionTracking.registerTransaction(tmpRenderable.TransactionHash);\n\t\t}\n\n\t\tif (!tmpRenderable)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not exist.`);\n\t\t\treturn tmpCallback(new Error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not exist.`));\n\t\t}\n\n\t\tif (!tmpRenderable.ContentDestinationAddress)\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render ${tmpRenderableHash} (param ${pRenderableHash}) because it does not have a valid destination address.`);\n\t\t\treturn tmpCallback(new Error(`Could not render ${tmpRenderableHash}`));\n\t\t}\n\n\t\tlet tmpRecordAddress;\n\t\tlet tmpRecord;\n\n\t\tif (typeof(pTemplateRecordAddress) === 'object')\n\t\t{\n\t\t\ttmpRecord = pTemplateRecordAddress;\n\t\t\ttmpRecordAddress = 'Passed in as object';\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttmpRecordAddress = (typeof (pTemplateRecordAddress) === 'string') ? pTemplateRecordAddress :\n\t\t\t\t(typeof (tmpRenderable.DefaultTemplateRecordAddress) === 'string') ? tmpRenderable.DefaultTemplateRecordAddress :\n\t\t\t\t\t(typeof (this.options.DefaultTemplateRecordAddress) === 'string') ? this.options.DefaultTemplateRecordAddress : false;\n\n\t\t\ttmpRecord = (typeof (tmpRecordAddress) === 'string') ? this.pict.DataProvider.getDataByAddress(tmpRecordAddress) : undefined;\n\t\t}\n\n\t\tif (this.pict.LogControlFlow)\n\t\t{\n\t\t\tthis.log.trace(`PICT-ControlFlow VIEW [${this.UUID}]::[${this.Hash}] Renderable[${tmpRenderableHash}] Destination[${tmpRenderable.ContentDestinationAddress}] TemplateRecordAddress[${tmpRecordAddress}] renderAsync:`);\n\t\t}\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Beginning Asynchronous Render (callback-style)...`);\n\t\t}\n\n\t\tlet tmpAnticipate = this.fable.newAnticipate();\n\n\t\ttmpAnticipate.anticipate(\n\t\t\t(fOnBeforeRenderCallback) =>\n\t\t\t{\n\t\t\t\tthis.onBeforeRenderAsync(fOnBeforeRenderCallback, tmpRenderable);\n\t\t\t});\n\n\t\ttmpAnticipate.anticipate(\n\t\t\t(fAsyncTemplateCallback) =>\n\t\t\t{\n\t\t\t\t// Render the template (asynchronously)\n\t\t\t\tthis.pict.parseTemplateByHash(tmpRenderable.TemplateHash, tmpRecord,\n\t\t\t\t\t(pError, pContent) =>\n\t\t\t\t\t{\n\t\t\t\t\t\tif (pError)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render (asynchronously) ${tmpRenderableHash} (param ${pRenderableHash}) because it did not parse the template.`, pError);\n\t\t\t\t\t\t\treturn fAsyncTemplateCallback(pError);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmpRenderable.Content = pContent;\n\n\t\t\t\t\t\treturn fAsyncTemplateCallback();\n\t\t\t\t\t}, [this], pScope, { RootRenderable: typeof pRootRenderable === 'object' ? pRootRenderable : tmpRenderable });\n\t\t\t});\n\n\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t{\n\t\t\tthis.onBeforeProjectAsync(fNext, tmpRenderable);\n\t\t});\n\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t{\n\t\t\tthis.onProjectAsync(fNext, tmpRenderable);\n\t\t});\n\n\t\tif (tmpRenderable.RenderMethod !== 'virtual-assignment')\n\t\t{\n\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t{\n\t\t\t\tthis.onAfterProjectAsync(fNext, tmpRenderable);\n\t\t\t});\n\n\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t{\n\t\t\t\tthis.onAfterRenderAsync(fNext, tmpRenderable);\n\t\t\t});\n\t\t}\n\n\t\ttmpAnticipate.wait(tmpCallback);\n\t}\n\n\t/**\n\t * Renders the default renderable.\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\trenderDefaultAsync(fCallback)\n\t{\n\t\t// Render the default renderable\n\t\tthis.renderAsync(fCallback);\n\t}\n\n\t/**\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t */\n\tbasicRender(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress)\n\t{\n\t\treturn this.basicRenderWithScope(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress);\n\t}\n\n\t/**\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t */\n\tbasicRenderWithScope(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress)\n\t{\n\t\tlet tmpRenderOptions = this.buildRenderOptions(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress);\n\t\tif (tmpRenderOptions.Valid)\n\t\t{\n\t\t\tthis.assignRenderContent(tmpRenderOptions.Renderable, tmpRenderOptions.DestinationAddress, this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash, tmpRenderOptions.Record, null, [this], pScope, { RootRenderable: tmpRenderOptions.Renderable }));\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not perform a basic render of ${tmpRenderOptions.RenderableHash} because it is not valid.`);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|Object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t */\n\tbasicRenderAsync(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, fCallback)\n\t{\n\t\treturn this.basicRenderWithScopeAsync(this, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, fCallback);\n\t}\n\n\t/**\n\t * @param {any} pScope - The scope to use for the template rendering.\n\t * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.\n\t * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.\n\t * @param {string|Object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.\n\t * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.\n\t */\n\tbasicRenderWithScopeAsync(pScope, pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress, fCallback)\n\t{\n\t\t// Allow the callback to be passed in as the last parameter no matter what\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback :\n\t\t\t\t\t\t\t(typeof(pTemplateRecordAddress) === 'function') ? pTemplateRecordAddress :\n\t\t\t\t\t\t\t(typeof(pRenderDestinationAddress) === 'function') ? pRenderDestinationAddress :\n\t\t\t\t\t\t\t(typeof(pRenderableHash) === 'function') ? pRenderableHash :\n\t\t\t\t\t\t\tnull;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} basicRenderAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\tconst tmpRenderOptions = this.buildRenderOptions(pRenderableHash, pRenderDestinationAddress, pTemplateRecordAddress);\n\t\tif (tmpRenderOptions.Valid)\n\t\t{\n\t\t\tthis.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash, tmpRenderOptions.Record,\n\t\t\t\t/**\n\t\t\t\t * @param {Error} [pError] - The error that occurred during template parsing.\n\t\t\t\t * @param {string} [pContent] - The content that was rendered from the template.\n\t\t\t\t */\n\t\t\t\t(pError, pContent) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not render (asynchronously) ${tmpRenderOptions.RenderableHash} because it did not parse the template.`, pError);\n\t\t\t\t\t\treturn tmpCallback(pError);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.assignRenderContent(tmpRenderOptions.Renderable, tmpRenderOptions.DestinationAddress, pContent);\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}, [this], pScope, { RootRenderable: tmpRenderOptions.Renderable });\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlet tmpErrorMessage = `PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} could not perform a basic render of ${tmpRenderOptions.RenderableHash} because it is not valid.`;\n\t\t\tthis.log.error(tmpErrorMessage);\n\t\t\treturn tmpCallback(new Error(tmpErrorMessage));\n\t\t}\n\t}\n\n\t/**\n\t * @param {Renderable} pRenderable - The renderable that was rendered.\n\t */\n\tonProject(pRenderable)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onProject:`);\n\t\t}\n\t\tif (pRenderable.RenderMethod === 'virtual-assignment')\n\t\t{\n\t\t\tthis.pict.TransactionTracking.pushToTransactionQueue(pRenderable.TransactionHash, { ViewHash: this.Hash, Renderable: pRenderable }, 'Deferred-Post-Content-Assignment');\n\t\t}\n\n\t\tif (this.pict.LogNoisiness > 0)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} Assigning Renderable[${pRenderable.RenderableHash}] content length ${pRenderable.Content.length} to Destination [${pRenderable.ContentDestinationAddress}] using Async render method ${pRenderable.RenderMethod}.`);\n\t\t}\n\n\t\t// Assign the content to the destination address\n\t\tthis.pict.ContentAssignment.projectContent(pRenderable.RenderMethod, pRenderable.ContentDestinationAddress, pRenderable.Content, pRenderable.TestAddress);\n\n\t\tthis.lastRenderedTimestamp = this.pict.log.getTimeStamp();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is projected into the DOM (async flow).\n\t *\n\t * @param {(error?: Error, content?: string) => void} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that is being projected.\n\t */\n\tonProjectAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onProject(pRenderable);\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is rendered.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that was rendered.\n\t */\n\tonAfterRender(pRenderable)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterRender:`);\n\t\t}\n\t\tif (pRenderable && pRenderable.RootRenderableViewHash === this.Hash)\n\t\t{\n\t\t\tconst tmpTransactionQueue = this.pict.TransactionTracking.clearTransactionQueue(pRenderable.TransactionHash) || [];\n\t\t\tfor (const tmpEvent of tmpTransactionQueue)\n\t\t\t{\n\t\t\t\tconst tmpView = this.pict.views[tmpEvent.Data.ViewHash];\n\t\t\t\tif (!tmpView)\n\t\t\t\t{\n\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterRender: Could not find view for transaction hash ${pRenderable.TransactionHash} and ViewHash ${tmpEvent.Data.ViewHash}.`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttmpView.onAfterProject();\n\n\t\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\t\ttmpView.onAfterRender(tmpEvent.Data.Renderable);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is rendered (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that was rendered.\n\t */\n\tonAfterRenderAsync(fCallback, pRenderable)\n\t{\n\t\tthis.onAfterRender(pRenderable);\n\t\tconst tmpAnticipate = this.fable.newAnticipate();\n\t\tif (pRenderable && pRenderable.RootRenderableViewHash === this.Hash)\n\t\t{\n\t\t\tconst queue = this.pict.TransactionTracking.clearTransactionQueue(pRenderable.TransactionHash) || [];\n\t\t\tfor (const event of queue)\n\t\t\t{\n\t\t\t\t/** @type {PictView} */\n\t\t\t\tconst tmpView = this.pict.views[event.Data.ViewHash];\n\t\t\t\tif (!tmpView)\n\t\t\t\t{\n\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterRenderAsync: Could not find view for transaction hash ${pRenderable.TransactionHash} and ViewHash ${event.Data.ViewHash}.`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttmpAnticipate.anticipate(tmpView.onAfterProjectAsync.bind(tmpView));\n\t\t\t\ttmpAnticipate.anticipate((fNext) =>\n\t\t\t\t{\n\t\t\t\t\ttmpView.onAfterRenderAsync(fNext, event.Data.Renderable);\n\t\t\t\t});\n\n\t\t\t\t// Execute the developer-overridable post-render behavior\n\t\t\t}\n\t\t}\n\t\treturn tmpAnticipate.wait(fCallback);\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is projected into the DOM.\n\t *\n\t * @param {Renderable} pRenderable - The renderable that was projected.\n\t */\n\tonAfterProject(pRenderable)\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterProject:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is projected into the DOM (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t * @param {Renderable} pRenderable - The renderable that was projected.\n\t */\n\tonAfterProjectAsync(fCallback, pRenderable)\n\t{\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Solver */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before the view is solved.\n\t */\n\tonBeforeSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before the view is solved (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeSolveAsync(fCallback)\n\t{\n\t\tthis.onBeforeSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is solved.\n\t */\n\tonSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when the view is solved (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonSolveAsync(fCallback)\n\t{\n\t\tthis.onSolve();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Performs view solving and triggers lifecycle hooks.\n\t *\n\t * @return {boolean} - True if the view was solved successfully, false otherwise.\n\t */\n\tsolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} executing solve() function...`);\n\t\t}\n\t\tthis.onBeforeSolve();\n\t\tthis.onSolve();\n\t\tthis.onAfterSolve();\n\t\tthis.lastSolvedTimestamp = this.pict.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Performs view solving and triggers lifecycle hooks (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tsolveAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : null;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} solveAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeSolveAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onSolveAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterSolveAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} solveAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastSolvedTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is solved.\n\t */\n\tonAfterSolve()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterSolve:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after the view is solved (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterSolveAsync(fCallback)\n\t{\n\t\tthis.onAfterSolve();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal From View */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled from the view.\n\t *\n\t * @return {boolean} - True if the operation was successful, false otherwise.\n\t */\n\tonBeforeMarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeMarshalFromView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeMarshalFromViewAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalFromView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled from the view.\n\t */\n\tonMarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onMarshalFromView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonMarshalFromViewAsync(fCallback)\n\t{\n\n\t\tthis.onMarshalFromView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Marshals data from the view.\n\t *\n\t * @return {boolean} - True if the operation was successful, false otherwise.\n\t */\n\tmarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} executing solve() function...`);\n\t\t}\n\t\tthis.onBeforeMarshalFromView();\n\t\tthis.onMarshalFromView();\n\t\tthis.onAfterMarshalFromView();\n\t\tthis.lastMarshalFromViewTimestamp = this.pict.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Marshals data from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tmarshalFromViewAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : null;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalFromViewAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalFromViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onMarshalFromViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalFromViewAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} marshalFromViewAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalFromViewTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled from the view.\n\t */\n\tonAfterMarshalFromView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterMarshalFromView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled from the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterMarshalFromViewAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalFromView();\n\t\treturn fCallback();\n\t}\n\n\t/* -------------------------------------------------------------------------- */\n\t/* Code Section: Marshal To View */\n\t/* -------------------------------------------------------------------------- */\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled into the view.\n\t */\n\tonBeforeMarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onBeforeMarshalToView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers before data is marshaled into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonBeforeMarshalToViewAsync(fCallback)\n\t{\n\t\tthis.onBeforeMarshalToView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled into the view.\n\t */\n\tonMarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onMarshalToView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers when data is marshaled into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonMarshalToViewAsync(fCallback)\n\t{\n\t\tthis.onMarshalToView();\n\t\treturn fCallback();\n\t}\n\n\t/**\n\t * Marshals data into the view.\n\t *\n\t * @return {boolean} - True if the operation was successful, false otherwise.\n\t */\n\tmarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 2)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} executing solve() function...`);\n\t\t}\n\t\tthis.onBeforeMarshalToView();\n\t\tthis.onMarshalToView();\n\t\tthis.onAfterMarshalToView();\n\t\tthis.lastMarshalToViewTimestamp = this.pict.log.getTimeStamp();\n\t\treturn true;\n\t}\n\n\t/**\n\t * Marshals data into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tmarshalToViewAsync(fCallback)\n\t{\n\t\tlet tmpAnticipate = this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');\n\n\n\t\t/** @type {ErrorCallback} */\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : null;\n\t\tif (!tmpCallback)\n\t\t{\n\t\t\tthis.log.warn(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.`);\n\t\t\ttmpCallback = (pError) =>\n\t\t\t\t{\n\t\t\t\t\tif (pError)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.log.error(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.Name} marshalToViewAsync Auto Callback Error: ${pError}`, pError);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t}\n\t\ttmpAnticipate.anticipate(this.onBeforeMarshalToViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onMarshalToViewAsync.bind(this));\n\t\ttmpAnticipate.anticipate(this.onAfterMarshalToViewAsync.bind(this));\n\n\t\ttmpAnticipate.wait(\n\t\t\t(pError) =>\n\t\t\t{\n\t\t\t\tif (this.pict.LogNoisiness > 2)\n\t\t\t\t{\n\t\t\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} marshalToViewAsync() complete.`);\n\t\t\t\t}\n\t\t\t\tthis.lastMarshalToViewTimestamp = this.pict.log.getTimeStamp();\n\t\t\t\treturn tmpCallback(pError);\n\t\t\t});\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled into the view.\n\t */\n\tonAfterMarshalToView()\n\t{\n\t\tif (this.pict.LogNoisiness > 3)\n\t\t{\n\t\t\tthis.log.trace(`PictView [${this.UUID}]::[${this.Hash}] ${this.options.ViewIdentifier} onAfterMarshalToView:`);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Lifecycle hook that triggers after data is marshaled into the view (async flow).\n\t *\n\t * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.\n\t */\n\tonAfterMarshalToViewAsync(fCallback)\n\t{\n\t\tthis.onAfterMarshalToView();\n\t\treturn fCallback();\n\t}\n\n\t/** @return {boolean} - True if the object is a PictView. */\n\tget isPictView()\n\t{\n\t\treturn true;\n\t}\n}\n\nmodule.exports = PictView;\n","module.exports={\n\t\"Name\": \"Pict Docuserve\",\n\t\"Hash\": \"Docuserve\",\n\n\t\"MainViewportViewIdentifier\": \"Docuserve-Layout\",\n\n\t\"AutoSolveAfterInitialize\": true,\n\t\"AutoRenderMainViewportViewAfterInitialize\": false,\n\t\"AutoRenderViewsAfterInitialize\": false,\n\n\t\"pict_configuration\":\n\t\t{\n\t\t\t\"Product\": \"Docuserve-Pict-Application\"\n\t\t}\n}\n","const libPictApplication = require('pict-application');\n\n// Provider\nconst libDocumentationProvider = require('./providers/Pict-Provider-Docuserve-Documentation.js');\n\n// Views\nconst libViewLayout = require('./views/PictView-Docuserve-Layout.js');\nconst libViewTopBar = require('./views/PictView-Docuserve-TopBar.js');\nconst libViewSidebar = require('./views/PictView-Docuserve-Sidebar.js');\nconst libViewSplash = require('./views/PictView-Docuserve-Splash.js');\nconst libViewContent = require('./views/PictView-Docuserve-Content.js');\nconst libViewSearch = require('./views/PictView-Docuserve-Search.js');\n\nclass DocuserveApplication extends libPictApplication\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\t// Add the documentation provider\n\t\tthis.pict.addProvider('Docuserve-Documentation', libDocumentationProvider.default_configuration, libDocumentationProvider);\n\n\t\t// Add views\n\t\tthis.pict.addView('Docuserve-Layout', libViewLayout.default_configuration, libViewLayout);\n\t\tthis.pict.addView('Docuserve-TopBar', libViewTopBar.default_configuration, libViewTopBar);\n\t\tthis.pict.addView('Docuserve-Sidebar', libViewSidebar.default_configuration, libViewSidebar);\n\t\tthis.pict.addView('Docuserve-Splash', libViewSplash.default_configuration, libViewSplash);\n\t\tthis.pict.addView('Docuserve-Content', libViewContent.default_configuration, libViewContent);\n\t\tthis.pict.addView('Docuserve-Search', libViewSearch.default_configuration, libViewSearch);\n\t}\n\n\tonAfterInitializeAsync(fCallback)\n\t{\n\t\t// Initialize application state\n\t\tthis.pict.AppData.Docuserve =\n\t\t{\n\t\t\tCatalogLoaded: false,\n\t\t\tCatalog: null,\n\t\t\tCoverLoaded: false,\n\t\t\tCover: null,\n\t\t\tSidebarLoaded: false,\n\t\t\tSidebarGroups: [],\n\t\t\tTopBarLoaded: false,\n\t\t\tTopBar: null,\n\t\t\tErrorPageLoaded: false,\n\t\t\tErrorPageHTML: null,\n\t\t\tKeywordIndexLoaded: false,\n\t\t\tKeywordDocumentCount: 0,\n\t\t\tCurrentGroup: '',\n\t\t\tCurrentModule: '',\n\t\t\tCurrentPath: '',\n\t\t\t// Whether the sidebar is currently visible\n\t\t\tSidebarVisible: true,\n\t\t\t// Base URL for local docs (relative to where the app is served)\n\t\t\tDocsBaseURL: '',\n\t\t\t// URL for the catalog JSON\n\t\t\tCatalogURL: 'retold-catalog.json'\n\t\t};\n\n\t\t// Load the catalog, then render the layout\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\ttmpDocProvider.loadCatalog(() =>\n\t\t{\n\t\t\t// Set the page title from cover.md or _topbar.md\n\t\t\tlet tmpDocuserve = this.pict.AppData.Docuserve;\n\t\t\tif (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover && tmpDocuserve.Cover.Title)\n\t\t\t{\n\t\t\t\tdocument.title = tmpDocuserve.Cover.Title;\n\t\t\t}\n\t\t\telse if (tmpDocuserve.TopBarLoaded && tmpDocuserve.TopBar && tmpDocuserve.TopBar.Brand)\n\t\t\t{\n\t\t\t\tdocument.title = tmpDocuserve.TopBar.Brand;\n\t\t\t}\n\n\t\t\t// Render the layout shell, which triggers child view rendering\n\t\t\tthis.pict.views['Docuserve-Layout'].render();\n\n\t\t\treturn super.onAfterInitializeAsync(fCallback);\n\t\t});\n\t}\n\n\t/**\n\t * Read the current window.location.hash and dispatch to the correct handler.\n\t *\n\t * Route patterns:\n\t * #/Home -> showView('Docuserve-Splash')\n\t * #/search/<query> -> navigateToSearch(query)\n\t * #/page/<docpath> -> navigateToPage(docpath)\n\t * #/doc/<group>/<module> -> navigateToModule(group, module)\n\t * #/doc/<group>/<module>/<path> -> navigateToModulePath(group, module, path)\n\t */\n\tresolveHash()\n\t{\n\t\tlet tmpHash = (window.location.hash || '').replace(/^#\\/?/, '');\n\n\t\tif (!tmpHash || tmpHash === 'Home')\n\t\t{\n\t\t\tthis.showView('Docuserve-Splash');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpParts = tmpHash.split('/');\n\n\t\tif (tmpParts[0] === 'search')\n\t\t{\n\t\t\tlet tmpQuery = decodeURIComponent(tmpParts.slice(1).join('/'));\n\t\t\tthis.navigateToSearch(tmpQuery);\n\t\t\treturn;\n\t\t}\n\n\t\tif (tmpParts[0] === 'page' && tmpParts.length >= 2)\n\t\t{\n\t\t\t// Rejoin everything after 'page/' in case the path has slashes\n\t\t\tlet tmpDocPath = tmpParts.slice(1).join('/');\n\t\t\tthis.navigateToPage(tmpDocPath);\n\t\t\treturn;\n\t\t}\n\n\t\tif (tmpParts[0] === 'doc' && tmpParts.length >= 3)\n\t\t{\n\t\t\tlet tmpGroup = tmpParts[1];\n\t\t\tlet tmpModule = tmpParts[2];\n\t\t\tif (tmpParts.length >= 4)\n\t\t\t{\n\t\t\t\tlet tmpPath = tmpParts.slice(3).join('/');\n\t\t\t\tthis.navigateToModulePath(tmpGroup, tmpModule, tmpPath);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.navigateToModule(tmpGroup, tmpModule);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Unknown route — treat as a page\n\t\tthis.navigateToPage(tmpHash);\n\t}\n\n\t/**\n\t * Navigate to a hash route.\n\t *\n\t * Sets window.location.hash, which triggers the hashchange listener in the\n\t * layout view, which calls resolveHash() automatically.\n\t *\n\t * @param {string} pRoute - The route path (e.g. '/Home', '/page/quick-start')\n\t */\n\tnavigateTo(pRoute)\n\t{\n\t\twindow.location.hash = pRoute;\n\t}\n\n\t/**\n\t * Show a specific view in the content area.\n\t *\n\t * @param {string} pViewIdentifier - The view identifier to render\n\t */\n\tshowView(pViewIdentifier)\n\t{\n\t\tif (pViewIdentifier in this.pict.views)\n\t\t{\n\t\t\tthis.pict.AppData.Docuserve.CurrentGroup = '';\n\t\t\tthis.pict.AppData.Docuserve.CurrentModule = '';\n\t\t\tthis.pict.AppData.Docuserve.CurrentPath = '';\n\n\t\t\tthis.pict.views[pViewIdentifier].render();\n\n\t\t\t// Update sidebar to clear module nav and refresh active states\n\t\t\tthis.pict.views['Docuserve-Sidebar'].clearModuleNav();\n\t\t\tthis.pict.views['Docuserve-Sidebar'].renderSidebarGroups();\n\t\t}\n\t}\n\n\t/**\n\t * Navigate to a module's documentation.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t */\n\tnavigateToModule(pGroup, pModule)\n\t{\n\t\tthis.navigateToModulePath(pGroup, pModule, 'README.md');\n\t}\n\n\t/**\n\t * Navigate to a specific path within a module's documentation.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t * @param {string} pPath - The document path\n\t */\n\tnavigateToModulePath(pGroup, pModule, pPath)\n\t{\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpContentView = this.pict.views['Docuserve-Content'];\n\t\tlet tmpSidebarView = this.pict.views['Docuserve-Sidebar'];\n\n\t\t// Update current navigation state\n\t\tthis.pict.AppData.Docuserve.CurrentGroup = pGroup;\n\t\tthis.pict.AppData.Docuserve.CurrentModule = pModule;\n\t\tthis.pict.AppData.Docuserve.CurrentPath = pPath;\n\n\t\t// Render the content view shell and show loading\n\t\ttmpContentView.render();\n\t\ttmpContentView.showLoading();\n\n\t\t// Update sidebar to show active module and module-specific nav\n\t\ttmpSidebarView.renderSidebarGroups();\n\t\ttmpSidebarView.renderModuleNav(pGroup, pModule);\n\n\t\t// Resolve the document URL and fetch it\n\t\tlet tmpURL = tmpDocProvider.resolveDocumentURL(pGroup, pModule, pPath || 'README.md');\n\n\t\tif (!tmpURL)\n\t\t{\n\t\t\ttmpContentView.displayContent(tmpDocProvider.getErrorPageHTML(pGroup + '/' + pModule));\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpDocPath = pPath || 'README.md';\n\t\ttmpDocProvider.fetchDocument(tmpURL, (pError, pHTML) =>\n\t\t{\n\t\t\tif (!pError)\n\t\t\t{\n\t\t\t\ttmpContentView.displayContent(pHTML);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Remote fetch failed — try a local fallback using the\n\t\t\t// group/module/path as a relative path. This handles cases\n\t\t\t// where the catalog contains entries (e.g. example apps)\n\t\t\t// that don't correspond to real GitHub repositories.\n\t\t\tlet tmpLocalPath = pGroup + '/' + pModule + '/' + tmpDocPath;\n\t\t\ttmpDocProvider.fetchLocalDocument(tmpLocalPath, (pLocalError, pLocalHTML) =>\n\t\t\t{\n\t\t\t\ttmpContentView.displayContent(pLocalHTML);\n\t\t\t}, pGroup, pModule, tmpDocPath);\n\t\t}, pGroup, pModule, tmpDocPath);\n\t}\n\n\t/**\n\t * Navigate to a local documentation page (e.g. architecture.md).\n\t *\n\t * @param {string} pDocPath - The doc path without extension\n\t */\n\tnavigateToPage(pDocPath)\n\t{\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpContentView = this.pict.views['Docuserve-Content'];\n\t\tlet tmpSidebarView = this.pict.views['Docuserve-Sidebar'];\n\n\t\t// Update state\n\t\tthis.pict.AppData.Docuserve.CurrentGroup = '';\n\t\tthis.pict.AppData.Docuserve.CurrentModule = '';\n\t\tthis.pict.AppData.Docuserve.CurrentPath = pDocPath;\n\n\t\t// Render the content view shell and show loading\n\t\ttmpContentView.render();\n\t\ttmpContentView.showLoading();\n\n\t\t// Clear module-specific sidebar nav\n\t\ttmpSidebarView.clearModuleNav();\n\t\ttmpSidebarView.renderSidebarGroups();\n\n\t\t// Fetch the local document\n\t\tlet tmpPath = pDocPath;\n\t\tif (!tmpPath.match(/\\.md$/))\n\t\t{\n\t\t\ttmpPath = tmpPath + '.md';\n\t\t}\n\n\t\ttmpDocProvider.fetchLocalDocument(tmpPath, (pError, pHTML) =>\n\t\t{\n\t\t\t// fetchDocument always provides displayable HTML in pHTML,\n\t\t\t// even on error, so we can use it directly.\n\t\t\ttmpContentView.displayContent(pHTML);\n\t\t});\n\t}\n\n\t/**\n\t * Navigate to the search page with an optional query.\n\t *\n\t * @param {string} pQuery - The search query (may be empty for blank search page)\n\t */\n\tnavigateToSearch(pQuery)\n\t{\n\t\tlet tmpSidebarView = this.pict.views['Docuserve-Sidebar'];\n\t\tlet tmpSearchView = this.pict.views['Docuserve-Search'];\n\n\t\t// Update state\n\t\tthis.pict.AppData.Docuserve.CurrentGroup = '';\n\t\tthis.pict.AppData.Docuserve.CurrentModule = '';\n\t\tthis.pict.AppData.Docuserve.CurrentPath = '';\n\n\t\t// Clear module-specific sidebar nav\n\t\ttmpSidebarView.clearModuleNav();\n\t\ttmpSidebarView.renderSidebarGroups();\n\n\t\t// Render the search view with the query\n\t\ttmpSearchView.render();\n\t\ttmpSearchView.showSearch(pQuery || '');\n\t}\n}\n\nmodule.exports = DocuserveApplication;\n\nmodule.exports.default_configuration = require('./Pict-Application-Docuserve-Configuration.json');\n","const libPictProvider = require('pict-provider');\nconst libLunr = require('lunr');\n\n/**\n * Documentation Provider for Docuserve\n *\n * Loads the Indoctrinate-generated catalog and keyword index,\n * fetches markdown documents from local paths or raw GitHub URLs,\n * and parses them into HTML for rendering.\n */\nclass DocuserveDocumentationProvider extends libPictProvider\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\tthis._Catalog = null;\n\t\tthis._ContentCache = {};\n\t}\n\n\t/**\n\t * Load all documentation data sources: catalog, cover.md, _sidebar.md.\n\t *\n\t * Loads the catalog first (it provides the fallback data), then attempts\n\t * to load cover.md and _sidebar.md in parallel. If those markdown files\n\t * exist they drive the splash and sidebar views; otherwise the catalog\n\t * data is used as a fallback.\n\t *\n\t * @param {Function} fCallback - Callback when all loading is complete\n\t */\n\tloadCatalog(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\n\t\tlet tmpCatalogURL = this.pict.AppData.Docuserve.CatalogURL || 'retold-catalog.json';\n\n\t\tfetch(tmpCatalogURL)\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\tthis.log.warn(`Docuserve: Could not load catalog from [${tmpCatalogURL}].`);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.json();\n\t\t\t})\n\t\t\t.then((pCatalog) =>\n\t\t\t{\n\t\t\t\tif (pCatalog)\n\t\t\t\t{\n\t\t\t\t\tthis._Catalog = pCatalog;\n\t\t\t\t\tthis.pict.AppData.Docuserve.Catalog = pCatalog;\n\t\t\t\t\tthis.pict.AppData.Docuserve.CatalogLoaded = true;\n\n\t\t\t\t\t// Build sidebar navigation data from the catalog as default\n\t\t\t\t\tthis.buildSidebarData(pCatalog);\n\t\t\t\t}\n\n\t\t\t\t// Now try to load cover.md, _sidebar.md, _topbar.md, errorpage.md, and keyword index in parallel\n\t\t\t\tlet tmpPending = 5;\n\t\t\t\tlet tmpFinish = () =>\n\t\t\t\t{\n\t\t\t\t\ttmpPending--;\n\t\t\t\t\tif (tmpPending <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn tmpCallback();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.loadCover(tmpFinish);\n\t\t\t\tthis.loadSidebar(tmpFinish);\n\t\t\t\tthis.loadTopbar(tmpFinish);\n\t\t\t\tthis.loadErrorPage(tmpFinish);\n\t\t\t\tthis.loadKeywordIndex(tmpFinish);\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading catalog: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Fetch and parse cover.md into structured data for the splash view.\n\t *\n\t * The expected cover.md format follows the docsify convention:\n\t * # Title\n\t * > Tagline\n\t * Description paragraph text.\n\t * - **Group** — description\n\t * [Link Text](url)\n\t *\n\t * Parsed result stored in this.pict.AppData.Docuserve.Cover:\n\t * { Title, Tagline, Description, Highlights: [{Label, Text}], Actions: [{Text, Href}] }\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadCover(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + 'cover.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No cover.md found; splash will use catalog data.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tthis.pict.AppData.Docuserve.Cover = this.parseCover(pMarkdown);\n\t\t\t\tthis.pict.AppData.Docuserve.CoverLoaded = true;\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading cover.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Parse cover.md markdown text into a structured object.\n\t *\n\t * @param {string} pMarkdown - Raw cover.md content\n\t * @returns {Object} Parsed cover data\n\t */\n\tparseCover(pMarkdown)\n\t{\n\t\tlet tmpCover = {\n\t\t\tTitle: '',\n\t\t\tTagline: '',\n\t\t\tDescription: '',\n\t\t\tHighlights: [],\n\t\t\tActions: []\n\t\t};\n\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i].trim();\n\n\t\t\tif (!tmpLine)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Heading — the title\n\t\t\tlet tmpHeadingMatch = tmpLine.match(/^#+\\s+(.+)/);\n\t\t\tif (tmpHeadingMatch)\n\t\t\t{\n\t\t\t\ttmpCover.Title = tmpHeadingMatch[1].trim();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Blockquote — the tagline\n\t\t\tlet tmpBlockquoteMatch = tmpLine.match(/^>\\s*(.*)/);\n\t\t\tif (tmpBlockquoteMatch)\n\t\t\t{\n\t\t\t\ttmpCover.Tagline = tmpBlockquoteMatch[1].trim();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bullet list — highlights (e.g. \"- **Fable** — Core ecosystem, DI, config\")\n\t\t\tlet tmpBulletMatch = tmpLine.match(/^[-*+]\\s+(.*)/);\n\t\t\tif (tmpBulletMatch)\n\t\t\t{\n\t\t\t\tlet tmpBulletContent = tmpBulletMatch[1];\n\t\t\t\t// Try to split on bold label: **Label** — rest\n\t\t\t\tlet tmpLabelMatch = tmpBulletContent.match(/^\\*\\*([^*]+)\\*\\*\\s*[-—:]\\s*(.*)/);\n\t\t\t\tif (tmpLabelMatch)\n\t\t\t\t{\n\t\t\t\t\ttmpCover.Highlights.push({ Label: tmpLabelMatch[1].trim(), Text: tmpLabelMatch[2].trim() });\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmpCover.Highlights.push({ Label: '', Text: tmpBulletContent.trim() });\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bare link — action button (e.g. \"[Get Started](getting-started.md)\")\n\t\t\tlet tmpLinkMatch = tmpLine.match(/^\\[([^\\]]+)\\]\\(([^)]+)\\)\\s*$/);\n\t\t\tif (tmpLinkMatch)\n\t\t\t{\n\t\t\t\ttmpCover.Actions.push({ Text: tmpLinkMatch[1].trim(), Href: tmpLinkMatch[2].trim() });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Otherwise it's description text\n\t\t\tif (!tmpCover.Description)\n\t\t\t{\n\t\t\t\ttmpCover.Description = tmpLine;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmpCover.Description += ' ' + tmpLine;\n\t\t\t}\n\t\t}\n\n\t\treturn tmpCover;\n\t}\n\n\t/**\n\t * Fetch and parse _sidebar.md into structured navigation data.\n\t *\n\t * The expected _sidebar.md format follows the docsify convention:\n\t * - [Home](/)\n\t * - Group Title\n\t * - [module-name](/group/module/)\n\t * - [Group Title](group.md)\n\t * - [module-name](/group/module/)\n\t *\n\t * If _sidebar.md is successfully loaded and parsed, its data replaces\n\t * the catalog-inferred SidebarGroups in AppData.\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadSidebar(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + '_sidebar.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No _sidebar.md found; sidebar will use catalog data.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tlet tmpSidebarData = this.parseSidebarMarkdown(pMarkdown);\n\t\t\t\tif (tmpSidebarData && tmpSidebarData.length > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.pict.AppData.Docuserve.SidebarGroups = tmpSidebarData;\n\t\t\t\t\tthis.pict.AppData.Docuserve.SidebarLoaded = true;\n\t\t\t\t}\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading _sidebar.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Fetch and parse _topbar.md into structured data for the top bar view.\n\t *\n\t * The expected _topbar.md format:\n\t * # Brand Name\n\t * - [Link Text](url)\n\t * - [Link Text](url)\n\t *\n\t * The heading becomes the brand/title shown on the left. List items become\n\t * navigation links. External links (starting with http) render on the\n\t * right side; internal links render in the centre nav area.\n\t *\n\t * Parsed result stored in this.pict.AppData.Docuserve.TopBar:\n\t * { Brand, NavLinks: [{Text, Href, External}], ExternalLinks: [{Text, Href}] }\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadTopbar(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + '_topbar.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No _topbar.md found; top bar will use defaults.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tthis.pict.AppData.Docuserve.TopBar = this.parseTopbar(pMarkdown);\n\t\t\t\tthis.pict.AppData.Docuserve.TopBarLoaded = true;\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading _topbar.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Parse _topbar.md markdown text into a structured object.\n\t *\n\t * @param {string} pMarkdown - Raw _topbar.md content\n\t * @returns {Object} Parsed top bar data { Brand, NavLinks, ExternalLinks }\n\t */\n\tparseTopbar(pMarkdown)\n\t{\n\t\tlet tmpTopBar = {\n\t\t\tBrand: '',\n\t\t\tNavLinks: [],\n\t\t\tExternalLinks: []\n\t\t};\n\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i].trim();\n\n\t\t\tif (!tmpLine)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Heading — the brand name\n\t\t\tlet tmpHeadingMatch = tmpLine.match(/^#+\\s+(.+)/);\n\t\t\tif (tmpHeadingMatch)\n\t\t\t{\n\t\t\t\ttmpTopBar.Brand = tmpHeadingMatch[1].trim();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bullet list item with link\n\t\t\tlet tmpBulletMatch = tmpLine.match(/^[-*+]\\s+(.*)/);\n\t\t\tif (tmpBulletMatch)\n\t\t\t{\n\t\t\t\tlet tmpContent = tmpBulletMatch[1].trim();\n\t\t\t\tlet tmpLinkMatch = tmpContent.match(/^\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n\n\t\t\t\tif (tmpLinkMatch)\n\t\t\t\t{\n\t\t\t\t\tlet tmpText = tmpLinkMatch[1].trim();\n\t\t\t\t\tlet tmpHref = tmpLinkMatch[2].trim();\n\n\t\t\t\t\t// External links (http/https) go to the right side\n\t\t\t\t\tif (tmpHref.match(/^https?:\\/\\//))\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpTopBar.ExternalLinks.push({ Text: tmpText, Href: tmpHref });\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Internal link — convert to hash route\n\t\t\t\t\t\tlet tmpRoute = this.convertSidebarLink(tmpHref);\n\t\t\t\t\t\ttmpTopBar.NavLinks.push({ Text: tmpText, Href: tmpRoute });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn tmpTopBar;\n\t}\n\n\t/**\n\t * Fetch and parse errorpage.md into HTML for use as a custom error page.\n\t *\n\t * The errorpage.md is a standard markdown file. If it contains the\n\t * placeholder `{{path}}` anywhere in its source, that token will be\n\t * replaced with the actual requested path at display time (via\n\t * getErrorPageHTML).\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadErrorPage(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + 'errorpage.md')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No errorpage.md found; errors will use default page.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\tthis.pict.AppData.Docuserve.ErrorPageHTML = this.parseMarkdown(pMarkdown);\n\t\t\t\tthis.pict.AppData.Docuserve.ErrorPageLoaded = true;\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading errorpage.md: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Load the keyword search index (retold-keyword-index.json).\n\t *\n\t * If the index file exists, hydrates a lunr.Index for client-side search\n\t * and stores the document metadata map. If the file is not found, search\n\t * features will simply not appear in the UI.\n\t *\n\t * @param {Function} fCallback - Callback when done\n\t */\n\tloadKeywordIndex(fCallback)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\n\t\tfetch(tmpDocsBase + 'retold-keyword-index.json')\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.json();\n\t\t\t})\n\t\t\t.then((pIndexData) =>\n\t\t\t{\n\t\t\t\tif (!pIndexData || !pIndexData.LunrIndex || !pIndexData.Documents)\n\t\t\t\t{\n\t\t\t\t\tthis.log.info('Docuserve: No keyword index found; search will be unavailable.');\n\t\t\t\t\treturn tmpCallback();\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tthis._LunrIndex = libLunr.Index.load(pIndexData.LunrIndex);\n\t\t\t\t\tthis._KeywordDocuments = pIndexData.Documents;\n\t\t\t\t\tthis.pict.AppData.Docuserve.KeywordIndexLoaded = true;\n\t\t\t\t\tthis.pict.AppData.Docuserve.KeywordDocumentCount = pIndexData.DocumentCount || 0;\n\t\t\t\t\tthis.log.info(`Docuserve: Keyword index loaded (${pIndexData.DocumentCount || 0} documents).`);\n\t\t\t\t}\n\t\t\t\tcatch (pError)\n\t\t\t\t{\n\t\t\t\t\tthis.log.warn(`Docuserve: Error hydrating lunr index: ${pError}`);\n\t\t\t\t}\n\n\t\t\t\treturn tmpCallback();\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error loading keyword index: ${pError}`);\n\t\t\t\treturn tmpCallback();\n\t\t\t});\n\t}\n\n\t/**\n\t * Check whether a group/module pair exists in the loaded catalog.\n\t *\n\t * Used by search() to decide whether a result should route to\n\t * #/doc/ (catalog module → GitHub raw URL) or #/page/ (local doc).\n\t *\n\t * @param {string} pGroup - The group key (e.g. \"fable\")\n\t * @param {string} pModule - The module name (e.g. \"fable\")\n\t * @returns {boolean} True if the module is found in the catalog\n\t */\n\tisModuleInCatalog(pGroup, pModule)\n\t{\n\t\tif (!this._Catalog || !this._Catalog.Groups)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = this._Catalog.Groups[i];\n\t\t\tif (tmpGroup.Key !== pGroup)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.Name === pModule)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Check whether a group key exists in the loaded catalog.\n\t *\n\t * Used to dynamically validate group keys instead of hardcoding them.\n\t *\n\t * @param {string} pGroupKey - The group key (e.g. \"fable\", \"example_applications\")\n\t * @returns {boolean} True if the group is found in the catalog\n\t */\n\tisGroupInCatalog(pGroupKey)\n\t{\n\t\tif (!this._Catalog || !this._Catalog.Groups)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tif (this._Catalog.Groups[i].Key === pGroupKey)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Search the keyword index for documents matching a query.\n\t *\n\t * Returns an array of result objects sorted by relevance:\n\t * [{ Key, Title, Group, Module, DocPath, Score, Route }]\n\t *\n\t * @param {string} pQuery - The search query\n\t * @returns {Array} Search results (empty if no index or no matches)\n\t */\n\tsearch(pQuery)\n\t{\n\t\tif (!this._LunrIndex || !this._KeywordDocuments || !pQuery || !pQuery.trim())\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tmpResults = [];\n\n\t\ttry\n\t\t{\n\t\t\tlet tmpLunrResults = this._LunrIndex.search(pQuery);\n\n\t\t\tfor (let i = 0; i < tmpLunrResults.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpRef = tmpLunrResults[i].ref;\n\t\t\t\tlet tmpScore = tmpLunrResults[i].score;\n\t\t\t\tlet tmpDoc = this._KeywordDocuments[tmpRef];\n\n\t\t\t\tif (!tmpDoc)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Build the hash route from the document key (group/module/docpath)\n\t\t\t\tlet tmpParts = tmpRef.split('/');\n\t\t\t\tlet tmpRoute = '';\n\t\t\t\tif (tmpParts.length >= 2)\n\t\t\t\t{\n\t\t\t\t\t// Check whether this group/module exists in the catalog.\n\t\t\t\t\t// If it does, route to #/doc/ which fetches from GitHub.\n\t\t\t\t\t// If not, fall back to #/page/ which fetches locally.\n\t\t\t\t\tlet tmpGroup = tmpParts[0];\n\t\t\t\t\tlet tmpModule = tmpParts[1];\n\n\t\t\t\t\tif (this.isModuleInCatalog(tmpGroup, tmpModule))\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpRoute = '#/doc/' + tmpRef;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Local document — route via #/page/ using the full ref path\n\t\t\t\t\t\ttmpRoute = '#/page/' + tmpRef;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttmpResults.push({\n\t\t\t\t\tKey: tmpRef,\n\t\t\t\t\tTitle: tmpDoc.Title || tmpRef,\n\t\t\t\t\tGroup: tmpDoc.Group || '',\n\t\t\t\t\tModule: tmpDoc.Module || '',\n\t\t\t\t\tDocPath: tmpDoc.DocPath || '',\n\t\t\t\t\tScore: tmpScore,\n\t\t\t\t\tRoute: tmpRoute\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tcatch (pError)\n\t\t{\n\t\t\tthis.log.warn(`Docuserve: Search error: ${pError}`);\n\t\t}\n\n\t\treturn tmpResults;\n\t}\n\n\t/**\n\t * Get the error page HTML for a given requested path.\n\t *\n\t * If a custom errorpage.md was loaded, its parsed HTML is returned with\n\t * the `{{path}}` placeholder replaced by the actual requested path.\n\t * Otherwise a default not-found HTML block is returned.\n\t *\n\t * @param {string} pRequestedPath - The path that was not found\n\t * @returns {string} HTML to display\n\t */\n\tgetErrorPageHTML(pRequestedPath)\n\t{\n\t\tlet tmpPath = pRequestedPath || 'unknown';\n\n\t\tif (this.pict.AppData.Docuserve.ErrorPageLoaded && this.pict.AppData.Docuserve.ErrorPageHTML)\n\t\t{\n\t\t\t// Replace the {{path}} placeholder with the actual requested path\n\t\t\treturn this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\\{\\{path\\}\\}/g, this.escapeHTML(tmpPath));\n\t\t}\n\n\t\t// Default fallback\n\t\treturn '<div class=\"docuserve-not-found\">'\n\t\t\t+ '<h2>Page Not Found</h2>'\n\t\t\t+ '<p>The document <code>' + this.escapeHTML(tmpPath) + '</code> could not be loaded.</p>'\n\t\t\t+ '<p><a href=\"#/Home\">Return to the home page</a></p>'\n\t\t\t+ '</div>';\n\t}\n\n\t/**\n\t * Parse _sidebar.md into the SidebarGroups format the sidebar view consumes.\n\t *\n\t * Returns an array of group objects:\n\t * [{ Name, Key, Route, Modules: [{ Name, HasDocs, Group, Route }] }]\n\t *\n\t * Top-level items (no indent) become groups. Indented child items become\n\t * modules within the preceding group. The special \"Home\" entry is stored\n\t * as a group with no modules.\n\t *\n\t * @param {string} pMarkdown - Raw _sidebar.md content\n\t * @returns {Array} Parsed sidebar groups\n\t */\n\tparseSidebarMarkdown(pMarkdown)\n\t{\n\t\tlet tmpGroups = [];\n\t\tlet tmpCurrentGroup = null;\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i];\n\n\t\t\tif (!tmpLine.trim())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Detect indent level: child items have 2+ leading spaces\n\t\t\tlet tmpIndentMatch = tmpLine.match(/^(\\s*)/);\n\t\t\tlet tmpIndent = tmpIndentMatch ? tmpIndentMatch[1].length : 0;\n\t\t\tlet tmpContent = tmpLine.trim();\n\n\t\t\t// Must start with a list marker\n\t\t\tlet tmpListMatch = tmpContent.match(/^[-*+]\\s+(.*)/);\n\t\t\tif (!tmpListMatch)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet tmpItemContent = tmpListMatch[1].trim();\n\n\t\t\t// Parse link if present: [Text](href)\n\t\t\tlet tmpLinkMatch = tmpItemContent.match(/^\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n\n\t\t\tif (tmpIndent < 2)\n\t\t\t{\n\t\t\t\t// Top-level item — this is a group header or standalone link\n\t\t\t\tif (tmpLinkMatch)\n\t\t\t\t{\n\t\t\t\t\tlet tmpName = tmpLinkMatch[1].trim();\n\t\t\t\t\tlet tmpHref = tmpLinkMatch[2].trim();\n\n\t\t\t\t\t// Derive a group key from the href or name\n\t\t\t\t\tlet tmpKey = this.deriveGroupKey(tmpName, tmpHref);\n\t\t\t\t\tlet tmpRoute = this.convertSidebarLink(tmpHref);\n\n\t\t\t\t\ttmpCurrentGroup = {\n\t\t\t\t\t\tName: tmpName,\n\t\t\t\t\t\tKey: tmpKey,\n\t\t\t\t\t\tRoute: tmpRoute,\n\t\t\t\t\t\tModules: []\n\t\t\t\t\t};\n\t\t\t\t\ttmpGroups.push(tmpCurrentGroup);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Plain text group header (no link)\n\t\t\t\t\tlet tmpName = tmpItemContent;\n\t\t\t\t\tlet tmpKey = tmpName.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');\n\n\t\t\t\t\ttmpCurrentGroup = {\n\t\t\t\t\t\tName: tmpName,\n\t\t\t\t\t\tKey: tmpKey,\n\t\t\t\t\t\tRoute: '',\n\t\t\t\t\t\tModules: []\n\t\t\t\t\t};\n\t\t\t\t\ttmpGroups.push(tmpCurrentGroup);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tmpCurrentGroup)\n\t\t\t{\n\t\t\t\t// Indented item — this is a module within the current group\n\t\t\t\tif (tmpLinkMatch)\n\t\t\t\t{\n\t\t\t\t\tlet tmpModuleName = tmpLinkMatch[1].trim();\n\t\t\t\t\tlet tmpModuleHref = tmpLinkMatch[2].trim();\n\t\t\t\t\tlet tmpModuleRoute = this.convertSidebarLink(tmpModuleHref);\n\n\t\t\t\t\ttmpCurrentGroup.Modules.push({\n\t\t\t\t\t\tName: tmpModuleName,\n\t\t\t\t\t\tHasDocs: true,\n\t\t\t\t\t\tGroup: tmpCurrentGroup.Key,\n\t\t\t\t\t\tRoute: tmpModuleRoute\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Plain text child entry (no docs link)\n\t\t\t\t\ttmpCurrentGroup.Modules.push({\n\t\t\t\t\t\tName: tmpItemContent,\n\t\t\t\t\t\tHasDocs: false,\n\t\t\t\t\t\tGroup: tmpCurrentGroup.Key,\n\t\t\t\t\t\tRoute: ''\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn tmpGroups;\n\t}\n\n\t/**\n\t * Convert a docsify-style sidebar link href into a docuserve hash route.\n\t *\n\t * Handles these forms:\n\t * / -> #/Home\n\t * /group/module/ -> #/doc/group/module\n\t * /group/module/path.md -> #/doc/group/module/path.md\n\t * something.md -> #/page/something\n\t *\n\t * @param {string} pHref - The original sidebar link href\n\t * @returns {string} The converted hash route\n\t */\n\tconvertSidebarLink(pHref)\n\t{\n\t\tif (!pHref)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Root home link\n\t\tif (pHref === '/')\n\t\t{\n\t\t\treturn '#/Home';\n\t\t}\n\n\t\t// Strip leading/trailing slashes for parsing\n\t\tlet tmpPath = pHref.replace(/^\\//, '').replace(/\\/$/, '');\n\n\t\tif (!tmpPath)\n\t\t{\n\t\t\treturn '#/Home';\n\t\t}\n\n\t\tlet tmpParts = tmpPath.split('/');\n\n\t\t// Check if it's a module path (group/module)\n\t\tif (tmpParts.length >= 2)\n\t\t{\n\t\t\tif (this.isGroupInCatalog(tmpParts[0]))\n\t\t\t{\n\t\t\t\treturn '#/doc/' + tmpPath;\n\t\t\t}\n\t\t}\n\n\t\t// Local page reference\n\t\tif (tmpPath.match(/\\.md$/))\n\t\t{\n\t\t\treturn '#/page/' + tmpPath.replace(/\\.md$/, '');\n\t\t}\n\n\t\treturn '#/page/' + tmpPath;\n\t}\n\n\t/**\n\t * Derive a short group key from a sidebar group name or href.\n\t *\n\t * @param {string} pName - The display name (e.g. \"Fable — Core Ecosystem\")\n\t * @param {string} pHref - The link href (e.g. \"fable.md\")\n\t * @returns {string} A short key (e.g. \"fable\")\n\t */\n\tderiveGroupKey(pName, pHref)\n\t{\n\t\t// Try href first — \"fable.md\" -> \"fable\"\n\t\tif (pHref && pHref !== '/')\n\t\t{\n\t\t\tlet tmpFromHref = pHref.replace(/^\\//, '').replace(/\\.md$/, '').replace(/\\/$/, '');\n\t\t\tif (tmpFromHref && !tmpFromHref.includes('/'))\n\t\t\t{\n\t\t\t\treturn tmpFromHref.toLowerCase();\n\t\t\t}\n\t\t}\n\n\t\t// Fall back to first word of name lowercased\n\t\tlet tmpFirstWord = pName.split(/[\\s—\\-:]+/)[0];\n\t\treturn tmpFirstWord.toLowerCase().replace(/[^a-z0-9]/g, '');\n\t}\n\n\t/**\n\t * Build structured sidebar data from the catalog for the sidebar view.\n\t *\n\t * @param {Object} pCatalog - The parsed retold-catalog.json\n\t */\n\tbuildSidebarData(pCatalog)\n\t{\n\t\tlet tmpSidebarGroups = [];\n\n\t\tfor (let i = 0; i < pCatalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = pCatalog.Groups[i];\n\t\t\tlet tmpGroupEntry = {\n\t\t\t\tName: tmpGroup.Name,\n\t\t\t\tKey: tmpGroup.Key,\n\t\t\t\tDescription: tmpGroup.Description,\n\t\t\t\tModules: []\n\t\t\t};\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\ttmpGroupEntry.Modules.push({\n\t\t\t\t\tName: tmpModule.Name,\n\t\t\t\t\tHasDocs: tmpModule.HasDocs,\n\t\t\t\t\tGroup: tmpGroup.Key,\n\t\t\t\t\tRoute: '#/doc/' + tmpGroup.Key + '/' + tmpModule.Name\n\t\t\t\t});\n\t\t\t}\n\n\t\t\ttmpSidebarGroups.push(tmpGroupEntry);\n\t\t}\n\n\t\tthis.pict.AppData.Docuserve.SidebarGroups = tmpSidebarGroups;\n\t}\n\n\t/**\n\t * Resolve a document URL from group/module/path to a fetchable URL.\n\t *\n\t * @param {string} pGroup - The group key (e.g. 'fable')\n\t * @param {string} pModule - The module name (e.g. 'fable')\n\t * @param {string} pPath - The document path within the module docs (e.g. 'README.md')\n\t * @returns {string} The resolved URL\n\t */\n\tresolveDocumentURL(pGroup, pModule, pPath)\n\t{\n\t\tif (!this._Catalog)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tlet tmpOrg = this._Catalog.GitHubOrg || 'stevenvelozo';\n\t\tlet tmpDefaultBranch = this._Catalog.DefaultBranch || 'master';\n\n\t\t// Find the module in the catalog\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = this._Catalog.Groups[i];\n\t\t\tif (tmpGroup.Key !== pGroup)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.Name !== pModule)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet tmpBranch = tmpModule.Branch || tmpDefaultBranch;\n\t\t\t\tlet tmpDocPath = pPath || 'README.md';\n\t\t\t\treturn 'https://raw.githubusercontent.com/' + tmpOrg + '/' + tmpModule.Repo + '/' + tmpBranch + '/docs/' + tmpDocPath;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Get the module-specific sidebar entries for a given group/module.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t * @returns {Array|null} The sidebar entries or null\n\t */\n\tgetModuleSidebar(pGroup, pModule)\n\t{\n\t\tif (!this._Catalog)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = 0; i < this._Catalog.Groups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = this._Catalog.Groups[i];\n\t\t\tif (tmpGroup.Key !== pGroup)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.Name !== pModule)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treturn tmpModule.Sidebar || null;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Fetch a markdown document and convert it to HTML.\n\t *\n\t * @param {string} pURL - The URL to fetch\n\t * @param {Function} fCallback - Callback receiving (error, htmlContent)\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t */\n\tfetchDocument(pURL, fCallback, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tlet tmpCallback = (typeof(fCallback) === 'function') ? fCallback : () => {};\n\n\t\tif (!pURL)\n\t\t{\n\t\t\treturn tmpCallback('No URL provided', '');\n\t\t}\n\n\t\t// Check cache\n\t\tif (this._ContentCache[pURL])\n\t\t{\n\t\t\treturn tmpCallback(null, this._ContentCache[pURL]);\n\t\t}\n\n\t\tfetch(pURL)\n\t\t\t.then((pResponse) =>\n\t\t\t{\n\t\t\t\tif (!pResponse.ok)\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn pResponse.text();\n\t\t\t})\n\t\t\t.then((pMarkdown) =>\n\t\t\t{\n\t\t\t\tif (!pMarkdown)\n\t\t\t\t{\n\t\t\t\t\treturn tmpCallback('Document not found', this.getErrorPageHTML(pURL));\n\t\t\t\t}\n\n\t\t\t\tlet tmpHTML = this.parseMarkdown(pMarkdown, pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t\t\t\tthis._ContentCache[pURL] = tmpHTML;\n\t\t\t\treturn tmpCallback(null, tmpHTML);\n\t\t\t})\n\t\t\t.catch((pError) =>\n\t\t\t{\n\t\t\t\tthis.log.warn(`Docuserve: Error fetching document [${pURL}]: ${pError}`);\n\t\t\t\treturn tmpCallback(pError, this.getErrorPageHTML(pURL));\n\t\t\t});\n\t}\n\n\t/**\n\t * Fetch a local document relative to the docs folder.\n\t *\n\t * @param {string} pPath - The relative path (e.g. 'architecture.md')\n\t * @param {Function} fCallback - Callback receiving (error, htmlContent)\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t */\n\tfetchLocalDocument(pPath, fCallback, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tlet tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';\n\t\tlet tmpURL = tmpDocsBase + pPath;\n\t\tthis.fetchDocument(tmpURL, fCallback, pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t}\n\n\t/**\n\t * Parse a markdown string into HTML.\n\t *\n\t * This is a basic markdown parser that handles the most common constructs:\n\t * headings, paragraphs, code blocks, inline code, links, bold, italic,\n\t * lists, blockquotes, and horizontal rules.\n\t *\n\t * @param {string} pMarkdown - The raw markdown text\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t * @returns {string} The parsed HTML\n\t */\n\tparseMarkdown(pMarkdown, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tif (!pMarkdown)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tlet tmpLines = pMarkdown.split('\\n');\n\t\tlet tmpHTML = [];\n\t\tlet tmpInCodeBlock = false;\n\t\tlet tmpCodeFenceLength = 0;\n\t\tlet tmpCodeLang = '';\n\t\tlet tmpCodeLines = [];\n\t\tlet tmpInList = false;\n\t\tlet tmpListType = '';\n\t\tlet tmpInBlockquote = false;\n\t\tlet tmpBlockquoteLines = [];\n\t\tlet tmpInMathBlock = false;\n\t\tlet tmpMathLines = [];\n\n\t\tfor (let i = 0; i < tmpLines.length; i++)\n\t\t{\n\t\t\tlet tmpLine = tmpLines[i];\n\n\t\t\t// Display math blocks ($$...$$) — skip if inside a code block\n\t\t\tif (!tmpInCodeBlock && tmpLine.trim().match(/^\\$\\$/))\n\t\t\t{\n\t\t\t\tif (tmpInMathBlock)\n\t\t\t\t{\n\t\t\t\t\t// End math block\n\t\t\t\t\ttmpHTML.push('<div class=\"docuserve-katex-display\">' + tmpMathLines.join('\\n') + '</div>');\n\t\t\t\t\ttmpInMathBlock = false;\n\t\t\t\t\ttmpMathLines = [];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Close any open list or blockquote\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t\ttmpInList = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (tmpInBlockquote)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t\t\t\t\ttmpInBlockquote = false;\n\t\t\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t\t\t}\n\t\t\t\t\ttmpInMathBlock = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (tmpInMathBlock)\n\t\t\t{\n\t\t\t\ttmpMathLines.push(tmpLine);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Code blocks (fenced) — track fence length so ````x```` nests around ```y```\n\t\t\tlet tmpFenceMatch = tmpLine.match(/^(`{3,})/);\n\t\t\tif (tmpFenceMatch)\n\t\t\t{\n\t\t\t\tlet tmpFenceLen = tmpFenceMatch[1].length;\n\n\t\t\t\tif (tmpInCodeBlock)\n\t\t\t\t{\n\t\t\t\t\t// Only close if the closing fence is at least as long as the opening\n\t\t\t\t\tif (tmpFenceLen >= tmpCodeFenceLength && tmpLine.trim() === tmpFenceMatch[1])\n\t\t\t\t\t{\n\t\t\t\t\t\t// End code block\n\t\t\t\t\t\tif (tmpCodeLang === 'mermaid')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Mermaid diagrams: output raw content for client-side rendering\n\t\t\t\t\t\t\ttmpHTML.push('<pre class=\"mermaid\">' + tmpCodeLines.join('\\n') + '</pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttmpHTML.push('<pre><code class=\"language-' + this.escapeHTML(tmpCodeLang) + '\">' + this.escapeHTML(tmpCodeLines.join('\\n')) + '</code></pre>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmpInCodeBlock = false;\n\t\t\t\t\t\ttmpCodeFenceLength = 0;\n\t\t\t\t\t\ttmpCodeLang = '';\n\t\t\t\t\t\ttmpCodeLines = [];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Inner fence with fewer backticks — treat as content\n\t\t\t\t\t\ttmpCodeLines.push(tmpLine);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Close any open list or blockquote\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t\ttmpInList = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (tmpInBlockquote)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t\t\t\t\ttmpInBlockquote = false;\n\t\t\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t\t\t}\n\t\t\t\t\t// Start code block — record fence length\n\t\t\t\t\ttmpCodeFenceLength = tmpFenceLen;\n\t\t\t\t\ttmpCodeLang = tmpLine.replace(/^`{3,}/, '').trim();\n\t\t\t\t\ttmpInCodeBlock = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tmpInCodeBlock)\n\t\t\t{\n\t\t\t\ttmpCodeLines.push(tmpLine);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Blockquotes\n\t\t\tif (tmpLine.match(/^>\\s?/))\n\t\t\t{\n\t\t\t\tif (!tmpInBlockquote)\n\t\t\t\t{\n\t\t\t\t\t// Close any open list\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t\ttmpInList = false;\n\t\t\t\t\t}\n\t\t\t\t\ttmpInBlockquote = true;\n\t\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t\t}\n\t\t\t\ttmpBlockquoteLines.push(tmpLine.replace(/^>\\s?/, ''));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (tmpInBlockquote)\n\t\t\t{\n\t\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t\t\ttmpInBlockquote = false;\n\t\t\t\ttmpBlockquoteLines = [];\n\t\t\t}\n\n\t\t\t// Horizontal rule\n\t\t\tif (tmpLine.match(/^(-{3,}|\\*{3,}|_{3,})\\s*$/))\n\t\t\t{\n\t\t\t\tif (tmpInList)\n\t\t\t\t{\n\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\ttmpInList = false;\n\t\t\t\t}\n\t\t\t\ttmpHTML.push('<hr>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Headings\n\t\t\tlet tmpHeadingMatch = tmpLine.match(/^(#{1,6})\\s+(.+)/);\n\t\t\tif (tmpHeadingMatch)\n\t\t\t{\n\t\t\t\tif (tmpInList)\n\t\t\t\t{\n\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\ttmpInList = false;\n\t\t\t\t}\n\t\t\t\tlet tmpLevel = tmpHeadingMatch[1].length;\n\t\t\t\tlet tmpText = this.parseInline(tmpHeadingMatch[2], pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t\t\t\tlet tmpID = tmpHeadingMatch[2].toLowerCase().replace(/[^\\w\\s-]/g, '').replace(/\\s+/g, '-');\n\t\t\t\ttmpHTML.push('<h' + tmpLevel + ' id=\"' + tmpID + '\">' + tmpText + '</h' + tmpLevel + '>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Unordered list items\n\t\t\tlet tmpULMatch = tmpLine.match(/^(\\s*)[-*+]\\s+(.*)/);\n\t\t\tif (tmpULMatch)\n\t\t\t{\n\t\t\t\tif (!tmpInList || tmpListType !== 'ul')\n\t\t\t\t{\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t}\n\t\t\t\t\ttmpHTML.push('<ul>');\n\t\t\t\t\ttmpInList = true;\n\t\t\t\t\ttmpListType = 'ul';\n\t\t\t\t}\n\t\t\t\ttmpHTML.push('<li>' + this.parseInline(tmpULMatch[2], pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</li>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Ordered list items\n\t\t\tlet tmpOLMatch = tmpLine.match(/^(\\s*)\\d+\\.\\s+(.*)/);\n\t\t\tif (tmpOLMatch)\n\t\t\t{\n\t\t\t\tif (!tmpInList || tmpListType !== 'ol')\n\t\t\t\t{\n\t\t\t\t\tif (tmpInList)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\t}\n\t\t\t\t\ttmpHTML.push('<ol>');\n\t\t\t\t\ttmpInList = true;\n\t\t\t\t\ttmpListType = 'ol';\n\t\t\t\t}\n\t\t\t\ttmpHTML.push('<li>' + this.parseInline(tmpOLMatch[2], pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</li>');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Close list if we've left list items\n\t\t\tif (tmpInList && tmpLine.trim() !== '')\n\t\t\t{\n\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\ttmpInList = false;\n\t\t\t}\n\n\t\t\t// Empty line\n\t\t\tif (tmpLine.trim() === '')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Table detection\n\t\t\tif (tmpLine.match(/^\\|/) && i + 1 < tmpLines.length && tmpLines[i + 1].match(/^\\|[\\s-:|]+\\|/))\n\t\t\t{\n\t\t\t\t// Close any open list\n\t\t\t\tif (tmpInList)\n\t\t\t\t{\n\t\t\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t\t\t\ttmpInList = false;\n\t\t\t\t}\n\n\t\t\t\tlet tmpTableHTML = '<table>';\n\n\t\t\t\t// Header row\n\t\t\t\tlet tmpHeaders = tmpLine.split('|').filter((pCell) => { return pCell.trim() !== ''; });\n\t\t\t\ttmpTableHTML += '<thead><tr>';\n\t\t\t\tfor (let h = 0; h < tmpHeaders.length; h++)\n\t\t\t\t{\n\t\t\t\t\ttmpTableHTML += '<th>' + this.parseInline(tmpHeaders[h].trim(), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</th>';\n\t\t\t\t}\n\t\t\t\ttmpTableHTML += '</tr></thead>';\n\n\t\t\t\t// Skip separator row\n\t\t\t\ti++;\n\n\t\t\t\t// Body rows\n\t\t\t\ttmpTableHTML += '<tbody>';\n\t\t\t\twhile (i + 1 < tmpLines.length && tmpLines[i + 1].match(/^\\|/))\n\t\t\t\t{\n\t\t\t\t\ti++;\n\t\t\t\t\tlet tmpCells = tmpLines[i].split('|').filter((pCell) => { return pCell.trim() !== ''; });\n\t\t\t\t\ttmpTableHTML += '<tr>';\n\t\t\t\t\tfor (let c = 0; c < tmpCells.length; c++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpTableHTML += '<td>' + this.parseInline(tmpCells[c].trim(), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</td>';\n\t\t\t\t\t}\n\t\t\t\t\ttmpTableHTML += '</tr>';\n\t\t\t\t}\n\t\t\t\ttmpTableHTML += '</tbody></table>';\n\t\t\t\ttmpHTML.push(tmpTableHTML);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Regular paragraph\n\t\t\ttmpHTML.push('<p>' + this.parseInline(tmpLine, pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</p>');\n\t\t}\n\n\t\t// Close any trailing open elements\n\t\tif (tmpInList)\n\t\t{\n\t\t\ttmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');\n\t\t}\n\t\tif (tmpInBlockquote)\n\t\t{\n\t\t\ttmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\\n'), pCurrentGroup, pCurrentModule, pCurrentDocPath) + '</blockquote>');\n\t\t}\n\t\tif (tmpInCodeBlock)\n\t\t{\n\t\t\ttmpHTML.push('<pre><code>' + this.escapeHTML(tmpCodeLines.join('\\n')) + '</code></pre>');\n\t\t}\n\n\t\treturn tmpHTML.join('\\n');\n\t}\n\n\t/**\n\t * Parse inline markdown elements (bold, italic, code, links, images).\n\t *\n\t * @param {string} pText - The text to parse\n\t * @param {string} [pCurrentGroup] - The current group key for link resolution\n\t * @param {string} [pCurrentModule] - The current module name for link resolution\n\t * @param {string} [pCurrentDocPath] - The current document path for link resolution\n\t * @returns {string} HTML with inline elements\n\t */\n\tparseInline(pText, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tlet tmpResult = pText;\n\n\t\t// Inline code (backticks) - handle first to avoid interfering with other patterns\n\t\ttmpResult = tmpResult.replace(/`([^`]+)`/g, '<code>$1</code>');\n\n\t\t// Inline LaTeX equations ($...$) — must be processed before other inline patterns\n\t\t// Match single $ delimiters that aren't adjacent to spaces (to avoid false positives with currency)\n\t\ttmpResult = tmpResult.replace(/\\$([^\\$\\s][^\\$]*?[^\\$\\s])\\$/g, '<span class=\"docuserve-katex-inline\">$1</span>');\n\t\t// Also match single-character inline math like $x$\n\t\ttmpResult = tmpResult.replace(/\\$([^\\$\\s])\\$/g, '<span class=\"docuserve-katex-inline\">$1</span>');\n\n\t\t// Images\n\t\ttmpResult = tmpResult.replace(/!\\[([^\\]]*)\\]\\(([^)]+)\\)/g, '<img src=\"$2\" alt=\"$1\">');\n\n\t\t// Links\n\t\ttmpResult = tmpResult.replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, (pMatch, pLinkText, pHref) =>\n\t\t{\n\t\t\t// Convert internal doc links to hash routes\n\t\t\tif (pHref.match(/^\\//) || pHref.match(/^[^:]+\\.md/))\n\t\t\t{\n\t\t\t\tlet tmpRoute = this.convertDocLink(pHref, pCurrentGroup, pCurrentModule, pCurrentDocPath);\n\t\t\t\treturn '<a href=\"' + tmpRoute + '\">' + pLinkText + '</a>';\n\t\t\t}\n\t\t\treturn '<a href=\"' + pHref + '\" target=\"_blank\" rel=\"noopener\">' + pLinkText + '</a>';\n\t\t});\n\n\t\t// Bold\n\t\ttmpResult = tmpResult.replace(/\\*\\*([^*]+)\\*\\*/g, '<strong>$1</strong>');\n\t\ttmpResult = tmpResult.replace(/__([^_]+)__/g, '<strong>$1</strong>');\n\n\t\t// Italic\n\t\ttmpResult = tmpResult.replace(/\\*([^*]+)\\*/g, '<em>$1</em>');\n\t\ttmpResult = tmpResult.replace(/_([^_]+)_/g, '<em>$1</em>');\n\n\t\treturn tmpResult;\n\t}\n\n\t/**\n\t * Convert a docsify-style internal link to a hash route for docuserve.\n\t *\n\t * When module context is provided, relative links (e.g. \"api.md\" or\n\t * \"./settings-manager.md\") are resolved within the current module and\n\t * document directory rather than falling back to the docs root.\n\t *\n\t * @param {string} pHref - The original link href\n\t * @param {string} [pCurrentGroup] - The current group key (e.g. \"fable\")\n\t * @param {string} [pCurrentModule] - The current module name (e.g. \"fable\")\n\t * @param {string} [pCurrentDocPath] - The current document path within the module (e.g. \"services/README.md\")\n\t * @returns {string} The converted hash route\n\t */\n\tconvertDocLink(pHref, pCurrentGroup, pCurrentModule, pCurrentDocPath)\n\t{\n\t\t// Strip leading ./ prefix for relative paths\n\t\tlet tmpPath = pHref.replace(/^\\.\\//, '');\n\t\t// Remove leading slash\n\t\ttmpPath = tmpPath.replace(/^\\//, '');\n\n\t\t// If it looks like an absolute module path (group/module/...), route directly\n\t\tlet tmpParts = tmpPath.split('/');\n\t\tif (tmpParts.length >= 2)\n\t\t{\n\t\t\tif (this.isGroupInCatalog(tmpParts[0]))\n\t\t\t{\n\t\t\t\treturn '#/doc/' + tmpPath;\n\t\t\t}\n\t\t}\n\n\t\t// If we have module context, resolve relative to current document's directory\n\t\tif (pCurrentGroup && pCurrentModule)\n\t\t{\n\t\t\t// Determine the directory of the current document\n\t\t\tlet tmpDocDir = '';\n\t\t\tif (pCurrentDocPath)\n\t\t\t{\n\t\t\t\tlet tmpDirParts = pCurrentDocPath.split('/');\n\t\t\t\tif (tmpDirParts.length > 1)\n\t\t\t\t{\n\t\t\t\t\ttmpDirParts.pop(); // Remove filename\n\t\t\t\t\ttmpDocDir = tmpDirParts.join('/') + '/';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn '#/doc/' + pCurrentGroup + '/' + pCurrentModule + '/' + tmpDocDir + tmpPath;\n\t\t}\n\n\t\t// Local doc page (no module context)\n\t\tif (tmpPath.match(/\\.md$/))\n\t\t{\n\t\t\tlet tmpPageKey = tmpPath.replace(/\\.md$/, '');\n\t\t\treturn '#/page/' + tmpPageKey;\n\t\t}\n\n\t\treturn '#/page/' + tmpPath;\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\t}\n}\n\nmodule.exports = DocuserveDocumentationProvider;\n\nmodule.exports.default_configuration =\n{\n\tProviderIdentifier: \"Docuserve-Documentation\",\n\n\tAutoInitialize: true,\n\tAutoInitializeOrdinal: 0\n};\n","const libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Content\",\n\n\tDefaultRenderable: \"Docuserve-Content-Display\",\n\tDefaultDestinationAddress: \"#Docuserve-Content-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Content-Template\",\n\t\t\tTemplate: /*html*/`\n<div class=\"docuserve-content\" id=\"Docuserve-Content-Body\">\n\t<div class=\"docuserve-content-loading\">Loading documentation...</div>\n</div>\n`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Content-Display\",\n\t\t\tTemplateHash: \"Docuserve-Content-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Content-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveContentView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\t/**\n\t * Display parsed HTML content in the content area.\n\t *\n\t * @param {string} pHTMLContent - The HTML to display\n\t */\n\tdisplayContent(pHTMLContent)\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Content-Body', pHTMLContent);\n\n\t\t// Scroll to top of content area\n\t\tlet tmpContentContainer = document.getElementById('Docuserve-Content-Container');\n\t\tif (tmpContentContainer)\n\t\t{\n\t\t\ttmpContentContainer.scrollTop = 0;\n\t\t}\n\n\t\t// Post-render: initialize Mermaid diagrams if mermaid is available\n\t\tthis.renderMermaidDiagrams();\n\n\t\t// Post-render: render KaTeX equations if katex is available\n\t\tthis.renderKaTeXEquations();\n\t}\n\n\t/**\n\t * Render any Mermaid diagram blocks in the content area.\n\t * Mermaid blocks are `<pre class=\"mermaid\">` elements produced by parseMarkdown.\n\t */\n\trenderMermaidDiagrams()\n\t{\n\t\tif (typeof mermaid === 'undefined')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpContentBody = document.getElementById('Docuserve-Content-Body');\n\t\tif (!tmpContentBody)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpMermaidElements = tmpContentBody.querySelectorAll('pre.mermaid');\n\t\tif (tmpMermaidElements.length < 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// mermaid.run() will process all pre.mermaid elements in the container\n\t\ttry\n\t\t{\n\t\t\tmermaid.run({ nodes: tmpMermaidElements });\n\t\t}\n\t\tcatch (pError)\n\t\t{\n\t\t\tthis.log.error('Mermaid rendering error: ' + pError.message);\n\t\t}\n\t}\n\n\t/**\n\t * Render KaTeX inline and display math elements in the content area.\n\t * Inline: `<span class=\"docuserve-katex-inline\">`\n\t * Display: `<div class=\"docuserve-katex-display\">`\n\t */\n\trenderKaTeXEquations()\n\t{\n\t\tif (typeof katex === 'undefined')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpContentBody = document.getElementById('Docuserve-Content-Body');\n\t\tif (!tmpContentBody)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Render inline math\n\t\tlet tmpInlineElements = tmpContentBody.querySelectorAll('.docuserve-katex-inline');\n\t\tfor (let i = 0; i < tmpInlineElements.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tkatex.render(tmpInlineElements[i].textContent, tmpInlineElements[i], { throwOnError: false, displayMode: false });\n\t\t\t}\n\t\t\tcatch (pError)\n\t\t\t{\n\t\t\t\tthis.log.warn('KaTeX inline error: ' + pError.message);\n\t\t\t}\n\t\t}\n\n\t\t// Render display math\n\t\tlet tmpDisplayElements = tmpContentBody.querySelectorAll('.docuserve-katex-display');\n\t\tfor (let i = 0; i < tmpDisplayElements.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tkatex.render(tmpDisplayElements[i].textContent, tmpDisplayElements[i], { throwOnError: false, displayMode: true });\n\t\t\t}\n\t\t\tcatch (pError)\n\t\t\t{\n\t\t\t\tthis.log.warn('KaTeX display error: ' + pError.message);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Show a loading indicator.\n\t */\n\tshowLoading()\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Content-Body', '<div class=\"docuserve-content-loading\">Loading documentation...</div>');\n\t}\n}\n\nmodule.exports = DocuserveContentView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n","const libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Layout\",\n\n\tDefaultRenderable: \"Docuserve-Layout-Shell\",\n\tDefaultDestinationAddress: \"#Docuserve-Application-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Layout-Shell-Template\",\n\t\t\tTemplate: /*html*/`\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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Layout-Shell\",\n\t\t\tTemplateHash: \"Docuserve-Layout-Shell-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Application-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveLayoutView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\t// After the layout shell is rendered, render the child views into their containers\n\t\tthis.pict.views['Docuserve-TopBar'].render();\n\t\tthis.pict.views['Docuserve-Sidebar'].render();\n\n\t\t// Show the splash screen initially\n\t\tthis.pict.views['Docuserve-Splash'].render();\n\n\t\t// Inject all view CSS into the PICT-CSS style element\n\t\tthis.pict.CSSMap.injectCSS();\n\n\t\t// Resolve the current hash on initial load\n\t\tthis.pict.PictApplication.resolveHash();\n\n\t\t// Listen for hash changes so that plain <a href=\"#/...\"> links trigger\n\t\t// navigation. This covers sidebar links, splash action buttons,\n\t\t// in-content links, and browser back/forward navigation.\n\t\tif (!this._HashChangeListenerBound)\n\t\t{\n\t\t\tthis._HashChangeListenerBound = true;\n\t\t\tlet tmpSelf = this;\n\t\t\twindow.addEventListener('hashchange', () =>\n\t\t\t{\n\t\t\t\ttmpSelf.pict.PictApplication.resolveHash();\n\t\t\t});\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n}\n\nmodule.exports = DocuserveLayoutView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n","const libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Search\",\n\n\tDefaultRenderable: \"Docuserve-Search-Display\",\n\tDefaultDestinationAddress: \"#Docuserve-Content-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Search-Template\",\n\t\t\tTemplate: /*html*/`\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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Search-Display\",\n\t\t\tTemplateHash: \"Docuserve-Search-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Content-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveSearchView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\tthis._SearchDebounceTimer = null;\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\t// Attach the search input listener\n\t\tlet tmpInput = document.getElementById('Docuserve-Search-Input');\n\t\tif (tmpInput)\n\t\t{\n\t\t\ttmpInput.addEventListener('input', () =>\n\t\t\t{\n\t\t\t\tif (this._SearchDebounceTimer)\n\t\t\t\t{\n\t\t\t\t\tclearTimeout(this._SearchDebounceTimer);\n\t\t\t\t}\n\n\t\t\t\tthis._SearchDebounceTimer = setTimeout(() =>\n\t\t\t\t{\n\t\t\t\t\tthis.performSearch(tmpInput.value);\n\t\t\t\t}, 250);\n\t\t\t});\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Show the search page with an optional initial query.\n\t *\n\t * @param {string} pQuery - The initial search query\n\t */\n\tshowSearch(pQuery)\n\t{\n\t\tlet tmpInput = document.getElementById('Docuserve-Search-Input');\n\t\tif (tmpInput)\n\t\t{\n\t\t\ttmpInput.value = pQuery || '';\n\t\t\ttmpInput.focus();\n\t\t}\n\n\t\tif (pQuery && pQuery.trim())\n\t\t{\n\t\t\tthis.performSearch(pQuery);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlet tmpDocCount = this.pict.AppData.Docuserve.KeywordDocumentCount || 0;\n\t\t\tlet tmpStatusMsg = tmpDocCount > 0\n\t\t\t\t? 'Search across ' + tmpDocCount + ' documents.'\n\t\t\t\t: 'Enter a search term to find documentation.';\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status', tmpStatusMsg);\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', '');\n\t\t}\n\n\t\t// Scroll to top\n\t\tlet tmpContentContainer = document.getElementById('Docuserve-Content-Container');\n\t\tif (tmpContentContainer)\n\t\t{\n\t\t\ttmpContentContainer.scrollTop = 0;\n\t\t}\n\t}\n\n\t/**\n\t * Perform a search and render the results.\n\t *\n\t * @param {string} pQuery - The search query\n\t */\n\tperformSearch(pQuery)\n\t{\n\t\tif (!pQuery || !pQuery.trim())\n\t\t{\n\t\t\tlet tmpDocCount = this.pict.AppData.Docuserve.KeywordDocumentCount || 0;\n\t\t\tlet tmpStatusMsg = tmpDocCount > 0\n\t\t\t\t? 'Search across ' + tmpDocCount + ' documents.'\n\t\t\t\t: 'Enter a search term to find documentation.';\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status', tmpStatusMsg);\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', '');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpResults = tmpDocProvider.search(pQuery);\n\n\t\t// Update status\n\t\tif (tmpResults.length === 0)\n\t\t{\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status',\n\t\t\t\t'No results found for \\'' + this.escapeHTML(pQuery) + '\\'.');\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', '');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Status',\n\t\t\ttmpResults.length + ' result' + (tmpResults.length !== 1 ? 's' : '') + ' for \\'' + this.escapeHTML(pQuery) + '\\'');\n\n\t\t// Render results\n\t\tlet tmpHTML = '';\n\n\t\tfor (let i = 0; i < tmpResults.length; i++)\n\t\t{\n\t\t\tlet tmpResult = tmpResults[i];\n\t\t\tlet tmpBreadcrumb = '';\n\t\t\tif (tmpResult.Group && tmpResult.Module)\n\t\t\t{\n\t\t\t\ttmpBreadcrumb = tmpResult.Group + ' › ' + tmpResult.Module;\n\t\t\t}\n\n\t\t\ttmpHTML += '<a class=\"docuserve-search-result\" href=\"' + tmpResult.Route + '\">';\n\t\t\ttmpHTML += '<div class=\"docuserve-search-result-title\">' + this.escapeHTML(tmpResult.Title) + '</div>';\n\t\t\tif (tmpBreadcrumb)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-search-result-breadcrumb\">' + tmpBreadcrumb + '</div>';\n\t\t\t}\n\t\t\tif (tmpResult.DocPath)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-search-result-path\">' + this.escapeHTML(tmpResult.DocPath) + '</div>';\n\t\t\t}\n\t\t\ttmpHTML += '</a>';\n\t\t}\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Search-Results', tmpHTML);\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\t}\n}\n\nmodule.exports = DocuserveSearchView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n","const libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Sidebar\",\n\n\tDefaultRenderable: \"Docuserve-Sidebar-Content\",\n\tDefaultDestinationAddress: \"#Docuserve-Sidebar-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Sidebar-Template\",\n\t\t\tTemplate: /*html*/`\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()\">×</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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Sidebar-Content\",\n\t\t\tTemplateHash: \"Docuserve-Sidebar-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Sidebar-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocusserveSidebarView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\n\t\tthis._SidebarSearchDebounceTimer = null;\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\tthis.renderSidebarGroups();\n\n\t\t// Conditionally show the search box if the keyword index is loaded\n\t\tlet tmpSearchContainer = document.getElementById('Docuserve-Sidebar-Search');\n\t\tif (tmpSearchContainer && this.pict.AppData.Docuserve.KeywordIndexLoaded)\n\t\t{\n\t\t\ttmpSearchContainer.style.display = '';\n\n\t\t\tlet tmpInput = document.getElementById('Docuserve-Sidebar-Search-Input');\n\t\t\tif (tmpInput)\n\t\t\t{\n\t\t\t\ttmpInput.addEventListener('input', () =>\n\t\t\t\t{\n\t\t\t\t\tif (this._SidebarSearchDebounceTimer)\n\t\t\t\t\t{\n\t\t\t\t\t\tclearTimeout(this._SidebarSearchDebounceTimer);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._SidebarSearchDebounceTimer = setTimeout(() =>\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.performSidebarSearch(tmpInput.value);\n\t\t\t\t\t}, 250);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Render the sidebar group navigation from catalog data.\n\t */\n\trenderSidebarGroups()\n\t{\n\t\tlet tmpGroups = this.pict.AppData.Docuserve.SidebarGroups;\n\n\t\tif (!tmpGroups || tmpGroups.length < 1)\n\t\t{\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-Groups', '<p style=\"padding: 1em; color: #999; font-size: 0.85em;\">Loading catalog...</p>');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpHTML = '';\n\n\t\tfor (let i = 0; i < tmpGroups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = tmpGroups[i];\n\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-group\">';\n\n\t\t\t// Determine the route for the group title: use the group's own route,\n\t\t\t// or fall back to the first module with docs.\n\t\t\tlet tmpGroupRoute = tmpGroup.Route || '';\n\t\t\tif (!tmpGroupRoute)\n\t\t\t{\n\t\t\t\tfor (let k = 0; k < tmpGroup.Modules.length; k++)\n\t\t\t\t{\n\t\t\t\t\tif (tmpGroup.Modules[k].HasDocs && tmpGroup.Modules[k].Route)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpGroupRoute = tmpGroup.Modules[k].Route;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tmpGroupRoute)\n\t\t\t{\n\t\t\t\ttmpHTML += '<a class=\"docuserve-sidebar-group-title\" href=\"' + tmpGroupRoute + '\">' + this.escapeHTML(tmpGroup.Name) + '</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-group-title\">' + this.escapeHTML(tmpGroup.Name) + '</div>';\n\t\t\t}\n\t\t\ttmpHTML += '<ul class=\"docuserve-sidebar-modules\">';\n\n\t\t\tfor (let j = 0; j < tmpGroup.Modules.length; j++)\n\t\t\t{\n\t\t\t\tlet tmpModule = tmpGroup.Modules[j];\n\t\t\t\tif (tmpModule.HasDocs)\n\t\t\t\t{\n\t\t\t\t\tlet tmpActiveClass = '';\n\t\t\t\t\tif (this.pict.AppData.Docuserve.CurrentGroup === tmpModule.Group && this.pict.AppData.Docuserve.CurrentModule === tmpModule.Name)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpActiveClass = ' class=\"active\"';\n\t\t\t\t\t}\n\t\t\t\t\ttmpHTML += '<li><a' + tmpActiveClass + ' href=\"' + tmpModule.Route + '\">' + this.escapeHTML(tmpModule.Name) + '</a></li>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmpHTML += '<li><span class=\"no-docs\">' + this.escapeHTML(tmpModule.Name) + '</span></li>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttmpHTML += '</ul>';\n\t\t\ttmpHTML += '</div>';\n\t\t}\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-Groups', tmpHTML);\n\t}\n\n\t/**\n\t * Render module-specific sub-navigation when viewing a module.\n\t *\n\t * @param {string} pGroup - The group key\n\t * @param {string} pModule - The module name\n\t */\n\trenderModuleNav(pGroup, pModule)\n\t{\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tif (!tmpDocProvider)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpSidebar = tmpDocProvider.getModuleSidebar(pGroup, pModule);\n\t\tif (!tmpSidebar)\n\t\t{\n\t\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-ModuleNav', '');\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpRoutePrefix = '#/doc/' + pGroup + '/' + pModule + '/';\n\t\tlet tmpHTML = '<div class=\"docuserve-sidebar-module-nav\">';\n\n\t\tfor (let i = 0; i < tmpSidebar.length; i++)\n\t\t{\n\t\t\tlet tmpEntry = tmpSidebar[i];\n\n\t\t\tif (tmpEntry.Children)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-module-nav-section\">' + this.escapeHTML(tmpEntry.Title) + '</div>';\n\n\t\t\t\tfor (let j = 0; j < tmpEntry.Children.length; j++)\n\t\t\t\t{\n\t\t\t\t\tlet tmpChild = tmpEntry.Children[j];\n\t\t\t\t\tif (tmpChild.Path)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmpHTML += '<a href=\"' + tmpRoutePrefix + tmpChild.Path + '\">' + this.escapeHTML(tmpChild.Title) + '</a>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tmpEntry.Path)\n\t\t\t{\n\t\t\t\ttmpHTML += '<a href=\"' + tmpRoutePrefix + tmpEntry.Path + '\">' + this.escapeHTML(tmpEntry.Title) + '</a>';\n\t\t\t}\n\t\t}\n\n\t\ttmpHTML += '</div>';\n\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-ModuleNav', tmpHTML);\n\t}\n\n\t/**\n\t * Perform a sidebar search and render inline results.\n\t *\n\t * Shows up to 8 results as compact links. If there are results, also\n\t * shows a \"See all results\" link to the dedicated search page.\n\t *\n\t * @param {string} pQuery - The search query\n\t */\n\tperformSidebarSearch(pQuery)\n\t{\n\t\tlet tmpResultsEl = document.getElementById('Docuserve-Sidebar-Search-Results');\n\t\tif (!tmpResultsEl)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!pQuery || !pQuery.trim())\n\t\t{\n\t\t\ttmpResultsEl.innerHTML = '';\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tlet tmpResults = tmpDocProvider.search(pQuery);\n\n\t\tif (tmpResults.length === 0)\n\t\t{\n\t\t\ttmpResultsEl.innerHTML = '<div style=\"padding: 0.4em 0.5em; font-size: 0.82em; color: #999;\">No results found.</div>';\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpMaxResults = 8;\n\t\tlet tmpHTML = '';\n\n\t\tfor (let i = 0; i < tmpResults.length && i < tmpMaxResults; i++)\n\t\t{\n\t\t\tlet tmpResult = tmpResults[i];\n\t\t\tlet tmpMeta = '';\n\t\t\tif (tmpResult.Group && tmpResult.Module)\n\t\t\t{\n\t\t\t\ttmpMeta = tmpResult.Group + ' / ' + tmpResult.Module;\n\t\t\t}\n\n\t\t\ttmpHTML += '<a href=\"' + tmpResult.Route + '\">';\n\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-search-result-title\">' + this.escapeHTML(tmpResult.Title) + '</div>';\n\t\t\tif (tmpMeta)\n\t\t\t{\n\t\t\t\ttmpHTML += '<div class=\"docuserve-sidebar-search-result-meta\">' + this.escapeHTML(tmpMeta) + '</div>';\n\t\t\t}\n\t\t\ttmpHTML += '</a>';\n\t\t}\n\n\t\tif (tmpResults.length > tmpMaxResults)\n\t\t{\n\t\t\tlet tmpEncodedQuery = encodeURIComponent(pQuery);\n\t\t\ttmpHTML += '<a class=\"docuserve-sidebar-search-all\" href=\"#/search/' + tmpEncodedQuery + '\">See all ' + tmpResults.length + ' results</a>';\n\t\t}\n\n\t\ttmpResultsEl.innerHTML = tmpHTML;\n\t}\n\n\t/**\n\t * Toggle the sidebar visibility and update the top bar hamburger button.\n\t */\n\ttoggleSidebar()\n\t{\n\t\tthis.pict.AppData.Docuserve.SidebarVisible = !this.pict.AppData.Docuserve.SidebarVisible;\n\n\t\tlet tmpContainer = document.getElementById('Docuserve-Sidebar-Container');\n\t\tlet tmpToggle = document.getElementById('Docuserve-TopBar-Toggle');\n\n\t\tif (this.pict.AppData.Docuserve.SidebarVisible)\n\t\t{\n\t\t\tif (tmpContainer) tmpContainer.style.display = '';\n\t\t\tif (tmpToggle) tmpToggle.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (tmpContainer) tmpContainer.style.display = 'none';\n\t\t\tif (tmpToggle) tmpToggle.style.display = 'inline-block';\n\t\t}\n\t}\n\n\t/**\n\t * Clear the module-specific sub-navigation.\n\t */\n\tclearModuleNav()\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-ModuleNav', '');\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"');\n\t}\n}\n\nmodule.exports = DocusserveSidebarView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n","const libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-Splash\",\n\n\tDefaultRenderable: \"Docuserve-Splash-Content\",\n\tDefaultDestinationAddress: \"#Docuserve-Content-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-Splash-Template\",\n\t\t\tTemplate: /*html*/`\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`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-Splash-Content\",\n\t\t\tTemplateHash: \"Docuserve-Splash-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-Content-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocusserveSplashView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\tlet tmpDocuserve = this.pict.AppData.Docuserve;\n\n\t\tif (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover)\n\t\t{\n\t\t\tthis.renderFromCover(tmpDocuserve.Cover);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.renderFromCatalog(tmpDocuserve);\n\t\t}\n\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Render the splash screen from parsed cover.md data.\n\t *\n\t * @param {Object} pCover - The parsed cover data { Title, Tagline, Description, Highlights, Actions }\n\t */\n\trenderFromCover(pCover)\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Title', this.escapeHTML(pCover.Title));\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Tagline', this.escapeHTML(pCover.Tagline));\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Description', this.escapeHTML(pCover.Description));\n\n\t\t// Render highlight cards\n\t\tlet tmpHighlightsHTML = '';\n\t\tfor (let i = 0; i < pCover.Highlights.length; i++)\n\t\t{\n\t\t\tlet tmpHighlight = pCover.Highlights[i];\n\t\t\ttmpHighlightsHTML += '<div class=\"docuserve-splash-highlight-card\">';\n\t\t\tif (tmpHighlight.Label)\n\t\t\t{\n\t\t\t\ttmpHighlightsHTML += '<h3>' + this.escapeHTML(tmpHighlight.Label) + '</h3>';\n\t\t\t}\n\t\t\ttmpHighlightsHTML += '<p>' + this.escapeHTML(tmpHighlight.Text) + '</p>';\n\t\t\ttmpHighlightsHTML += '</div>';\n\t\t}\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Highlights', tmpHighlightsHTML);\n\n\t\t// Render action buttons\n\t\tlet tmpActionsHTML = '';\n\t\tlet tmpDocProvider = this.pict.providers['Docuserve-Documentation'];\n\t\tfor (let i = 0; i < pCover.Actions.length; i++)\n\t\t{\n\t\t\tlet tmpAction = pCover.Actions[i];\n\t\t\tlet tmpClass = (i === 0) ? 'primary' : 'secondary';\n\t\t\tlet tmpHref = tmpAction.Href;\n\n\t\t\t// External links open in new tab\n\t\t\tif (tmpHref.match(/^https?:\\/\\//))\n\t\t\t{\n\t\t\t\ttmpActionsHTML += '<a class=\"' + tmpClass + '\" href=\"' + this.escapeHTML(tmpHref) + '\" target=\"_blank\" rel=\"noopener\">' + this.escapeHTML(tmpAction.Text) + '</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Internal links go through the app router\n\t\t\t\tlet tmpRoute = tmpDocProvider.convertSidebarLink(tmpHref);\n\t\t\t\ttmpActionsHTML += '<a class=\"' + tmpClass + '\" href=\"' + this.escapeHTML(tmpRoute) + '\">' + this.escapeHTML(tmpAction.Text) + '</a>';\n\t\t\t}\n\t\t}\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Actions', tmpActionsHTML);\n\t}\n\n\t/**\n\t * Render the splash screen from catalog data as a fallback when cover.md\n\t * is not available.\n\t *\n\t * @param {Object} pDocuserve - The AppData.Docuserve state\n\t */\n\trenderFromCatalog(pDocuserve)\n\t{\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Title', 'Retold');\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Tagline', 'Documentation');\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Description', '');\n\n\t\t// Build highlight cards from catalog groups\n\t\tlet tmpHighlightsHTML = '';\n\t\tlet tmpGroups = pDocuserve.SidebarGroups || [];\n\t\tfor (let i = 0; i < tmpGroups.length; i++)\n\t\t{\n\t\t\tlet tmpGroup = tmpGroups[i];\n\t\t\t// Skip groups with no modules (like \"Home\" or \"Getting Started\")\n\t\t\tif (!tmpGroup.Modules || tmpGroup.Modules.length < 1)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet tmpDescription = tmpGroup.Description || (tmpGroup.Modules.length + ' modules');\n\t\t\ttmpHighlightsHTML += '<div class=\"docuserve-splash-highlight-card\">';\n\t\t\ttmpHighlightsHTML += '<h3>' + this.escapeHTML(tmpGroup.Name) + '</h3>';\n\t\t\ttmpHighlightsHTML += '<p>' + this.escapeHTML(tmpDescription) + '</p>';\n\t\t\ttmpHighlightsHTML += '</div>';\n\t\t}\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Highlights', tmpHighlightsHTML);\n\n\t\t// Default action buttons\n\t\tthis.pict.ContentAssignment.assignContent('#Docuserve-Splash-Actions', '');\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t *\n\t * @param {string} pText - The text to escape\n\t * @returns {string} The escaped text\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"');\n\t}\n}\n\nmodule.exports = DocusserveSplashView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n","const libPictView = require('pict-view');\n\nconst _ViewConfiguration =\n{\n\tViewIdentifier: \"Docuserve-TopBar\",\n\n\tDefaultRenderable: \"Docuserve-TopBar-Content\",\n\tDefaultDestinationAddress: \"#Docuserve-TopBar-Container\",\n\n\tAutoRender: false,\n\n\tCSS: /*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`,\n\n\tTemplates:\n\t[\n\t\t{\n\t\t\tHash: \"Docuserve-TopBar-Template\",\n\t\t\tTemplate: /*html*/`\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()\">☰</button>\n\t</div>\n</div>\n`\n\t\t}\n\t],\n\n\tRenderables:\n\t[\n\t\t{\n\t\t\tRenderableHash: \"Docuserve-TopBar-Content\",\n\t\t\tTemplateHash: \"Docuserve-TopBar-Template\",\n\t\t\tDestinationAddress: \"#Docuserve-TopBar-Container\",\n\t\t\tRenderMethod: \"replace\"\n\t\t}\n\t]\n};\n\nclass DocuserveTopBarView extends libPictView\n{\n\tconstructor(pFable, pOptions, pServiceHash)\n\t{\n\t\tsuper(pFable, pOptions, pServiceHash);\n\t}\n\n\tonAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent)\n\t{\n\t\tthis.renderTopBarContent();\n\t\treturn super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);\n\t}\n\n\t/**\n\t * Populate the top bar from _topbar.md data or fall back to defaults.\n\t */\n\trenderTopBarContent()\n\t{\n\t\tlet tmpDocuserve = this.pict.AppData.Docuserve;\n\t\tlet tmpBrandEl = document.getElementById('Docuserve-TopBar-Brand');\n\t\tlet tmpNavEl = document.getElementById('Docuserve-TopBar-Nav');\n\t\tlet tmpLinksEl = document.getElementById('Docuserve-TopBar-Links');\n\n\t\tif (!tmpBrandEl || !tmpNavEl || !tmpLinksEl)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (tmpDocuserve.TopBarLoaded && tmpDocuserve.TopBar)\n\t\t{\n\t\t\t// Data-driven from _topbar.md\n\t\t\tlet tmpTopBar = tmpDocuserve.TopBar;\n\n\t\t\t// Brand\n\t\t\ttmpBrandEl.textContent = tmpTopBar.Brand || 'Documentation';\n\n\t\t\t// Navigation links (centre)\n\t\t\tlet tmpNavHTML = '<a href=\"#/Home\">Home</a>';\n\t\t\tfor (let i = 0; i < tmpTopBar.NavLinks.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpLink = tmpTopBar.NavLinks[i];\n\t\t\t\ttmpNavHTML += '<a href=\"' + tmpLink.Href + '\">' + this.escapeHTML(tmpLink.Text) + '</a>';\n\t\t\t}\n\t\t\ttmpNavEl.innerHTML = tmpNavHTML;\n\n\t\t\t// External links (right side) — search link first if keyword index is available\n\t\t\tlet tmpLinksHTML = '';\n\t\t\tif (tmpDocuserve.KeywordIndexLoaded)\n\t\t\t{\n\t\t\t\ttmpLinksHTML += '<a href=\"#/search/\">Search</a>';\n\t\t\t}\n\t\t\tfor (let i = 0; i < tmpTopBar.ExternalLinks.length; i++)\n\t\t\t{\n\t\t\t\tlet tmpLink = tmpTopBar.ExternalLinks[i];\n\t\t\t\ttmpLinksHTML += '<a href=\"' + this.escapeHTML(tmpLink.Href) + '\" target=\"_blank\" rel=\"noopener\">' + this.escapeHTML(tmpLink.Text) + '</a>';\n\t\t\t}\n\t\t\ttmpLinksEl.innerHTML = tmpLinksHTML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Fallback: use brand from cover or a default, and just show Home\n\t\t\tlet tmpBrand = 'Documentation';\n\t\t\tif (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover && tmpDocuserve.Cover.Title)\n\t\t\t{\n\t\t\t\ttmpBrand = tmpDocuserve.Cover.Title;\n\t\t\t}\n\t\t\telse if (tmpDocuserve.CatalogLoaded && tmpDocuserve.Catalog && tmpDocuserve.Catalog.Name)\n\t\t\t{\n\t\t\t\ttmpBrand = tmpDocuserve.Catalog.Name;\n\t\t\t}\n\n\t\t\ttmpBrandEl.textContent = tmpBrand;\n\t\t\ttmpNavEl.innerHTML = '<a href=\"#/Home\">Home</a>';\n\t\t\ttmpLinksEl.innerHTML = tmpDocuserve.KeywordIndexLoaded ? '<a href=\"#/search/\">Search</a>' : '';\n\t\t}\n\t}\n\n\t/**\n\t * Escape HTML special characters.\n\t */\n\tescapeHTML(pText)\n\t{\n\t\tif (!pText)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn pText\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(/</g, '<')\n\t\t\t.replace(/>/g, '>')\n\t\t\t.replace(/\"/g, '"')\n\t\t\t.replace(/'/g, ''');\n\t}\n}\n\nmodule.exports = DocuserveTopBarView;\n\nmodule.exports.default_configuration = _ViewConfiguration;\n"]}
|