/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.AuditConfiguration
 *  com.l7tech.gateway.common.cluster.ClusterProperty
 *  com.l7tech.gateway.common.module.ServerModuleFile
 *  com.l7tech.gateway.common.security.keystore.SsgKeyEntry
 *  com.l7tech.gateway.common.security.password.SecurePassword
 *  com.l7tech.gateway.common.security.rbac.Role
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.gateway.common.solutionkit.EntityOwnershipDescriptor
 *  com.l7tech.gateway.common.solutionkit.SolutionKit
 *  com.l7tech.gateway.common.transport.InterfaceTag
 *  com.l7tech.gateway.common.transport.SsgConnector
 *  com.l7tech.gateway.common.transport.jms.JmsConnection
 *  com.l7tech.gateway.common.transport.jms.JmsEndpoint
 *  com.l7tech.identity.Identity
 *  com.l7tech.identity.IdentityProviderConfig
 *  com.l7tech.identity.IdentityProviderConfigManager
 *  com.l7tech.identity.fed.FederatedGroup
 *  com.l7tech.identity.fed.FederatedUser
 *  com.l7tech.identity.fed.VirtualGroup
 *  com.l7tech.identity.internal.InternalGroup
 *  com.l7tech.identity.internal.InternalUser
 *  com.l7tech.objectmodel.Entity
 *  com.l7tech.objectmodel.EntityHeader
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.GuidEntityHeader
 *  com.l7tech.objectmodel.folder.Folder
 *  com.l7tech.objectmodel.folder.HasFolder
 *  com.l7tech.policy.AssertionAccess
 *  com.l7tech.policy.Policy
 *  com.l7tech.util.CollectionUtils$MapBuilder
 *  com.l7tech.util.Functions
 *  com.l7tech.util.Functions$Unary
 *  jakarta.inject.Inject
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.bundling;

import com.l7tech.gateway.common.audit.AuditConfiguration;
import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.gateway.common.security.password.SecurePassword;
import com.l7tech.gateway.common.security.rbac.Role;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.gateway.common.solutionkit.EntityOwnershipDescriptor;
import com.l7tech.gateway.common.solutionkit.SolutionKit;
import com.l7tech.gateway.common.transport.InterfaceTag;
import com.l7tech.gateway.common.transport.SsgConnector;
import com.l7tech.gateway.common.transport.jms.JmsConnection;
import com.l7tech.gateway.common.transport.jms.JmsEndpoint;
import com.l7tech.identity.Identity;
import com.l7tech.identity.IdentityProviderConfig;
import com.l7tech.identity.IdentityProviderConfigManager;
import com.l7tech.identity.fed.FederatedGroup;
import com.l7tech.identity.fed.FederatedUser;
import com.l7tech.identity.fed.VirtualGroup;
import com.l7tech.identity.internal.InternalGroup;
import com.l7tech.identity.internal.InternalUser;
import com.l7tech.objectmodel.Entity;
import com.l7tech.objectmodel.EntityHeader;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.GuidEntityHeader;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.objectmodel.folder.HasFolder;
import com.l7tech.policy.AssertionAccess;
import com.l7tech.policy.Policy;
import com.l7tech.server.EntityCrud;
import com.l7tech.server.EntityHeaderUtils;
import com.l7tech.server.bundling.AssertionAccessContainer;
import com.l7tech.server.bundling.EntityBundle;
import com.l7tech.server.bundling.EntityBundleExporter;
import com.l7tech.server.bundling.EntityContainer;
import com.l7tech.server.bundling.EntityMappingInstructions;
import com.l7tech.server.bundling.InterfaceTagContainer;
import com.l7tech.server.bundling.JmsContainer;
import com.l7tech.server.bundling.MappingInstructionsBuilder;
import com.l7tech.server.bundling.b;
import com.l7tech.server.search.DependencyAnalyzer;
import com.l7tech.server.search.DependencySearchResultsUtils;
import com.l7tech.server.search.exceptions.CannotRetrieveDependenciesException;
import com.l7tech.server.search.objects.BrokenDependency;
import com.l7tech.server.search.objects.Dependency;
import com.l7tech.server.search.objects.DependencySearchResults;
import com.l7tech.server.search.objects.DependentEntity;
import com.l7tech.server.solutionkit.SolutionKitManager;
import com.l7tech.util.CollectionUtils;
import com.l7tech.util.Functions;
import jakarta.inject.Inject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.jetbrains.annotations.NotNull;

/*
 * Exception performing whole class analysis ignored.
 */
public class EntityBundleExporterImpl
implements EntityBundleExporter {
    public static final String IncludeRequestFolderOption;
    public static final String DefaultMappingActionOption;
    public static final String DefaultMapByOption;
    public static final String IgnoredEntityIdsOption;
    public static final String IgnoreDependenciesOption;
    public static final String EncassAsPolicyDependencyOption;
    public static final String ServiceUsed;
    private static final String a;
    private static final EntityMappingInstructions.MappingAction b;
    private static final String c;
    public static final String IncludeSolutionKitsOption;
    private static final String d;
    private static final String e;
    public static final String IncludeOnlyServicePolicyOption;
    public static final String IncludeOnlyServicePolicy;
    public static final String IncludeOnlyDependenciesOption;
    public static final String IncludeOnlyDependencies;
    public static final String IncludeGatewayConfigurationOption;
    public static final String IncludeGatewayConfiguration;
    private static final EntityMappingInstructions.MappingAction f;
    @Inject
    private DependencyAnalyzer dependencyAnalyzer;
    @Inject
    private EntityCrud entityCrud;
    @Inject
    private MappingInstructionsBuilder mappingInstructionsBuilder;
    @Inject
    private SolutionKitManager solutionKitManager;
    private static final String[] g;

    @NotNull
    private static Map<String, Object> a(@NotNull Properties properties) {
        Map map;
        try {
            if (properties == null) {
                EntityBundleExporterImpl.a(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        CollectionUtils.MapBuilder mapBuilder = CollectionUtils.MapBuilder.builder();
        try {
            if (properties.containsKey(g[17])) {
                mapBuilder.put((Object)g[38], Arrays.asList(properties.getProperty(g[7]).split(",")));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            if (properties.containsKey(g[50])) {
                mapBuilder.put((Object)g[50], properties.get(g[50]));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            if (properties.containsKey(g[45])) {
                mapBuilder.put((Object)g[29], (Object)Boolean.parseBoolean(properties.getProperty(g[0], g[22])));
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            mapBuilder.put((Object)g[2], (Object)Boolean.parseBoolean(properties.getProperty(g[39], g[26])));
            mapBuilder.put((Object)g[18], (Object)false);
            mapBuilder.put((Object)g[27], (Object)Boolean.parseBoolean(properties.getProperty(g[40], g[26])));
            mapBuilder.put((Object)g[6], (Object)Boolean.parseBoolean(properties.getProperty(g[3], g[26])));
            mapBuilder.put((Object)g[52], (Object)Boolean.parseBoolean(properties.getProperty(g[37], g[26])));
            map = mapBuilder.map();
            if (map == null) {
                EntityBundleExporterImpl.a(1);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        return map;
    }

    @Override
    @NotNull
    public EntityBundle exportBundle(@NotNull Properties properties, EntityHeader ... entityHeaderArray) throws FindException, CannotRetrieveDependenciesException {
        try {
            if (properties == null) {
                EntityBundleExporterImpl.a(2);
            }
        }
        catch (FindException findException) {
            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
        }
        try {
            if (entityHeaderArray == null) {
                EntityBundleExporterImpl.a(3);
            }
        }
        catch (FindException findException) {
            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
        }
        List<DependencySearchResults> list = this.dependencyAnalyzer.getDependencies(Arrays.asList(entityHeaderArray), EntityBundleExporterImpl.a(properties));
        List<Dependency> list2 = DependencySearchResultsUtils.flattenDependencySearchResults(list, true);
        Set<String> set = this.a();
        ArrayList<EntityContainer> arrayList = new ArrayList<EntityContainer>();
        ArrayList<EntityMappingInstructions> arrayList2 = new ArrayList<EntityMappingInstructions>();
        for (Dependency dependency : list2) {
            boolean bl2;
            EntityHeader entityHeader;
            block39: {
                block40: {
                    block38: {
                        block41: {
                            EntityMappingInstructions.TargetMapping targetMapping;
                            block36: {
                                block37: {
                                    if (!(dependency instanceof BrokenDependency)) break block41;
                                    entityHeader = ((DependentEntity)dependency.getDependent()).getEntityHeader();
                                    targetMapping = null;
                                    try {
                                        try {
                                            if (entityHeader.getGoid() != null && !Goid.isDefault((Goid)entityHeader.getGoid())) break block36;
                                        }
                                        catch (FindException findException) {
                                            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                        }
                                        if (!(entityHeader instanceof GuidEntityHeader)) break block37;
                                    }
                                    catch (FindException findException) {
                                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                    }
                                    targetMapping = new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.GUID, ((GuidEntityHeader)entityHeader).getGuid());
                                    break block36;
                                }
                                if (entityHeader.getName() != null) {
                                    targetMapping = new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.NAME, entityHeader.getName());
                                }
                            }
                            EntityMappingInstructions entityMappingInstructions = new EntityMappingInstructions(entityHeader, targetMapping, EntityMappingInstructions.MappingAction.Ignore, false, false);
                            try {
                                if (arrayList2.contains(entityMappingInstructions)) continue;
                                arrayList2.add(entityMappingInstructions);
                                continue;
                            }
                            catch (FindException findException) {
                                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                            }
                        }
                        try {
                            try {
                                try {
                                    try {
                                        try {
                                            if (!(dependency.getDependent() instanceof DependentEntity)) continue;
                                            if (entityHeaderArray.length <= 0) break block38;
                                        }
                                        catch (FindException findException) {
                                            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                        }
                                        if (Boolean.parseBoolean(properties.getProperty(g[15], g[26]))) break block38;
                                    }
                                    catch (FindException findException) {
                                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                    }
                                    if (!EntityType.FOLDER.equals((Object)((DependentEntity)dependency.getDependent()).getEntityHeader().getType())) break block38;
                                }
                                catch (FindException findException) {
                                    throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                }
                                if (Functions.exists(Arrays.asList(entityHeaderArray), (Functions.Unary)new b(this, dependency))) {
                                    continue;
                                }
                            }
                            catch (FindException findException) {
                                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                            }
                        }
                        catch (FindException findException) {
                            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                        }
                    }
                    entityHeader = this.entityCrud.find(((DependentEntity)dependency.getDependent()).getEntityHeader());
                    try {
                        if (entityHeader == null) {
                            throw new FindException(g[54] + ((DependentEntity)dependency.getDependent()).getEntityHeader().toStringVerbose());
                        }
                    }
                    catch (FindException findException) {
                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                    }
                    bl2 = true;
                    String[] stringArray = g;
                    boolean bl3 = Boolean.parseBoolean(properties.getProperty(stringArray[9], stringArray[26]));
                    try {
                        try {
                            try {
                                if (!bl3) break block39;
                                if (entityHeader instanceof PublishedService) break block40;
                            }
                            catch (FindException findException) {
                                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                            }
                            if (entityHeader instanceof Policy) break block40;
                        }
                        catch (FindException findException) {
                            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                        }
                        if (!(entityHeader instanceof Folder)) break block39;
                    }
                    catch (FindException findException) {
                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                    }
                }
                bl2 = false;
            }
            try {
                if (!bl2) continue;
                this.a(properties, arrayList2, (DependentEntity)dependency.getDependent(), (Entity)entityHeader, set);
                this.a(properties, (Entity)entityHeader, arrayList);
            }
            catch (FindException findException) {
                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
            }
        }
        return new EntityBundle(arrayList, arrayList2, list);
    }

    private void a(@NotNull Properties properties, @NotNull Entity entity, @NotNull List<EntityContainer> list) throws FindException {
        block27: {
            try {
                if (properties == null) {
                    EntityBundleExporterImpl.a(4);
                }
            }
            catch (FindException findException) {
                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
            }
            try {
                if (entity == null) {
                    EntityBundleExporterImpl.a(5);
                }
            }
            catch (FindException findException) {
                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
            }
            try {
                if (list == null) {
                    EntityBundleExporterImpl.a(6);
                }
            }
            catch (FindException findException) {
                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
            }
            if (entity instanceof JmsEndpoint) {
                JmsEndpoint jmsEndpoint = (JmsEndpoint)entity;
                Entity entity2 = this.entityCrud.find(new EntityHeader(jmsEndpoint.getConnectionGoid(), EntityType.JMS_CONNECTION, null, null));
                try {
                    if (entity2 == null) {
                        throw new FindException(g[47] + jmsEndpoint.getName());
                    }
                }
                catch (FindException findException) {
                    throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                }
                list.add(new JmsContainer(jmsEndpoint, (JmsConnection)entity2));
            } else {
                block30: {
                    block29: {
                        block28: {
                            block26: {
                                try {
                                    try {
                                        try {
                                            if (!(entity instanceof SsgKeyEntry)) break block26;
                                            if (!properties.containsKey(g[43])) break block27;
                                        }
                                        catch (FindException findException) {
                                            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                        }
                                        if (Boolean.valueOf(properties.getProperty(g[43])).booleanValue()) break block26;
                                        break block27;
                                    }
                                    catch (FindException findException) {
                                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                    }
                                }
                                catch (FindException findException) {
                                    throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                                }
                            }
                            try {
                                if (!(entity instanceof InterfaceTag)) break block28;
                                list.add(new InterfaceTagContainer((InterfaceTag)entity));
                                break block27;
                            }
                            catch (FindException findException) {
                                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                            }
                        }
                        try {
                            if (!(entity instanceof AssertionAccess)) break block29;
                            list.add(new AssertionAccessContainer((AssertionAccess)entity));
                            break block27;
                        }
                        catch (FindException findException) {
                            throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                        }
                    }
                    try {
                        if (!(entity instanceof VirtualGroup)) break block30;
                        break block27;
                    }
                    catch (FindException findException) {
                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                    }
                }
                list.add(new EntityContainer<Entity>(entity));
            }
        }
    }

    private void a(@NotNull Properties properties, @NotNull ArrayList<EntityMappingInstructions> arrayList, @NotNull DependentEntity dependentEntity, @NotNull Entity entity, @NotNull Set<String> set) {
        block123: {
            EntityMappingInstructions entityMappingInstructions;
            block122: {
                block124: {
                    EntityMappingInstructions.MappingAction mappingAction;
                    String[] stringArray;
                    block119: {
                        EntityMappingInstructions.MappingAction mappingAction2;
                        Set<String> set2;
                        Entity entity2;
                        EntityBundleExporterImpl entityBundleExporterImpl;
                        EntityMappingInstructions.TargetMapping targetMapping;
                        EntityHeader entityHeader;
                        EntityMappingInstructions entityMappingInstructions2;
                        EntityMappingInstructions entityMappingInstructions3;
                        block121: {
                            block120: {
                                block118: {
                                    block117: {
                                        block116: {
                                            block114: {
                                                block115: {
                                                    block111: {
                                                        EntityMappingInstructions.MappingAction mappingAction3;
                                                        Set<String> set3;
                                                        Entity entity3;
                                                        EntityBundleExporterImpl entityBundleExporterImpl2;
                                                        EntityMappingInstructions.TargetMapping targetMapping2;
                                                        EntityHeader entityHeader2;
                                                        EntityMappingInstructions entityMappingInstructions4;
                                                        EntityMappingInstructions entityMappingInstructions5;
                                                        block113: {
                                                            block112: {
                                                                boolean bl2;
                                                                block105: {
                                                                    EntityMappingInstructions.MappingAction mappingAction4;
                                                                    Set<String> set4;
                                                                    Entity entity4;
                                                                    EntityBundleExporterImpl entityBundleExporterImpl3;
                                                                    EntityMappingInstructions.TargetMapping targetMapping3;
                                                                    EntityHeader entityHeader3;
                                                                    EntityMappingInstructions entityMappingInstructions6;
                                                                    EntityMappingInstructions entityMappingInstructions7;
                                                                    block107: {
                                                                        block106: {
                                                                            block102: {
                                                                                EntityMappingInstructions.MappingAction mappingAction5;
                                                                                Set<String> set5;
                                                                                Entity entity5;
                                                                                EntityBundleExporterImpl entityBundleExporterImpl4;
                                                                                EntityMappingInstructions.TargetMapping targetMapping4;
                                                                                EntityHeader entityHeader4;
                                                                                EntityMappingInstructions entityMappingInstructions8;
                                                                                EntityMappingInstructions entityMappingInstructions9;
                                                                                block104: {
                                                                                    block103: {
                                                                                        block98: {
                                                                                            block99: {
                                                                                                EntityMappingInstructions.MappingAction mappingAction6;
                                                                                                Set<String> set6;
                                                                                                Entity entity6;
                                                                                                EntityBundleExporterImpl entityBundleExporterImpl5;
                                                                                                EntityMappingInstructions.TargetMapping targetMapping5;
                                                                                                EntityHeader entityHeader5;
                                                                                                EntityMappingInstructions entityMappingInstructions10;
                                                                                                EntityMappingInstructions entityMappingInstructions11;
                                                                                                block101: {
                                                                                                    block100: {
                                                                                                        boolean bl3;
                                                                                                        block97: {
                                                                                                            block96: {
                                                                                                                block92: {
                                                                                                                    EntityMappingInstructions.MappingAction mappingAction7;
                                                                                                                    Set<String> set7;
                                                                                                                    Folder folder;
                                                                                                                    EntityBundleExporterImpl entityBundleExporterImpl6;
                                                                                                                    EntityMappingInstructions.TargetMapping targetMapping6;
                                                                                                                    EntityHeader entityHeader6;
                                                                                                                    EntityMappingInstructions entityMappingInstructions12;
                                                                                                                    EntityMappingInstructions entityMappingInstructions13;
                                                                                                                    block95: {
                                                                                                                        block94: {
                                                                                                                            block93: {
                                                                                                                                try {
                                                                                                                                    if (properties == null) {
                                                                                                                                        EntityBundleExporterImpl.a(7);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                                try {
                                                                                                                                    if (arrayList == null) {
                                                                                                                                        EntityBundleExporterImpl.a(8);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                                try {
                                                                                                                                    if (dependentEntity == null) {
                                                                                                                                        EntityBundleExporterImpl.a(9);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                                try {
                                                                                                                                    if (entity == null) {
                                                                                                                                        EntityBundleExporterImpl.a(10);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                                try {
                                                                                                                                    if (set == null) {
                                                                                                                                        EntityBundleExporterImpl.a(11);
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                                stringArray = g;
                                                                                                                                mappingAction = EntityMappingInstructions.MappingAction.valueOf(properties.getProperty(stringArray[55], b.toString()));
                                                                                                                                try {
                                                                                                                                    try {
                                                                                                                                        if (!(entity instanceof HasFolder)) break block92;
                                                                                                                                        if (!properties.containsKey(stringArray[8])) break block93;
                                                                                                                                    }
                                                                                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                    }
                                                                                                                                    if (((List)properties.get(g[50])).contains(EntityHeaderUtils.fromEntity(entity))) break block92;
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                            }
                                                                                                                            Folder folder2 = ((HasFolder)entity).getFolder();
                                                                                                                            try {
                                                                                                                                try {
                                                                                                                                    EntityMappingInstructions entityMappingInstructions14;
                                                                                                                                    if (folder2 == null) break block92;
                                                                                                                                    entityMappingInstructions13 = entityMappingInstructions14;
                                                                                                                                    entityMappingInstructions12 = entityMappingInstructions14;
                                                                                                                                    entityHeader6 = EntityHeaderUtils.fromEntity((Entity)folder2);
                                                                                                                                    targetMapping6 = null;
                                                                                                                                    entityBundleExporterImpl6 = this;
                                                                                                                                    folder = folder2;
                                                                                                                                    set7 = set;
                                                                                                                                    if (!mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore)) break block94;
                                                                                                                                }
                                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                                }
                                                                                                                                mappingAction7 = mappingAction;
                                                                                                                                break block95;
                                                                                                                            }
                                                                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                            }
                                                                                                                        }
                                                                                                                        mappingAction7 = EntityMappingInstructions.MappingAction.NewOrExisting;
                                                                                                                    }
                                                                                                                    entityMappingInstructions13(entityHeader6, targetMapping6, entityBundleExporterImpl6.a((Entity)folder, set7, mappingAction7), true, false);
                                                                                                                    entityMappingInstructions = entityMappingInstructions12;
                                                                                                                    try {
                                                                                                                        if (!arrayList.contains(entityMappingInstructions)) {
                                                                                                                            arrayList.add(entityMappingInstructions);
                                                                                                                        }
                                                                                                                    }
                                                                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                    }
                                                                                                                }
                                                                                                                try {
                                                                                                                    try {
                                                                                                                        if (!properties.containsKey(g[51]) || !Boolean.valueOf(properties.getProperty(g[43])).booleanValue()) break block96;
                                                                                                                    }
                                                                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                    }
                                                                                                                    bl3 = true;
                                                                                                                    break block97;
                                                                                                                }
                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                }
                                                                                                            }
                                                                                                            bl3 = false;
                                                                                                        }
                                                                                                        bl2 = bl3;
                                                                                                        try {
                                                                                                            try {
                                                                                                                EntityMappingInstructions entityMappingInstructions15;
                                                                                                                try {
                                                                                                                    if (!(entity instanceof InternalUser)) break block98;
                                                                                                                    if (!((InternalUser)entity).getGoid().equals((Object)new Goid(0L, 3L))) break block99;
                                                                                                                }
                                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                                }
                                                                                                                entityMappingInstructions11 = entityMappingInstructions15;
                                                                                                                entityMappingInstructions10 = entityMappingInstructions15;
                                                                                                                entityHeader5 = dependentEntity.getEntityHeader();
                                                                                                                targetMapping5 = null;
                                                                                                                entityBundleExporterImpl5 = this;
                                                                                                                entity6 = entity;
                                                                                                                set6 = set;
                                                                                                                if (!mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore)) break block100;
                                                                                                            }
                                                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                            }
                                                                                                            mappingAction6 = mappingAction;
                                                                                                            break block101;
                                                                                                        }
                                                                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                                                                            throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                        }
                                                                                                    }
                                                                                                    mappingAction6 = EntityMappingInstructions.MappingAction.NewOrExisting;
                                                                                                }
                                                                                                entityMappingInstructions11(entityHeader5, targetMapping5, entityBundleExporterImpl5.a(entity6, set6, mappingAction6), true, false);
                                                                                                entityMappingInstructions = entityMappingInstructions10;
                                                                                                break block124;
                                                                                            }
                                                                                            if (bl2) {
                                                                                                entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), null, this.a(entity, set, mappingAction), false, false);
                                                                                            } else {
                                                                                                EntityMappingInstructions.MappingAction mappingAction8;
                                                                                                Set<String> set8;
                                                                                                Entity entity7;
                                                                                                EntityBundleExporterImpl entityBundleExporterImpl7;
                                                                                                EntityMappingInstructions.TargetMapping targetMapping7;
                                                                                                EntityHeader entityHeader7;
                                                                                                EntityMappingInstructions entityMappingInstructions16;
                                                                                                EntityMappingInstructions entityMappingInstructions17;
                                                                                                try {
                                                                                                    EntityMappingInstructions entityMappingInstructions18;
                                                                                                    entityMappingInstructions17 = entityMappingInstructions18;
                                                                                                    entityMappingInstructions16 = entityMappingInstructions18;
                                                                                                    entityHeader7 = dependentEntity.getEntityHeader();
                                                                                                    targetMapping7 = null;
                                                                                                    entityBundleExporterImpl7 = this;
                                                                                                    entity7 = entity;
                                                                                                    set8 = set;
                                                                                                    mappingAction8 = mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore) ? mappingAction : EntityMappingInstructions.MappingAction.NewOrExisting;
                                                                                                }
                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                }
                                                                                                entityMappingInstructions17(entityHeader7, targetMapping7, entityBundleExporterImpl7.a(entity7, set8, mappingAction8), true, false);
                                                                                                entityMappingInstructions = entityMappingInstructions16;
                                                                                            }
                                                                                            break block124;
                                                                                        }
                                                                                        try {
                                                                                            try {
                                                                                                EntityMappingInstructions entityMappingInstructions19;
                                                                                                try {
                                                                                                    if (!(entity instanceof IdentityProviderConfig) || !IdentityProviderConfigManager.INTERNALPROVIDER_SPECIAL_GOID.equals((Object)((IdentityProviderConfig)entity).getGoid())) break block102;
                                                                                                }
                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                }
                                                                                                entityMappingInstructions9 = entityMappingInstructions19;
                                                                                                entityMappingInstructions8 = entityMappingInstructions19;
                                                                                                entityHeader4 = dependentEntity.getEntityHeader();
                                                                                                targetMapping4 = null;
                                                                                                entityBundleExporterImpl4 = this;
                                                                                                entity5 = entity;
                                                                                                set5 = set;
                                                                                                if (!mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore)) break block103;
                                                                                            }
                                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                            }
                                                                                            mappingAction5 = mappingAction;
                                                                                            break block104;
                                                                                        }
                                                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                                                            throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                        }
                                                                                    }
                                                                                    mappingAction5 = EntityMappingInstructions.MappingAction.NewOrExisting;
                                                                                }
                                                                                entityMappingInstructions9(entityHeader4, targetMapping4, entityBundleExporterImpl4.a(entity5, set5, mappingAction5), true, false);
                                                                                entityMappingInstructions = entityMappingInstructions8;
                                                                                break block124;
                                                                            }
                                                                            try {
                                                                                try {
                                                                                    EntityMappingInstructions entityMappingInstructions20;
                                                                                    try {
                                                                                        try {
                                                                                            try {
                                                                                                try {
                                                                                                    if (!(entity instanceof Identity) || entity instanceof InternalGroup) break block105;
                                                                                                }
                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                }
                                                                                                if (entity instanceof FederatedUser) break block105;
                                                                                            }
                                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                            }
                                                                                            if (entity instanceof FederatedGroup) break block105;
                                                                                        }
                                                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                                                            throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                        }
                                                                                        if (entity instanceof VirtualGroup) break block105;
                                                                                    }
                                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                    }
                                                                                    entityMappingInstructions7 = entityMappingInstructions20;
                                                                                    entityMappingInstructions6 = entityMappingInstructions20;
                                                                                    entityHeader3 = dependentEntity.getEntityHeader();
                                                                                    targetMapping3 = null;
                                                                                    entityBundleExporterImpl3 = this;
                                                                                    entity4 = entity;
                                                                                    set4 = set;
                                                                                    if (!mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore)) break block106;
                                                                                }
                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                }
                                                                                mappingAction4 = mappingAction;
                                                                                break block107;
                                                                            }
                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                            }
                                                                        }
                                                                        mappingAction4 = EntityMappingInstructions.MappingAction.NewOrExisting;
                                                                    }
                                                                    entityMappingInstructions7(entityHeader3, targetMapping3, entityBundleExporterImpl3.a(entity4, set4, mappingAction4), true, false);
                                                                    entityMappingInstructions = entityMappingInstructions6;
                                                                    break block124;
                                                                }
                                                                try {
                                                                    try {
                                                                        EntityMappingInstructions entityMappingInstructions21;
                                                                        block108: {
                                                                            try {
                                                                                block110: {
                                                                                    try {
                                                                                        block109: {
                                                                                            try {
                                                                                                try {
                                                                                                    try {
                                                                                                        if (entity instanceof Folder && ((Folder)entity).getGoid().equals((Object)Folder.ROOT_FOLDER_ID)) break block108;
                                                                                                    }
                                                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                    }
                                                                                                    if (entity instanceof SsgKeyEntry) break block109;
                                                                                                }
                                                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                                }
                                                                                                if (!(entity instanceof SecurePassword)) break block110;
                                                                                            }
                                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                            }
                                                                                        }
                                                                                        if (!bl2) break block108;
                                                                                    }
                                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                                    }
                                                                                }
                                                                                if (!(entity instanceof VirtualGroup)) break block111;
                                                                            }
                                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                            }
                                                                        }
                                                                        entityMappingInstructions5 = entityMappingInstructions21;
                                                                        entityMappingInstructions4 = entityMappingInstructions21;
                                                                        entityHeader2 = dependentEntity.getEntityHeader();
                                                                        targetMapping2 = null;
                                                                        entityBundleExporterImpl2 = this;
                                                                        entity3 = entity;
                                                                        set3 = set;
                                                                        if (!mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore)) break block112;
                                                                    }
                                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                    }
                                                                    mappingAction3 = mappingAction;
                                                                    break block113;
                                                                }
                                                                catch (IllegalArgumentException illegalArgumentException) {
                                                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                                }
                                                            }
                                                            mappingAction3 = EntityMappingInstructions.MappingAction.NewOrExisting;
                                                        }
                                                        entityMappingInstructions5(entityHeader2, targetMapping2, entityBundleExporterImpl2.a(entity3, set3, mappingAction3), true, false);
                                                        entityMappingInstructions = entityMappingInstructions4;
                                                        break block124;
                                                    }
                                                    try {
                                                        try {
                                                            try {
                                                                if (!(entity instanceof Role) || ((Role)entity).isUserCreated().booleanValue()) break block114;
                                                            }
                                                            catch (IllegalArgumentException illegalArgumentException) {
                                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                            }
                                                            if (((Role)entity).getEntityGoid() == null) break block115;
                                                        }
                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                            throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                        }
                                                        if (((Role)entity).getEntityType() == null) break block115;
                                                    }
                                                    catch (IllegalArgumentException illegalArgumentException) {
                                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                                    }
                                                    entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.MAP_BY_ROLE_ENTITY), this.a(entity, set, mappingAction), true, false);
                                                    break block124;
                                                }
                                                stringArray = g;
                                                entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), null, this.a(entity, set, EntityMappingInstructions.MappingAction.valueOf(properties.getProperty(stringArray[16], b.toString()))), true, false);
                                                break block124;
                                            }
                                            try {
                                                if (!(entity instanceof SsgConnector) || !this.a(((SsgConnector)entity).getName())) break block116;
                                            }
                                            catch (IllegalArgumentException illegalArgumentException) {
                                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                                            }
                                            entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.NAME), this.a(entity, set, mappingAction), true, false);
                                            break block124;
                                        }
                                        try {
                                            if (!(entity instanceof PublishedService) || !entity.getId().equals(properties.getProperty(g[44]))) break block117;
                                        }
                                        catch (IllegalArgumentException illegalArgumentException) {
                                            throw EntityBundleExporterImpl.a(illegalArgumentException);
                                        }
                                        entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.NAME), this.a(entity, set, mappingAction), true, false);
                                        break block124;
                                    }
                                    try {
                                        if (!(entity instanceof ClusterProperty) && !(entity instanceof AssertionAccess)) break block118;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                    }
                                    entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.NAME), this.a(entity, set, mappingAction), false, false);
                                    break block124;
                                }
                                try {
                                    try {
                                        EntityMappingInstructions entityMappingInstructions22;
                                        if (!(entity instanceof ServerModuleFile)) break block119;
                                        entityMappingInstructions3 = entityMappingInstructions22;
                                        entityMappingInstructions2 = entityMappingInstructions22;
                                        entityHeader = dependentEntity.getEntityHeader();
                                        targetMapping = new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.MODULE_SHA265);
                                        entityBundleExporterImpl = this;
                                        entity2 = entity;
                                        set2 = set;
                                        if (!mappingAction.equals((Object)EntityMappingInstructions.MappingAction.Ignore)) break block120;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                    }
                                    mappingAction2 = mappingAction;
                                    break block121;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                }
                            }
                            mappingAction2 = EntityMappingInstructions.MappingAction.NewOrExisting;
                        }
                        entityMappingInstructions3(entityHeader, targetMapping, entityBundleExporterImpl.a(entity2, set2, mappingAction2), false, false);
                        entityMappingInstructions = entityMappingInstructions2;
                        break block124;
                    }
                    if (entity instanceof AuditConfiguration) {
                        entityMappingInstructions = new EntityMappingInstructions(dependentEntity.getEntityHeader(), new EntityMappingInstructions.TargetMapping(EntityMappingInstructions.TargetMapping.Type.ID), EntityMappingInstructions.MappingAction.NewOrExisting, true, false);
                    } else {
                        stringArray = g;
                        entityMappingInstructions = this.mappingInstructionsBuilder.createDefaultMapping(dependentEntity.getEntityHeader(), this.a(entity, set, mappingAction), EntityMappingInstructions.TargetMapping.Type.valueOf(properties.getProperty(stringArray[41], stringArray[56]).toUpperCase()));
                    }
                }
                int n2 = arrayList.indexOf(entityMappingInstructions);
                try {
                    if (n2 <= 0) break block122;
                    arrayList.remove(n2);
                    arrayList.add(n2, entityMappingInstructions);
                    break block123;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                }
            }
            arrayList.add(entityMappingInstructions);
        }
    }

    private EntityMappingInstructions.MappingAction a(@NotNull Entity entity, @NotNull Set<String> set, @NotNull EntityMappingInstructions.MappingAction mappingAction) {
        EntityMappingInstructions.MappingAction mappingAction2;
        try {
            if (entity == null) {
                EntityBundleExporterImpl.a(12);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            if (set == null) {
                EntityBundleExporterImpl.a(13);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            if (mappingAction == null) {
                EntityBundleExporterImpl.a(14);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            if (f.equals((Object)mappingAction)) {
                return mappingAction;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        try {
            mappingAction2 = set.contains(entity.getId()) ? f : mappingAction;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw EntityBundleExporterImpl.a(illegalArgumentException);
        }
        return mappingAction2;
    }

    private boolean a(String string) {
        boolean bl2;
        block12: {
            block10: {
                try {
                    block11: {
                        try {
                            try {
                                try {
                                    try {
                                        if (string == null) break block10;
                                        if (g[36].equals(string)) break block11;
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw EntityBundleExporterImpl.a(illegalArgumentException);
                                    }
                                    if (g[31].equals(string)) break block11;
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                                }
                                if (g[35].equals(string)) break block11;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw EntityBundleExporterImpl.a(illegalArgumentException);
                            }
                            if (!g[49].equals(string)) break block10;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw EntityBundleExporterImpl.a(illegalArgumentException);
                        }
                    }
                    bl2 = true;
                    break block12;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw EntityBundleExporterImpl.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    private Set<String> a() throws FindException {
        HashSet<String> hashSet;
        block8: {
            hashSet = new HashSet<String>();
            Collection collection = this.solutionKitManager.findAll();
            try {
                if (collection == null || collection.isEmpty()) break block8;
            }
            catch (FindException findException) {
                throw EntityBundleExporterImpl.a((Exception)((Object)findException));
            }
            for (SolutionKit solutionKit : collection) {
                List list = solutionKit.getEntityOwnershipDescriptors();
                try {
                    if (list == null || list.isEmpty()) continue;
                }
                catch (FindException findException) {
                    throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                }
                for (EntityOwnershipDescriptor entityOwnershipDescriptor : list) {
                    try {
                        if (!entityOwnershipDescriptor.isReadOnly()) continue;
                        hashSet.add(entityOwnershipDescriptor.getEntityId());
                    }
                    catch (FindException findException) {
                        throw EntityBundleExporterImpl.a((Exception)((Object)findException));
                    }
                }
            }
        }
        return Collections.unmodifiableSet(hashSet);
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[58];
                var3_1 = 0;
                var2_2 = "k^n5cD']`b8yT\u001fjU}1~S\u0003@St\u0016LEc0|R#V@b&dg\u0014A@h&d^\u0003]\u0013G^n8eS\u0003}_a!d^\t@{d c\u0017g^n8eS\u0003a^a-TR\u0016K^i1~T\u000fKC>oBj!}R\bZ\u0010k;b\u0017&`_y\u001ae[\n\u000e@l&qZ\u0003ZU\u007ft7\u0012\u0015\t\u0010b20\u0012\u0015\u0000\u0015~t}B\u0015Z\u0010c;d\u0017\u0004K\u0010c!|[\u0018g^n8eS\u0003a^a-CR\u0014XYn1@X\nGSt\u001dg^n8eS\u0003a^a-TR\u0016K^i1~T\u000fKCB$d^\t@\u0010gWc;bR\u0002k^y=dN/JC\u0012gWc;bR\"K@h:tR\bMYh'\u0017g^n8eS\u0003a^a-TR\u0016K^i1~T\u000fKC\u0007FUl0uE\u0015\u001eLEd8ts\u0003^Uc0uY\u0005Wqc5|N\u001cKBB$d^\t@C\u0014JUk5e[\u0012cQ}$yY\u0001oSy=\u007fY\nOTi\u0019qG\u0016G^j\u0014g^n8eS\u0003|U|!uD\u0012h_a0uE\u0014g^n8eS\u0003|U|!uD\u0012h_a0uE\u0014jUk5e[\u0012cQ}$yY\u0001oSy=\u007fY\u0010gWc;bR\u0002k^y=dN/JC\u001e\\Uy!bY']Ch&d^\t@CL'TR\u0016K^i1~T\u000fKC\fKH};bC$[^i8u\u0013g^n8eS\u0003}_a!d^\t@{d c\u0010K^y=dN%A^y5yY\u0003\\C\u0005HQa'u\nMQa7QT\u0012G_c\u0006K^y=dN\u000fJU}1~S\u0003@DB6zR\u0005Z\u0005HQa'u\u001eg^n8eS\u0003a^a-CR\u0014XYn1@X\nGSt\u001b`C\u000fA^\u001eLEd8ts\u0003^Uc0uY\u0005Wqc5|N\u001cKBB$d^\t@C\u0018K^n5cD']`b8yT\u001fjU}1~S\u0003@St3M_`{|\u0000\u0012KSe{cR\u0014XU\u007f{rB\bJ\\d:w\u0018#@Dd iu\u0013@Ta1UO\u0016ABy1b~\u000b^\\\u0014jUk5e[\u0012\u000exY\u0000@dF\u0006\b9`#\u001e*n~b ^B\nB\u0010`1d_\tJ\u0010('>\u0012\u0015\u000e]x'd\u0017\bAD-&uC\u0013\\^-:e[\n\u0010\\Ul0_Y\nWuc yC\u000fKC\u000b}U\u007f\"yT\u0003{Ch0\u0014jUk5e[\u0012\u000exY\u0000@dF\u0006\t9`#\u001e\u0013jUk5e[\u0012\u000exY\u0000@\u0017N\u0016\u00005d9\u001bg^n8eS\u0003iQy1gV\u001fm_c2yP\u0013\\Qy=\u007fY\u0006gWc;bR\u0013g^n8eS\u0003}_a!d^\t@{d c\u0018g^n8eS\u0003a^a-CR\u0014XYn1@X\nGSt\fjUk5e[\u0012cQ}\u0016i\fjUk5e[\u0012cQ}\u0016i\u000ek^n&iG\u0012}Un&uC\u0015\u000b}U\u007f\"yT\u0003{Ch0\u0018k^n5cD']`b8yT\u001fjU}1~S\u0003@St\u000bOTi\u0011~C\u000fZYh'8mQc:\u007fCFHYc00V\u0015]_n=qC\u0003J\u0010g9c\u0017\u0005A^c1sC\u000fA^-2\u007fEFD]~tuY\u0002^_d:d\rF\u0002gt\u0011`_i10\u007f2z`^t8\u0005W\u001c\u0004$\u0012gWc;bR\"K@h:tR\bMYh'\u000ek^n&iG\u0012}Un&uC\u0015\u001bg^n8eS\u0003iQy1gV\u001fm_c2yP\u0013\\Qy=\u007fY3M_`{|\u0000\u0012KSe{cR\u0014XU\u007f{rB\bJ\\d:w\u0018#@Dd iu\u0013@Ta1UO\u0016ABy1b~\u000b^\\-m_x8t\u0017\bAD-8\u007fV\u0002\u000eUc yC\u001f\u000eV\u007f;}\u0017\u0002K@h:tR\bMI-2\u007fB\bJ\n-\u0014jUk5e[\u0012cQ}$yY\u0001oSy=\u007fY";
                var4_3 = "k^n5cD']`b8yT\u001fjU}1~S\u0003@St\u0016LEc0|R#V@b&dg\u0014A@h&d^\u0003]\u0013G^n8eS\u0003}_a!d^\t@{d c\u0017g^n8eS\u0003a^a-TR\u0016K^i1~T\u000fKC>oBj!}R\bZ\u0010k;b\u0017&`_y\u001ae[\n\u000e@l&qZ\u0003ZU\u007ft7\u0012\u0015\t\u0010b20\u0012\u0015\u0000\u0015~t}B\u0015Z\u0010c;d\u0017\u0004K\u0010c!|[\u0018g^n8eS\u0003a^a-CR\u0014XYn1@X\nGSt\u001dg^n8eS\u0003a^a-TR\u0016K^i1~T\u000fKCB$d^\t@\u0010gWc;bR\u0002k^y=dN/JC\u0012gWc;bR\"K@h:tR\bMYh'\u0017g^n8eS\u0003a^a-TR\u0016K^i1~T\u000fKC\u0007FUl0uE\u0015\u001eLEd8ts\u0003^Uc0uY\u0005Wqc5|N\u001cKBB$d^\t@C\u0014JUk5e[\u0012cQ}$yY\u0001oSy=\u007fY\nOTi\u0019qG\u0016G^j\u0014g^n8eS\u0003|U|!uD\u0012h_a0uE\u0014g^n8eS\u0003|U|!uD\u0012h_a0uE\u0014jUk5e[\u0012cQ}$yY\u0001oSy=\u007fY\u0010gWc;bR\u0002k^y=dN/JC\u001e\\Uy!bY']Ch&d^\t@CL'TR\u0016K^i1~T\u000fKC\fKH};bC$[^i8u\u0013g^n8eS\u0003}_a!d^\t@{d c\u0010K^y=dN%A^y5yY\u0003\\C\u0005HQa'u\nMQa7QT\u0012G_c\u0006K^y=dN\u000fJU}1~S\u0003@DB6zR\u0005Z\u0005HQa'u\u001eg^n8eS\u0003a^a-CR\u0014XYn1@X\nGSt\u001b`C\u000fA^\u001eLEd8ts\u0003^Uc0uY\u0005Wqc5|N\u001cKBB$d^\t@C\u0018K^n5cD']`b8yT\u001fjU}1~S\u0003@St3M_`{|\u0000\u0012KSe{cR\u0014XU\u007f{rB\bJ\\d:w\u0018#@Dd iu\u0013@Ta1UO\u0016ABy1b~\u000b^\\\u0014jUk5e[\u0012\u000exY\u0000@dF\u0006\b9`#\u001e*n~b ^B\nB\u0010`1d_\tJ\u0010('>\u0012\u0015\u000e]x'd\u0017\bAD-&uC\u0013\\^-:e[\n\u0010\\Ul0_Y\nWuc yC\u000fKC\u000b}U\u007f\"yT\u0003{Ch0\u0014jUk5e[\u0012\u000exY\u0000@dF\u0006\t9`#\u001e\u0013jUk5e[\u0012\u000exY\u0000@\u0017N\u0016\u00005d9\u001bg^n8eS\u0003iQy1gV\u001fm_c2yP\u0013\\Qy=\u007fY\u0006gWc;bR\u0013g^n8eS\u0003}_a!d^\t@{d c\u0018g^n8eS\u0003a^a-CR\u0014XYn1@X\nGSt\fjUk5e[\u0012cQ}\u0016i\fjUk5e[\u0012cQ}\u0016i\u000ek^n&iG\u0012}Un&uC\u0015\u000b}U\u007f\"yT\u0003{Ch0\u0018k^n5cD']`b8yT\u001fjU}1~S\u0003@St\u000bOTi\u0011~C\u000fZYh'8mQc:\u007fCFHYc00V\u0015]_n=qC\u0003J\u0010g9c\u0017\u0005A^c1sC\u000fA^-2\u007fEFD]~tuY\u0002^_d:d\rF\u0002gt\u0011`_i10\u007f2z`^t8\u0005W\u001c\u0004$\u0012gWc;bR\"K@h:tR\bMYh'\u000ek^n&iG\u0012}Un&uC\u0015\u001bg^n8eS\u0003iQy1gV\u001fm_c2yP\u0013\\Qy=\u007fY3M_`{|\u0000\u0012KSe{cR\u0014XU\u007f{rB\bJ\\d:w\u0018#@Dd iu\u0013@Ta1UO\u0016ABy1b~\u000b^\\-m_x8t\u0017\bAD-8\u007fV\u0002\u000eUc yC\u001f\u000eV\u007f;}\u0017\u0002K@h:tR\bMI-2\u007fB\bJ\n-\u0014jUk5e[\u0012cQ}$yY\u0001oSy=\u007fY".length();
                var1_4 = 24;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = EntityBundleExporterImpl.a(v0, EntityBundleExporterImpl.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "ve\bR@l5hH\u0010L";
                    var4_3 = "ve\bR@l5hH\u0010L".length();
                    var1_4 = 2;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 114;
                        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++] = EntityBundleExporterImpl.a(v0, EntityBundleExporterImpl.b(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;
            }
        }
        EntityBundleExporterImpl.g = var5;
        EntityBundleExporterImpl.IncludeOnlyServicePolicyOption = EntityBundleExporterImpl.g[5];
        EntityBundleExporterImpl.IncludeSolutionKitsOption = EntityBundleExporterImpl.g[20];
        EntityBundleExporterImpl.IncludeOnlyDependenciesOption = EntityBundleExporterImpl.g[9];
        EntityBundleExporterImpl.IncludeOnlyServicePolicy = EntityBundleExporterImpl.g[26];
        EntityBundleExporterImpl.EncassAsPolicyDependencyOption = EntityBundleExporterImpl.g[0];
        EntityBundleExporterImpl.IncludeRequestFolderOption = EntityBundleExporterImpl.g[14];
        EntityBundleExporterImpl.ServiceUsed = EntityBundleExporterImpl.g[34];
        EntityBundleExporterImpl.c = EntityBundleExporterImpl.g[48];
        EntityBundleExporterImpl.d = EntityBundleExporterImpl.g[26];
        EntityBundleExporterImpl.a = EntityBundleExporterImpl.g[26];
        EntityBundleExporterImpl.IncludeGatewayConfigurationOption = EntityBundleExporterImpl.g[37];
        EntityBundleExporterImpl.DefaultMapByOption = EntityBundleExporterImpl.g[42];
        EntityBundleExporterImpl.IncludeGatewayConfiguration = EntityBundleExporterImpl.g[26];
        EntityBundleExporterImpl.e = EntityBundleExporterImpl.g[26];
        EntityBundleExporterImpl.IncludeOnlyDependencies = EntityBundleExporterImpl.g[26];
        EntityBundleExporterImpl.IgnoreDependenciesOption = EntityBundleExporterImpl.g[50];
        EntityBundleExporterImpl.IgnoredEntityIdsOption = EntityBundleExporterImpl.g[7];
        EntityBundleExporterImpl.DefaultMappingActionOption = EntityBundleExporterImpl.g[16];
        EntityBundleExporterImpl.b = EntityMappingInstructions.MappingAction.NewOrExisting;
        EntityBundleExporterImpl.f = EntityMappingInstructions.MappingAction.NewOrExisting;
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void a(int var0) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [0[TRYBLOCK]], but top level block is 6[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1050)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 5);
        }
        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 -> 77;
                    case 1 -> 83;
                    case 2 -> 110;
                    case 3 -> 55;
                    case 4 -> 115;
                    case 5 -> 84;
                    default -> 5;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

