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