{#if fileLoading}
{:else if fileImageUrl !== null}
{:else if fileVideoUrl !== null}
{:else if fileAudioUrl !== null}
{:else if filePdfData !== null}
{:else if fileSqliteData !== null}
{:else if fileOfficeHtml !== null}
{@html fileOfficeHtml}
{#if excelSheetNames.length > 1}
{#each excelSheetNames as sheet}
{/each}
{/if}
{:else if fileOfficeSlides !== null && fileOfficeSlides.length > 0}
{#if fileOfficeSlides.length > 1}
{currentSlide + 1} / {fileOfficeSlides.length}
{/if}
{:else if fileContent !== null}
{#if isHtml && !showRaw && serveUrl}
{#if overlay}
{/if}
{:else if isHtml && !showRaw}
{#if overlay}
{/if}
{:else if isHtml && showRaw}
{:else if isMarkdown && !showRaw}
{@html renderedHtml}
{:else if isMarkdown && showRaw}
{:else if isCsv && !showRaw && csvRows.length > 0}
| # |
{#each csvHeader as cell}
{cell} |
{/each}
{#each csvBody as row, i}
| {i + 1} |
{#each row as cell}
{cell} |
{/each}
{#each Array(Math.max(0, csvHeader.length - row.length)) as _}
|
{/each}
{/each}
{:else if isNotebook && !showRaw && parsedNotebook}
{:else if isJson && !showRaw && parsedJson !== undefined}
{:else if isJson && !showRaw && jsonError}
JSON parse error: {jsonError}
{fileContent}
{:else if isSvg && !showRaw && fileContent}
{@html DOMPurify.sanitize(fileContent, {
USE_PROFILES: { svg: true, svgFilters: true },
ADD_TAGS: ['use']
})}
{:else if isCode && !showRaw}
{:else if isSvg && highlightedHtml && !showRaw}
{@html highlightedHtml}
{:else if editing}
{:else}
{fileContent}
{/if}
{:else}
{$i18n.t('Could not read file.')}
{/if}