{"version":3,"file":"template.mjs","sources":["../src/template.ts"],"sourcesContent":["/**\n * Create a strict interpolation RegExp based on the given variables' name\n */\nconst createStrictInterpolationRegExp = (allowedVariableNames: string[], flags: string) => {\n const oneOfVariables = allowedVariableNames.join('|');\n\n // 1. We need to match the delimiters: <%= ... %>\n // 2. We accept any number of whitespaces characters before and/or after the variable name: \\s* ... \\s*\n // 3. We only accept values from the variable list as interpolation variables' name: : (${oneOfVariables})\n return new RegExp(`<%=\\\\s*(${oneOfVariables})\\\\s*%>`, flags);\n};\n\n/**\n * Create a loose interpolation RegExp to match as many groups as possible\n */\nconst createLooseInterpolationRegExp = (flags: string) => new RegExp(/<%=([\\s\\S]+?)%>/, flags);\n\nexport { createStrictInterpolationRegExp, createLooseInterpolationRegExp };\n"],"names":["createStrictInterpolationRegExp","allowedVariableNames","flags","oneOfVariables","join","RegExp","createLooseInterpolationRegExp"],"mappings":"AAAA;;IAGA,MAAMA,+BAAkC,GAAA,CAACC,oBAAgCC,EAAAA,KAAAA,GAAAA;IACvE,MAAMC,cAAAA,GAAiBF,oBAAqBG,CAAAA,IAAI,CAAC,GAAA,CAAA;;;;IAKjD,OAAO,IAAIC,OAAO,CAAC,QAAQ,EAAEF,cAAe,CAAA,OAAO,CAAC,EAAED,KAAAA,CAAAA;AACxD;AAEA;;AAEC,UACKI,8BAAiC,GAAA,CAACJ,KAAkB,GAAA,IAAIG,OAAO,iBAAmBH,EAAAA,KAAAA;;;;"}