class StringUtils{static unstylizeChars(str){for(var characterMap=[{char:"'",regEx:/\u2018|\u2019|\u201A|\uFFFD/g},{char:'"',regEx:/\u201c|\u201d|\u201e/g},{char:"<",regEx:/\u2039/g},{char:">",regEx:/\u203A/g},{char:" ",regEx:/\u00A0/g},{char:"-",regEx:/\u2013/g},{char:"--",regEx:/\u2014/g},{char:"...",regEx:/\u2026/g}],i=0;i<characterMap.length;i++)str=str.replace(characterMap[i].regEx,characterMap[i].char);return str}static isEmpty(text){return"string"!=typeof text||!text.length}static capitalizeFirstLetterAllWords(text){let textArray=text.split(" ");return $.each(textArray,(function(index,word){textArray[index]=word.charAt(0).toUpperCase()+word.slice(1)+" "})),textArray.join(" ")}static isStringJSON(string){try{JSON.parse(string)}catch(e){return!1}return!0}static replaceAllSpaces(string,replace){return string.replace(/\s+/g,replace)}static removeNonAlphaNumeric(string){return string.replace(/\W/g,"")}static trim(value){return"string"!=typeof value?"":$.trim(value.replace(/\s{2,}/g," "))}static trimURL(value){return"string"==typeof value?((value=$.trim(value.replace(/\s{2,}/g," ")))&&"http://"!==value.substr(0,7)&&"https://"!==value.substr(0,8)&&"ftp://"!==value.substr(0,6)&&(value="http://"+value),value):""}static parseMarkdown(str){return str.replace(/^### (.*$)/gim,'<div class="h3">$1</div>').replace(/^## (.*$)/gim,'<div class="h2">$1</div>').replace(/^# (.*$)/gim,'<div class="h1">$1</div>').replace(/^\> (.*$)/gim,"<blockquote>$1</blockquote>").replace(/\*\*(.*)\*\*/gim,"<b>$1</b>").replace(/\*(.*)\*/gim,"<i>$1</i>").replace(/!\[(.*?)\]\((.*?)\)/gim,"<img src='$2' alt='$1' />").replace(/\[(.*?)\]\((.*?)\)/gim,"<a href='$2' target='_blank'>$1</a>").replace(/\<\/div\>\n/g,"</div>").replace(/\<\/blockquote\>\n/g,"</blockquote>").replace(/\n/gim,"<br />").trim()}}