-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.min.js.map
1 lines (1 loc) · 84.2 KB
/
index.min.js.map
1
{"version":3,"sources":["index.js"],"names":["window","$","undefined","treeGroup","lowerCaseEncodeURI","val","encodeURIComponent","toLowerCase","searchIncludeHash","hash","searchInclude","jsr","jsv","smp","txt","searchContent","searchValue","i","category","foundInCat","foundInCats","categories","content","l","length","filter","observable","setProperty","searchtextElem","removeClass","hidden","searchCat","name","find","noSearch","htmlConverter","filterlen","search","topCatContent","topCatFindContent","found","foundInTopic","foundInSubCat","subCategory","searchTopic","topicName","text","index","displayText","ind","section","preText","postText","filtered","sectionId","searchItem","findSection","searchAnchor","topic","findTopic","sections","_type","indexOf","substring","lastIndexOf","slice","substr","searchTerm","push","clearSearch","clearSearchCat","clearSearchTopic","getCategory","catName","searchExclude","getCategoryNode","subcategories","parent","selectedCategory","topCategory","homeCategory","stack","pop","expanded","topCat","oldTopCategory","topCategoryName","loadedPromise","Deferred","jsrender","searchCategory","page","addClass","searched","loadAllContent","then","setTimeout","resolve","loaded","loading","getScript","promise","fetchCategory","save","categoryName","sectionIndex","oldCategory","lochash","location","history","replaceState","state","url","document","URL","historyIndex","historyStates","newState","scroll","scrollTop","key","searchRegex","exec","decodeURIComponent","newTopCat","navTo","initPageParams","initPage","searchTitle","title","topSearchTree","parseInt","selected","signature","api","param","sig","this","data","ret","object","method","params","optional","getContent","topics","path","stringify","JSON","parse","eval","e","editable","textareas","contents","loadedfind","loadingfind","localStorage","setItem","value","prefix","notLoaded","allLoadedPromise","loadingLabel","loadedLabel","loadedAll","scrollTargetElem","skipLoad","searchbox","prevLochash","isSearchTreeSelectionChange","isLeftNavSelectionChange","searchNavElem","sideNavElem","hoverTextElem","useBodyToScroll","views","documentation","include","class","allowEdit","md","Remarkable","html","breaks","linkify","typographer","highlight","str","lang","hljs","getLanguage","err","highlightAuto","converters","sampleFrames","pageTag","init","pagetag","onAfterLink","on","addSection","view","innerText","getAttribute","className","ev","addSignature","stopImmediatePropagation","addParam","addLink","addTopic","addCodeTab","isJsr","jsrJsvJqui","code","removeSection","get","getIndex","ctx","parentTags","sampleFrame","runCode","tag","tagName","parents","sampleSection","tabsControl","tabs","tryitTab","tabCount","setTab","pane","tree","onDispose","template","modes","details","summary","edit","mode","setTree","onSelectionChange","refresh","onExpansionChange","iframeLoaded","tagId","loadScript","signatures","newSignature","extend","subTypes","_removeData","insert","isTagArg","args","newParam","links","newLink","link","newTopic","codetabs","newTab","codetab","type","sectionType","append","getLinks","cat","recurse","childCat","childCats","newSection","label","selectList","left","sectionTypes","leftsections","tagCtx","props","childTags","toggleSelect","remove","tryIt","sample","hideCategory","scrollTo","newCat","searchTreeNode","offset","wasSearch","navTreeNode","searchtext","getElementById","top","el","documentElement","body","delay","animate","height","offsetTop","searchTreeTag","baseTag","self","toggle","searchTreeNodeTag","sectionTag","render","buttons","tmpl","templates","ctxPrm","stopPropagation","target","is","moveUp","moveDown","selectedChild","move","onToggleSelect","sectionButtonsTag","nestedSectionType","sectionTitleTag","sectionHeaderTag","sampleFrameTag","parseJSON","trim","iframeWnd","innerHTML","replace","toremove","header","head","origData","sampleData","tryItData","loadTabs","markup","action","nocss","each","tab","onBind","parentElem","contentWindow","_tgId","onTabChange","apply","arguments","linkCtx","observe","unobserve","revert","sampleFieldsTag","arg1","arg2","fullCode","headerInsert","urlTokens","codeInHeader","split","replaced","start","test","join","headerAction","renderField","isData","highlightSyntax","tags","sectionButtons","sectionHeader","sectionTitle","newsearch","sectionTemplates","para","helpers","sampleFields","tabsTmpl","codetabsLength","pathname","testDiv","onkeydown","event","keyCode","altKey","shiftKey","searchTree","close","ctrlKey","next","prev","focus","prototype","select","unselect","changing","eventArgs","onEnter","newSearch","newIndex","mouseenter","hoverText","hoverTopicSel","show","elem","mouseleave","hide","mousewheel","preventDefault","originalEvent","deltaY","click","leftTarget","position","elementFromPoint","clientY","editview","detail","syntax","selectedLogo","scrollRestoration","id","jQuery"],"mappings":"CAAA,SAAUA,OAAQC,EA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oB,SAAQyD,YAAcA,aAAeD,iBAGrCyO,UAAU5N,KAAKwK,KAAK,cAAe7O,SAAUiS,UAAWA,YAExD3R,eAAiB3B,EAAE,eACnBuK,UAAYvK,EAAE,iBACd2K,cAAgB3K,EAAE,cAClB4K,YAAc5K,EAAE,YAChB6K,cAAgB7K,EAAE,cAEd,qBAAuB4G,WAC1BA,QAAQyT,kBAAoB,UAE7Bra,EAAED,QACAwM,GAAG,aAAclG,eACjBkG,GAAG,SAAUjG,MAEftG,EAAE8V,QAAQrV,cAAe,MAAO,MAAO,MAAO,MAAO,SAASoM,EAAIgM,GACjElS,SAASnG,KAAO,YAAcgH,YAAYC,KAAKd,SAASnG,MAAM,GAAKD,sBAGpEP,EAAE,SAAW8E,YAAYyC,KACvB3F,YAAY,cACZ+D,SAAS,YAEXyU,EAAepa,EAAE,uBAEjB0F,KAAKkC,MAAMjB,SAASnG,MAEpBR,EAAE,cAAcuM,GAAG,QAAS,WAC3B6N,EAAaxY,YAAY,YAAY+D,SAAS,cAC9CyU,EAAepa,EAAEwI,MAAM7C,SAAS,YAAY/D,YAAY,cACxD+E,SAASnG,KAAOgI,KAAK8R,GAAGtW,MAAM,KAE1BoG,WACJrE,WAAW,WACVF,sBAsCD2C,KAAMA,KAAK+R","file":"index.min.js","sourcesContent":["(function(window, $, undefined) {\n\"use strict\";\nvar page, selectedCategory, topCategory, homeCategory, topCategoryName, scrollTargetElem, skipLoad, searchbox, initPageParams, prevLochash,\n\tisSearchTreeSelectionChange, isLeftNavSelectionChange, topSearchTree, loadedAll, searchtextElem, searchNavElem, sideNavElem, hoverTextElem, useBodyToScroll,\n\n\tcontent = $.views.documentation.content,\n\tsearchInclude = content.include,\n\tsearchRegex = /#(?:search\\?s=([^&]+)(&f=(jsr-)?(jsv-)?(smp-)?(txt-)?)?(?:&l=)?)?([^@]+)?(?:@(.+))?$/,\n\tsearchCategory = {\n\t\tname: \"home\",\n\t\t\"class\": \"search\",\n\t\tloaded: true,\n\t\tsearch: true\n\t},\n\tallowEdit = false,\n\tmd = new Remarkable('full', {\n\t\thtml: true,\n\t\tbreaks: false,\n\t\tlinkify: true,\n\t\ttypographer: true,\n\t\thighlight: function (str, lang) {\n\t\t\tif (lang && hljs.getLanguage(lang)) {\n\t\t\t\ttry {\n\t\t\t\t\treturn hljs.highlight(lang, str).value;\n\t\t\t\t} catch (err) {}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treturn hljs.highlightAuto(str).value;\n\t\t\t} catch (err) {}\n\t\t\treturn ''; // use external default escaping\n\t\t}\n\t}),\n\thtmlConverter = $.views.converters.html,\n//#region TAG CONTROLS\n\n// {{page}}\n\n\thistoryIndex = -1,\n\thistoryStates = {},\n\tsampleFrames = {},\n\tpageTag = {\n\t\tinit: function() {\n\t\t\twindow.pagetag = page = this;\n\t\t\tpage.data = content;\n\t\t\tpage.category = selectedCategory;\n\t\t},\n\t\tonAfterLink: function() {\n\t\t\tvar page = this, activeContainer;\n\t\t\tpage.contents()\n\t\t\t\t.on(\"click\", \".insertsection\", function() {\n\t\t\t\t\tpage.addSection($.view(this), this.innerText, this.getAttribute(\"data-type\"), this.className.indexOf(\"append\") >= 0);\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".savedata\", function() {\n\t\t\t\t\tsave();\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".addsignature\", function(ev) {\n\t\t\t\t\tpage.addSignature($.view(this));\n\t\t\t\t\tev.stopImmediatePropagation();\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".addparam\", function() {\n\t\t\t\t\tpage.addParam($.view(this));\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".addarg\", function() {\n\t\t\t\t\tpage.addParam($.view(this), true);\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".addlink\", function() {\n\t\t\t\t\tpage.addLink($.view(this));\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".addtopic\", function() {\n\t\t\t\t\tpage.addTopic($.view(this));\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".addcodetab\", function() {\n\t\t\t\t\tpage.addCodeTab($.view(this));\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".defaultsample\", function() {\n\t\t\t\t\tvar data = $.view(this).data,\n\t\t\t\t\t\tisJsr = data.jsrJsvJqui === \"jsr\";\n\t\t\t\t\t$.observable(data).setProperty({\n\t\t\t\t\t\thtml: '<script id=\"myTmpl\" type=\"text/x-jsrender\">\\n {{:name}}\\n</script>\\n\\n<div id=\"page\"></div>',\n\t\t\t\t\t\tcode: 'var myTmpl = $.templates(\"#myTmpl\"),\\n data = { name: \"Jo\" }' + (isJsr ? ',\\n html = myTmpl.render(data);\\n\\n$(\"#page\").html(html);' : ';\\n\\nmyTmpl.link(\"#page\", data);')\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".removesection\", function() {\n\t\t\t\t\tvar view = $.view(this);\n\t\t\t\t\tpage.removeSection(view.get(\"array\").data, view.getIndex());\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".runSample\", function() {\n\t\t\t\t\t$.view(this).ctx.parentTags.section.sampleFrame.runCode();\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".revertSample\", function() {\n\t\t\t\t\tvar tag = $.view(this).ctx.tag,\n\t\t\t\t\t\tsection = tag.tagName === \"section\" ? tag : tag.parent.parents.section;\n\t\t\t\t\tsection.sampleFrame.runCode(true);\n\t\t\t\t})\n\t\t\t\t.on(\"click\", \".tryIt\", function() {\n\t\t\t\t\tvar sampleSection = $.view(this).parent.tag,\n\t\t\t\t\t\ttabsControl = sampleSection.tabs,\n\t\t\t\t\t\ttryitTab = tabsControl.tabCount - 1;\n\t\t\t\t\ttabsControl.setTab(tabsControl.pane === tryitTab ? 0 : tryitTab);\n\t\t\t\t})\n\t\t\t\t.on(\"keyup\", \".try textarea\", function() {\n\t\t\t\t\t$.observable($.view(this).ctx.parentTags.section.sampleFrame).setProperty(\"ranIt\", true);\n\t\t\t\t})\n\t\t\t\t.on(\"contextmenu\", function() {\n\t\t\t\t\tvar editable = !page.editable;\n\t\t\t\t\tif (!editable || !content.search && (allowEdit || content.allowEdit)) {\n\t\t\t\t\t\t$.observable(content).setProperty(\"editable\", editable);\n\t\t\t\t\t\tif (page.tree) {\n\t\t\t\t\t\t\t$.observable(page.tree).setProperty(\"editable\", editable);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$.observable(page).setProperty(\"editable\", editable);\n\t\t\t\t\t\tsave();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\t\tonDispose: function() {\n\t\t\tsave();\n\t\t},\n\t\ttemplate: \"#pagePanelTmpl\",\n\n\t// properties\n\t\tmodes: {\n\t\t\tdetails: 1,\n\t\t\tsummary: 0,\n\t\t\tedit: 2\n\t\t},\n\t\tmode: 0,\n\t\teditable: false,\n\n\t// methods\n\t\tsetTree: function(tree) {\n\t\t\tthis.tree = tree;\n\t\t\t$.observable(tree).setProperty(\"selected\", selectedCategory);\n\t\t\ttree.onSelectionChange = function(selected) {\n\t\t\t\tsave(location.hash = selected.name);\n\t\t\t\tif (tree.editable) {\n\t\t\t\t\ttree.refresh();\n\t\t\t\t}\n\t\t\t\tisLeftNavSelectionChange = true;\n\t\t\t};\n\t\t\ttree.onExpansionChange = function(selected) {\n\t\t\t\tsave(selected.name);\n\t\t\t};\n\t\t},\n\t\tiframeLoaded: function(tagId, loadScript) {\n\t\t\tsampleFrames[tagId].getScript(loadScript);\n\t\t},\n\t\taddSignature: function(view) {\n\t\t\tvar signatures = view.data.signatures,\n\t\t\t\tlength = signatures.length,\n\t\t\t\tnewSignature = $.extend(true, {}, this.data.subTypes.signature);\n\t\t\tif (signatures[length-1]) {\n\t\t\t\t// Copy over the previous signature, but don't copy the event data, since we want new data-linking for the new instances.\n\t\t\t\t$.extend(true, newSignature, signatures[length-1]);\n\t\t\t\t$._removeData(newSignature);\n\t\t\t\t$._removeData(newSignature.params);\n\t\t\t}\n\t\t\t$.observable(signatures).insert(newSignature);\n\t\t},\n\t\taddParam: function(view, isTagArg) {\n\t\t\tvar params = isTagArg ? view.data.args : view.data.params,\n\t\t\t\tnewParam = $.extend(true, {}, this.data.subTypes.param);\n\t\t\t$.observable(params).insert(newParam);\n\t\t},\n\t\taddLink: function(view) {\n\t\t\tvar links = view.data.links,\n\t\t\t\tnewLink = $.extend(true, {}, this.data.subTypes.link);\n\t\t\t$.observable(links).insert(newLink);\n\t\t},\n\t\taddTopic: function(view) {\n\t\t\tvar topics = view.data.topics,\n\t\t\t\tnewTopic = $.extend(true, {}, this.data.subTypes.topic);\n\t\t\t$.observable(topics).insert(newTopic);\n\t\t},\n\t\taddCodeTab: function(view) {\n\t\t\tvar tabs = view.data.codetabs = view.data.codetabs || [],\n\t\t\t\tnewTab = $.extend(true, {}, this.data.subTypes.codetab);\n\t\t\t$.observable(tabs).insert(newTab);\n\t\t},\n\t\taddSection: function(view, type, sectionType, append) {\n\t\t\tfunction getLinks(cat, recurse) {\n\t\t\t\tvar childCat, i,\n\t\t\t\t\tchildCats = cat.categories || [],\n\t\t\t\t\tl = childCats.length;\n\t\t\t\tfor (i =0; i<l; i++) {\n\t\t\t\t\tchildCat = childCats[i];\n\t\t\t\t\tif (topics[hash = childCat.name]) {\n\t\t\t\t\t\tnewSection.topics.push({\n\t\t\t\t\t\t\thash: hash,\n\t\t\t\t\t\t\tlabel: childCat.label\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif (recurse) {\n\t\t\t\t\t\tgetLinks(childCat, recurse);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar selectList, index, sections, hash, left,\n\t\t\t\tcategory = this.category,\n\t\t\t\ttopics = this.data[topCategoryName],\n\t\t\t\ttopic = (topics || topCategory)[category.name],\n\t\t\t\tsectionTypes = this.data.sectionTypes,\n\t\t\t\tnewSection = $.extend(true, {}, sectionTypes[type]);\n\n\t\t\tif (sectionType) {\n\t\t\t\ttopic = append ? view.data : view.parent.get(\"item\").data;\n\t\t\t}\n\n\t\t\tif (topic) {\n\t\t\t\tif (topic.leftsections) {\n\t\t\t\t\tselectList = view.ctx.tag;\n\t\t\t\t\tleft = selectList.tagCtx.props.left;\n\t\t\t\t}\n\t\t\t\tsections = left ? topic.leftsections : topic.sections;\n\t\t\t\tif (!sections) {\n\t\t\t\t\tsections = [];\n\t\t\t\t\t$.observable(topic).setProperty(\"sections\", sections);\n\t\t\t\t}\n\t\t\t\tindex = append ? sections.length : view.getIndex();\n\t\t\t\tif (type === \"links\") {\n\t\t\t\t\tgetLinks(category);\n\t\t\t\t}\n\t\t\t\t$.observable(sections).insert(index, newSection);\n\t\t\t} else if (!topic) {\n\t\t\t\ttopics[category.name] = {\n\t\t\t\t\ttitle: category.label,\n\t\t\t\t\tpath: \"\",\n\t\t\t\t\tsections: [newSection]\n\t\t\t\t};\n\t\t\t\tview.refresh();\n\t\t\t\tif (selectList = view.childTags(true, \"selectList\")[0]) {\n\t\t\t\t\tselectList.toggleSelect(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsave();\n\t\t},\n\t\tremoveSection: function(sections, index) {\n\t\t\t$.observable(sections).remove(index);\n\t\t\tsave();\n\t\t},\n\t\ttryIt: function(view) {\n\t\t\tvar sample = view.data;\n\t\t\t$.observable(sample).setProperty(\"tryIt\", !sample.tryIt);\n\t\t},\n\t\thideCategory: function(hash) {\n\t\t\tfunction getCategoryNode(name, categories, parent) {\n\t\t\t\tstack.push(parent);\n\t\t\t\tvar category,\n\t\t\t\t\tl = categories.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\tcategory = categories[l];\n\t\t\t\t\tif (category.name === name || category.categories && (category = getCategoryNode(name, category.categories, category))) {\n\t\t\t\t\t\twhile (parent = stack.pop()) {\n\t\t\t\t\t\t\tif (parent.hidden) {\n\t\t\t\t\t\t\t\treturn parent;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn category;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstack.pop();\n\t\t\t}\n\t\t\tvar hidden,\n\t\t\t\tstack = [],\n\t\t\t\tcategories = this.data.categories;\n\n\t\t\thidden = hash && getCategoryNode(hash, categories);\n\t\t\treturn hidden && hidden.hidden;\n\t\t},\n\t\tscrollTo: function(lochash) {\n\t\t\tlocation.hash = lochash;\n\t\t},\n\t\tnavTo: function(lochash, newCat) {\n\t\t\tvar section, searchTreeNode, offset, categoryName, sectionIndex, filter, searchTerm, scrollTo, wasSearch, navTreeNode;\n\t\t\tif (prevLochash !== lochash) {\n\t\t\t\tif (section = searchRegex.exec(lochash)) {\n\t\t\t\t\tif (searchTerm = section[1]) {\n\t\t\t\t\t\t$.observable(searchInclude).setProperty({\n\t\t\t\t\t\t\tjsr: !section[3],\n\t\t\t\t\t\t\tjsv: !section[4],\n\t\t\t\t\t\t\tsmp: !section[5],\n\t\t\t\t\t\t\ttxt: !section[6]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcategoryName = section[7];\n\t\t\t\t\tsectionIndex = section[8];\n\t\t\t\t\tif (searchTreeNode = sectionIndex && searchTerm) {\n\t\t\t\t\t\tsearchTreeNode = categoryName + \"@\" + sectionIndex;\n\t\t\t\t\t\tsection = content.filter[sectionIndex].text;\n\t\t\t\t\t\t$.observable(content).setProperty(\"searchtext\", topSearchTree.searchtext = section);\n\t\t\t\t\t\tsearchtextElem.addClass(\"selected\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsection = sectionIndex;\n\t\t\t\t\t\twasSearch = content.searchtext;\n\t\t\t\t\t\t$.observable(content).setProperty(\"searchtext\", topSearchTree.searchtext = undefined);\n\t\t\t\t\t\tsearchtextElem.removeClass(\"selected\");\n\t\t\t\t\t}\n\t\t\t\t\tinitPage(categoryName, searchTerm, sectionIndex);\n\t\t\t\t\tif (!searchTerm && page.tree) { // If tree not yet instantiated, will set selection in page.setTree()\n\t\t\t\t\t\t$.observable(page.tree).setProperty(\"selected\", selectedCategory);\n\t\t\t\t\t\tnavTreeNode = $(\".sidenav li.selected\")[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (section && (scrollTargetElem = document.getElementById(lochash + \"$\"))) {\n\t\t\t\t\tskipLoad = true;\n\t\t\t\t\tnewCat = newCat === true || !isSearchTreeSelectionChange;\n\t\t\t\t\tsetTimeout(function() { // Need short delay for Chrome to scroll to 0 - after it has moved to previous scroll position\n\t\t\t\t\t\tif (lochash === location.hash) { // If a new request has started, skip this one. (Fast clicking on prev, next, or history back/forward)\n\t\t\t\t\t\t\tif (newCat || !scrollTargetElem) {\n\t\t\t\t\t\t\t\twindow.scrollTo(0, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (scrollTargetElem) {\n\t\t\t\t\t\t\t\toffset = $(scrollTargetElem).offset().top\n\t\t\t\t\t\t\t\t\t- (!content.searched\n\t\t\t\t\t\t\t\t\t\t? 40\n\t\t\t\t\t\t\t\t\t\t: searchTreeNode\n\t\t\t\t\t\t\t\t\t\t\t? 140\n\t\t\t\t\t\t\t\t\t\t\t: 120);\n\n\t\t\t\t\t\t\t\t$.observable(content).setProperty(\"loc\", lochash);\n\t\t\t\t\t\t\t\t// Detect whether to use documentElement or body for scrolling;\n\t\t\t\t\t\t\t\tvar el = document.documentElement;\n\t\t\t\t\t\t\t\tif (useBodyToScroll === undefined) { // Not set yet\n\t\t\t\t\t\t\t\t\tif (useBodyToScroll = !el.scrollTop) { // false if documentElement has scrollTop value\n\t\t\t\t\t\t\t\t\t\tif (!(useBodyToScroll = (el = document.body).scrollTop)) { // true if body has scrollTop value\n\t\t\t\t\t\t\t\t\t\t\tel.scrollTop = 1;\n\t\t\t\t\t\t\t\t\t\t\tif (useBodyToScroll = el.scrollTop) { // true if moving to scrollTop 1 actually worked. Otherwise false (0)\n\t\t\t\t\t\t\t\t\t\t\t\tel.scrollTop = 0; // reset to zero\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$(useBodyToScroll ? 'body' : 'html').delay(150).animate({scrollTop: offset}, searchTreeNode ? 100 : 625, function() {\n\t\t\t\t\t\t\t\t\t// Need 'body' for Safari and 'html' for the other browsers\n\t\t\t\t\t\t\t\t\tif (!isSearchTreeSelectionChange && lochash === location.hash) { // If a new request has started, skip this one.\n\t\t\t\t\t\t\t\t\t\tif (searchTreeNode = document.getElementById(searchTreeNode + \"$\")) {\n\t\t\t\t\t\t\t\t\t\t\tsearchNavElem.animate({scrollTop: searchNavElem.scrollTop() - searchNavElem.height()/2\n\t\t\t\t\t\t\t\t\t\t\t\t+ $(searchTreeNode).offset().top - searchbox.offset().top - 60}, 150);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (navTreeNode) {\n\t\t\t\t\t\t\t\t\t\tsideNavElem.animate({scrollTop: navTreeNode.offsetTop - sideNavElem.height()/2}, 150);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tscrollTargetElem = isSearchTreeSelectionChange = false;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tnavTreeNode = !isLeftNavSelectionChange && navTreeNode;\n\t\t\t\t\tscrollTargetElem = isSearchTreeSelectionChange = isLeftNavSelectionChange = false;\n\t\t\t\t\tsetTimeout(function() { // Need short delay for Chrome to scroll to 0 - after it has moved to previous scroll position\n\t\t\t\t\t\tif (!wasSearch) {\n\t\t\t\t\t\t\twindow.scrollTo(0, historyStates[historyIndex] && historyStates[historyIndex].scroll || 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (navTreeNode) {\n\t\t\t\t\t\t\tsideNavElem.animate({scrollTop: navTreeNode.offsetTop - sideNavElem.height()/2}, 150);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tprevLochash = lochash;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t},\n\n// {{searchTree}}\n \n\tsearchTreeTag = {\n\t\tbaseTag: \"tree\",\n\t\tfilter: true,\n\t\tinit: function(tagCtx) {\n\t\t\ttagCtx.ctx.tree = topSearchTree; // Set contextual property ~tree\n\t\t},\n\t\tonAfterLink: function() {\n\t\t\tvar self = this;\n\t\t\tself.contents(\"ul\")\n\t\t\t\t.on(\"click\", \".toggle\", function(ev) {\n\t\t\t\t\t$.view(this).ctx.tag.toggle();\n\t\t\t\t\tev.stopImmediatePropagation();\n\t\t\t\t})\n\t\t},\n\t\ttemplate: \"<ul class=\\\"tree\\\">\" +\n\t\t\t\"{^{for}}\" +\n\t\t\t\t\"{^{searchTreeNode/}}\" +\n\t\t\t\"{{/for}}\" +\n\t\t\"</ul>\"\n\t},\n\n\tsearchTreeNodeTag = {\n\t\tbaseTag: \"treeNode\",\n\t\ttemplate: \"{^{if !hidden && filtered}}<li {{:filtered.length ? 'class=\\\"withgroup\\\"' : ''}} data-link=\\\"class{merge: ~tree.topicName === name toggle='topicsel'}\\\">\" +\n\t\t\t\"{^{if categories && categories.length }}\" +\n\t\t\t\t\"<span class=\\\"spacerbox\\\"></span>\" +\n\t\t\t\"{{else}}\" +\n\t\t\t\t\"<span class=\\\"spacer\\\">•</span>\" +\n\t\t\t\"{{/if}}\" +\n\t\t\t\"<span class=\\\"searchitem\\\">{{>label}}</span> {{if filtered.length}}<span class='searchgroup'>{^{for filtered ~name=name}}<div class='searchcontext' id='{{:section}}$' data-link=\\\"{on ~tree.select section true} class{merge: ~tree.selected === section toggle='sectionsel'} {on 'mouseenter' ~tree.mouseenter ~name}\\\">{{:text}}</div><span class='searchplace'></span>{{/for}}</span>{{/if}}\" +\n\t\t\"</li>{{if filtered.length}}<li class='aftergroup'></li>{{/if}}\" +\n\t\t\t\"<li>\" +\n\t\t\t\t\"<ul>\" +\n\t\t\t\t\t\"{^{for categories }}\" +\n\t\t\t\t\t\t\"{^{searchTreeNode/}}\" +\n\t\t\t\t\t\"{{/for}}\" +\n\t\t\t\t\"</ul>\" +\n\t\t\t\"</li>\" +\n\t\t\"{{/if}}\"\n\t},\n\n// {{section}}\n\n\tsectionTag = {\n\t\tinit: function(tagCtx) {\n\t\t\tthis.data = tagCtx.view.data;\n\t\t},\n\t\trender: function(type, mode) {\n\t\t\tvar editable = mode === \"edit\",\n\t\t\t\tbuttons = \"\";\n\t\t\tif (editable) {\n\t\t\t\tmode = this.selected ? mode : \"editview\";\n\t\t\t\tif (!this.parent.parents.section || this.parent.parents.section.selected) {\n\t\t\t\t\tbuttons = '<button class=\"toggleselect cmdbtn\">' + (this.selected\n\t\t\t\t\t\t? 'ok</button><button class=\"up cmdbtn\">up</button><button class=\"down cmdbtn\">down'\n\t\t\t\t\t\t: \"edit\"\n\t\t\t\t\t) + '</button><span class=\"removesection\"></span><br/>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.tagCtx.tmpl = this.templates[mode][type];\n\t\t\t\tbuttons += this.tagCtx.render();\n\t\t\treturn editable\n\t\t\t\t? ('<div class=\"mode-' + mode + '\">' + buttons + \"</div>\") : buttons;\n\t\t},\n\t\tonAfterLink: function() {\n\t\t\tvar self = this;\n\t\t\tif (self.ctxPrm(\"mode\") === \"edit\") {\n\t\t\t\tself.contents(\".cmdbtn\").on(\"click\", function(ev) {\n\t\t\t\t\tev.stopPropagation();\n\t\t\t\t\tev.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t\tself.contents().on(\"click\", function(ev) {\n\t\t\t\t\tif ($(ev.target).is(\"cmdbtn,a,input,textarea,button,img,.removesection\")) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tself.toggleSelect(); \n\t\t\t\t});\n\t\t\t\tself.contents(true, \".toggleselect:first\").on(\"click\", function() {\n\t\t\t\t\tself.toggleSelect();\n\t\t\t\t});\n\t\t\t\tself.contents(true, \".up\").on(\"click\", function(ev) {\n\t\t\t\t\tself.moveUp();\n\t\t\t\t\tev.stopImmediatePropagation();\n\t\t\t\t});\n\t\t\t\tself.contents(true, \".down\").on(\"click\", function(ev) {\n\t\t\t\t\tself.moveDown();\n\t\t\t\t\tev.stopImmediatePropagation();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonDispose: function() {\n\t\t\tif (this.parent.selectedChild === this) {\n\t\t\t\tthis.parent.selectedChild = null;\n\t\t\t}\n\t\t},\n\n\t// methods\n\t\tmoveUp: function() {\n\t\t\tvar index = this.tagCtx.view.index,\n\t\t\t\tsections = this.parent.tagCtx.args[0];\n\t\t\tif (index) {\n\t\t\t\t$.observable(sections).move(index, index-1);\n\t\t\t}\n\t\t\tsave();\n\t\t},\n\t\tmoveDown: function() {\n\t\t\tvar index = this.tagCtx.view.index,\n\t\t\t\tsections = this.parent.tagCtx.args[0];\n\t\t\tif (index + 1 < sections.length) {\n\t\t\t\t$.observable(sections).move(index, index+1);\n\t\t\t}\n\t\t\tsave();\n\t\t},\n\t\ttoggleSelect: function() {\n\t\t\t$.observable(this).setProperty(\"selected\", !this.selected);\n\t\t\tthis.refresh();\n\t\t\tif (this.parent.onToggleSelect) {\n\t\t\t\tthis.parent.onToggleSelect(this);\n\t\t\t}\n\t\t\tsave();\n\t\t}\n\t},\n\n// {{sectionButton}}\n\n\tsectionButtonsTag = {\n\t\trender: function(sectionTypes) {\n\t\t\tvar ret = \"<div class=\\\"buttons\\\">\",\n\t\t\t\tnestedSectionType = this.ctxPrm(\"sectionType\");\n\t\t\tfor (var type in sectionTypes) {\n\t\t\t\tret += \"<button class=\\\"\"\n\t\t\t\t\t\t\t+ (this.tagCtx.props.append ? \"append \" : \"\")\n\t\t\t\t\t\t\t+ \"insertsection cmdbtn\\\" \"\n\t\t\t\t\t\t\t+ (nestedSectionType ? \"data-type=\\\"\" + nestedSectionType + \"\\\"\" : \"\")\n\t\t\t\t\t\t+ \">\"\n\t\t\t\t\t\t\t+ type\n\t\t\t\t\t\t+ \"</button>\";\n\t\t\t}\n\t\t\treturn ret + \"</div>\";\n\t\t}\n\t},\n\n// {{sectionTitle}}\n\n\tsectionTitleTag = {\n\t\ttemplate: \"#sectionTitleTmpl\"\n\t},\n\n// {{sectionHeader}}\n\n\tsectionHeaderTag = {\n\t\ttemplate: \"#sectionHeaderTmpl\"\n\t},\n\n// {{sampleFrame}}\n\n\tsampleFrameTag = {\n\t\tinit: function() {\n\t\t\tvar self = this,\n\t\t\t\tdata = $.parseJSON(stringify(self.parent.parents.section.data)),\n\t\t\t\tcodetabs = data.codetabs;\n\n\t\t\tself.parent.sampleFrame = self;\n\t\t\tself.getScript = function(loadScript) {\n\t\t\t\tself.loadScript = loadScript;\n\t\t\t\tif (data.url) {\n\t\t\t\t\tvar html = $.trim(self.iframeWnd.document.body.innerHTML).replace(/ /g, \"\\n\"), // IE puts entities in place of some newlines\n\t\t\t\t\t\ttoremove = html.indexOf(\"\\n<!--<script src=\\\"\"),\n\t\t\t\t\t\theader = self.iframeWnd.document.head || \"\";\n\t\t\t\t\tif (toremove > 0) {\n\t\t\t\t\t\thtml = html.slice(0, toremove);\n\t\t\t\t\t}\n\t\t\t\t\tif (header) { // Fails in IE8 or earlier\n\t\t\t\t\t\theader = header.innerHTML\n\t\t\t\t\t\t\t.replace(/^.*sample-viewer.*$/m, \"\")\n\t\t\t\t\t\t\t.replace(/^.*chrome-extension.*$/mg, \"\") // Remove scripts inserted by chrome extensions, e.g. BitWarden\n\t\t\t\t\t\t\t.replace(/<style type=\"text\\/css\"><\\/style>/, \"\")\n\t\t\t\t\t\t\t.replace(/^\\n*.*\\.js\"><\\/script>\\n*/, \"\")\n\t\t\t\t\t\t\t.replace(/\\n\\n/, \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\t$.get(data.url + \".js\", function(content) {\n\t\t\t\t\t\tloadScript({code: content});\n\t\t\t\t\t\tself.origData = self.sampleData = {\n\t\t\t\t\t\t\turl: data.url,\n\t\t\t\t\t\t\thtml: html,\n\t\t\t\t\t\t\theader: header,\n\t\t\t\t\t\t\tcode: content\n\t\t\t\t\t\t};\n\t\t\t\t\t\tself.tryItData = {\n\t\t\t\t\t\t\thtml: html,\n\t\t\t\t\t\t\theader: header,\n\t\t\t\t\t\t\tcode: content\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcodetabs && self.loadTabs(codetabs);\n\t\t\t\t\t}, \"text\");\n\t\t\t\t} else {\n\t\t\t\t\theader = data.header ? data.header + \"\\n\" : \"\";\n\t\t\t\t\tloadScript(data);\n\t\t\t\t\tself.origData = self.sampleData = {\n\t\t\t\t\t\tdata: data.data,\n\t\t\t\t\t\tmarkup: data.markup,\n\t\t\t\t\t\theader: header,\n\t\t\t\t\t\taction: data.action,\n\t\t\t\t\t\thtml: data.html,\n\t\t\t\t\t\tcode: data.code,\n\t\t\t\t\t\tjsrJsvJqui: data.jsrJsvJqui,\n\t\t\t\t\t\tnocss: data.nocss\n\t\t\t\t\t};\n\t\t\t\t\tself.tryItData = {\n\t\t\t\t\t\tdata: data.data,\n\t\t\t\t\t\tmarkup: data.markup,\n\t\t\t\t\t\theader: header,\n\t\t\t\t\t\taction: data.action,\n\t\t\t\t\t\thtml: data.html,\n\t\t\t\t\t\tcode: data.code,\n\t\t\t\t\t\tjsrJsvJqui: data.jsrJsvJqui,\n\t\t\t\t\t\tnocss: data.nocss\n\t\t\t\t\t};\n\t\t\t\t\tcodetabs && self.loadTabs(codetabs);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tloadTabs: function(codetabs) {\n\t\t\tvar self = this;\n\t\t\t$.each(codetabs, function(index, tab) {\n\t\t\t\t$.get(tab.url, function(content) {\n\t\t\t\t\tself.tryItData['c' + index] = self.sampleData['c' + index] = content;\n\t\t\t\t}, \"text\");\n\t\t\t});\n\t\t},\n\t\ttemplate: \"<div class=\\\"nosearch\\\" style=\\\"height: {{attr:height}}px;\\\"><div style=\\\"padding: 10px;\\\">Loading...</div></div><iframe src=\\\"{{attr:url||'samples/iframedefault' + (jsrJsvJqui||'') + (nocss?'_nocss':'')}}.html\\\" class=\\\"sampleframe\\\" name=\\\"result\\\" style=\\\"height: {{attr:height}}px;\\\"></iframe>\",\n\t\tonBind: function() {\n\t\t\tvar self = this,\n\t\t\t\tiframeWnd = self.iframeWnd = $(self.parentElem).find(\".sampleframe\")[0].contentWindow;\n\t\t\tif (iframeWnd) {\n\t\t\t\tsampleFrames[iframeWnd._tgId = self._tgId] = self;\n\t\t\t}\n\t\t\tself.parent.tabs.onSelectionChange = function() {\n\t\t\t\tself.onTabChange.apply(self, arguments);\n\t\t\t};\n\t\t\tvar data = self.linkCtx.data;\n\t\t},\n\t\tonDispose: function() {\n\t\t\tif (this.iframeWnd.$ && this.iframeWnd.$.observe) {\n\t\t\t\tthis.iframeWnd.$.unobserve();\n\t\t\t}\n\t\t\tthis.iframeWnd = this.parent.sampleFrame = this.parentElem = undefined;\n\t\t},\n\t\tonTabChange: function(index, tabs) {\n\t\t\t$.observable(this).setProperty(\"tryIt\", index === tabs.tabCount - 1);\n\t\t},\n\t\trunCode: function(revert) {\n\t\t\tif (revert) {\n\t\t\t\t$.observable(this.tryItData).setProperty(this.origData);\n\t\t\t\t$.observable(this).setProperty(\"ranIt\", !revert);\n\t\t\t}\n\t\t\t\tthis.loadScript(this.tryItData);\n\t\t}\n\t},\n\n// {{sampleFields}}\n\n\tsampleFieldsTag = {\n\t\tinit: function() {\n\t\t\tthis.data = this.tagCtx.view.data.tryItData;\n\t\t},\n\t\trender: function(mode, arg1, arg2) {\n\t\t\tfunction fullCode() {\n\t\t\t\tvar headerInsert, urlTokens,\n\t\t\t\t\tcode = tryItData.code,\n\t\t\t\t\tcodeInHeader = code && code.indexOf(\"$(function()\") === 0,\n\t\t\t\t\thtml = tryItData.html,\n\t\t\t\t\theader = tryItData.header;\n\t\t\t\tif (!url) {\n\t\t\t\t\theader = header ? header.replace(/^\\S/gm, \" $&\") : \"\";\n\t\t\t\t\theaderInsert =\n\t\t\t\t\t\tnocss || header && !headerAction\n\t\t\t\t\t\t\t? \"\" // If nocss specified, or if headerAction is replace (\"\") and there is header content provided, don't insert samples.css\n\t\t\t\t\t\t\t: \" <link href=\\\"https://www.jsviews.com/samples/samples.css\\\" rel=\\\"stylesheet\\\" />\\n\";\n\t\t\t\t\theader = headerAction === \"append\" ? headerInsert + header : header + headerInsert;\n\t\t\t\t\theader = header.replace(/((?:href|src)=[\"'])\\//g, function(replaced, start, index, str) {\n\t\t\t\t\t\treturn start + \"https://www.jsviews.com/\"; // replace \"/download/...\" and similar, by \"https://www.jsviews.com/download/...\"\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\turlTokens = url.split(\"/\");\n\t\t\t\t\turlTokens.pop();\n\t\t\t\t\theader = header.replace(/((?:href|src)=[\"'])(?:\\.\\.\\/)*\\/?/g, function(replaced, start, index, str) {\n\t\t\t\t\t\tif (/^(?:https:|http:)?\\/\\//.test(str.slice(index+start.length))) {\n\t\t\t\t\t\t\treturn replaced;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treplaced = replaced.replace(/[^.]/g,\"\").length/2;\n\t\t\t\t\t\theaderInsert = (replaced ? urlTokens.slice(0, -replaced) : urlTokens).join(\"/\");\n\t\t\t\t\t\tif (headerInsert.length) {\n\t\t\t\t\t\t\theaderInsert += \"/\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn start + \"https://www.jsviews.com/\" + headerInsert; // replace \"../../download/...\" and similar, by \"https://www.jsviews.com/download/...\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn \"<!DOCTYPE html>\\n\"\n\t\t\t\t\t+ \"<!-- To run the current sample code in your own environment, copy this to an html page. -->\\n\\n\"\n\t\t\t\t\t+ \"<html>\\n\"\n\t\t\t\t\t+ \"<head>\\n\"\n\t\t\t\t\t+ \" <script src=\\\"https://code.jquery.com/jquery-3.6.4.min.js\\\"></script>\\n\"\n\t\t\t\t\t+ (url\n\t\t\t\t\t\t? ((codeInHeader\n\t\t\t\t\t\t\t\t? (\"<script>\\n\" + code\n\t\t\t\t\t\t\t\t\t+ \"\\n</script>\\n\")\n\t\t\t\t\t\t\t\t: \"\"))\n\t\t\t\t\t\t: (\n\t\t\t\t\t(jsrJsvJqui === \"jqui\"\n\t\t\t\t\t\t? \" <script src=\\\"https://code.jquery.com/ui/1.13.2/jquery-ui.min.js\\\"></script>\\n\"\n\t\t\t\t\t\t\t+ \" <link href=\\\"https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css\\\" rel=\\\"stylesheet\\\" />\\n\"\n\t\t\t\t\t\t: \"\"\n\t\t\t\t\t)\n\t\t\t\t\t+ \" <script src=\\\"https://www.jsviews.com/download/js\" + (jsrJsvJqui === \"jsr\" ? \"render\" : \"views\")\n\t\t\t\t\t+ \".min.js\\\"></script>\\n\"\n\t\t\t\t\t+ (jsrJsvJqui === \"jqui\"\n\t\t\t\t\t\t? \" <script src=\\\"https://www.jsviews.com/download/sample-tag-controls/jsviews-jqueryui-widgets.min.js\\\"></script>\\n\"\n\t\t\t\t\t\t: \"\")\n\t\t\t\t\t))\n\t\t\t\t\t+ (header || \"\") + \"</head>\\n\"\n\t\t\t\t\t+ \"<body>\\n\\n\"\n\t\t\t\t\t+ (html\n\t\t\t\t\t\t? (html + (code && !codeInHeader ? \"\\n\\n<script>\\n\" + code + \"\\n</script>\" : \"\"))\n\t\t\t\t\t\t: (tryItData.markup\n\t\t\t\t\t\t\t? (\"<div id=\\\"result\\\"></div>\\n\\n\"\n\t\t\t\t\t\t\t\t+ \"<script id=\\\"theTmpl\\\" type=\\\"text/x-jsrender\\\">\\n\"\n\t\t\t\t\t\t\t\t+ tryItData.markup\n\t\t\t\t\t\t\t\t+ \"\\n</script>\\n\\n\"\n\t\t\t\t\t\t\t\t+ \"<script>\\n\"\n\t\t\t\t\t\t\t\t+ \"var data = \" + stringify(tryItData.data) + \";\\n\\n\"\n\t\t\t\t\t\t\t\t+ \"var template = $.templates(\\\"#theTmpl\\\");\\n\\n\"\n\t\t\t\t\t\t\t\t+ (jsrJsvJqui === \"jsr\"\n\t\t\t\t\t\t\t\t\t? (\"var htmlOutput = template.render(data);\\n\\n\"\n\t\t\t\t\t\t\t\t\t\t+ \"$(\\\"#result\\\").html(htmlOutput);\")\n\t\t\t\t\t\t\t\t\t: \"template.link(\\\"#result\\\", data);\")\n\t\t\t\t\t\t\t\t+ \"\\n</script>\"\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t+ \"\\n\\n</body>\\n\"\n\t\t\t\t\t+ \"</html>\\n\";\n\t\t\t}\n\n\t\t\tfunction renderField(type, label) {\n\t\t\t\tvar value = tryItData[type],\n\t\t\t\t\tisData = type === \"data\",\n\t\t\t\t\thighlightSyntax = {\n\t\t\t\t\t\tcode: \"js\",\n\t\t\t\t\t\tmarkup: \"jsr\",\n\t\t\t\t\t\thtml: \"jsr\"\n\t\t\t\t\t};\n\n\t\t\t\tif (value) {\n\t\t\t\t\tvalue = \"<label>\" + (label||type);\n\t\t\t\t\tif (editable) {\n\t\t\t\t\t\t value += \":<textarea data-link=\\\"\"\n\t\t\t\t\t\t\t+ (isData\n\t\t\t\t\t\t\t\t? \"{stringify:tryItData.\" + type + \":parse}\"\n\t\t\t\t\t\t\t\t: \"tryItData.\" + type\n\t\t\t\t\t\t\t) + \"\\\"></textarea></label>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue += \":<pre>\"\n\t\t\t\t\t\t\t+ (isData\n\t\t\t\t\t\t\t\t? hljs.highlight(\"json\", stringify(tryItData[type])).value\n\t\t\t\t\t\t\t\t: hljs.highlight(highlightSyntax[type] || \"javascript\", tryItData[type]).value\n\t\t\t\t\t\t\t) + \"</pre></label>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn value || \"\";\n\t\t\t}\n\n\t\t\tvar ret = \"\",\n\t\t\t\ttryItData = this.data,\n\t\t\t\torigData = this.tagCtx.view.data.origData,\n\t\t\t\tjsrJsvJqui = origData.jsrJsvJqui,\n\t\t\t\tnocss = origData.nocss,\n\t\t\t\theaderAction = origData.action,\n\t\t\t\teditable = mode===\"edit\",\n\t\t\t\turl = this.parent.parents.section.data.url;\n\n\t\t\tif (mode === \"full\") {\n\t\t\t\tret += \"<textarea class=\\\"fullcode\\\">\" + htmlConverter(fullCode()) + \"</textarea>\";\n\t\t\t} else if (mode === \"code\") {\n\t\t\t\tret += renderField(arg1, arg2);\n\t\t\t} else if (tryItData.html) {\n\t\t\t\tret += renderField(\"html\") + renderField(\"code\", \"javascript\"); // Could do + renderField(\"header\");\n\t\t\t} else if (tryItData.markup) {\n\t\t\t\tret += renderField(\"markup\", \"template markup\") + renderField(\"data\");\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t},\n\n//#endregion\n\n//#region TEMPLATES\n\n\ttemplates = {\n\t\tpage: $.templates({\n\t\t\tmarkup: \"#pageTmpl\",\n\t\t\ttags: {\n\t\t\t\tsectionButtons: sectionButtonsTag,\n\t\t\t\tsectionHeader: sectionHeaderTag,\n\t\t\t\tsectionTitle: sectionTitleTag\n\t\t\t},\n\t\t\tconverters: {\n\t\t\t\tnewsearch: function(val) {\n\t\t\t\t\treturn val.toLowerCase();\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t},\n\tsectionTemplates = {\n\t\tsummary: {\n\t\t\tpara: $.templates(\"#paraTmpl\"),\n\t\t\tapi: $.templates({\n\t\t\t\tmarkup: \"#apiTmpl\",\n\t\t\t\thelpers: {\n\t\t\t\t\tsignature: signature\n\t\t\t\t}\n\t\t\t}),\n\t\t\ttag: $.templates({\n\t\t\t\tmarkup: \"#tagTmpl\",\n\t\t\t\thelpers: {\n\t\t\t\t\tsignature: signature\n\t\t\t\t}\n\t\t\t}),\n\t\t\tdata: $.templates(\"#dataTmpl\"),\n\t\t\ttemplate: $.templates({\n\t\t\t\tmarkup: \"#templateTmpl\"\n\t\t\t}),\n\t\t\tcode: $.templates(\"#codeTmpl\"),\n\t\t\tsample: $.templates({\n\t\t\t\tmarkup: \"#sampleTmpl\",\n\t\t\t\ttags: {\n\t\t\t\t\tsampleFrame: sampleFrameTag,\n\t\t\t\t\tsampleFields: sampleFieldsTag\n\t\t\t\t},\n\t\t\t\thelpers: {\n\t\t\t\t\ttabsTmpl: function() {\n\t\t\t\t\t\tvar tab,\n\t\t\t\t\t\t\tcodetabs = this.data.codetabs || [],\n\t\t\t\t\t\t\tcodetabsLength = codetabs.length,\n\t\t\t\t\t\t\ttemplate = '{^{tabs tabCaption=\"How it works\"}}' +\n\t\t\t\t\t\t\t'<div style=\"margin: -18px 0\">{{for ~sections}}' +\n\t\t\t\t\t\t\t\t'{{if ~mode!==\"summary\" || !detail}}{^{section _type ~mode /}}{{/if}}' +\n\t\t\t\t\t\t\t'{{/for}}</div>' +\n\t\t\t\t\t\t'{{else tabCaption=\"Code\"}}' +\n\t\t\t\t\t\t\t'<div class=\"code\">' +\n\t\t\t\t\t\t\t\t'{{sampleFields/}}' +\n\t\t\t\t\t\t\t'</div>';\n\n\t\t\t\t\t\tfor (tab = 0; tab < codetabsLength; tab++) { // Add an {{else}} block for each codetab\n\t\t\t\t\t\t\ttemplate += '{{else tabCaption=\"' + codetabs[tab].label + '\"}}' +\n\t\t\t\t\t\t\t\t'<div class=\"codetab\">' +\n\t\t\t\t\t\t\t\t\t'{{sampleFields \"code\" \"c' + tab + '\" \"' + codetabs[tab].url + '\"/}}' +\n\t\t\t\t\t\t\t\t'</div>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttemplate +=\n\t\t\t\t\t\t'{{else tabCaption=\"Full Code\"}}' +\n\t\t\t\t\t\t\t'{{sampleFields \"full\"/}}' +\n\t\t\t\t\t\t'{{else tabCaption=\"Try it\"}}' +\n\t\t\t\t\t\t\t'<div class=\"runButtons\">' +\n\t\t\t\t\t\t\t\t'<em>Try it:</em> make changes below, then run... <button class=\"runSample\" data-link=\"disabled{:!ranIt}\">Run code</button>' +\n\t\t\t\t\t\t\t\t'<button class=\"revertSample\" data-link=\"disabled{:!ranIt}\">Clear changes</button>' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t'<div class=\"try\">' +\n\t\t\t\t\t\t\t\t'{{sampleFields \"edit\"/}}' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t'{{/tabs}}';\n\t\t\t\t\t\treturn template;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t\tlinks: $.templates({\n\t\t\t\tmarkup: \"#linksTmpl\",\n\t\t\t\thelpers: {\n\t\t\t\t\turl: function(hash) {\n\t\t\t\t\t\treturn location.pathname +\"#\" + hash;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tedit: {\n\t\t\tpara: $.templates(\"#editParaTmpl\"),\n\t\t\tapi: $.templates(\"#editApiTmpl\"),\n\t\t\ttag: $.templates(\"#editTagTmpl\"),\n\t\t\tdata: $.templates(\"#editDataTmpl\"),\n\t\t\ttemplate: $.templates(\"#editTemplateTmpl\"),\n\t\t\tcode: $.templates(\"#editCodeTmpl\"),\n\t\t\tsample: $.templates(\"#editSampleTmpl\"),\n\t\t\tlinks: $.templates(\"#editLinksTmpl\")\n\t\t}\n\t},\n\n\ttestDiv = $(\"#testHtml\")[0];\n\ndocument.onkeydown = function(ev) {\n\tev = ev || window.event;\n\tvar keyCode = ev.keyCode;\n\tif (!ev.altKey && !ev.shiftKey) {\n\t\tif (keyCode === 27) { // Escape\n\t\t\tcontent.searchTree.close();\n\t\t} else if (ev.ctrlKey) {\n\t\t\tif (content.search) {\n\t\t\t\tif (keyCode === 39) { // Right arrow\n\t\t\t\t\tcontent.searchTree.next();\n\t\t\t\t} else if (keyCode === 37) { //Left Arrow\n\t\t\t\t\tcontent.searchTree.prev();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (keyCode === 191) { // Ctrl+/\n\t\t\t\tsearchbox.focus();\n\t\t\t\twindow.scrollTo(0, 0);\n\t\t\t}\n\t\t}\n\t}\n};\n\nfunction treeGroup () {}\n\ntreeGroup.prototype = {\n\tselect: function(section) {\n\t\tif (section && this.selected !== section) {\n\t\t\tlocation.hash = \"search?s=\" + lowerCaseEncodeURI(content.search) + searchIncludeHash() + \"&l=\" + section;\n\t\t\tsearchtextElem.addClass(\"selected\");\n\t\t}\n\t},\n\tunselect: function() {\n\t\tlocation.hash = \"search?s=\" + lowerCaseEncodeURI(content.search) + searchIncludeHash();\n\t\tsearchtextElem.removeClass(\"selected\");\n\t},\n\tchanging: function(ev, eventArgs) {\n\t\tvar newSearch,\n\t\t\tnoSearch = \" \",\n\t\t\tsearchTerm = eventArgs.value;\n\t\tif (searchTerm) {\n\t\t\tif (searchTerm !== content.search) {\n\t\t\t\tnoSearch = \"<b>Enter</b>: Search...<br/><b>Escape</b>: Quit<br/><b>Ctrl+Left/Right Arrow</b>: Prev/Next result\";\n\t\t\t} else {\n\t\t\t\tnoSearch = \"\";\n\t\t\t}\n\t\t}\n\t\t$.observable(content).setProperty(\"noSearch\", noSearch);\n\t\treturn false;\n\t},\n\tonEnter: function(ev, eventArgs) {\n\t\tvar newSearch,\n\t\t\tnoSearch = \" \",\n\t\t\tsearchTerm = ev.target.value;\n\t\tif (ev.keyCode === 13 && searchTerm && !content.editable) {\n\t\t\tnewSearch = content.search !== searchTerm;\n\t\t\tsearchTerm = \"#search?s=\" + lowerCaseEncodeURI(searchTerm) + searchIncludeHash();\n\t\t\tif (location.hash !== searchTerm) {\n\t\t\t\tlocation.hash = searchTerm;\n\t\t\t\t$.observable(content).setProperty(\"noSearch\", newSearch ? \"Loading...\" : \"\");\n\t\t\t}\n\t\t\treturn; // Set content.search to value in text box.\n\t\t}\n\t},\n\tprev: function() {\n\t\t$(\"#prev\").focus();\n\t\tvar newIndex = this.sectionIndex === undefined ? content.filterlen - 1 : this.sectionIndex - 1;\n\t\tif (newIndex >= 0) {\n\t\t\tthis.select(content.filter[newIndex].section);\n\t\t} else if (newIndex === -1) {\n\t\t\tthis.unselect();\n\t\t}\n\t},\n\tnext: function() {\n\t\t$(\"#next\").focus();\n\t\tvar newIndex = this.sectionIndex === undefined ? 0 : this.sectionIndex + 1;\n\t\tif (newIndex < content.filterlen) {\n\t\t\tthis.select(content.filter[newIndex].section);\n\t\t} else if (newIndex === content.filterlen) {\n\t\t\tthis.unselect();\n\t\t}\n\t},\n\tclose: function() {\n\t\tvar catName = searchRegex.exec(location.hash);\n\t\tlocation.hash = catName && catName[7] || topCategoryName;\n\t},\n\tmouseenter: function(topicName, ev, eventArgs) { // Hover over a search target section\n\t\tvar section = eventArgs.linkCtx.data;\n\n\t\t$.observable(content).setProperty({\n\t\t\thoverText: section.text, // Set section text on hover div, which will also make it visible\n\t\t\thoverTopicSel: this.topicName === topicName // True for search section within the currently selected topic - sets class for colors.\n\t\t});\n\t\thoverTextElem\n\t\t\t.show()\n\t\t\t.offset({top: eventArgs.linkCtx.elem.offsetTop + searchNavElem.offset().top - searchNavElem.scrollTop()});\n\t},\n\tmouseleave: function(ev, eventArgs) {\n\t\thoverTextElem.hide();\n\t},\n\tmousewheel: function(ev, eventArgs) {\n\t\thoverTextElem.hide();\n\t\tev.preventDefault();\n\t\tsearchNavElem.scrollTop(searchNavElem.scrollTop() + ev.originalEvent.deltaY);\n\t},\n\tclick: function(ev, eventArgs) { // Click on overlay: \"#hoverText\"\n\t\tvar leftTarget = searchNavElem.position().left + 10;\n\t\thoverTextElem.hide();\n\t\tisSearchTreeSelectionChange = true;\n\t\tthis.select($.view(document.elementFromPoint(leftTarget, ev.clientY)).data.section);\n\t}\n};\n\nfunction lowerCaseEncodeURI(val) {\n\treturn encodeURIComponent(val).toLowerCase();\n}\n\nfunction searchIncludeHash() {\n\tvar hash = \"\";\n\tif (!(searchInclude.jsr && searchInclude.jsv && searchInclude.smp && searchInclude.txt)) {\n\t\thash += \"&f=\"\n\t\t+ (searchInclude.jsr ? \"\" : \"jsr-\")\n\t\t+ (searchInclude.jsv ? \"\" : \"jsv-\")\n\t\t+ (searchInclude.smp ? \"\" : \"smp-\")\n\t\t+ (searchInclude.txt ? \"\" : \"txt-\");\n\t}\n\treturn hash;\n}\n\nfunction searchContent(searchValue) {\n\tvar i, category, foundInCat, foundInCats,\n\t\tcategories = content.categories,\n\t\tl = categories.length;\n\tcontent.filter = [];\n\t$.observable(content).setProperty(\"searchtext\", \"\");\n\tsearchtextElem && searchtextElem.removeClass(\"selected\");\n\tfor (i=1; categories && i<l; i++) {\n\t\tcategory = categories[i];\n\t\tfoundInCat = undefined;\n\t\tif ((category.filter !== \"jsr\" || searchInclude.jsr)\n\t\t\t&& (category.filter !== \"jsv\" || searchInclude.jsv)\n\t\t\t&& !category.hidden\n\t\t\t&& searchCat(category, searchValue.toLowerCase(), content[category.name], content.find[category.name])) {\n\t\t\tfoundInCat = true;\n\t\t\tfoundInCats = true;\n\t\t}\n\t\t$.observable(category).setProperty(\"filtered\", foundInCat);\n\t}\n\t$.observable(content).setProperty({\n\t\tnoSearch: foundInCats || !searchValue ? \"\" : \"No results found for <span class='searchterm'>\" + htmlConverter(searchValue) + \"</span>...\",\n\t\tfilterlen: content.filter.length\n\t});\n}\n\nfunction searchCat(category, search, topCatContent, topCatFindContent) {\n\tvar i, l, found, foundInTopic, foundInSubCat, categories, subCategory;\n\tif (search && (categories = category.categories)) {\n\t\tl = categories.length;\n\t\tfor (i=0; categories && i<l; i++) {\n\t\t\tsubCategory = categories[i];\n\t\t\tfoundInSubCat = foundInTopic = undefined;\n\t\t\tif ((subCategory.filter !== \"jsr\" || searchInclude.jsr)\n\t\t\t\t&& (subCategory.filter !== \"jsv\" || searchInclude.jsv)\n\t\t\t\t&& !subCategory.hidden) {\n\t\t\t\tfoundInTopic = searchTopic(subCategory.name, search, topCatContent, topCatFindContent);\n\t\t\t\tfoundInSubCat = searchCat(subCategory, search, topCatContent, topCatFindContent);\n\t\t\t\tif (foundInTopic && foundInTopic.length || foundInSubCat) {\n\t\t\t\t\tfound = foundInTopic;\n\t\t\t\t} else {\n\t\t\t\t\tfoundInTopic = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$.observable(subCategory).setProperty(\"filtered\", foundInTopic);\n\t\t}\n\t}\n\treturn found;\n}\n\nfunction searchTopic(topicName, text, topCatContent, topCatFindContent) {\n\tvar i, l, index, displayText, ind, section, preText, postText, filtered, sectionId, searchItem, findSection, searchAnchor,\n\t\ttopic = topCatContent[topicName],\n\t\tfindTopic = topCatFindContent[topicName];\n\tif (findTopic) {\n\t\tl = findTopic.sections.length;\n\t\tfiltered = [];\n\t\tif ((topic.filter !== \"jsr\" || searchInclude.jsr)\n\t\t\t&& (topic.filter !== \"jsv\" || searchInclude.jsv)) {\n\t\t\tfor (i=0; i<l; i++) {\n\t\t\t\tsection = topic.sections[i];\n\t\t\t\tfindSection = findTopic.sections[i];\n\t\t\t\tsearchAnchor = undefined;\n\t\t\t\tif (section && findSection.text && (section._type === \"sample\" && searchInclude.smp || section._type !== \"sample\" && searchInclude.txt)) {\n\t\t\t\t\tdisplayText = findSection.text;\n\t\t\t\t\tindex = displayText.toLowerCase().indexOf(text);\n\t\t\t\t\tif (index + 1) {\n\t\t\t\t\t\tpreText = displayText.substring(index - 35, index);\n\t\t\t\t\t\tif (ind = (preText.lastIndexOf(\"\\n\") + 1) || (preText.search(/\\s/) + 1)) {\n\t\t\t\t\t\t\tpreText = preText.slice(ind);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpostText = displayText.substr(index + text.length, 210 - text.length - preText.length);\n\t\t\t\t\t\tif (ind = postText.indexOf(\"\\n\") + 1) {\n\t\t\t\t\t\t\tpostText = postText.slice(0, ind - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsectionId = topicName + \"@\" + content.filter.length;\n\t\t\t\t\t\tsearchAnchor = \"#search?s=\" + lowerCaseEncodeURI(text) + searchIncludeHash() + \"&l=\" + sectionId;\n\t\t\t\t\n\t\t\t\t\t\t$.observable(section).setProperty(\"searchAnchor\", \"#search?s=\" + lowerCaseEncodeURI(text) + searchIncludeHash() + \"&l=\" + sectionId);\n\t\t\t\t\t\tsearchItem = {\n\t\t\t\t\t\t\tsection: sectionId,\n\t\t\t\t\t\t\tsearchTerm: htmlConverter(displayText.substr(index, text.length)), \n\t\t\t\t\t\t\ttext: htmlConverter(preText)\n\t\t\t\t\t\t\t\t+ \"<span class='searchterm'>\"\n\t\t\t\t\t\t\t\t\t+ htmlConverter(displayText.substr(index, text.length))\n\t\t\t\t\t\t\t\t+ \"</span>\"\n\t\t\t\t\t\t\t\t+ htmlConverter(postText)\n\t\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\t\tfiltered.push(searchItem);\n\t\t\t\t\t\tcontent.filter.push(searchItem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$.observable(section).setProperty(\"searchAnchor\", searchAnchor);\n\t\t\t}\n\t\t}\n\t\t$.observable(topic).setProperty(\"filtered\", filtered); \n\t\treturn topic.filtered;\n\t}\n}\n\nfunction clearSearch(searchValue) {\n\tvar category,\n\t\tcategories = content.categories,\n\t\tl = categories.length;\n\tcontent.filter = [];\n\twhile (categories && l-- > 1) {\n\t\tcategory = categories[l];\n\t\tcategory.filtered = undefined;\n\t\t!category.hidden && clearSearchCat(category, content[category.name]);\n\t}\n}\n\nfunction clearSearchCat(category, topCatContent) {\n\tvar l, categories, subCategory;\n\tif (categories = category.categories) {\n\t\tl = categories.length;\n\t\twhile (categories && l--) {\n\t\t\tsubCategory = categories[l];\n\t\t\tif (!subCategory.hidden) {\n\t\t\t\tsubCategory.filtered = undefined;\n\t\t\t\tclearSearchTopic(subCategory.name, topCatContent);\n\t\t\t\tclearSearchCat(subCategory, topCatContent);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction clearSearchTopic(topicName, topCatContent) {\n\tvar l, section,\n\t\ttopic = topCatContent[topicName];\n\tif (topic) {\n\t\tl = topic.sections.length;\n\t\ttopic.filtered = undefined;\n\t\twhile (l--) {\n\t\t\tsection = topic.sections[l];\n\t\t\t$.observable(section).setProperty(\"searchAnchor\", undefined);\n\t\t}\n\t}\n}\n\nsectionTemplates.editview = sectionTemplates.detail = sectionTemplates.summary; // for now\nsectionTag.templates = sectionTemplates;\n\n//#endregion\n\n//#region HELPER FUNCTIONS\n\nfunction getCategory(catName, searchTerm, searchExclude) {\n\tfunction getCategoryNode(name, subcategories, parent) {\n\t\tif (selectedCategory = categories[0][name]) {\n\t\t\treturn topCategory = homeCategory = selectedCategory;\n\t\t}\n\t\ttopCategory = undefined;\n\n\t\tstack.push(parent);\n\t\tvar category,\n\t\t\tl = subcategories.length;\n\t\twhile (l--) {\n\t\t\tcategory = subcategories[l];\n\t\t\tif (category.name === name || category.categories && (category = getCategoryNode(name, category.categories, category))) {\n\t\t\t\twhile (parent = stack.pop()) {\n\t\t\t\t\ttopCategory = parent;\n\t\t\t\t\tif (!parent.expanded) {\n\t\t\t\t\t\t$.observable(parent).setProperty(\"expanded\", true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn category;\n\t\t\t}\n\t\t}\n\t\tstack.pop();\n\t}\n\tvar topCat, // specific to this getScript call\n\t\tstack = [],\n\t\tcategories = content.categories,\n\t\toldTopCategory = topCategoryName,\n\t\tloadedPromise = $.Deferred();\n\n\tselectedCategory = catName && getCategoryNode(catName, categories) || categories[0].jsrender;\n\ttopCategory = topCategory || selectedCategory;\n\tif (searchTerm && !catName) {\n\t\ttopCategory = searchCategory;\n\t\tif (page) {\n\t\t\tpage.category = undefined;\n\t\t}\n\t}\n\n\ttopCategoryName = topCategory.name;\n\n\tif (topCategoryName !== oldTopCategory) {\n\t\tif (oldTopCategory) {\n\t\t\t$(\"#id-\" + oldTopCategory)\n\t\t\t\t.removeClass(\"selected\")\n\t\t\t\t.addClass(\"unselected\");\n\t\t}\n\t\t$(\"#id-\" + topCategoryName)\n\t\t\t.removeClass(\"unselected\")\n\t\t\t.addClass(\"selected\");\n\t}\n\n\tif (content.topCategory !== topCategory) {\n\t\tcontent.catName = catName; // Don't change this observably, to avoid triggering an additional UI update before topCategory has been set.\n\t\t$.observable(content).setProperty(\"topCategory\", topCategory);\n\t}\n\n\tif (searchTerm) {\n\t\tif (content.searched !== searchTerm || content.searchExclude !== searchExclude) {\n\t\t\tloadAllContent()\n\t\t\t\t.then(function() {\n\t\t\t\t\tloadAllContent(\"find\")\n\t\t\t\t\t\t.then(function() {\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tsearchContent(searchTerm);\n\t\t\t\t\t\t\t\t$.observable(content).setProperty(\"searched\", searchTerm);\n\t\t\t\t\t\t\t\tcontent.searchExclude = searchExclude;\n\t\t\t\t\t\t\t\tloadedPromise.resolve();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t} else {\n\t\t\tloadedPromise.resolve();\n\t\t}\n\t} else {\n\t\tif (!topCategory.loaded && !topCategory.loading) {\n\t\t\ttopCategory.loading = \" \"; // true, but render blank until after timeout\n\t\t\ttopCat = topCategory; // Specific to this getCategory() call. (Global topCategory var may change before then() returns)\n\n\t\t\t$.getScript(\"documentation/contents-\" + topCategory.name + \".min.js\")\n\t\t\t\t.then(function() {\n\t\t\t\t\t$.observable(topCat).setProperty(\"loaded\", true);\n\t\t\t\t\tloadedPromise.resolve();\n\t\t\t\t});\n\t\t} else if (topCategory.loaded) {\n\t\t\tif (content.searched) {\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tclearSearch(); // lazy clear search annotations from content\n\t\t\t\t\t$.observable(content).setProperty({\n\t\t\t\t\t\tsearch: undefined,\n\t\t\t\t\t\tfilterlen: 0\n\t\t\t\t\t});\n\t\t\t\t\tcontent.searched = undefined;\n\t\t\t\t});\n\t\t\t}\n\t\t\tloadedPromise.resolve();\n\t\t}\n\t}\n\treturn loadedPromise.promise();\n}\n\nfunction fetchCategory() {\n\tsave();\n\n\tvar categoryName, searchTerm, sectionIndex, searchExclude,\n\t\toldTopCategory = topCategory,\n\t\toldCategory = selectedCategory,\n\t\tlochash = location.hash;\n\n\tif (history && history.replaceState) { // In IE9 history.replaceState not supported\n\t\tif (history.state && history.state.url === document.URL) {\n\t\t\thistoryIndex = history.state.index;\n\t\t\tif (historyStates[historyIndex]) {\n\t\t\t\thistory.replaceState(historyStates[historyIndex], \"\")\n\t\t\t} else {\n\t\t\t\thistoryStates[historyIndex] = history.state;\n\t\t\t}\n\t\t} else {\n\t\t\thistoryIndex++;\n\t\t\tvar newState = historyStates[historyIndex] = {\n\t\t\t\turl: document.URL,\n\t\t\t\tindex: historyIndex\n\t\t\t};\n\n\t\t\thistory.replaceState(newState, \"\")\n\n\t\t\tif (historyStates[historyIndex - 1]) {\n\t\t\t\thistoryStates[historyIndex - 1].scroll = $(window).scrollTop();\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!lochash || lochash === \"#home\") {\n\t\tlochash = \"#\" + (homeCategory && homeCategory.key || \"jsrender\");\n\t}\n\tcategoryName = searchRegex.exec(lochash);\n\n\tif (categoryName[1]) {\n\t\t$.observable(searchInclude).setProperty({\n\t\t\tjsr: !categoryName[3],\n\t\t\tjsv: !categoryName[4],\n\t\t\tsmp: !categoryName[5],\n\t\t\ttxt: !categoryName[6]\n\t\t});\n\t\t$.observable(content).setProperty(\"search\", searchTerm = decodeURIComponent(categoryName[1]).toLowerCase());\n\t}\n\n\tsectionIndex = categoryName[8];\n\tsearchExclude = categoryName[2];\n\tcategoryName = categoryName[7];\n\n\treturn getCategory(categoryName, searchTerm, searchExclude)\n\t\t.then(function() {\n\t\t\tif (page) {\n\t\t\t\tvar newTopCat = oldTopCategory !== topCategory;\n\t\t\t\ttopCategoryName = topCategory.name;\n\t\t\t\tif (topCategoryName !== \"home\" && !content[topCategoryName]) {\n\t\t\t\t\tthrow topCategoryName + \" not loaded. Ensure category.loaded not saved as 'true'...\";\n\t\t\t\t}\n\t\t\t\t$.observable(page).setProperty({\n\t\t\t\t\tcategory: selectedCategory\n\t\t\t\t});\n\n\t\t\t\tif (newTopCat) {\n\t\t\t\t\toldTopCategory.loading = \"\"; // false\n\t\t\t\t\tif (oldTopCategory && oldTopCategory.key) {\n\t\t\t\t\t\t$(\"#logo-\" + oldTopCategory.key)\n\t\t\t\t\t\t\t.removeClass(\"selected\")\n\t\t\t\t\t\t\t.addClass(\"unselected\");\n\t\t\t\t\t}\n\t\t\t\t\tif (topCategory.key) {\n\t\t\t\t\t\t$(\"#logo-\" + topCategory.key)\n\t\t\t\t\t\t\t.removeClass(\"unselected\")\n\t\t\t\t\t\t\t.addClass(\"selected\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpage.navTo(lochash, newTopCat || oldCategory !== selectedCategory);\n\t\t\t} else {\n\t\t\t\tinitPageParams = {catName: categoryName, searchTerm: searchTerm, section: sectionIndex};\n\t\t\t}\n\t\t});\n}\n\nfunction initPage(categoryName, searchTerm, sectionIndex) {\n\n\t$.observable(content).setProperty({\n\t\tsearchTitle: searchTerm && categoryName && content[topCategoryName][categoryName].title,\n\t\tcatName: categoryName\n\t});\n\tif (searchTerm) {\n\t\t$.observable(topSearchTree).setProperty({\n\t\t\tsectionIndex: sectionIndex && parseInt(sectionIndex),\n\t\t\ttopicName: categoryName,\n\t\t\tselected: sectionIndex && (categoryName + \"@\" + sectionIndex)\n\t\t});\n\t}\n}\n\nfunction signature(api) {\n\tvar param, i, l,\n\t\tsig = this.data,\n\t\tret = (api.object ? api.object + \".\" : \"\") + api.name;\n\n\tif (api.method) {\n\t\tret += \"(\";\n\t\tfor (i=0, l=sig.params.length; i<l; i++) {\n\t\t\tparam = sig.params[i];\n\t\t\tret += (param.optional ? \"[\" : \"\") + (i ? \", \" : \"\") + param.name + (param.optional ? \"]\" : \"\");\n\t\t}\n\t\tret += \")\";\n\t}\n\treturn ret;\n}\n\nfunction getContent(topics) {\n\tif (!topics) {\n\t\treturn \"\";\n\t}\n\tvar ret, l, topic,\n\t\tcategories = content.categories,\n\t\tname = topCategoryName,\n\t\tpath = \"JsViewsDocTopics/\" + topCategoryName,\n\t\tloaded = {},\n\t\tloading = {};\n\n\tif (topics === categories) {\n\t\tname = \"categories\";\n\t\tpath = \"JsViewsDocCategories\";\n\t\tl = topics.length;\n\t\twhile (l--) {\n\t\t\ttopic = topics[l];\n\t\t\tloaded[l] = topic.loaded;\n\t\t\tloading[l] = topic.loading;\n\t\t\tdelete topic.loading;\n\t\t\tdelete topic.loaded;\n\t\t}\n\t}\n\n\tret = \"var content = $.views.documentation.content;\\n\\ncontent.\"\n\t\t+ name + \" = content.useStorage && $.parseJSON(localStorage.getItem(\\\"\" + path + \"\\\")) ||\\n\"\n\t\t+ stringify(topics) + \";\";\n\n\tif (topics === categories) {\n\t\tl = topics.length;\n\t\twhile (l--) {\n\t\t\ttopics[l].loading = loading[l];\n\t\t\ttopics[l].loaded = loaded[l];\n\t\t}\n\t}\n\treturn ret;\n}\n\nfunction stringify(val) {\n\treturn JSON.stringify(val, null, ' ');\n}\n\nfunction parse(val) {\n\tvar data;\n\ttry {\n\t\teval(\"data=\" + val + \";\");\n\t\treturn data;\n\t} catch (e) {\n\t}\n}\n\nfunction save() {\n\tif (content.editable) {\n\t\tvar topics, category,\n\t\t\tcategories = content.categories,\n\t\t\tl = categories.length,\n\t\t\ttextareas = page.contents(true, \".savetext\"),\n\t\t\tloaded = {},\n\t\t\tloading = {},\n\t\t\tloadedfind = {},\n\t\t\tloadingfind = {};\n\n\t\twhile (l-- > 1) {\n\t\t\tcategory = categories[l];\n\t\t\tloaded[l] = category.loaded;\n\t\t\tloading[l] = category.loading;\n\t\t\tloadedfind[l] = category.loadedfind;\n\t\t\tloadingfind[l] = category.loadingfind;\n\t\t\tcategories[l].loaded = categories[l].loadedfind = false;\n\t\t\tcategories[l].loading = categories[l].loadingfind = \"\";\n\t\t}\n\t\tlocalStorage.setItem(\"JsViewsDocCategories\", stringify(categories));\n\t\tl = categories.length;\n\t\twhile (l-- > 1) {\n\t\t\tcategories[l].loaded = loaded[l];\n\t\t\tcategories[l].loading = loading[l];\n\t\t\tcategories[l].loadedfind = loadedfind[l];\n\t\t\tcategories[l].loadingfind = loadingfind[l];\n\t\t}\n\t\ttopics = content[topCategoryName];\n\t\tif (topics) {\n\t\t\tlocalStorage.setItem(\"JsViewsDocTopics/\" + topCategoryName, stringify(topics));\n\t\t}\n\t\ttextareas[0].value = getContent(topics);\n\t\ttextareas[1].value = getContent(categories);\n\t}\n}\n\n//#endregion\n\n//#region PAGE INITIALIZATION\n\n$.views.tags({\n\tpage: pageTag,\n\tsection: sectionTag,\n\tsearchTree: searchTreeTag,\n\tsearchTreeNode: searchTreeNodeTag\n});\n\n$.views.helpers({\n\tstringify: stringify\n});\n\n$.views.converters({\n\tstringify: stringify,\n\tgetContent: getContent,\n\tsyntax: function(val) {\n\t\treturn \"<pre>\" + hljs.highlight(this.tagCtx.args[1], val).value + \"</pre>\";\n\t},\n\tparse: parse,\n\tmd: function(val) {\n\t\treturn md.render(val);\n\t}\n});\n\ntopSearchTree = content.searchTree = new treeGroup();\n\tsetTimeout(function() {\n\t\t$(\"#initial-load\").html(\"Loading...\");\n\t}, 2000);\n\nfetchCategory()\n\t.then(function() {\n\t\tvar selectedLogo, categoryName,\n\t\tcategories = content.categories,\n\t\tl = categories.length;\n\n\t\twhile (l--) {\n\t\t\tcategories[l].loadedfind = categories[l].loadingfind = undefined;\n\t\t}\n\n\t\tcontent.topCategory = topCategory || selectedCategory;\n\n\t\t//================ Load Page ================\n\t\ttemplates.page.link(\"#id-content\", content, {templates: templates});\n\n\t\tsearchtextElem = $(\"#searchtext\");\n\t\tsearchbox = $(\"#id-searchbox\");\n\t\tsearchNavElem = $(\".searchnav\");\n\t\tsideNavElem = $(\".sidenav\");\n\t\thoverTextElem = $(\"#hovertext\");\n\n\t\tif ('scrollRestoration' in history) {\n\t\t\thistory.scrollRestoration = 'manual';\n\t\t}\n\t\t$(window)\n\t\t\t.on('hashchange', fetchCategory)\n\t\t\t.on('unload', save);\n\n\t\t$.observe(searchInclude, \"jsr\", \"jsv\", \"smp\", \"txt\", function(ev, eventArgs){\n\t\t\tlocation.hash = \"search?s=\" + searchRegex.exec(location.hash)[1] + searchIncludeHash();\n\t\t});\n\n\t\t$(\"#logo-\" + topCategory.key)\n\t\t\t.removeClass(\"unselected\")\n\t\t\t.addClass(\"selected\");\n\n\t\tselectedLogo = $(\".main-item.selected\");\n\n\t\tpage.navTo(location.hash);\n\n\t\t$(\".main-item\").on(\"click\", function() {\n\t\t\tselectedLogo.removeClass(\"selected\").addClass(\"unselected\");\n\t\t\tselectedLogo = $(this).addClass(\"selected\").removeClass(\"unselected\");\n\t\t\tlocation.hash = this.id.slice(5);\n\t\t});\n\t\tif (!loadedAll) {\n\t\t\tsetTimeout(function() {\n\t\t\t\tloadAllContent(); // lazy load other content in the background\n\t\t\t});\n\t\t}\n\t});\n\nfunction loadAllContent(prefix) {\n\tvar categories = content.categories,\n\t\tl = categories.length,\n\t\tnotLoaded = 0,\n\t\tallLoadedPromise = $.Deferred(),\n\t\tloadingLabel = \"loading\" + (prefix||\"\"),\n\t\tloadedLabel = \"loaded\" + (prefix||\"\");\n\tprefix = prefix || \"contents\";\n\tloadedAll = true;\n\twhile (l-- > 1) {\n\t\t(function() { // Equivalent to $.proxy. Ensure category is specific to this call\n\t\t\tvar category = categories[l];\n\t\t\tif (!category.hidden && !(prefix===\"contents\" ? content : content[prefix])[category.name]) {\n\t\t\t\tnotLoaded++;\n\t\t\t\tcategory[loadingLabel] = \" \";\n\t\t\t\t$.getScript(\"documentation/\" + prefix + \"-\" + category.name + \".min.js\")\n\t\t\t\t\t.then(function() {\n\t\t\t\t\t\t$.observable(category).setProperty(loadedLabel, true);\n\t\t\t\t\t\tcategory.loading = \"\";\n\t\t\t\t\t\tnotLoaded--;\n\t\t\t\t\t\tif (!notLoaded) {\n\t\t\t\t\t\t\tallLoadedPromise.resolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\t})();\n\t}\n\tif (!notLoaded) {\n\t\tallLoadedPromise.resolve();\n\t}\n\treturn allLoadedPromise.promise();\n}\n//#endregion\n})(this, this.jQuery);\n"]}