function IsValidPublicDicitonary(){return"string"!=typeof publicDictionary}function ShowPublicDictionary(){if(IsValidPublicDicitonary()){var e=GetSelectedFilters(),i=[],t=htmlEntitiesParseForSearchEntry(document.getElementById("searchBox").value),n=document.getElementById("searchOptionWord").checked,r=document.getElementById("searchOptionSimple").checked,c=document.getElementById("searchOptionLong").checked,o=!document.getElementById("searchCaseSensitive").checked,a=document.getElementById("searchIgnoreDiacritics").checked;if(""!=t&&(n||r||c)){var l=[],s=htmlEntitiesParseForSearch(JSON.stringify(publicDictionary));o&&(t=t.toLowerCase()),a&&(t=removeDiacritics(t),s=removeDiacritics(s)),n&&l.push("contains("+(o?"name":'translate(name, "", "")')+', "'+t+'")'),r&&l.push("contains("+(o?"simpleDefinition":'translate(simpleDefinition, "", "")')+', "'+t+'")'),c&&l.push("contains("+(o?"longDefinition":'translate(longDefinition, "", "")')+', "'+t+'")');var d=JSON.parse(s);i=JSON.search(d,"//words["+l.join(" or ")+"]/wordId")}var p=document.getElementById("dictionaryName");p.innerHTML=htmlEntitiesParse(publicDictionary.name)+" Dictionary";var m=document.getElementById("dictionaryBy");m.innerHTML="created by "+htmlEntitiesParse(publicDictionary.createdBy);var u=document.getElementById("incompleteNotice");publicDictionary.settings.isComplete||(u.innerHTML="Note: This dictionary is not yet complete and is likely to change.");var y=document.getElementById("dictionaryDescription");y.innerHTML=marked(htmlEntitiesParse(publicDictionary.description));var h=document.getElementById("theDictionary"),D="",g=0;if(publicDictionary.words.length>0)for(var b=0;b0&&e.indexOf(publicDictionary.words[b].partOfSpeech)>-1)&&(""==t||""!=t&&(n||r||c)&&i.indexOf(publicDictionary.words[b].wordId)>=0)&&(publicDictionary.words[b].hasOwnProperty("pronunciation")||(publicDictionary.words[b].pronunciation=""),publicDictionary.words[b].hasOwnProperty("wordId")||(publicDictionary.words[b].wordId=b+1),D+=PublicDictionaryEntry(b),g++);else D="There are no entries in the dictionary.";h.innerHTML=D,ShowFilterWordCount(g)}else document.getElementById("dictionaryContainer").innerHTML=publicDictionary}function PublicDictionaryEntry(e){var i="🔗",t=regexParseForSearch(document.getElementById("searchBox").value),n=document.getElementById("searchOptionWord").checked,r=document.getElementById("searchOptionSimple").checked,c=document.getElementById("searchOptionLong").checked,o=!document.getElementById("searchCaseSensitive").checked,a=document.getElementById("searchIgnoreDiacritics").checked,l=new RegExp("("+(a?removeDiacritics(t)+"|"+t:t)+")","g"+(o?"i":""));return i+="",i+=""!=t&&n?htmlEntitiesParse(publicDictionary.words[e].name).replace(l,"$1"):publicDictionary.words[e].name,i+="",""!=publicDictionary.words[e].pronunciation&&(i+="",i+=marked(htmlEntitiesParse(publicDictionary.words[e].pronunciation)).replace("

","").replace("

",""),i+="
"),""!=publicDictionary.words[e].partOfSpeech&&(i+="",i+=publicDictionary.words[e].partOfSpeech,i+=""),i+="
",""!=publicDictionary.words[e].simpleDefinition&&(i+="",i+=""!=t&&r?htmlEntitiesParse(publicDictionary.words[e].simpleDefinition).replace(l,"$1"):publicDictionary.words[e].simpleDefinition,i+=""),""!=publicDictionary.words[e].longDefinition&&(i+="",i+=""!=t&&c?marked(htmlEntitiesParse(publicDictionary.words[e].longDefinition).replace(l,"$1")):marked(htmlEntitiesParse(publicDictionary.words[e].longDefinition)),i+=""),i+="
"}function SetPublicPartsOfSpeech(){for(var e=document.getElementById("filterOptions"),i=htmlEntitiesParse(publicDictionary.settings.partsOfSpeech).trim().split(","),t=0;t