[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:35) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-121539","MarcaId":"4597192000165991011","user":"uzaldivar@arochilindner.com"}
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:42) - Tokens generados: 1000.333808139eb3f6c88bddac9bea1b101e.a676feb6decd5b3196c0cef7effcee23
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:43) - Intento 0 el registro no contiene foto asociada
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:43) - ERROR al obtener imagen, intento: 1 , respuesta: null
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:45) - Intento 1 el registro no contiene foto asociada
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:45) - ERROR al obtener imagen, intento: 2 , respuesta: null
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:47) - Intento 2 el registro no contiene foto asociada
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:47) - ERROR al obtener imagen, intento: 3 , respuesta: null
[fd876ad6-239b-46c9-9a39-6a5bd8cf4de6](2024-04-02 11:03:49) - No se pudo encontrar una imagen asociada a registro de CRM \n
[8f1d07d8-5fa2-40e0-a23f-e365817a7a4c](2024-04-02 11:04:36) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-121539","MarcaId":"4597192000165991011","user":"uzaldivar@arochilindner.com"}
[8f1d07d8-5fa2-40e0-a23f-e365817a7a4c](2024-04-02 11:04:43) - Tokens generados: 1000.333808139eb3f6c88bddac9bea1b101e.a676feb6decd5b3196c0cef7effcee23
[8f1d07d8-5fa2-40e0-a23f-e365817a7a4c](2024-04-02 11:04:44) - Intento 0 para obtener imagen de marca de CRM, respuesta: 200
[8f1d07d8-5fa2-40e0-a23f-e365817a7a4c](2024-04-02 11:04:44) - Imagen guardada localmente de manera exitosa
[8f1d07d8-5fa2-40e0-a23f-e365817a7a4c](2024-04-02 11:04:44) - Intento 0 para actualizar CRM con datos de url de marca: {
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "Modified_Time": "2024-04-02T10:04:44-06:00",
                "Modified_By": {
                    "name": "Aptus Legal Administrator",
                    "id": "4597192000000287001"
                },
                "Created_Time": "2024-04-02T10:03:34-06:00",
                "id": "4597192000165991011",
                "Created_By": {
                    "name": "Ulises Zaldivar",
                    "id": "4597192000143282101"
                }
            },
            "message": "record updated",
            "status": "success"
        }
    ]
}
[8f1d07d8-5fa2-40e0-a23f-e365817a7a4c](2024-04-02 11:04:44) - Proceso finalizado exitosamente, URL: https://aptuslegal.app/imagenesAptusLegal/arochi/LogosArochi/MAR-121539.png 

[05334fca-8b80-47af-b78a-d4a54656d157](2024-04-02 11:06:05) - Proceso de subida de imagen iniciado, data: {"source":"webhook","RefAL":"MAR-121447","MarcaId":"4597192000165235207","user":"gbringas@arochilindner.com"}
[05334fca-8b80-47af-b78a-d4a54656d157](2024-04-02 11:06:12) - Tokens generados: 1000.333808139eb3f6c88bddac9bea1b101e.a676feb6decd5b3196c0cef7effcee23
[05334fca-8b80-47af-b78a-d4a54656d157](2024-04-02 11:06:13) - Intento 0 para obtener imagen de marca de CRM, respuesta: 200
[05334fca-8b80-47af-b78a-d4a54656d157](2024-04-02 11:06:13) - Imagen guardada localmente de manera exitosa
[05334fca-8b80-47af-b78a-d4a54656d157](2024-04-02 11:06:14) - Intento 0 para actualizar CRM con datos de url de marca: {
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "Modified_Time": "2024-04-02T10:06:14-06:00",
                "Modified_By": {
                    "name": "Aptus Legal Administrator",
                    "id": "4597192000000287001"
                },
                "Created_Time": "2024-03-29T08:04:45-06:00",
                "id": "4597192000165235207",
                "Created_By": {
                    "name": "Yumiko Soto Ymay",
                    "id": "4597192000011167128"
                }
            },
            "message": "record updated",
            "status": "success"
        }
    const index = symbols.length;
        symbols.push(firstAccessibleSymbol);
        const moduleSymbol = firstAccessibleSymbol.parent;
        if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
          symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
        } else {
          const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
          const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
            [{
              exportKind: 0 /* Named */,
              moduleFileName: fileName,
              isFromPackageJson: false,
              moduleSymbol,
              symbol: firstAccessibleSymbol,
              targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
            }],
            position,
            isValidTypeOnlyAliasUseSite(location)
          ) || {};
          if (moduleSpecifier) {
            const origin = {
              kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
              moduleSymbol,
              isDefaultExport: false,
              symbolName: firstAccessibleSymbol.name,
              exportName: firstAccessibleSymbol.name,
              fileName,
              moduleSpecifier
            };
            symbolToOriginInfoMap[index] = origin;
          }
        }
      } else if (preferences.includeCompletionsWithInsertText) {
        if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) {
          return;
        }
        addSymbolOriginInfo(symbol);
        addSymbolSortInfo(symbol);
        symbols.push(symbol);
      }
    } else {
      addSymbolOriginInfo(symbol);
      addSymbolSortInfo(symbol);
      symbols.push(symbol);
    }
    function addSymbolSortInfo(symbol2) {
      if (isStaticProperty(symbol2)) {
        symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority;
      }
    }
    function addSymbolOriginInfo(symbol2) {
      if (preferences.includeCompletionsWithInsertText) {
        if (insertAwait && addToSeen(seenPropertySymbols, getSymbolId(symbol2))) {
          symbolToOriginInfoMap[symbols.length] = { kind: getNullableSymbolOriginInfoKind(8 /* Promise */) };
        } else if (insertQuestionDot) {
          symbolToOriginInfoMap[symbols.length] = { kind: 16 /* Nullable */ };
        }
      }
    }
    function getNullableSymbolOriginInfoKind(kind) {
      return insertQuestionDot ? kind | 16 /* Nullable */ : kind;
    }
  }
  function getLeftMostName(e) {
    return isIdentifier(e) ? e : isPropertyAccessExpression(e) ? getLeftMostName(e.expression) : void 0;
  }
  function tryGetGlobalSymbols() {
    const result = tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() || tryGetObjectLikeCompletionSymbols() || tryGetImportCompletionSymbols() || tryGetImportOrExportClauseCompletionSymbols() || tryGetImportAttributesCompletionSymbols() || tryGetLocalNamedExportCompletionSymbols() || tryGetConstructorCompletion() || tryGetClassLikeCompletionSymbols() || tryGetJsxCompletionSymbols() || (getGlobalCompletions(), 1 /* Success */);
    return result === 1 /* Success */;
  }
  function tryGetConstructorCompletion() {
    if (!tryGetConstructorLikeCompletionContainer(contextToken)) return 0 /* Continue */;
    completionKind = 5 /* None */;
    isNewIdentifierLocation = true;
    keywordFilters = 4 /* ConstructorParameterKeywords */;
    return 1 /* Success */;
  }
  function tryGetJsxCompletionSymbols() {
    const jsxContainer = tryGetContainingJsxElement(contextToken);
    const attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes);
    if (!attrsType) return 0 /* Continue */;
    const completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */);
    symbols = concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));
    setSortTextToOptionalMember();
    completionKind = 3 /* MemberLike */;
    isNewIdentifierLocation = false;
    return 1 /* Success */;
  }
  function tryGetImportCompletionSymbols() {
    if (!importStatementCompletion) return 0 /* Continue */;
    isNewIdentifierLocation = true;
    collectAutoImports();
    return 1 /* Success */;
  }
  function getGlobalCompletions() {
    keywordFilters = tryGetFunctionLikeBodyCompletionContainer(contextToken) ? 5 /* FunctionLikeBodyKeywords */ : 1 /* All */;
    completionKind = 1 /* Global */;
    isNewIdentifierLocation = isNewIdentifierDefinitionLocation();
    if (previousToken !== contextToken) {
      Debug.assert(!!previousToken, "Expected 'contextToken' to be defined when different from 'previousToken'.");
    }
    const adjustedPosition = previousToken !== contextToken ? previousToken.getStart() : position;
    const scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile;
    isInSnippetScope = isSnippetScope(scopeNode);
    const symbolMeanings = (isTypeOnlyLocation ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */;
    const typeOnlyAliasNeedsPromotion = previousToken && !isValidTypeOnlyAliasUseSite(previousToken);
    symbols = concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings));
    Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined");
    for (let i = 0; i < symbols.length; i++) {
      const symbol = symbols[i];
      if (!typeChecker.isArgumentsSymbol(symbol) && !some(symbol.declarations, (d) => d.getSourceFile() === sourceFile)) {
        symbolToSortTextMap[getSymbolId(symbol)] = SortText.GlobalsOrKeywords;
      }
      if (typeOnlyAliasNeedsPromotion && !(symbol.flags & 111551 /* Value */)) {
        const typeOnlyAliasDeclaration = symbol.declarations && find(symbol.declarations, isTypeOnlyImportDeclaration);
        if (typeOnlyAliasDeclaration) {
          const origin = { kind: 64 /* TypeOnlyAlias */, declaration: typeOnlyAliasDeclaration };
          symbolToOriginInfoMap[i] = origin;
        }
      }
    }
    if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 307 /* SourceFile */) {
      const thisType = typeChecker.tryGetThisTypeAt(
        scopeNode,
        /*includeGlobalThis*/
        false,
        isClassLike(scopeNode.parent) ? scopeNode : void 0
      );
      if (thisType && !isProbablyGlobalType(thisType, sourceFile, typeChecker)) {
        for (const symbol of getPropertiesForCompletion(thisType, typeChecker)) {
          symbolToOriginInfoMap[symbols.length] = { kind: 1 /* ThisType */ };
          symbols.push(symbol);
          symbolToSortTextMap[getSymbolId(symbol)] = SortText.SuggestedClassMembers;
        }
      }
    }
    collectAutoImports();
    if (isTypeOnlyLocation) {
      keywordFilters = contextToken && isAssertionExpression(contextToken.parent) ? 6 /* TypeAssertionKeywords */ : 7 /* TypeKeywords */;
    }
  }
  function shouldOfferImportCompletions() {
    var _a;
    if (importStatementCompletion) return true;
    if (!preferences.includeCompletionsForModuleExports) return false;
    if (sourceFile.externalModuleIndicator || sourceFile.commonJsModuleIndicator) return true;
    if (compilerOptionsIndicateEsModules(program.getCompilerOptions())) return true;
    return ((_a = program.getSymlinkCache) == null ? void 0 : _a.call(program).hasAnySymlinks()) || !!program.getCompilerOptions().paths || programContainsModules(program);
  }
  function isSnippetScope(scopeNode) {
    switch (scopeNode.kind) {
      case 307 /* SourceFile */:
      case 228 /* TemplateExpression */:
      case 294 /* JsxExpression */:
      case 241 /* Block */:
        return true;
      default:
        return isStatement(scopeNode);
    }
  }
  function isTypeOnlyCompletion() {
    return insideJsDocTagTypeExpression || insideJsDocImportTag || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken));
  }
  function isContextTokenValueLocation(contextToken2) {
    return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */);
  }
  function isContextTokenTypeLocation(contextToken2) {
    if (contextToken2) {
      const parentKind = contextToken2.parent.kind;
      switch (contextToken2.kind) {
        case 59 /* ColonToken */:
          return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind);
        case 64 /* EqualsToken */:
          return parentKind === 265 /* TypeAliasDeclaration */ || parentKind === 168 /* TypeParameter */;
        case 130 /* AsKeyword */:
          return parentKind === 234 /* AsExpression */;
        case 30 /* LessThanToken */:
          return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */;
        case 96 /* ExtendsKeyword */:
          return parentKind === 168 /* TypeParameter */;
        case 152 /* SatisfiesKeyword */:
          return parentKind === 238 /* SatisfiesExpression */;
      }
    }
    return false;
  }
  function collectAutoImports() {
    var _a, _b;
    if (!shouldOfferImportCompletions()) return;
    Debug.assert(!(detailsEntryId == null ? void 0 : detailsEntryId.data), "Should not run 'collectAutoImports' when faster path is available via `data`");
    if (detailsEntryId && !detailsEntryId.source) {
      return;
    }
    flags |= 1 /* MayIncludeAutoImports */;
    const isAfterTypeOnlyImportSpecifierModifier = previousToken === contextToken && importStatementCompletion;
    const lowerCaseTokenText = isAfterTypeOnlyImportSpecifierModifier ? "" : previousToken && isIdentifier(previousToken) ? previousToken.text.toLowerCase() : "";
    const moduleSpecifierCache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host);
    const exportInfo = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken);
    const packageJsonAutoImportProvider = (_b = host.getPackageJsonAutoImportProvider) == null ? void 0 : _b.call(host);
    const packageJsonFilter = detailsEntryId ? void 0 : createPackageJsonImportFilter(sourceFile, preferences, host);
    resolvingModuleSpecifiers(
      "collectAutoImports",
      host,
      importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences)),
      program,
      position,
      preferences,
      !!importStatementCompletion,
      isValidTypeOnlyAliasUseSite(location),
      (context) => {
        exportInfo.search(
          sourceFile.path,
          /*preferCapitalized*/
          isRightOfOpenTag,
          (symbolName2, targetFlags) => {
            if (!isIdentifierText(symbolName2, getEmitScriptTarget(host.getCompilationSettings()))) return false;
            if (!detailsEntryId && isStringANonContextualKeyword(symbolName2)) return false;
            if (!isTypeOnlyLocation && !importStatementCompletion && !(targetFlags & 111551 /* Value */)) return false;
            if (isTypeOnlyLocation && !(targetFlags & (1536 /* Module */ | 788968 /* Type */))) return false;
            const firstChar = symbolName2.charCodeAt(0);
            if (isRightOfOpenTag && (firstChar < 65 /* A */ || firstChar > 90 /* Z */)) return false;
            if (detailsEntryId) return true;
            return charactersFuzzyMatchInString(symbolName2, lowerCaseTokenText);
          },
          (info, symbolName2, isFromAmbientModule, exportMapKey) => {
            if (detailsEntryId && !some(info, (i) => detailsEntryId.source === stripQuotes(i.moduleSymbol.name))) {
              return;
            }
            info = filter(info, isImportableExportInfo);
            if (!info.length) {
              return;
            }
            const result = context.tryResolve(info, isFromAmbientModule) || {};
            if (result === "failed") return;
            let exportInfo2 = info[0], moduleSpecifier;
            if (result !== "skipped") {
              ({ exportInfo: exportInfo2 = info[0], moduleSpecifier } = result);
            }
            const isDefaultExport = exportInfo2.exportKind === 1 /* Default */;
            const symbol = isDefaultExport && getLocalSymbolForExportDefault(Debug.checkDefined(exportInfo2.symbol)) || Debug.checkDefined(exportInfo2.symbol);
            pushAutoImportSymbol(symbol, {
              kind: moduleSpecifier ? 32 /* ResolvedExport */ : 4 /* Export */,
              moduleSpecifier,
              symbolName: symbolName2,
              exportMapKey,
              exportName: exportInfo2.exportKind === 2 /* ExportEquals */ ? "export=" /* ExportEquals */ : Debug.checkDefined(exportInfo2.symbol).name,
              fileName: exportInfo2.moduleFileName,
              isDefaultExport,
              moduleSymbol: exportInfo2.moduleSymbol,
              isFromPackageJson: exportInfo2.isFromPackageJson
            });
          }
        );
        hasUnresolvedAutoImports = context.skippedAny();
        flags |= context.resolvedAny() ? 8 /* ResolvedModuleSpecifiers */ : 0;
        flags |= context.resolvedBeyondLimit() ? 16 /* ResolvedModuleSpecifiersBeyondLimit */ : 0;
      }
    );
    function isImportableExportInfo(info) {
      const moduleFile = tryCast(info.moduleSymbol.valueDeclaration, isSourceFile);
      if (!moduleFile) {
        const moduleName = stripQuotes(info.moduleSymbol.name);
        if (ts_JsTyping_exports.nodeCoreModules.has(moduleName) && startsWith(moduleName, "node:") !== shouldUseUriStyleNodeCoreModules(sourceFile, program)) {
          return false;
        }
        return ((packageJsonFilter == null ? void 0 : packageJsonFilter.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson))) ?? true) || fileContainsPackageImport(sourceFile, moduleName);
      }
      return isImportableFile(
        info.isFromPackageJson ? packageJsonAutoImportProvider : program,
        sourceFile,
        moduleFile,
        preferences,
        packageJsonFilter,
        getModuleSpecifierResolutionHost(info.isFromPackageJson),
        moduleSpecifierCache
      );
    }
  }
  function pushAutoImportSymbol(symbol, origin) {
    const symbolId = getSymbolId(symbol);
    if (symbolToSortTextMap[symbolId] === SortText.GlobalsOrKeywords) {
      return;
    }
    symbolToOriginInfoMap[symbols.length] = origin;
    symbolToSortTextMap[symbolId] = importStatementCompletion ? SortText.LocationPriority : SortText.AutoImportSuggestions;
    symbols.push(symbol);
  }
  function collectObjectLiteralMethodSymbols(members, enclosingDeclaration) {
    if (isInJSFile(location)) {
      return;
    }
    members.forEach((member) => {
      if (!isObjectLiteralMethodSymbol(member)) {
        return;
      }
      const displayName = getCompletionEntryDisplayNameForSymbol(
        member,
        getEmitScriptTarget(compilerOptions),
        /*origin*/
        void 0,
        0 /* ObjectPropertyDeclaration */,
        /*jsxIdentifierExpected*/
        false
      );
      if (!displayName) {
        return;
      }
      const { name } = displayName;
      const entryProps = getEntryForObjectLiteralMethodCompletion(
        member,
        name,
        enclosingDeclaration,
        program,
        host,
        compilerOptions,
        preferences,
        formatContext
      );
      if (!entryProps) {
        return;
      }
      const origin = { kind: 128 /* ObjectLiteralMethod */, ...entryProps };
      flags |= 32 /* MayIncludeMethodSnippets */;
      symbolToOriginInfoMap[symbols.length] = origin;
      symbols.push(member);
    });
  }
  function isObjectLiteralMethodSymbol(symbol) {
    if (!(symbol.flags & (4 /* Property */ | 8192 /* Method */))) {
      return false;
    }
    return true;
  }
  function getScopeNode(initialToken, position2, sourceFile2) {
    let scope = initialToken;
    while (scope && !positionBelongsToNode(scope, position2, sourceFile2)) {
      scope = scope.parent;
    }
    return scope;
  }
  function isCompletionListBlocker(contextToken2) {
    const start2 = timestamp();
    const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || isSolelyIdentifierDefinitionLocation(contextToken2) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2);
    log("getCompletionsAtPosition: isCompletionListBlocker: " + (timestamp() - start2));
    return result;
  }
  function isInJsxText(contextToken2) {
    if (contextToken2.kind === 12 /* JsxText */) {
      return true;
    }
    if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) {
      if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) {
        return false;
      }
      if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) {
        return location.parent.kind !== 286 /* JsxOpeningElement */;
      }
      if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) {
        return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */;
      }
    }
    return false;
  }
  function isNewIdentifierDefinitionLocation() {
    if (contextToken) {
      const containingNodeKind = contextToken.parent.kind;
      const tokenKind = keywordForNode(contextToken);
      switch (tokenKind) {
        case 28 /* CommaToken */:
          return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 226 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */;
        case 21 /* OpenParenToken */:
          return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */;
        case 23 /* OpenBracketToken */:
          return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */;
        case 144 /* ModuleKeyword */:
        case 145 /* NamespaceKeyword */:
        case 102 /* ImportKeyword */:
          return true;
        case 25 /* DotToken */:
          return containingNodeKind === 267 /* ModuleDeclaration */;
        case 19 /* OpenBraceToken */:
          return containingNodeKind === 263 /* ClassDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */;
        case 64 /* EqualsToken */:
          return containingNodeKind === 260 /* VariableDeclaration */ || containingNodeKind === 226 /* BinaryExpression */;
        case 16 /* TemplateHead */:
          return containingNodeKind === 228 /* TemplateExpression */;
        case 17 /* TemplateMiddle */:
          return containingNodeKind === 239 /* TemplateSpan */;
        case 134 /* AsyncKeyword */:
          return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */;
        case 42 /* AsteriskToken */:
          return containingNodeKind === 174 /* MethodDeclaration */;
      }
      if (isClassMemberCompletionKeyword(tokenKind)) {
        return true;
      }
    }
    return false;
  }
  function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) {
    return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2)));
  }
  function tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() {
    const typeLiteralNode = tryGetTypeLiteralNode(contextToken);
    if (!typeLiteralNode) return 0 /* Continue */;
    const intersectionTypeNode = isIntersectionTypeNode(typeLiteralNode.parent) ? typeLiteralNode.parent : void 0;
    const containerTypeNode = intersectionTypeNode || typeLiteralNode;
    const containerExpectedType = getConstraintOfTypeArgumentProperty(containerTypeNode, typeChecker);
    if (!containerExpectedType) return 0 /* Continue */;
    const containerActualType = typeChecker.getTypeFromTypeNode(containerTypeNode);
    const members = getPropertiesForCompletion(containerExpectedType, typeChecker);
    const existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);
    const existingMemberEscapedNames = /* @__PURE__ */ new Set();
    existingMembers.forEach((s) => existingMemberEscapedNames.add(s.escapedName));
    symbols = concatenate(symbols, filter(members, (s) => !existingMemberEscapedNames.has(s.escapedName)));
    completionKind = 0 /* ObjectPropertyDeclaration */;
    isNewIdentifierLocation = true;
    return 1 /* Success */;
  }
  function tryGetObjectLikeCompletionSymbols() {
    if ((contextToken == null ? void 0 : contextToken.kind) === 26 /* DotDotDotToken */) return 0 /* Continue */;
    const symbolsStartIndex = symbols.length;
    const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile);
    if (!objectLikeContainer) return 0 /* Continue */;
    completionKind = 0 /* ObjectPropertyDeclaration */;
    let typeMembers;
    let existingMembers;
    if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) {
      const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker);
      if (instantiatedType === void 0) {
        if (objectLikeContainer.flags & 67108864 /* InWithStatement */) {
          return 2 /* Fail */;
        }
        return 0 /* Continue */;
      }
      const completionsType = typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */);
      const hasStringIndexType = (completionsType || instantiatedType).getStringIndexType();
      const hasNumberIndextype = (completionsType || instantiatedType).getNumberIndexType();
      isNewIdentifierLocation = !!hasStringIndexType || !!hasNumberIndextype;
      typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker);
      existingMembers = objectLikeContainer.properties;
      if (typeMembers.length === 0) {
        if (!hasNumberIndextype) {
          return 0 /* Continue */;
        }
      }
    } else {
      Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */);
      isNewIdentifierLocation = false;
      const rootDeclaration = getRootDeclaration(objectLikeContainer.parent);
      if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like.");
      let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */;
      if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) {
        if (isExpression(rootDeclaration.parent)) {
          canGetType = !!typeChecker.getContextualType(rootDeclaration.parent);
        } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) {
          canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent);
        }
      }
      if (canGetType) {
        const typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
        if (!typeForObject) return 2 /* Fail */;
        typeMembers = typeChecker.getPropertiesOfType(typeForObject).filter((propertySymbol) => {
          return typeChecker.isPropertyAccessible(
            objectLikeContainer,
            /*isSuper*/
            false,
            /*isWrite*/
            false,
            typeForObject,
            propertySymbol
          );
        });
        existingMembers = objectLikeContainer.elements;
      }
    }
    if (typeMembers && typeMembers.length > 0) {
      const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers));
      symbols = concatenate(symbols, filteredMembers);
      setSortTextToOptionalMember();
      if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) {
        transformObjectLiteralMembersSortText(symbolsStartIndex);
        collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer);
      }
    }
    return 1 /* Success */;
  }
  function tryGetImportOrExportClauseCompletionSymbols() {
    if (!contextToken) return 0 /* Continue */;
    const namedImportsOrExports = contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */ ? tryCast(contextToken.parent, isNamedImportsOrExports) : isTypeKeywordTokenOrIdentifier(contextToken) ? tryCast(contextToken.parent.parent, isNamedImportsOrExports) : void 0;
    if (!namedImportsOrExports) return 0 /* Continue */;
    if (!isTypeKeywordTokenOrIdentifier(contextToken)) {
      keywordFilters = 8 /* TypeKeyword */;
    }
    const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent;
    if (!moduleSpecifier) {
      isNewIdentifierLocation = true;
      return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */;
    }
    const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier);
    if (!moduleSpecifierSymbol) {
      isNewIdentifierLocation = true;
      return 2 /* Fail */;
    }
    completionKind = 3 /* MemberLike */;
    isNewIdentifierLocation = false;
    const exports2 = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol);
    const existing = new Set(namedImportsOrExports.elements.filter((n) => !isCurrentlyEditingNode(n)).map((n) => moduleExportNameTextEscaped(n.propertyName || n.name)));
    const uniques = exports2.filter((e) => e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName));
    symbols = concatenate(symbols, uniques);
    if (!uniques.length) {
      keywordFilters = 0 /* None */;
    }
    return 1 /* Success */;
  }
  function tryGetImportAttributesCompletionSymbols() {
    if (contextToken === void 0) return 0 /* Continue */;
    const importAttributes = contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */ ? tryCast(contextToken.parent, isImportAttributes) : contextToken.kind === 59 /* ColonToken */ ? tryCast(contextToken.parent.parent, isImportAttributes) : void 0;
    if (importAttributes === void 0) return 0 /* Continue */;
    const existing = new Set(importAttributes.elements.map(getNameFromImportAttribute));
    symbols = filter(typeChecker.getTypeAtLocation(importAttributes).getApparentProperties(), (attr) => !existing.has(attr.escapedName));
    return 1 /* Success */;
  }
  function tryGetLocalNamedExportCompletionSymbols() {
    var _a;
    const namedExports = contextToken && (contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */) ? tryCast(contextToken.parent, isNamedExports) : void 0;
    if (!namedExports) {
      return 0 /* Continue */;
    }
    const localsContainer = findAncestor(namedExports, or(isSourceFile, isModuleDeclaration));
    completionKind = 5 /* None */;
    isNewIdentifierLocation = false;
    (_a = localsContainer.locals) == null ? void 0 : _a.forEach((symbol, name) => {
      var _a2, _b;
      symbols.push(symbol);
      if ((_b = (_a2 = localsContainer.symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.has(name)) {
        symbolToSortTextMap[getSymbolId(symbol)] = SortText.OptionalMember;
      }
    });
    return 1 /* Success */;
  }
  function tryGetClassLikeCompletionSymbols() {
    const decl = tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position);
    if (!decl) return 0 /* Continue */;
    completionKind = 3 /* MemberLike */;
    isNewIdentifierLocation = true;
    keywordFilters = contextToken.kind === 42 /* AsteriskToken */ ? 0 /* None */ : isClassLike(decl) ? 2 /* ClassElementKeywords */ : 3 /* InterfaceElementKeywords */;
    if (!isClassLike(decl)) return 1 /* Success */;
    const classElement = contextToken.kind === 27 /* SemicolonToken */ ? contextToken.parent.parent : contextToken.parent;
    let classElementModifierFlags = isClassElement(classElement) ? getEffectiveModifierFlags(classElement) : 0 /* None */;
    if (contextToken.kind === 80 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) {
      switch (contextToken.getText()) {
        case "private":
          classElementModifierFlags = classElementModifierFlags | 2 /* Private */;
          break;
        case "static":
          classElementModifierFlags = classElementModifierFlags | 256 /* Static */;
          break;
        case "override":
          classElementModifierFlags = classElementModifierFlags | 16 /* Override */;
          break;
      }
    }
    if (isClassStaticBlockDeclaration(classElement)) {
      classElementModifierFlags |= 256 /* Static */;
    }
    if (!(classElementModifierFlags & 2 /* Private */)) {
      const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl);
      const baseSymbols = flatMap(baseTypeNodes, (baseTypeNode) => {
        const type = typeChecker.getTypeAtLocation(baseTypeNode);
        return classElementModifierFlags & 256 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type);
      });
      symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
      forEach(symbols, (symbol, index) => {
        const declaration = symbol == null ? void 0 : symbol.valueDeclaration;
        if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {
          const origin = {
            kind: 512 /* ComputedPropertyName */,
            symbolName: typeChecker.symbolToString(symbol)
          };
          symbolToOriginInfoMap[index] = origin;
        }
      });
    }
    return 1 /* Success */;
  }
  function isConstructorParameterCompletion(node2) {
    return !!node2.parent && isParameter(node2.parent) && isConstructorDeclaration(node2.parent.parent) && (isParameterPropertyModifier(node2.kind) || isDeclarationName(node2));
  }
  function tryGetConstructorLikeCompletionContainer(contextToken2) {
    if (contextToken2) {
      const parent2 = contextToken2.parent;
      switch (contextToken2.kind) {
        case 21 /* OpenParenToken */:
        case 28 /* CommaToken */:
          return isConstructorDeclaration(contextToken2.parent) ? contextToken2.parent : void 0;
        default:
          if (isConstructorParameterCompletion(contextToken2)) {
            return parent2.parent;
          }
      }
    }
    return void 0;
  }
  function tryGetFunctionLikeBodyCompletionContainer(contextToken2) {
    if (contextToken2) {
      let prev;
      const container = findAncestor(contextToken2.parent, (node2) => {
        if (isClassLike(node2)) {
          return "quit";
        }
        if (isFunctionLikeDeclaration(node2) && prev === node2.body) {
          return true;
        }
        prev