import { c as _c } from "react/compiler-runtime";
import { feature } from 'bun:bundle';
import { APIUserAbortError } from '@anthropic-ai/sdk';
import * as React from 'react';
import { useCallback } from 'react';
import { type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, logEvent } from 'src/services/analytics/index.js';
import { sanitizeToolNameForAnalytics } from 'src/services/analytics/metadata.js';
import type { ToolUseConfirm } from '../components/permissions/PermissionRequest.js';
import { Text } from '../ink.js';
import type { ToolPermissionContext, Tool as ToolType, ToolUseContext } from '../Tool.js';
import { consumeSpeculativeClassifierCheck, peekSpeculativeClassifierCheck } from '../tools/BashTool/bashPermissions.js';
import { BASH_TOOL_NAME } from '../tools/BashTool/toolName.js';
import type { AssistantMessage } from '../types/message.js';
import { recordAutoModeDenial } from '../utils/autoModeDenials.js';
import { clearClassifierChecking, setClassifierApproval, setYoloClassifierApproval } from '../utils/classifierApprovals.js';
import { logForDebugging } from '../utils/debug.js';
import { AbortError } from '../utils/errors.js';
import { logError } from '../utils/log.js';
import type { PermissionDecision } from '../utils/permissions/PermissionResult.js';
import { hasPermissionsToUseTool } from '../utils/permissions/permissions.js';
import { jsonStringify } from '../utils/slowOperations.js';
import { handleCoordinatorPermission } from './toolPermission/handlers/coordinatorHandler.js';
import { handleInteractivePermission } from './toolPermission/handlers/interactiveHandler.js';
import { handleSwarmWorkerPermission } from './toolPermission/handlers/swarmWorkerHandler.js';
import { createPermissionContext, createPermissionQueueOps } from './toolPermission/PermissionContext.js';
import { logPermissionDecision } from './toolPermission/permissionLogging.js';
export type CanUseToolFn<Input extends Record<string, unknown> = Record<string, unknown>> = (tool: ToolType, input: Input, toolUseContext: ToolUseContext, assistantMessage: AssistantMessage, toolUseID: string, forceDecision?: PermissionDecision<Input>) => Promise<PermissionDecision<Input>>;
function useCanUseTool(setToolUseConfirmQueue, setToolPermissionContext) {
  const $ = _c(3);
  let t0;
  if ($[0] !== setToolPermissionContext || $[1] !== setToolUseConfirmQueue) {
    t0 = async (tool, input, toolUseContext, assistantMessage, toolUseID, forceDecision) => new Promise(resolve => {
      const ctx = createPermissionContext(tool, input, toolUseContext, assistantMessage, toolUseID, setToolPermissionContext, createPermissionQueueOps(setToolUseConfirmQueue));
      if (ctx.resolveIfAborted(resolve)) {
        return;
      }
      const decisionPromise = forceDecision !== undefined ? Promise.resolve(forceDecision) : hasPermissionsToUseTool(tool, input, toolUseContext, assistantMessage, toolUseID);
      return decisionPromise.then(async result => {
        if (result.behavior === "allow") {
          if (ctx.resolveIfAborted(resolve)) {
            return;
          }
          if (feature("TRANSCRIPT_CLASSIFIER") && result.decisionReason?.type === "classifier" && result.decisionReason.classifier === "auto-mode") {
            setYoloClassifierApproval(toolUseID, result.decisionReason.reason);
          }
          ctx.logDecision({
            decision: "accept",
            source: "config"
          });
          resolve(ctx.buildAllow(result.updatedInput ?? input, {
            decisionReason: result.decisionReason
          }));
          return;
        }
        const appState = toolUseContext.getAppState();
        const description = await tool.description(input as never, {
          isNonInteractiveSession: toolUseContext.options.isNonInteractiveSession,
          toolPermissionContext: appState.toolPermissionContext,
          tools: toolUseContext.options.tools
        });
        if (ctx.resolveIfAborted(resolve)) {
          return;
        }
        switch (result.behavior) {
          case "deny":
            {
              logPermissionDecision({
                tool,
                input,
                toolUseContext,
                messageId: ctx.messageId,
                toolUseID
              }, {
                decision: "reject",
                source: "config"
              });
              if (feature("TRANSCRIPT_CLASSIFIER") && result.decisionReason?.type === "classifier" && result.decisionReason.classifier === "auto-mode") {
                recordAutoModeDenial({
                  toolName: tool.name,
                  display: description,
                  reason: result.decisionReason.reason ?? "",
                  timestamp: Date.now()
                });
                toolUseContext.addNotification?.({
                  key: "auto-mode-denied",
                  priority: "immediate",
                  jsx: <><Text color="error">{tool.userFacingName(input).toLowerCase()} denied by auto mode</Text><Text dimColor={true}> · /permissions</Text></>
                });
              }
              resolve(result);
              return;
            }
          case "ask":
            {
              if (appState.toolPermissionContext.awaitAutomatedChecksBeforeDialog) {
                const coordinatorDecision = await handleCoordinatorPermission({
                  ctx,
                  ...(feature("BASH_CLASSIFIER") ? {
                    pendingClassifierCheck: result.pendingClassifierCheck
                  } : {}),
                  updatedInput: result.updatedInput,
                  suggestions: result.suggestions,
                  permissionMode: appState.toolPermissionContext.mode
                });
                if (coordinatorDecision) {
                  resolve(coordinatorDecision);
                  return;
                }
              }
              if (ctx.resolveIfAborted(resolve)) {
                return;
              }
              const swarmDecision = await handleSwarmWorkerPermission({
                ctx,
                description,
                ...(feature("BASH_CLASSIFIER") ? {
                  pendingClassifierCheck: result.pendingClassifierCheck
                } : {}),
                updatedInput: result.updatedInput,
                suggestions: result.suggestions
              });
              if (swarmDecision) {
                resolve(swarmDecision);
                return;
              }
              if (feature("BASH_CLASSIFIER") && result.pendingClassifierCheck && tool.name === BASH_TOOL_NAME && !appState.toolPermissionContext.awaitAutomatedChecksBeforeDialog) {
                const speculativePromise = peekSpeculativeClassifierCheck((input as {
                  command: string;
                }).command);
                if (speculativePromise) {
                  const raceResult = await Promise.race([speculativePromise.then(_temp), new Promise(_temp2)]);
                  if (ctx.resolveIfAborted(resolve)) {
                    return;
                  }
                  if (raceResult.type === "result" && raceResult.result.matches && raceResult.result.confidence === "high" && feature("BASH_CLASSIFIER")) {
                    consumeSpeculativeClassifierCheck((input as {
                      command: string;
                    }).command);
                    const matchedRule = raceResult.result.matchedDescription ?? undefined;
                    if (matchedRule) {
                      setClassifierApproval(toolUseID, matchedRule);
                    }
                    ctx.logDecision({
                      decision: "accept",
                      source: {
                        type: "classifier"
                      }
                    });
                    resolve(ctx.buildAllow(result.updatedInput ?? input as Record<string, unknown>, {
                      decisionReason: {
                        type: "classifier" as const,
                        classifier: "bash_allow" as const,
                        reason: `Allowed by prompt rule: "${raceResult.result.matchedDescription}"`
                      }
                    }));
                    return;
                  }
                }
              }
              handleInteractivePermission({
                ctx,
                description,
                result,
                awaitAutomatedChecksBeforeDialog: appState.toolPermissionContext.awaitAutomatedChecksBeforeDialog,
                bridgeCallbacks: feature("BRIDGE_MODE") ? appState.replBridgePermissionCallbacks : undefined,
                channelCallbacks: feature("KAIROS") || feature("KAIROS_CHANNELS") ? appState.channelPermissionCallbacks : undefined
              }, resolve);
              return;
            }
        }
      }).catch(error => {
        if (error instanceof AbortError || error instanceof APIUserAbortError) {
          logForDebugging(`Permission check threw ${error.constructor.name} for tool=${tool.name}: ${error.message}`);
          ctx.logCancelled();
          resolve(ctx.cancelAndAbort(undefined, true));
        } else {
          logError(error);
          resolve(ctx.cancelAndAbort(undefined, true));
        }
      }).finally(() => {
        clearClassifierChecking(toolUseID);
      });
    });
    $[0] = setToolPermissionContext;
    $[1] = setToolUseConfirmQueue;
    $[2] = t0;
  } else {
    t0 = $[2];
  }
  return t0;
}
function _temp2(res) {
  return setTimeout(res, 2000, {
    type: "timeout" as const
  });
}
function _temp(r) {
  return {
    type: "result" as const,
    result: r
  };
}
export default useCanUseTool;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJmZWF0dXJlIiwiQVBJVXNlckFib3J0RXJyb3IiLCJSZWFjdCIsInVzZUNhbGxiYWNrIiwiQW5hbHl0aWNzTWV0YWRhdGFfSV9WRVJJRklFRF9USElTX0lTX05PVF9DT0RFX09SX0ZJTEVQQVRIUyIsImxvZ0V2ZW50Iiwic2FuaXRpemVUb29sTmFtZUZvckFuYWx5dGljcyIsIlRvb2xVc2VDb25maXJtIiwiVGV4dCIsIlRvb2xQZXJtaXNzaW9uQ29udGV4dCIsIlRvb2wiLCJUb29sVHlwZSIsIlRvb2xVc2VDb250ZXh0IiwiY29uc3VtZVNwZWN1bGF0aXZlQ2xhc3NpZmllckNoZWNrIiwicGVla1NwZWN1bGF0aXZlQ2xhc3NpZmllckNoZWNrIiwiQkFTSF9UT09MX05BTUUiLCJBc3Npc3RhbnRNZXNzYWdlIiwicmVjb3JkQXV0b01vZGVEZW5pYWwiLCJjbGVhckNsYXNzaWZpZXJDaGVja2luZyIsInNldENsYXNzaWZpZXJBcH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GFudE1lc3NhZ2UsXG4gICAgICB0b29sVXNlSUQsXG4gICAgICBmb3JjZURlY2lzaW9uLFxuICAgICkgPT4ge1xuICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKHJlc29sdmUgPT4ge1xuICAgICAgICBjb25zdCBjdHggPSBjcmVhdGVQZXJtaXNzaW9uQ29udGV4dChcbiAgICAgICAgICB0b29sLFxuICAgICAgICAgIGlucHV0LFxuICAgICAgICAgIHRvb2xVc2VDb250ZXh0LFxuICAgICAgICAgIGFzc2lzdGFudE1lc3NhZ2UsXG4gICAgICAgICAgdG9vbFVzZUlELFxuICAgICAgICAgIHNldFRvb2xQZXJtaXNzaW9uQ29udGV4dCxcbiAgICAgICAgICBjcmVhdGVQZXJtaXNzaW9uUXVldWVPcHMoc2V0VG9vbFVzZUNvbmZpcm1RdWV1ZSksXG4gICAgICAgIClcblxuICAgICAgICBpZiAoY3R4LnJlc29sdmVJZkFib3J0ZWQocmVzb2x2ZSkpIHJldHVyblxuXG4gICAgICAgIGNvbnN0IGRlY2lzaW9uUHJvbWlzZSA9XG4gICAgICAgICAgZm9yY2VEZWNpc2lvbiAhPT0gdW5kZWZpbmVkXG4gICAgICAgICAgICA/IFByb21pc2UucmVzb2x2ZShmb3JjZURlY2lzaW9uKVxuICAgICAgICAgICAgOiBoYXNQZXJtaXNzaW9uc1RvVXNlVG9vbChcbiAgICAgICAgICAgICAgICB0b29sLFxuICAgICAgICAgICAgICAgIGlucHV0LFxuICAgICAgICAgICAgICAgIHRvb2xVc2VDb250ZXh0LFxuICAgICAgICAgICAgICAgIGFzc2lzdGFudE1lc3NhZ2UsXG4gICAgICAgICAgICAgICAgdG9vbFVzZUlELFxuICAgICAgICAgICAgICApXG5cbiAgICAgICAgcmV0dXJuIGRlY2lzaW9uUHJvbWlzZVxuICAgICAgICAgIC50aGVuKGFzeW5jIHJlc3VsdCA9PiB7XG4gICAgICAgICAgICAvLyBbQU5ULU9OTFldIExvZyBhbGwgdG9vbCBwZXJtaXNzaW9uIGRlY2lzaW9ucyB3aXRoIHRvb2wgbmFtZSBhbmQgYXJnc1xuICAgICAgICAgICAgaWYgKFwiZXh0ZXJuYWxcIiA9PT0gJ2FudCcpIHtcbiAgICAgICAgICAgICAgbG9nRXZlbnQoJ3Rlbmd1X2ludGVybmFsX3Rvb2xfcGVybWlzc2lvbl9kZWNpc2lvbicsIHtcbiAgICAgICAgICAgICAgICB0b29sTmFtZTogc2FuaXRpemVUb29sTmFtZUZvckFuYWx5dGljcyh0b29sLm5hbWUpLFxuICAgICAgICAgICAgICAgIGJlaGF2aW9yOlxuICAgICAgICAgICAgICAgICAgcmVzdWx0LmJlaGF2aW9yIGFzIEFuYWx5dGljc01ldGFkYXRhX0lfVkVSSUZJRURfVEhJU19JU19OT1RfQ09ERV9PUl9GSUxFUEFUSFMsXG4gICAgICAgICAgICAgICAgLy8gTm90ZTogaW5wdXQgY29udGFpbnMgY29kZS9maWxlcGF0aHMsIG9ubHkgbG9nIGZvciBhbnRzXG4gICAgICAgICAgICAgICAgaW5wdXQ6IGpzb25TdHJpbmdpZnkoXG4gICAgICAgICAgICAgICAgICBpbnB1dCxcbiAgICAgICAgICAgICAgICApIGFzIEFuYWx5dGljc01ldGFkYXRhX0lfVkVSSUZJRURfVEhJU19JU19OT1RfQ09ERV9PUl9GSUxFUEFUSFMsXG4gICAgICAgICAgICAgICAgbWVzc2FnZUlEOlxuICAgICAgICAgICAgICAgICAgY3R4Lm1lc3NhZ2VJZCBhcyBBbmFseXRpY3NNZXRhZGF0YV9JX1ZFUklGSUVEX1RISVNfSVNfTk9UX0NPREVfT1JfRklMRVBBVEhTLFxuICAgICAgICAgICAgICAgIGlzTWNwOiB0b29sLmlzTWNwID8/IGZhbHNlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBIYXMgcGVybWlzc2lvbnMgdG8gdXNlIHRvb2wsIGdyYW50ZWQgaW4gY29uZmlnXG4gICAgICAgICAgICBpZiAocmVzdWx0LmJlaGF2aW9yID09PSAnYWxsb3cnKSB7XG4gICAgICAgICAgICAgIGlmIChjdHgucmVzb2x2ZUlmQWJvcnRlZChyZXNvbHZlKSkgcmV0dXJuXG4gICAgICAgICAgICAgIC8vIFRyYWNrIGF1dG8gbW9kZSBjbGFzc2lmaWVyIGFwcHJvdmFscyBmb3IgVUkgZGlzcGxheVxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgZmVhdHVyZSgnVFJBTlNDUklQVF9DTEFTU0lGSUVSJykgJiZcbiAgICAgICAgICAgICAgICByZXN1bHQuZGVjaXNpb25SZWFzb24/LnR5cGUgPT09ICdjbGFzc2lmaWVyJyAmJlxuICAgICAgICAgICAgICAgIHJlc3VsdC5kZWNpc2lvblJlYXNvbi5jbGFzc2lmaWVyID09PSAnYXV0by1tb2RlJ1xuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBzZXRZb2xvQ2xhc3NpZmllckFwcHJvdmFsKFxuICAgICAgICAgICAgICAgICAgdG9vbFVzZUlELFxuICAgICAgICAgICAgICAgICAgcmVzdWx0LmRlY2lzaW9uUmVhc29uLnJlYXNvbixcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBjdHgubG9nRGVjaXNpb24oeyBkZWNpc2lvbjogJ2FjY2VwdCcsIHNvdXJjZTogJ2NvbmZpZycgfSlcblxuICAgICAgICAgICAgICByZXNvbHZlKFxuICAgICAgICAgICAgICAgIGN0eC5idWlsZEFsbG93KHJlc3VsdC51cGRhdGVkSW5wdXQgPz8gaW5wdXQsIHtcbiAgICAgICAgICAgICAgICAgIGRlY2lzaW9uUmVhc29uOiByZXN1bHQuZGVjaXNpb25SZWFzb24sXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IGFwcFN0YXRlID0gdG9vbFVzZUNvbnRleHQuZ2V0QXBwU3RhdGUoKVxuICAgICAgICAgICAgY29uc3QgZGVzY3JpcHRpb24gPSBhd2FpdCB0b29sLmRlc2NyaXB0aW9uKGlucHV0IGFzIG5ldmVyLCB7XG4gICAgICAgICAgICAgIGlzTm9uSW50ZXJhY3RpdmVTZXNzaW9uOlxuICAgICAgICAgICAgICAgIHRvb2xVc2VDb250ZXh0Lm9wdGlvbnMuaXNOb25JbnRlcmFjdGl2ZVNlc3Npb24sXG4gICAgICAgICAgICAgIHRvb2xQZXJtaXNzaW9uQ29udGV4dDogYXBwU3RhdGUudG9vbFBlcm1pc3Npb25Db250ZXh0LFxuICAgICAgICAgICAgICB0b29sczogdG9vbFVzZUNvbnRleHQub3B0aW9ucy50b29scyxcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgIGlmIChjdHgucmVzb2x2ZUlmQWJvcnRlZChyZXNvbHZlKSkgcmV0dXJuXG5cbiAgICAgICAgICAgIC8vIERvZXMgbm90IGhhdmUgcGVybWlzc2lvbnMgdG8gdXNlIHRvb2wsIGNoZWNrIHRoZSBiZWhhdmlvclxuICAgICAgICAgICAgc3dpdGNoIChyZXN1bHQuYmVoYXZpb3IpIHtcbiAgICAgICAgICAgICAgY2FzZSAnZGVueSc6IHtcbiAgICAgICAgICAgICAgICBsb2dQZXJtaXNzaW9uRGVjaXNpb24oXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRvb2wsXG4gICAgICAgICAgICAgICAgICAgIGlucHV0LFxuICAgICAgICAgICAgICAgICAgICB0b29sVXNlQ29udGV4dCxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUlkOiBjdHgubWVzc2FnZUlkLFxuICAgICAgICAgICAgICAgICAgICB0b29sVXNlSUQsXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgeyBkZWNpc2lvbjogJ3JlamVjdCcsIHNvdXJjZTogJ2NvbmZpZycgfSxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgZmVhdHVyZSgnVFJBTlNDUklQVF9DTEFTU0lGSUVSJykgJiZcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5kZWNpc2lvblJlYXNvbj8udHlwZSA9PT0gJ2NsYXNzaWZpZXInICYmXG4gICAgICAgICAgICAgICAgICByZXN1bHQuZGVjaXNpb25SZWFzb24uY2xhc3NpZmllciA9PT0gJ2F1dG8tbW9kZSdcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIHJlY29yZEF1dG9Nb2RlRGVuaWFsKHtcbiAgICAgICAgICAgICAgICAgICAgdG9vbE5hbWU6IHRvb2wubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZGVzY3JpcHRpb24sXG4gICAgICAgICAgICAgICAgICAgIHJlYXNvbjogcmVzdWx0LmRlY2lzaW9uUmVhc29uLnJlYXNvbiA/PyAnJyxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBEYXRlLm5vdygpLFxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIHRvb2xVc2VDb250ZXh0LmFkZE5vdGlmaWNhdGlvbj8uKHtcbiAgICAgICAgICAgICAgICAgICAga2V5OiAnYXV0by1tb2RlLWRlbmllZCcsXG4gICAgICAgICAgICAgICAgICAgIHByaW9yaXR5OiAnaW1tZWRpYXRlJyxcbiAgICAgICAgICAgICAgICAgICAganN4OiAoXG4gICAgICAgICAgICAgICAgICAgICAgPD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxUZXh0IGNvbG9yPVwiZXJyb3JcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAge3Rvb2wudXNlckZhY2luZ05hbWUoaW5wdXQpLnRvTG93ZXJDYXNlKCl9IGRlbmllZCBieVxuICAgICAgICAgICAgICAgICAgICAgICAgICBhdXRvIG1vZGVcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxUZXh0IGRpbUNvbG9yPiDCtyAvcGVybWlzc2lvbnM8L1RleHQ+XG4gICAgICAgICAgICAgICAgICAgICAgPC8+XG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdClcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGNhc2UgJ2Fzayc6IHtcbiAgICAgICAgICAgICAgICAvLyBGb3IgY29vcmRpbmF0b3Igd29ya2VycywgYXdhaXQgYXV0b21hdGVkIGNoZWNrcyBiZWZvcmUgc2hvd2luZyBkaWFsb2cuXG4gICAgICAgICAgICAgICAgLy8gQmFja2dyb3VuZCB3b3JrZXJzIHNob3VsZCBvbmx5IGludGVycnVwdCB0aGUgdXNlciB3aGVuIGF1dG9tYXRlZCBjaGVja3MgY2FuJ3QgZGVjaWRlLlxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGFwcFN0YXRlLnRvb2xQZXJtaXNzaW9uQ29udGV4dFxuICAgICAgICAgICAgICAgICAgICAuYXdhaXRBdXRvbWF0ZWRDaGVja3NCZWZvcmVEaWFsb2dcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGNvb3JkaW5hdG9yRGVjaXNpb24gPSBhd2FpdCBoYW5kbGVDb29yZGluYXRvclBlcm1pc3Npb24oXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBjdHgsXG4gICAgICAgICAgICAgICAgICAgICAgLi4uKGZlYXR1cmUoJ0JBU0hfQ0xBU1NJRklFUicpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZW5kaW5nQ2xhc3NpZmllckNoZWNrOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnBlbmRpbmdDbGFzc2lmaWVyQ2hlY2ssXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIDoge30pLFxuICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZWRJbnB1dDogcmVzdWx0LnVwZGF0ZWRJbnB1dCxcbiAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0aW9uczogcmVzdWx0LnN1Z2dlc3Rpb25zLFxuICAgICAgICAgICAgICAgICAgICAgIHBlcm1pc3Npb25Nb2RlOiBhcHBTdGF0ZS50b29sUGVybWlzc2lvbkNvbnRleHQubW9kZSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRvckRlY2lzaW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoY29vcmRpbmF0b3JEZWNpc2lvbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAvLyBudWxsIG1lYW5zIG5laXRoZXIgYXV0b21hdGVkIGNoZWNrIHJlc29sdmVkIC0tIGZhbGwgdGhyb3VnaCB0byBkaWFsb2cgYmVsb3cuXG4gICAgICAgICAgICAgICAgICAvLyBIb29rcyBhbHJlYWR5IHJhbiwgY2xhc3NpZmllciBhbHJlYWR5IGNvbnN1bWVkLlxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFmdGVyIGF3YWl0aW5nIGF1dG9tYXRlZCBjaGVja3MsIHZlcmlmeSB0aGUgcmVxdWVzdCB3YXNuJ3QgYWJvcnRlZFxuICAgICAgICAgICAgICAgIC8vIHdoaWxlIHdlIHdlcmUgd2FpdGluZy4gV2l0aG91dCB0aGlzIGNoZWNrLCBhIHN0YWxlIGRpYWxvZyBjb3VsZCBhcHBlYXIuXG4gICAgICAgICAgICAgICAgaWYgKGN0eC5yZXNvbHZlSWZBYm9ydGVkKHJlc29sdmUpKSByZXR1cm5cblxuICAgICAgICAgICAgICAgIC8vIEZvciBzd2FybSB3b3JrZXJzLCB0cnkgY2xhc3NpZmllciBhdXRvLWFwcHJvdmFsIHRoZW5cbiAgICAgICAgICAgICAgICAvLyBmb3J3YXJkIHBlcm1pc3Npb24gcmVxdWVzdHMgdG8gdGhlIGxlYWRlciB2aWEgbWFpbGJveC5cbiAgICAgICAgICAgICAgICBjb25zdCBzd2FybURlY2lzaW9uID0gYXdhaXQgaGFuZGxlU3dhcm1Xb3JrZXJQZXJtaXNzaW9uKHtcbiAgICAgICAgICAgICAgICAgIGN0eCxcbiAgICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uLFxuICAgICAgICAgICAgICAgICAgLi4uKGZlYXR1cmUoJ0JBU0hfQ0xBU1NJRklFUicpXG4gICAgICAgICAgICAgICAgICAgID8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGVuZGluZ0NsYXNzaWZpZXJDaGVjazogcmVzdWx0LnBlbmRpbmdDbGFzc2lmaWVyQ2hlY2ssXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICA6IHt9KSxcbiAgICAgICAgICAgICAgICAgIHVwZGF0ZWRJbnB1dDogcmVzdWx0LnVwZGF0ZWRJbnB1dCxcbiAgICAgICAgICAgICAgICAgIHN1Z2dlc3Rpb25zOiByZXN1bHQuc3VnZ2VzdGlvbnMsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBpZiAoc3dhcm1EZWNpc2lvbikge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZShzd2FybURlY2lzaW9uKVxuICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gR3JhY2UgcGVyaW9kOiB3YWl0IHVwIHRvIDJzIGZvciBzcGVjdWxhdGl2ZSBjbGFzc2lmaWVyXG4gICAgICAgICAgICAgICAgLy8gdG8gcmVzb2x2ZSBiZWZvcmUgc2hvd2luZyB0aGUgZGlhbG9nIChtYWluIGFnZW50IG9ubHkpXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgZmVhdHVyZSgnQkFTSF9DTEFTU0lGSUVSJykgJiZcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5wZW5kaW5nQ2xhc3NpZmllckNoZWNrICYmXG4gICAgICAgICAgICAgICAgICB0b29sLm5hbWUgPT09IEJBU0hfVE9PTF9OQU1FICYmXG4gICAgICAgICAgICAgICAgICAhYXBwU3RhdGUudG9vbFBlcm1pc3Npb25Db250ZXh0XG4gICAgICAgICAgICAgICAgICAgIC5hd2FpdEF1dG9tYXRlZENoZWNrc0JlZm9yZURpYWxvZ1xuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgY29uc3Qgc3BlY3VsYXRpdmVQcm9taXNlID0gcGVla1NwZWN1bGF0aXZlQ2xhc3NpZmllckNoZWNrKFxuICAgICAgICAgICAgICAgICAgICAoaW5wdXQgYXMgeyBjb21tYW5kOiBzdHJpbmcgfSkuY29tbWFuZCxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGlmIChzcGVjdWxhdGl2ZVByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmFjZVJlc3VsdCA9IGF3YWl0IFByb21pc2UucmFjZShbXG4gICAgICAgICAgICAgICAgICAgICAgc3BlY3VsYXRpdmVQcm9taXNlLnRoZW4ociA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3Jlc3VsdCcgYXMgY29uc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQ6IHIsXG4gICAgICAgICAgICAgICAgICAgICAgfSkpLFxuICAgICAgICAgICAgICAgICAgICAgIG5ldyBQcm9taXNlPHsgdHlwZTogJ3RpbWVvdXQnIH0+KHJlcyA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXJlc3RyaWN0ZWQtc3ludGF4IC0tIHJlc29sdmVzIHdpdGggYSB2YWx1ZSwgbm90IHZvaWRcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQocmVzLCAyMDAwLCB7IHR5cGU6ICd0aW1lb3V0JyBhcyBjb25zdCB9KSxcbiAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICBdKVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChjdHgucmVzb2x2ZUlmQWJvcnRlZChyZXNvbHZlKSkgcmV0dXJuXG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIHJhY2VSZXN1bHQudHlwZSA9PT0gJ3Jlc3VsdCcgJiZcbiAgICAgICAgICAgICAgICAgICAgICByYWNlUmVzdWx0LnJlc3VsdC5tYXRjaGVzICYmXG4gICAgICAgICAgICAgICAgICAgICAgcmFjZVJlc3VsdC5yZXN1bHQuY29uZmlkZW5jZSA9PT0gJ2hpZ2gnICYmXG4gICAgICAgICAgICAgICAgICAgICAgZmVhdHVyZSgnQkFTSF9DTEFTU0lGSUVSJylcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgLy8gQ2xhc3NpZmllciBhcHByb3ZlZCB3aXRoaW4gZ3JhY2UgcGVyaW9kIOKAlCBza2lwIGRpYWxvZ1xuICAgICAgICAgICAgICAgICAgICAgIHZvaWQgY29uc3VtZVNwZWN1bGF0aXZlQ2xhc3NpZmllckNoZWNrKFxuICAgICAgICAgICAgICAgICAgICAgICAgKGlucHV0IGFzIHsgY29tbWFuZDogc3RyaW5nIH0pLmNvbW1hbmQsXG4gICAgICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWF0Y2hlZFJ1bGUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgcmFjZVJlc3VsdC5yZXN1bHQubWF0Y2hlZERlc2NyaXB0aW9uID8/IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaGVkUnVsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0Q2xhc3NpZmllckFwcHJvdmFsKHRvb2xVc2VJRCwgbWF0Y2hlZFJ1bGUpXG4gICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgY3R4LmxvZ0RlY2lzaW9uKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlY2lzaW9uOiAnYWNjZXB0JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZTogeyB0eXBlOiAnY2xhc3NpZmllcicgfSxcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHguYnVpbGRBbGxvdyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnVwZGF0ZWRJbnB1dCA/P1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpbnB1dCBhcyBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNpc2lvblJlYXNvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2NsYXNzaWZpZXInIGFzIGNvbnN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NpZmllcjogJ2Jhc2hfYWxsb3cnIGFzIGNvbnN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhc29uOiBgQWxsb3dlZCBieSBwcm9tcHQgcnVsZTogXCIke3JhY2VSZXN1bHQucmVzdWx0Lm1hdGNoZWREZXNjcmlwdGlvbn1cImAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIFRpbWVvdXQgb3Igbm8gbWF0Y2gg4oCUIGZhbGwgdGhyb3VnaCB0byBzaG93IGRpYWxvZ1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFNob3cgZGlhbG9nIGFuZCBzdGFydCBob29rcy9jbGFzc2lmaWVyIGluIGJhY2tncm91bmRcbiAgICAgICAgICAgICAgICBoYW5kbGVJbnRlcmFjdGl2ZVBlcm1pc3Npb24oXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGN0eCxcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24sXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCxcbiAgICAgICAgICAgICAgICAgICAgYXdhaXRBdXRvbWF0ZWRDaGVja3NCZWZvcmVEaWFsb2c6XG4gICAgICAgICAgICAgICAgICAgICAgYXBwU3RhdGUudG9vbFBlcm1pc3Npb25Db250ZXh0XG4gICAgICAgICAgICAgICAgICAgICAgICAuYXdhaXRBdXRvbWF0ZWRDaGVja3NCZWZvcmVEaWFsb2csXG4gICAgICAgICAgICAgICAgICAgIGJyaWRnZUNhbGxiYWNrczogZmVhdHVyZSgnQlJJREdFX01PREUnKVxuICAgICAgICAgICAgICAgICAgICAgID8gYXBwU3RhdGUucmVwbEJyaWRnZVBlcm1pc3Npb25DYWxsYmFja3NcbiAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgY2hhbm5lbENhbGxiYWNrczpcbiAgICAgICAgICAgICAgICAgICAgICBmZWF0dXJlKCdLQUlST1MnKSB8fCBmZWF0dXJlKCdLQUlST1NfQ0hBTk5FTFMnKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBhcHBTdGF0ZS5jaGFubmVsUGVybWlzc2lvbkNhbGxiYWNrc1xuICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgcmVzb2x2ZSxcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgZXJyb3IgaW5zdGFuY2VvZiBBYm9ydEVycm9yIHx8XG4gICAgICAgICAgICAgIGVycm9yIGluc3RhbmNlb2YgQVBJVXNlckFib3J0RXJyb3JcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBsb2dGb3JEZWJ1Z2dpbmcoXG4gICAgICAgICAgICAgICAgYFBlcm1pc3Npb24gY2hlY2sgdGhyZXcgJHtlcnJvci5jb25zdHJ1Y3Rvci5uYW1lfSBmb3IgdG9vbD0ke3Rvb2wubmFtZX06ICR7ZXJyb3IubWVzc2FnZX1gLFxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIGN0eC5sb2dDYW5jZWxsZWQoKVxuICAgICAgICAgICAgICByZXNvbHZlKGN0eC5jYW5jZWxBbmRBYm9ydCh1bmRlZmluZWQsIHRydWUpKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbG9nRXJyb3IoZXJyb3IpXG4gICAgICAgICAgICAgIHJlc29sdmUoY3R4LmNhbmNlbEFuZEFib3J0KHVuZGVmaW5lZCwgdHJ1ZSkpXG4gICAgICAgICAg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