/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.google.gson.Gson
 *  com.google.gson.JsonSyntaxException
 *  com.l7tech.gateway.common.audit.Audit
 *  com.l7tech.gateway.common.audit.AuditDetailMessage
 *  com.l7tech.gateway.common.audit.AuditRecord
 *  com.l7tech.gateway.common.audit.MessageSummaryAuditRecord
 *  com.l7tech.policy.variable.Syntax
 *  com.l7tech.util.Config
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.ConfigFactory$ConfigurationListener
 *  com.l7tech.util.SyspropUtil
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.audit;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.audit.AuditDetailMessage;
import com.l7tech.gateway.common.audit.AuditRecord;
import com.l7tech.gateway.common.audit.MessageSummaryAuditRecord;
import com.l7tech.policy.variable.Syntax;
import com.l7tech.server.audit.a;
import com.l7tech.server.audit.w;
import com.l7tech.server.audit.x;
import com.l7tech.server.message.PolicyEnforcementContextFactory;
import com.l7tech.server.policy.variable.ExpandVariables;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.SyspropUtil;
import java.lang.reflect.Type;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import org.jetbrains.annotations.Nullable;

public class AuditLogFormatter<REC extends AuditRecord> {
    private static final Logger a;
    private static final int b = 1000;
    private static final int c = 10000;
    private static final String d;
    private static final String e;
    private static final String f;
    private static final String g;
    private static final String h;
    private static String i;
    private static String j;
    private static String k;
    private static String l;
    private static String m;
    private static String n;
    private static String o;
    private static String p;
    private static String[] q;
    private static final Object r;
    private static final Gson s;
    private static final Type t;
    private static final List<String> u;
    protected static Config config;
    protected static boolean configInitialized;
    private final String v;
    private final String w;
    private final String x;
    private final String y;
    private final String z;
    private final String A;
    private final String B;
    static final String C;
    static final String D;
    static String E;
    static boolean F;
    private static int G;
    private static final Pattern H;
    private static final String I;
    private static final String J;
    private static final String K;
    private static final String[] L;

    private static void a(Config config) {
        try {
            if (!configInitialized) {
                AuditLogFormatter.config = config;
                ConfigFactory.addListener((ConfigFactory.ConfigurationListener)new w(), (String[])new String[0]);
                AuditLogFormatter.a(L[27]);
                configInitialized = true;
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
    }

    private static void a(String string) {
        block4: {
            try {
                try {
                    if (config == null || !L[41].equals(string)) break block4;
                }
                catch (JsonSyntaxException jsonSyntaxException) {
                    throw AuditLogFormatter.a(jsonSyntaxException);
                }
                G = config.getIntProperty(L[41], 10000);
            }
            catch (JsonSyntaxException jsonSyntaxException) {
                throw AuditLogFormatter.a(jsonSyntaxException);
            }
        }
    }

    public static boolean isFormatDefault() {
        boolean bl2;
        try {
            bl2 = !AuditLogFormatter.isFormatJson();
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        return bl2;
    }

    public static boolean isFormatJson() {
        boolean bl2;
        block5: {
            block4: {
                try {
                    try {
                        if (E == null || !E.equalsIgnoreCase(L[14])) break block4;
                    }
                    catch (JsonSyntaxException jsonSyntaxException) {
                        throw AuditLogFormatter.a(jsonSyntaxException);
                    }
                    bl2 = true;
                    break block5;
                }
                catch (JsonSyntaxException jsonSyntaxException) {
                    throw AuditLogFormatter.a(jsonSyntaxException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Unable to fully structure code
     */
    public AuditLogFormatter(Map<String, Object> var1_1) {
        block26: {
            block22: {
                block25: {
                    block24: {
                        block23: {
                            super();
                            var2_2 = AuditLogFormatter.r;
                            synchronized (var2_2) {
                                block21: {
                                    block28: {
                                        block27: {
                                            if (AuditLogFormatter.i == null) ** GOTO lbl25
                                            if (AuditLogFormatter.k == null) ** GOTO lbl25
                                            if (AuditLogFormatter.m == null) ** GOTO lbl25
                                            break block27;
                                            catch (JsonSyntaxException v0) {
                                                throw AuditLogFormatter.a(v0);
                                            }
                                        }
                                        if (AuditLogFormatter.o == null) ** GOTO lbl25
                                        break block28;
                                        catch (JsonSyntaxException v1) {
                                            throw AuditLogFormatter.a(v1);
                                        }
                                    }
                                    try {
                                        block29: {
                                            if (AuditLogFormatter.p != null) break block21;
                                            break block29;
                                            catch (JsonSyntaxException v2) {
                                                throw AuditLogFormatter.a(v2);
                                            }
                                        }
                                        AuditLogFormatter.a();
                                    }
                                    catch (JsonSyntaxException v3) {
                                        throw AuditLogFormatter.a(v3);
                                    }
                                }
                            }
                            if (var1_1 != null) {
                                var2_2 = new x(this);
                                this.v = AuditLogFormatter.c(ExpandVariables.process(AuditLogFormatter.i, var1_1, (Audit)var2_2, false, 1000));
                                this.w = AuditLogFormatter.c(ExpandVariables.process(AuditLogFormatter.k, var1_1, (Audit)var2_2, false, 1000));
                                this.x = AuditLogFormatter.c(ExpandVariables.process(AuditLogFormatter.m, var1_1, (Audit)var2_2, false, 1000));
                                this.y = AuditLogFormatter.o;
                                this.z = AuditLogFormatter.p;
                            } else {
                                this.v = AuditLogFormatter.j;
                                this.w = AuditLogFormatter.l;
                                this.x = AuditLogFormatter.n;
                                this.y = AuditLogFormatter.o;
                                this.z = AuditLogFormatter.p;
                            }
                            var2_2 = PolicyEnforcementContextFactory.getCurrent();
                            try {
                                try {
                                    try {
                                        if (var2_2 == null || var2_2.getService() == null) break block22;
                                    }
                                    catch (JsonSyntaxException v4) {
                                        throw AuditLogFormatter.a(v4);
                                    }
                                    v5 = this;
                                    if (var2_2.getService().getGoid() == null) break block23;
                                }
                                catch (JsonSyntaxException v6) {
                                    throw AuditLogFormatter.a(v6);
                                }
                                v7 = var2_2.getService().getGoid().toString();
                                break block24;
                            }
                            catch (JsonSyntaxException v8) {
                                throw AuditLogFormatter.a(v8);
                            }
                        }
                        v7 = "";
                    }
                    try {
                        v5.A = v7;
                        if (var2_2.getService().getRoutingUri() != null) break block25;
                        this.B = var2_2.getService().getName();
                        break block26;
                    }
                    catch (JsonSyntaxException v9) {
                        throw AuditLogFormatter.a(v9);
                    }
                }
                this.B = MessageFormat.format(AuditLogFormatter.L[1], new Object[]{var2_2.getService().getName(), var2_2.getService().getRoutingUri()});
                break block26;
            }
            this.A = "";
            this.B = "";
        }
    }

    public AuditLogFormatter() {
        this(null);
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public static void notifyPropertyChange(String string) {
        if (u.contains(string)) {
            Object object = r;
            synchronized (object) {
                m = null;
                k = null;
                i = null;
                p = null;
                o = null;
                a.log(Level.INFO, L[12] + string);
            }
        }
    }

    private static void a() {
        Config config;
        try {
            config = AuditLogFormatter.config != null ? AuditLogFormatter.config : ConfigFactory.getCachedConfig();
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        AuditLogFormatter.b(config);
        AuditLogFormatter.b();
        j = AuditLogFormatter.b(i);
        l = AuditLogFormatter.b(k);
        n = AuditLogFormatter.b(m);
        o = AuditLogFormatter.b(o);
        p = AuditLogFormatter.b(p);
        if (a.isLoggable(Level.FINER)) {
            String[] stringArray = L;
            StringBuffer stringBuffer = new StringBuffer(stringArray[42]);
            stringBuffer.append(stringArray[32]).append(stringArray[20]).append(i).append("\n");
            stringBuffer.append(stringArray[50]).append(stringArray[17]).append(k).append("\n");
            stringBuffer.append(stringArray[6]).append(stringArray[17]).append(m).append("\n");
            stringBuffer.append(stringArray[19]).append(stringArray[17]).append(o).append("\n");
            stringBuffer.append(stringArray[0]).append(stringArray[17]).append(p);
            a.log(Level.FINER, stringBuffer.toString());
        }
    }

    private static void b(Config config) {
        block17: {
            String[] stringArray;
            block16: {
                block15: {
                    block14: {
                        block13: {
                            block12: {
                                block11: {
                                    block10: {
                                        stringArray = L;
                                        String string = stringArray[31];
                                        try {
                                            AuditLogFormatter.a(config);
                                            i = config.getProperty(stringArray[49]);
                                            if (i != null) break block10;
                                            i = stringArray[5];
                                            break block11;
                                        }
                                        catch (JsonSyntaxException jsonSyntaxException) {
                                            throw AuditLogFormatter.a(jsonSyntaxException);
                                        }
                                    }
                                    stringArray = L;
                                    i = i.replaceAll(stringArray[51], "");
                                }
                                try {
                                    k = config.getProperty(L[45]);
                                    if (k != null) break block12;
                                    k = L[3];
                                    break block13;
                                }
                                catch (JsonSyntaxException jsonSyntaxException) {
                                    throw AuditLogFormatter.a(jsonSyntaxException);
                                }
                            }
                            stringArray = L;
                            k = k.replaceAll(stringArray[51], "");
                        }
                        try {
                            m = config.getProperty(L[40]);
                            if (m != null) break block14;
                            m = L[22];
                            break block15;
                        }
                        catch (JsonSyntaxException jsonSyntaxException) {
                            throw AuditLogFormatter.a(jsonSyntaxException);
                        }
                    }
                    stringArray = L;
                    m = m.replaceAll(stringArray[51], "");
                }
                try {
                    o = config.getProperty(L[29]);
                    if (o != null) break block16;
                    o = L[35];
                    break block17;
                }
                catch (JsonSyntaxException jsonSyntaxException) {
                    throw AuditLogFormatter.a(jsonSyntaxException);
                }
            }
            stringArray = L;
            o = o.replaceAll(stringArray[51], "");
        }
        try {
            p = config.getProperty(L[11]);
            p = p == null ? L[15] : p.replaceAll(L[51], "");
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
    }

    private static void b() {
        HashSet<String> hashSet = new HashSet<String>();
        try {
            AuditLogFormatter.a(hashSet, i);
            AuditLogFormatter.a(hashSet, k);
            AuditLogFormatter.a(hashSet, m);
            AuditLogFormatter.a(hashSet, o);
            AuditLogFormatter.a(hashSet, p);
            q = hashSet.size() > 0 ? hashSet.toArray(new String[hashSet.size()]) : new String[0];
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
    }

    private static String b(String string) {
        String[] stringArray = L;
        String string2 = stringArray[21];
        String string3 = stringArray[25];
        for (String string4 : q) {
            stringArray = L;
            string = string.replaceAll(stringArray[13] + string4 + stringArray[46], "");
        }
        return AuditLogFormatter.c(string);
    }

    private static String c(String string) {
        String[] stringArray = L;
        return string.replaceAll(stringArray[38], "").replaceAll(stringArray[4], "");
    }

    private static void a(Set<String> set, String string) {
        block4: {
            try {
                try {
                    if (string != null && string.length() != 0) break block4;
                }
                catch (JsonSyntaxException jsonSyntaxException) {
                    throw AuditLogFormatter.a(jsonSyntaxException);
                }
                return;
            }
            catch (JsonSyntaxException jsonSyntaxException) {
                throw AuditLogFormatter.a(jsonSyntaxException);
            }
        }
        String[] stringArray = Syntax.getReferencedNames((String)string);
        set.addAll(Arrays.asList(stringArray));
    }

    public static String[] getContextVariablesUsed() {
        return q;
    }

    public String format(REC REC, String string) {
        return this.format(REC, string, null);
    }

    public String format(REC REC, String string, boolean bl2) {
        return this.format(REC, string, null, bl2);
    }

    public String format(REC REC, String string, String[] stringArray) {
        return this.format(REC, string, stringArray, false);
    }

    public String format(REC REC, String string, String[] stringArray, boolean bl2) {
        return this.a(REC, string, null, stringArray, bl2, -1L);
    }

    String a(AuditDetailMessage auditDetailMessage, long l2) {
        return this.a(auditDetailMessage, null, l2);
    }

    public String formatDetail(AuditDetailMessage auditDetailMessage, String[] stringArray) {
        return this.a(auditDetailMessage, stringArray, -1L);
    }

    String a(AuditDetailMessage auditDetailMessage, String[] stringArray, long l2) {
        return this.a(null, null, auditDetailMessage, stringArray, false, l2);
    }

    public String formatDetail(@Nullable REC REC, String string, @Nullable AuditDetailMessage auditDetailMessage, String[] stringArray, long l2) {
        return this.a(REC, string, auditDetailMessage, stringArray, false, l2);
    }

    private String a(@Nullable REC REC, String string, @Nullable AuditDetailMessage auditDetailMessage, String[] stringArray, boolean bl2, long l2) {
        try {
            if (AuditLogFormatter.isFormatJson()) {
                return this.a(REC, string, auditDetailMessage, stringArray, l2);
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        return this.a(REC, auditDetailMessage, stringArray, bl2);
    }

    private String a(@Nullable REC REC, @Nullable AuditDetailMessage auditDetailMessage, String[] stringArray, boolean bl2) {
        block10: {
            block11: {
                try {
                    try {
                        if (!(REC instanceof MessageSummaryAuditRecord)) break block10;
                        if (auditDetailMessage == null) break block11;
                    }
                    catch (JsonSyntaxException jsonSyntaxException) {
                        throw AuditLogFormatter.a(jsonSyntaxException);
                    }
                    return this.e(new MessageFormat(this.x).format(this.a(auditDetailMessage, stringArray)));
                }
                catch (JsonSyntaxException jsonSyntaxException) {
                    throw AuditLogFormatter.a(jsonSyntaxException);
                }
            }
            try {
                if (bl2) {
                    return this.e(new MessageFormat(this.v).format(this.a(REC, true)));
                }
            }
            catch (JsonSyntaxException jsonSyntaxException) {
                throw AuditLogFormatter.a(jsonSyntaxException);
            }
            return this.e(new MessageFormat(this.w).format(this.a(REC, false)));
        }
        try {
            if (auditDetailMessage != null) {
                return this.e(new MessageFormat(this.z).format(this.a(auditDetailMessage, stringArray)));
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        return this.e(new MessageFormat(this.y).format(this.a(REC, bl2)));
    }

    private String a(@Nullable REC REC, String string, @Nullable AuditDetailMessage auditDetailMessage, String[] stringArray, long l2) {
        TreeMap<String, Object> treeMap;
        block17: {
            block18: {
                block16: {
                    treeMap = new TreeMap<String, Object>();
                    try {
                        try {
                            if (auditDetailMessage == null) break block16;
                            treeMap.put(L[26], auditDetailMessage.getId());
                            treeMap.put(L[28], AuditLogFormatter.d(new MessageFormat(auditDetailMessage.getMessage()).format(stringArray)));
                            if (l2 <= 0L) break block17;
                        }
                        catch (JsonSyntaxException jsonSyntaxException) {
                            throw AuditLogFormatter.a(jsonSyntaxException);
                        }
                        treeMap.put(L[7], String.format(L[39], new Date(l2)));
                        break block17;
                    }
                    catch (JsonSyntaxException jsonSyntaxException) {
                        throw AuditLogFormatter.a(jsonSyntaxException);
                    }
                }
                try {
                    try {
                        try {
                            if (REC == null) break block17;
                            treeMap.put(L[44], AuditLogFormatter.d(new MessageFormat(REC.getMessage()).format(stringArray)));
                            if (!(REC instanceof MessageSummaryAuditRecord)) break block17;
                        }
                        catch (JsonSyntaxException jsonSyntaxException) {
                            throw AuditLogFormatter.a(jsonSyntaxException);
                        }
                        if (!F) break block18;
                    }
                    catch (JsonSyntaxException jsonSyntaxException) {
                        throw AuditLogFormatter.a(jsonSyntaxException);
                    }
                    treeMap.put(L[30], AuditLogFormatter.d(((MessageSummaryAuditRecord)REC).getRequestXml()));
                    treeMap.put(L[36], AuditLogFormatter.d(((MessageSummaryAuditRecord)REC).getResponseXml()));
                    break block17;
                }
                catch (JsonSyntaxException jsonSyntaxException) {
                    throw AuditLogFormatter.a(jsonSyntaxException);
                }
            }
            String[] stringArray2 = L;
            treeMap.put(stringArray2[10], ((MessageSummaryAuditRecord)REC).getRequestXml());
            treeMap.put(stringArray2[16], ((MessageSummaryAuditRecord)REC).getResponseXml());
        }
        try {
            if (REC != null) {
                treeMap.put(L[18], string);
                treeMap.putAll(REC.getAuditMetadata());
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        try {
            if (this.B.length() > 0) {
                treeMap.put(L[48], this.B);
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        return s.toJson(treeMap);
    }

    private static Object d(@Nullable String string) {
        try {
            if (string == null) {
                return null;
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        try {
            if (!H.matcher(string).matches()) {
                return string;
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        try {
            return s.fromJson(string, t);
        }
        catch (JsonSyntaxException | StackOverflowError throwable) {
            return string;
        }
    }

    private Object[] a(REC REC, boolean bl2) {
        String string;
        String string2;
        String string3;
        Object[] objectArray = new String[4];
        try {
            objectArray[0] = "";
            Object[] objectArray2 = objectArray;
            int n2 = 1;
            string3 = bl2 ? "" : REC.getMessage();
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        try {
            objectArray2[n2] = string3;
            Object[] objectArray3 = objectArray;
            int n3 = 2;
            string2 = REC instanceof MessageSummaryAuditRecord ? this.A : "";
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        try {
            objectArray3[n3] = string2;
            Object[] objectArray4 = objectArray;
            int n4 = 3;
            string = REC instanceof MessageSummaryAuditRecord ? this.B : "";
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        objectArray4[n4] = string;
        return objectArray;
    }

    private Object[] a(AuditDetailMessage auditDetailMessage, String[] stringArray) {
        return new String[]{Integer.toString(auditDetailMessage.getId()), new MessageFormat(auditDetailMessage.getMessage()).format(stringArray), this.A, this.B};
    }

    private String e(String string) {
        try {
            if (string.length() == 0) {
                return null;
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        try {
            if (string.length() > G) {
                return string.substring(0, G);
            }
        }
        catch (JsonSyntaxException jsonSyntaxException) {
            throw AuditLogFormatter.a(jsonSyntaxException);
        }
        return string;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[52];
                var3_1 = 0;
                var2_2 = "BSp:<_CD`{!%rXlR|6:WIWG}?\tX\u0016is\u0013h\u001d^{.\u0006\u00170'\u0011>\t\u0012\u0002`>e6\u001d\u0007Rp\u0007m\"\bWn.vy7Xn\u001c1blg\u007f\r\u0003%w<_\t\u0012\u0002`)\u0003X\u0017i'\u007f]O\u000f\fN\u0007xxH.\u00159p^ZH(\u0013OH~\rO\r\u0014wp^{?\b\u0016OQ~\fH.#sT{0-`_JHss:v]VCg'huCQ\u0006g6:eE@C.s3 Q\u001bBSp:<_CD`{!%rXpCf%!pIgC`2!\u007f\u0010GC`2!\u007f\u0001WOy6;gMNV'\u007f]O\u000f\fN\u0007xxH.\u00159p^ZH(\u0013OH~\rO\r\u0014wp^{?\b\u0016OQ~\fH.@@Iy}$$XFE|};v^UCf})fHJR:?'t\u0002EIf>)g\u0002IU{=f\u007fCDtq\"=v_Wtq 8|BPCU \u0002`CM\u0007QCe&-`X\u0019BSp:<_CD`{!%rXlR|6:WIWG}?/bSp:<3@LA45'aABR`6:?\f@Ja <v^\u0003Vf<8v^W_4&8wMWCpih\u0004\u007f\u0002H(\u0004IU{=\bX\u0016iihh\u001d^\bQCg#'}_F\u0003\u0003\u001b4\u0002JB\u0013BSp:<_CD`{!%rXlR|6:\u0003\u0003\u001b4\u0004\u007f\u0002H(\bX\u0016iihh\u001d^\"@Iy}$$XFE|};v^UCf})fHJR:?'t\u0002EIf>)g\u001b\u007f]O\u000f,O_~\fO\r\u0014wP\u007f[Ix\u0013OH\u007fUIy\u0014n\u0002\u007f[\tGC`2!\u007f\u0001JB!BSp:<=@LA:>)kjLTy2<gIGkq ;rKFu})-\u0007NCg )tI\u0013BSp:<_CD`{!%rXlR|6:\u0007QCe&-`X\u0015\u007f\u0002H(\u0013O_~\fH.4OWxzg\u000ebOQ\u001bBSp:<_CD`{!%rXpCf%!pIkCu7-a\u0007GCr2=\u007fX\u0007GCr2=\u007fX\u0003X\u0017i\bQCg#'}_F\u0004IU{=\u001b\u007f]O\u000f,O_~\fO\r\u0014wP\u007f[Ix\u0013OH\u007fUIy\u0014n.\u0006\u00170'\u0011>\t\u0012\u0002`>e6\u001d\u0007Rp\u0007m\"\bWn.vy7Xn\u001c1blg\u007f\r\u0003%w<_\t\u0012\u0002`)\u001bBSp:<_CD`{!%rXpCf%!pIgC`2!\u007f!BSp:<=@LA:>)kjLTy2<gIGkq ;rKFu})-\"bSp:<_CD`{!%rXWCfs!}EWOu?!iIG\u0006`<r\u0019#sT{0-`_JHss:v]VCg'huCQ\u0006g6:eE@C.s3 Q\u0007NCg )tI\u001bBSp:<_CD`{!%rXpCf%!pIeI{'-a\u0002\u007f[\r}zgy\u0014h\u0002\t[H b7\u0007PCf%!pI\u001bBSp:<_CD`{!%rXpCf%!pIkCu7-a";
                var4_3 = "BSp:<_CD`{!%rXlR|6:WIWG}?\tX\u0016is\u0013h\u001d^{.\u0006\u00170'\u0011>\t\u0012\u0002`>e6\u001d\u0007Rp\u0007m\"\bWn.vy7Xn\u001c1blg\u007f\r\u0003%w<_\t\u0012\u0002`)\u0003X\u0017i'\u007f]O\u000f\fN\u0007xxH.\u00159p^ZH(\u0013OH~\rO\r\u0014wp^{?\b\u0016OQ~\fH.#sT{0-`_JHss:v]VCg'huCQ\u0006g6:eE@C.s3 Q\u001bBSp:<_CD`{!%rXpCf%!pIgC`2!\u007f\u0010GC`2!\u007f\u0001WOy6;gMNV'\u007f]O\u000f\fN\u0007xxH.\u00159p^ZH(\u0013OH~\rO\r\u0014wp^{?\b\u0016OQ~\fH.@@Iy}$$XFE|};v^UCf})fHJR:?'t\u0002EIf>)g\u0002IU{=f\u007fCDtq\"=v_Wtq 8|BPCU \u0002`CM\u0007QCe&-`X\u0019BSp:<_CD`{!%rXlR|6:WIWG}?/bSp:<3@LA45'aABR`6:?\f@Ja <v^\u0003Vf<8v^W_4&8wMWCpih\u0004\u007f\u0002H(\u0004IU{=\bX\u0016iihh\u001d^\bQCg#'}_F\u0003\u0003\u001b4\u0002JB\u0013BSp:<_CD`{!%rXlR|6:\u0003\u0003\u001b4\u0004\u007f\u0002H(\bX\u0016iihh\u001d^\"@Iy}$$XFE|};v^UCf})fHJR:?'t\u0002EIf>)g\u001b\u007f]O\u000f,O_~\fO\r\u0014wP\u007f[Ix\u0013OH\u007fUIy\u0014n\u0002\u007f[\tGC`2!\u007f\u0001JB!BSp:<=@LA:>)kjLTy2<gIGkq ;rKFu})-\u0007NCg )tI\u0013BSp:<_CD`{!%rXlR|6:\u0007QCe&-`X\u0015\u007f\u0002H(\u0013O_~\fH.4OWxzg\u000ebOQ\u001bBSp:<_CD`{!%rXpCf%!pIkCu7-a\u0007GCr2=\u007fX\u0007GCr2=\u007fX\u0003X\u0017i\bQCg#'}_F\u0004IU{=\u001b\u007f]O\u000f,O_~\fO\r\u0014wP\u007f[Ix\u0013OH\u007fUIy\u0014n.\u0006\u00170'\u0011>\t\u0012\u0002`>e6\u001d\u0007Rp\u0007m\"\bWn.vy7Xn\u001c1blg\u007f\r\u0003%w<_\t\u0012\u0002`)\u001bBSp:<_CD`{!%rXpCf%!pIgC`2!\u007f!BSp:<=@LA:>)kjLTy2<gIGkq ;rKFu})-\"bSp:<_CD`{!%rXWCfs!}EWOu?!iIG\u0006`<r\u0019#sT{0-`_JHss:v]VCg'huCQ\u0006g6:eE@C.s3 Q\u0007NCg )tI\u001bBSp:<_CD`{!%rXpCf%!pIeI{'-a\u0002\u007f[\r}zgy\u0014h\u0002\t[H b7\u0007PCf%!pI\u001bBSp:<_CD`{!%rXpCf%!pIkCu7-a".length();
                var1_4 = 25;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 7;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = AuditLogFormatter.a(v0, AuditLogFormatter.f(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "gvU\u001f\u0019zfaE^\u0004\u0000W}UfC\u0000\u0004Ul@l^\u0002\bD\u0015Z'm\r6jz[)m\u000b\u0011jr]_B+Gjt";
                    var4_3 = "gvU\u001f\u0019zfaE^\u0004\u0000W}UfC\u0000\u0004Ul@l^\u0002\bD\u0015Z'm\r6jz[)m\u000b\u0011jr]_B+Gjt".length();
                    var1_4 = 27;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 34;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = AuditLogFormatter.a(v0, AuditLogFormatter.f(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        AuditLogFormatter.L = var5;
        AuditLogFormatter.D = AuditLogFormatter.L[33];
        AuditLogFormatter.f = AuditLogFormatter.L[15];
        AuditLogFormatter.K = AuditLogFormatter.L[8];
        AuditLogFormatter.e = AuditLogFormatter.L[35];
        AuditLogFormatter.C = AuditLogFormatter.L[37];
        AuditLogFormatter.J = AuditLogFormatter.L[24];
        AuditLogFormatter.g = AuditLogFormatter.L[35];
        AuditLogFormatter.h = AuditLogFormatter.L[15];
        AuditLogFormatter.d = AuditLogFormatter.L[43];
        AuditLogFormatter.I = AuditLogFormatter.L[2];
        AuditLogFormatter.a = Logger.getLogger(AuditLogFormatter.class.getName());
        AuditLogFormatter.r = new Object();
        AuditLogFormatter.s = new Gson();
        AuditLogFormatter.t = new a().getType();
        AuditLogFormatter.u = new ArrayList<String>(10);
        var0_6 = AuditLogFormatter.L;
        AuditLogFormatter.u.add(var0_6[32]);
        AuditLogFormatter.u.add(var0_6[50]);
        AuditLogFormatter.u.add(var0_6[6]);
        AuditLogFormatter.u.add(var0_6[19]);
        AuditLogFormatter.u.add(var0_6[0]);
        AuditLogFormatter.E = SyspropUtil.getString((String)var0_6[23], (String)var0_6[34]);
        AuditLogFormatter.F = SyspropUtil.getBoolean((String)var0_6[9], (boolean)false);
        AuditLogFormatter.G = 10000;
        AuditLogFormatter.H = Pattern.compile(var0_6[47], 32);
    }

    private static JsonSyntaxException a(JsonSyntaxException jsonSyntaxException) {
        return jsonSyntaxException;
    }

    private static char[] f(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x2B);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 36;
                    case 1 -> 33;
                    case 2 -> 19;
                    case 3 -> 84;
                    case 4 -> 79;
                    case 5 -> 20;
                    default -> 43;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

