From 91a0ca864c0185c5fd1bf8599463192289561020 Mon Sep 17 00:00:00 2001 From: Sam Cao Date: Tue, 21 May 2024 14:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20join=20split?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../swc4j/ast/expr/Swc4jAstCallExpr.java | 150 ++++++++++-------- .../swc4j/ast/expr/Swc4jAstExprOrSpread.java | 4 + .../swc4j/ast/expr/lit/Swc4jAstArrayLit.java | 28 +++- .../swc4j/ast/expr/lit/Swc4jAstNumber.java | 6 + .../javet/swc4j/ast/expr/lit/Swc4jAstStr.java | 37 +++++ .../javet/swc4j/utils/StringUtils.java | 35 +++- .../javet/swc4j/ast/Swc4jAstStore.java | 2 +- .../TestSwc4jPluginHostJsFuckDecoder.java | 1 + .../swc4j/tutorials/Tutorial07Decode.java | 2 +- 9 files changed, 186 insertions(+), 79 deletions(-) diff --git a/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstCallExpr.java b/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstCallExpr.java index 67c7ed6b..40f828be 100644 --- a/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstCallExpr.java +++ b/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstCallExpr.java @@ -40,23 +40,14 @@ import com.caoccao.javet.swc4j.span.Swc4jSpan; import com.caoccao.javet.swc4j.utils.AssertionUtils; import com.caoccao.javet.swc4j.utils.SimpleList; -import com.caoccao.javet.swc4j.utils.SimpleSet; -import com.caoccao.javet.swc4j.utils.StringUtils; import java.util.List; import java.util.Optional; -import java.util.Set; @Jni2RustClass(filePath = Jni2RustFilePath.AstUtils) public class Swc4jAstCallExpr extends Swc4jAst implements ISwc4jAstExpr { - public static final String FONTCOLOR = "fontcolor"; - public static final String ITALICS = "italics"; - public static final String TO_STRING = "toString"; - public static final Set BUILT_IN_FUNCTION_SET = SimpleSet.immutableOf(FONTCOLOR, ITALICS); - public static final String SLICE = "slice"; - public static final String CONCAT = "concat"; protected static final Swc4jParseOptions PARSE_OPTIONS = new Swc4jParseOptions() .setCaptureAst(true) .setMediaType(Swc4jMediaType.JavaScript); @@ -87,51 +78,99 @@ public Optional eval() { Optional call = memberExpr.evalAsCall(); if (call.isPresent()) { ISwc4jAstExpr obj = memberExpr.getObj().unParenExpr(); - if (BUILT_IN_FUNCTION_SET.contains(call.get())) { - if (obj instanceof Swc4jAstStr) { - String objString = obj.as(Swc4jAstStr.class).getValue(); - if (FONTCOLOR.equals(call.get())) { - String argString = Swc4jAstIdent.UNDEFINED; - if (!args.isEmpty()) { - Swc4jAstExprOrSpread exprOrSpread = args.get(0); - ISwc4jAstExpr expr = exprOrSpread.getExpr().unParenExpr(); - if (expr instanceof Swc4jAstStr || expr instanceof Swc4jAstNumber) { - argString = expr.as(ISwc4jAstCoercionPrimitive.class).asString(); - } else if (expr.isNaN()) { - argString = Swc4jAstNumber.NAN; - } else if (expr.isInfinity()) { - argString = Swc4jAstNumber.INFINITY; - } else { - return Optional.empty(); - } - } - try { - String escapeArgString = argString.replace("\"", """); - return Optional.of(Swc4jAstStr.create("" + objString + "")); - } catch (Throwable ignored) { + if (obj instanceof Swc4jAstStr) { + Swc4jAstStr objString = obj.as(Swc4jAstStr.class); + if (Swc4jAstStr.FONTCOLOR.equals(call.get())) { + String argString = Swc4jAstIdent.UNDEFINED; + if (!args.isEmpty()) { + Swc4jAstExprOrSpread exprOrSpread = args.get(0); + ISwc4jAstExpr expr = exprOrSpread.getExpr().unParenExpr(); + if (expr instanceof Swc4jAstStr || expr instanceof Swc4jAstNumber) { + argString = expr.as(ISwc4jAstCoercionPrimitive.class).asString(); + } else if (expr.isNaN()) { + argString = Swc4jAstNumber.NAN; + } else if (expr.isInfinity()) { + argString = Swc4jAstNumber.INFINITY; + } else { return Optional.empty(); } - } else if (ITALICS.equals(call.get())) { - return Optional.of(Swc4jAstStr.create("" + objString + "")); + } + return Optional.of(Swc4jAstStr.create(objString.fontcolor(argString))); + } else if (Swc4jAstStr.ITALICS.equals(call.get())) { + return Optional.of(Swc4jAstStr.create(objString.italics())); + } else if (Swc4jAstStr.SPLIT.equals(call.get())) { + switch (args.size()) { + case 0: + return Optional.of(Swc4jAstArrayLit.create(objString.split())); + case 1: + ISwc4jAstExpr arg = args.get(0).getExpr().unParenExpr(); + if (arg instanceof ISwc4jAstCoercionPrimitive) { + String separator = arg.as(ISwc4jAstCoercionPrimitive.class).asString(); + return Optional.of(Swc4jAstArrayLit.create(objString.split(separator))); + } + break; + default: + ISwc4jAstExpr arg1 = args.get(0).getExpr().unParenExpr(); + ISwc4jAstExpr arg2 = args.get(1).getExpr().unParenExpr(); + if (arg1 instanceof ISwc4jAstCoercionPrimitive && + arg2 instanceof ISwc4jAstCoercionPrimitive) { + String separator = arg1.as(ISwc4jAstCoercionPrimitive.class).asString(); + int limit = arg2.as(ISwc4jAstCoercionPrimitive.class).asInt(); + return Optional.of(Swc4jAstArrayLit.create(objString.split(separator, limit))); + } + break; + } + } else if (Swc4jAstStr.SLICE.equals(call.get())) { + switch (args.size()) { + case 0: + return Optional.of(Swc4jAstStr.create(objString.slice())); + case 1: + ISwc4jAstExpr arg = args.get(0).getExpr().unParenExpr(); + if (arg instanceof ISwc4jAstCoercionPrimitive) { + int indexStart = arg.as(ISwc4jAstCoercionPrimitive.class).asInt(); + return Optional.of(Swc4jAstStr.create(objString.slice(indexStart))); + } + break; + default: + ISwc4jAstExpr arg1 = args.get(0).getExpr().unParenExpr(); + ISwc4jAstExpr arg2 = args.get(1).getExpr().unParenExpr(); + if (arg1 instanceof ISwc4jAstCoercionPrimitive && + arg2 instanceof ISwc4jAstCoercionPrimitive) { + int indexStart = arg1.as(ISwc4jAstCoercionPrimitive.class).asInt(); + int indexEnd = arg2.as(ISwc4jAstCoercionPrimitive.class).asInt(); + return Optional.of(Swc4jAstStr.create(objString.slice(indexStart, indexEnd))); + } + break; } } } else if (obj instanceof Swc4jAstArrayLit) { - if (CONCAT.equals(call.get())) { + Swc4jAstArrayLit objArrayLit = obj.as(Swc4jAstArrayLit.class); + if (Swc4jAstArrayLit.CONCAT.equals(call.get())) { if (!args.isEmpty()) { ISwc4jAstExpr expr = args.get(0).getExpr().unParenExpr(); if (expr instanceof Swc4jAstArrayLit) { - Swc4jAstArrayLit leftArrayLit = obj.as(Swc4jAstArrayLit.class); Swc4jAstArrayLit rightArrayLit = expr.as(Swc4jAstArrayLit.class); - leftArrayLit.concat(rightArrayLit); - return Optional.of(leftArrayLit); + objArrayLit.concat(rightArrayLit); + return Optional.of(objArrayLit); } } + } else if (Swc4jAstArrayLit.JOIN.equals(call.get())) { + if (objArrayLit.isAllPrimitive()) { + String separator = null; + if (!args.isEmpty()) { + ISwc4jAstExpr expr = args.get(0).getExpr().unParenExpr(); + if (!expr.isUndefined() && expr instanceof ISwc4jAstCoercionPrimitive) { + separator = expr.as(ISwc4jAstCoercionPrimitive.class).asString(); + } + } + return Optional.of(Swc4jAstStr.create(objArrayLit.join(separator))); + } } else { return Optional.of(Swc4jAstStr.create(Swc4jAstArrayLit.ARRAY_FUNCTION_STRING_MAP .getOrDefault(call.get(), Swc4jAstIdent.UNDEFINED))); } - } else if (Swc4jAstMemberExpr.CONSTRUCTOR.equals(call.get())) { - if (obj instanceof Swc4jAstRegex) { + } else if (obj instanceof Swc4jAstRegex) { + if (Swc4jAstMemberExpr.CONSTRUCTOR.equals(call.get())) { switch (args.size()) { case 0: return Optional.of(Swc4jAstRegex.create()); @@ -153,34 +192,8 @@ public Optional eval() { break; } } - } else if (SLICE.equals(call.get())) { - if (obj instanceof Swc4jAstStr) { - String objString = obj.as(Swc4jAstStr.class).getValue(); - switch (args.size()) { - case 0: - return Optional.of(Swc4jAstStr.create(objString)); - case 1: - ISwc4jAstExpr arg = args.get(0).getExpr().unParenExpr(); - if (arg instanceof ISwc4jAstCoercionPrimitive) { - int indexStart = arg.as(ISwc4jAstCoercionPrimitive.class).asInt(); - int indexEnd = objString.length(); - return Optional.of(Swc4jAstStr.create(StringUtils.slice(objString, indexStart, indexEnd))); - } - break; - default: - ISwc4jAstExpr arg1 = args.get(0).getExpr().unParenExpr(); - ISwc4jAstExpr arg2 = args.get(1).getExpr().unParenExpr(); - if (arg1 instanceof ISwc4jAstCoercionPrimitive && - arg2 instanceof ISwc4jAstCoercionPrimitive) { - int indexStart = arg1.as(ISwc4jAstCoercionPrimitive.class).asInt(); - int indexEnd = arg2.as(ISwc4jAstCoercionPrimitive.class).asInt(); - return Optional.of(Swc4jAstStr.create(StringUtils.slice(objString, indexStart, indexEnd))); - } - break; - } - } - } else if (TO_STRING.equals(call.get())) { - if (obj instanceof Swc4jAstNumber) { + } else if (obj instanceof Swc4jAstNumber) { + if (Swc4jAstNumber.TO_STRING.equals(call.get())) { int radix = 10; if (!args.isEmpty()) { ISwc4jAstExpr arg = args.get(0).getExpr().unParenExpr(); @@ -188,8 +201,7 @@ public Optional eval() { radix = arg.as(ISwc4jAstCoercionPrimitive.class).asInt(); } } - String value = Integer.toString(obj.as(Swc4jAstNumber.class).asInt(), radix); - return Optional.of(Swc4jAstStr.create(value)); + return Optional.of(Swc4jAstStr.create(obj.as(Swc4jAstNumber.class).toString(radix))); } } } diff --git a/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstExprOrSpread.java b/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstExprOrSpread.java index 13b54f89..e2f2351f 100644 --- a/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstExprOrSpread.java +++ b/src/main/java/com/caoccao/javet/swc4j/ast/expr/Swc4jAstExprOrSpread.java @@ -47,6 +47,10 @@ public Swc4jAstExprOrSpread( setSpread(spread); } + public static Swc4jAstExprOrSpread create(ISwc4jAstExpr expr) { + return new Swc4jAstExprOrSpread(null, expr, Swc4jSpan.DUMMY); + } + @Override public List getChildNodes() { return SimpleList.of(expr); diff --git a/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstArrayLit.java b/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstArrayLit.java index 6d773b8c..e1b11a40 100644 --- a/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstArrayLit.java +++ b/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstArrayLit.java @@ -33,10 +33,7 @@ import com.caoccao.javet.swc4j.utils.SimpleMap; import com.caoccao.javet.swc4j.utils.SimpleSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; @Jni2RustClass(filePath = Jni2RustFilePath.AstUtils) @@ -104,7 +101,9 @@ public class Swc4jAstArrayLit "toString", "", "unshift", "0", "values", "[object Array Iterator]"); + public static final String CONCAT = "concat"; public static final String CONSTRUCTOR = "Array"; + public static final String JOIN = "join"; protected final List> elems; @Jni2RustMethod @@ -118,6 +117,14 @@ public Swc4jAstArrayLit( this.elems.stream().filter(Optional::isPresent).map(Optional::get).forEach(node -> node.setParent(this)); } + public static Swc4jAstArrayLit create(List list) { + List elems = new ArrayList<>(); + if (list != null && !list.isEmpty()) { + list.forEach(str -> elems.add(str == null ? null : Swc4jAstExprOrSpread.create(Swc4jAstStr.create(str)))); + } + return new Swc4jAstArrayLit(elems, Swc4jSpan.DUMMY); + } + @Override public boolean asBoolean() { return true; @@ -216,6 +223,19 @@ public boolean isAllPrimitive() { }); } + public String join(String separator) { + if (separator == null) { + separator = ","; + } + return elems.stream() + .map(elem -> elem + .map(e -> e.getExpr().unParenExpr()) + .map(e -> e.as(ISwc4jAstCoercionPrimitive.class)) + .map(ISwc4jAstCoercionPrimitive::toString) + .orElse("")) + .collect(Collectors.joining(separator)); + } + @Override public boolean replaceNode(ISwc4jAst oldNode, ISwc4jAst newNode) { if (!elems.isEmpty() && (newNode == null || newNode instanceof Swc4jAstExprOrSpread)) { diff --git a/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstNumber.java b/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstNumber.java index df328e84..ac228910 100644 --- a/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstNumber.java +++ b/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstNumber.java @@ -37,6 +37,7 @@ public class Swc4jAstNumber public static final String CONSTRUCTOR = "Number"; public static final String INFINITY = "Infinity"; public static final String NAN = "NaN"; + public static final String TO_STRING = "toString"; protected static final int MAX_EXPONENT = 308; protected static final Pattern PATTERN_DECIMAL_ZEROS = Pattern.compile("^([\\+\\-]?)(\\d+)\\.0*$", Pattern.CASE_INSENSITIVE); @@ -47,6 +48,7 @@ public class Swc4jAstNumber @Jni2RustField(componentAtom = true) protected Optional raw; protected double value; + @Jni2RustMethod public Swc4jAstNumber( double value, @@ -222,6 +224,10 @@ public String toString() { return normalize(raw.orElse(Double.toString(value))); } + public String toString(int radix) { + return Integer.toString(asInt(), radix); + } + @Override public Swc4jAstVisitorResponse visit(ISwc4jAstVisitor visitor) { switch (visitor.visitNumber(this)) { diff --git a/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstStr.java b/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstStr.java index 34f3b70a..e9057e51 100644 --- a/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstStr.java +++ b/src/main/java/com/caoccao/javet/swc4j/ast/expr/lit/Swc4jAstStr.java @@ -35,6 +35,10 @@ public class Swc4jAstStr implements ISwc4jAstLit, ISwc4jAstModuleExportName, ISwc4jAstPropName, ISwc4jAstTsModuleName, ISwc4jAstTsLit, ISwc4jAstTsEnumMemberId, ISwc4jAstCoercionPrimitive { public static final String CONSTRUCTOR = "String"; + public static final String FONTCOLOR = "fontcolor"; + public static final String ITALICS = "italics"; + public static final String SLICE = "slice"; + public static final String SPLIT = "split"; @Jni2RustField(componentAtom = true) protected Optional raw; @Jni2RustField(atom = true) @@ -98,6 +102,11 @@ public String asString() { return toString(); } + public String fontcolor(String arg) { + String escapeArg = arg.replace("\"", """); + return "" + value + ""; + } + @Override public List getChildNodes() { return EMPTY_CHILD_NODES; @@ -118,6 +127,10 @@ public String getValue() { return value; } + public String italics() { + return "" + value + ""; + } + @Override public boolean replaceNode(ISwc4jAst oldNode, ISwc4jAst newNode) { return false; @@ -133,6 +146,30 @@ public Swc4jAstStr setValue(String value) { return this; } + public String slice() { + return slice(0); + } + + public String slice(int indexStart) { + return slice(indexStart, value.length()); + } + + public String slice(int indexStart, int indexEnd) { + return StringUtils.slice(value, indexStart, indexEnd); + } + + public List split() { + return split(null, 0); + } + + public List split(String separator) { + return split(separator, 0); + } + + public List split(String separator, int limit) { + return StringUtils.split(value, separator, limit); + } + @Override public String toString() { return value; diff --git a/src/main/java/com/caoccao/javet/swc4j/utils/StringUtils.java b/src/main/java/com/caoccao/javet/swc4j/utils/StringUtils.java index 39bdbbb9..beedeb48 100644 --- a/src/main/java/com/caoccao/javet/swc4j/utils/StringUtils.java +++ b/src/main/java/com/caoccao/javet/swc4j/utils/StringUtils.java @@ -16,10 +16,7 @@ package com.caoccao.javet.swc4j.utils; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.StringJoiner; +import java.util.*; /** * The type String utils. @@ -181,6 +178,36 @@ public static String slice(String str, int indexStart, int indexEnd) { return str.substring(indexStart, indexEnd); } + /** + * String.prototype.split() + * The split() method of String values takes a pattern and divides this string into an ordered list of substrings + * by searching for the pattern, puts these substrings into an array, and returns the array. + * + * @param str the str + * @param separator The pattern describing where each split should occur. Can be undefined, a string, + * or an object with a Symbol.split method — the typical example being a regular expression. + * Omitting separator or passing undefined causes split() to return an array with the calling + * string as a single element. All values that are not undefined or objects with a @@split method + * are coerced to strings. + * @param limit A non-negative integer specifying a limit on the number of substrings to be included in the + * array. If provided, splits the string at each occurrence of the specified separator, + * but stops when limit entries have been placed in the array. + * Any leftover text is not included in the array at all. + * @return A list of strings, split at each point where the separator occurs in the given string. + * @since 0.8.0 + */ + public static List split(String str, String separator, int limit) { + List list = new ArrayList<>(); + if (isNotEmpty(str)) { + if (separator == null) { + list.add(str); + } else { + Collections.addAll(list, str.split(separator, limit)); + } + } + return list; + } + /** * To snake case string. * diff --git a/src/test/java/com/caoccao/javet/swc4j/ast/Swc4jAstStore.java b/src/test/java/com/caoccao/javet/swc4j/ast/Swc4jAstStore.java index 2ed19a80..b7244215 100644 --- a/src/test/java/com/caoccao/javet/swc4j/ast/Swc4jAstStore.java +++ b/src/test/java/com/caoccao/javet/swc4j/ast/Swc4jAstStore.java @@ -124,7 +124,7 @@ private void init() { Map methodMap = Stream.of(clazz.getDeclaredMethods()) .filter(method -> !Modifier.isStatic(method.getModifiers())) .filter(method -> !Modifier.isAbstract(method.getModifiers())) - .collect(Collectors.toMap(Method::getName, Function.identity())); + .collect(Collectors.toMap(Method::getName, Function.identity(), (n1, n2) -> n1)); ReflectionUtils.getDeclaredFields(clazz).values().stream() .filter(field -> !Modifier.isStatic(field.getModifiers())) .filter(field -> !new Jni2RustFieldUtils(field).isIgnore()) diff --git a/src/test/java/com/caoccao/javet/swc4j/plugins/jsfuck/TestSwc4jPluginHostJsFuckDecoder.java b/src/test/java/com/caoccao/javet/swc4j/plugins/jsfuck/TestSwc4jPluginHostJsFuckDecoder.java index ccafd565..a38e87b2 100644 --- a/src/test/java/com/caoccao/javet/swc4j/plugins/jsfuck/TestSwc4jPluginHostJsFuckDecoder.java +++ b/src/test/java/com/caoccao/javet/swc4j/plugins/jsfuck/TestSwc4jPluginHostJsFuckDecoder.java @@ -64,6 +64,7 @@ public void test() throws Swc4jCoreException { testCaseMap.put("(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]])+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]", "\"eval\""); testCaseMap.put("(+(!+[]+!+[]+!+[]+[!+[]+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]+!+[]])+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+([][[]]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(+(!+[]+!+[]+!+[]+[!+[]+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]+!+[]])", "\"window\""); testCaseMap.put("[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]])+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]])()([+!+[]]+(+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]])+[])[!+[]+!+[]]+[+!+[]])", "eval(\"1+1\")"); + testCaseMap.put("[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+((!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[+!+[]]+(!![]+[])[+[]]+[+!+[]]+[+[]]+[+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[+!+[]]+[!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]])[(![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]]((!![]+[])[+[]])[([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]](([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]])+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()", "\"~`!@#$%^&*()-=_+{}[];:'\\\",.<>/?|\\\\\""); ISwc4jPluginHost pluginHost = new Swc4jPluginHostJsFuckDecoder(); jsScriptTransformOptions .setPluginHost(pluginHost) diff --git a/src/test/java/com/caoccao/javet/swc4j/tutorials/Tutorial07Decode.java b/src/test/java/com/caoccao/javet/swc4j/tutorials/Tutorial07Decode.java index fb26765e..4a39c6d1 100644 --- a/src/test/java/com/caoccao/javet/swc4j/tutorials/Tutorial07Decode.java +++ b/src/test/java/com/caoccao/javet/swc4j/tutorials/Tutorial07Decode.java @@ -40,7 +40,7 @@ public static void main(String[] args) throws Swc4jCoreException, MalformedURLEx // Prepare a script name. URL specifier = new URL("file:///abc.ts"); // Create a plugin host. - ISwc4jPluginHost pluginHost = new Swc4jPluginHostJsFuckDecoder(10); + ISwc4jPluginHost pluginHost = new Swc4jPluginHostJsFuckDecoder(); Swc4jTransformOptions options = new Swc4jTransformOptions() .setSpecifier(specifier) .setPluginHost(pluginHost)