{"version":3,"sources":["jsdelivr-header.js","/npm/pig-latin-encoder@1.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,OAAO,QAAQ,SAAU,EAAS,GAAI,EAAS,MAAO,GAAU,EAAO,GAAU,GAgC7E,OAvBI,GACA,EAAS,EAAO,MAAM,MACf,SAAQ,CAAC,EAAM,KAClB,IAAI,EAAQ,EAAK,MAAM,WACnB,EACmB,GAAf,EAAM,MACN,EAAO,IAAU,EAEjB,EAAO,GAAS,GAAG,EAAM,KAAK,EAAK,OAAO,EAAE,EAAM,MAAM,KAAK,EAAK,OAAO,EAAM,MAAM,KAAK,EAAK,KAAK,IAGxG,EAAO,GAAS,CACpB,KAGJ,EAAS,EAAO,MAAM,MACf,SAAQ,CAAC,EAAM,KACf,GAAQ,EAAK,OAAO,OAAO,IAC1B,EAAO,IAAU,EACrB,IAID,EAAO,KAAK,IAEvB","file":"/npm/pig-latin-encoder@1.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/pig-latin-encoder@1.0.2/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","module.exports=function (string = \"\", ending = \"way\", reverse = false, orginal = true) {\n    /***\n     * @author Veerakrishna Pachhipala\n     * * pigLatinConverter is a function parse a string to pig latin converter\n     * @param string is a input string\n     * @param ending is a string to append if string contains vowel\n     * @param reverse is a boolean if it is true then result would reverse order\n     * @param orginal is a boolean if it is false then @param string would not pid latin encode but  @param ending is append\n     */\n    if (orginal) {\n        string = string.split(\" \");\n        string.forEach((word, index) => {\n            let match = word.match(/[aeiou]/);\n            if (match) {\n                if (match.index == 0) {\n                    string[index] += ending\n                } else {\n                    string[index] = `${match[0]}${word.substr(1,match.index-1)}${word.substr(match.index+1)}${word[0]}${ending}`\n                }\n            } else {\n                string[index] = word;\n            }\n        });\n    } else {\n        string = string.split(\" \");\n        string.forEach((word, index) => {\n            if(word && word.trim().length>0){\n                string[index] += ending;\n            }\n           \n        })\n    }\n    return string.join(\" \");\n\n}\n"]}