//#region src/domains/run/services/blob-storage/file-security-errors.ts
var FileSecurityError = class extends Error {
	constructor(message, options) {
		super(message, options);
		this.name = new.target.name;
	}
};
var InvalidExternalFileUrlError = class extends FileSecurityError {
	constructor(rawUrl) {
		super(`Invalid external file URL: ${rawUrl}`);
	}
};
var BlockedUnsupportedSchemeError = class extends FileSecurityError {
	constructor(protocol) {
		super(`Blocked external file URL with unsupported scheme: ${protocol}`);
	}
};
var BlockedDisallowedPortError = class extends FileSecurityError {
	constructor(port) {
		super(`Blocked external file URL with disallowed port: ${port}`);
	}
};
var BlockedEmbeddedCredentialsError = class extends FileSecurityError {
	constructor() {
		super("Blocked external file URL with embedded credentials");
	}
};
var NoIpResolvedError = class extends FileSecurityError {
	constructor(hostname) {
		super(`No IP addresses resolved for host: ${hostname}`);
	}
};
var BlockedUrlResolvingToPrivateIpError = class extends FileSecurityError {
	constructor(ip) {
		super(`Blocked external file URL resolving to private or reserved IP: ${ip}`);
	}
};
var UnableToResolveHostError = class extends FileSecurityError {
	constructor(hostname, options) {
		super(`Unable to resolve external file host: ${hostname}`, options);
	}
};
var BlockedConnectionToPrivateIpError = class extends FileSecurityError {
	constructor(address) {
		super(`Blocked external file connection to private or reserved IP: ${address}`);
	}
};
var RedirectMissingLocationError = class extends FileSecurityError {
	constructor(url) {
		super(`Redirect response missing location header: ${url}`);
	}
};
var TooManyRedirectsError = class extends FileSecurityError {
	constructor(url) {
		super(`Too many redirects while downloading file: ${url}`);
	}
};
var FailedToDownloadError = class extends FileSecurityError {
	constructor(url, statusText, options) {
		super(statusText ? `Failed to download file from ${url}: ${statusText}` : `Failed to download file from ${url}`, options);
	}
};
var BlockedExternalFileLargerThanError = class extends FileSecurityError {
	constructor(maxBytes, contentLength) {
		super(`Blocked external file larger than ${maxBytes} bytes: ${contentLength}`);
	}
};
var BlockedExternalFileExceedingError = class extends FileSecurityError {
	constructor(maxBytes) {
		super(`Blocked external file exceeding ${maxBytes} bytes`);
	}
};
var ExternalFileResponseBodyEmptyError = class extends FileSecurityError {
	constructor() {
		super("External file response body is empty");
	}
};
var UnexpectedRedirectStateError = class extends FileSecurityError {
	constructor(url) {
		super(`Unexpected redirect handling state for URL: ${url}`);
	}
};
var TimedOutDownloadingError = class extends FileSecurityError {
	constructor(url) {
		super(`Timed out downloading file from ${url}`);
	}
};
var BlockedInlineFileExceedingError = class extends FileSecurityError {
	constructor(maxBytes) {
		super(`Blocked inline file exceeding ${maxBytes} bytes`);
	}
};
var BlockedInlineUnsupportedFileBytesError = class extends FileSecurityError {
	constructor(claimedContentType) {
		super(`Blocked inline file with unsupported bytes signature (claimed content-type: ${claimedContentType})`);
	}
};
var BlockedExternalUnsupportedBytesError = class extends FileSecurityError {
	constructor(contentType) {
		super(`Blocked external file with unsupported bytes signature (content-type: ${contentType})`);
	}
};
var InvalidInlineFileMalformedBase64Error = class extends FileSecurityError {
	constructor() {
		super("Invalid inline file: malformed base64 payload");
	}
};
var TextDocumentAttachmentError = class extends FileSecurityError {
	constructor(message, options) {
		super(message, options);
		this.name = new.target.name;
	}
};
var InvalidUtf8TextDocumentError = class extends TextDocumentAttachmentError {
	constructor(options) {
		super("Invalid UTF-8 text document", options);
	}
};
var TextDocumentControlCharacterError = class extends TextDocumentAttachmentError {
	constructor(options) {
		super("Text document contains disallowed control characters", options);
	}
};
var UnsupportedTextAttachmentSourceError = class extends TextDocumentAttachmentError {
	constructor(mimeType, options) {
		super(`Unsupported text attachment source for mime type: ${mimeType}`, options);
	}
};
var PdfUrlIngestionError = class extends FileSecurityError {
	sourceUrl;
	constructor(sourceUrl, options) {
		super(`Failed to ingest PDF URL: ${sourceUrl}`, options);
		this.sourceUrl = sourceUrl;
	}
};

//#endregion
export { BlockedConnectionToPrivateIpError, BlockedDisallowedPortError, BlockedEmbeddedCredentialsError, BlockedExternalFileExceedingError, BlockedExternalFileLargerThanError, BlockedExternalUnsupportedBytesError, BlockedInlineFileExceedingError, BlockedInlineUnsupportedFileBytesError, BlockedUnsupportedSchemeError, BlockedUrlResolvingToPrivateIpError, ExternalFileResponseBodyEmptyError, FailedToDownloadError, FileSecurityError, InvalidExternalFileUrlError, InvalidInlineFileMalformedBase64Error, InvalidUtf8TextDocumentError, NoIpResolvedError, PdfUrlIngestionError, RedirectMissingLocationError, TextDocumentAttachmentError, TextDocumentControlCharacterError, TimedOutDownloadingError, TooManyRedirectsError, UnableToResolveHostError, UnexpectedRedirectStateError, UnsupportedTextAttachmentSourceError };