//#region src/domains/run/services/blob-storage/image-security-errors.ts
var ImageSecurityError = class extends Error {
	constructor(message, options) {
		super(message, options);
		this.name = new.target.name;
	}
};
var InvalidExternalImageUrlError = class extends ImageSecurityError {
	constructor(rawUrl) {
		super(`Invalid external image URL: ${rawUrl}`);
	}
};
var BlockedUnsupportedSchemeError = class extends ImageSecurityError {
	constructor(protocol) {
		super(`Blocked external image URL with unsupported scheme: ${protocol}`);
	}
};
var BlockedDisallowedPortError = class extends ImageSecurityError {
	constructor(port) {
		super(`Blocked external image URL with disallowed port: ${port}`);
	}
};
var BlockedEmbeddedCredentialsError = class extends ImageSecurityError {
	constructor() {
		super("Blocked external image URL with embedded credentials");
	}
};
var NoIpResolvedError = class extends ImageSecurityError {
	constructor(hostname) {
		super(`No IP addresses resolved for host: ${hostname}`);
	}
};
var BlockedUrlResolvingToPrivateIpError = class extends ImageSecurityError {
	constructor(ip) {
		super(`Blocked external image URL resolving to private or reserved IP: ${ip}`);
	}
};
var UnableToResolveHostError = class extends ImageSecurityError {
	constructor(hostname, options) {
		super(`Unable to resolve external image host: ${hostname}`, options);
	}
};
var BlockedConnectionToPrivateIpError = class extends ImageSecurityError {
	constructor(address) {
		super(`Blocked external image connection to private or reserved IP: ${address}`);
	}
};
var RedirectMissingLocationError = class extends ImageSecurityError {
	constructor(url) {
		super(`Redirect response missing location header: ${url}`);
	}
};
var TooManyRedirectsError = class extends ImageSecurityError {
	constructor(url) {
		super(`Too many redirects while downloading image: ${url}`);
	}
};
var FailedToDownloadError = class extends ImageSecurityError {
	constructor(url, statusText, options) {
		super(statusText ? `Failed to download image from ${url}: ${statusText}` : `Failed to download image from ${url}`, options);
	}
};
var BlockedExternalImageLargerThanError = class extends ImageSecurityError {
	constructor(maxBytes, contentLength) {
		super(`Blocked external image larger than ${maxBytes} bytes: ${contentLength}`);
	}
};
var BlockedExternalImageExceedingError = class extends ImageSecurityError {
	constructor(maxBytes) {
		super(`Blocked external image exceeding ${maxBytes} bytes`);
	}
};
var ExternalImageResponseBodyEmptyError = class extends ImageSecurityError {
	constructor() {
		super("External image response body is empty");
	}
};
var UnexpectedRedirectStateError = class extends ImageSecurityError {
	constructor(url) {
		super(`Unexpected redirect handling state for URL: ${url}`);
	}
};
var TimedOutDownloadingError = class extends ImageSecurityError {
	constructor(url) {
		super(`Timed out downloading image from ${url}`);
	}
};
var BlockedInlineImageExceedingError = class extends ImageSecurityError {
	constructor(maxBytes) {
		super(`Blocked inline image exceeding ${maxBytes} bytes`);
	}
};
var BlockedInlineUnsupportedBytesError = class extends ImageSecurityError {
	constructor(claimedContentType) {
		super(`Blocked inline image with unsupported bytes signature (claimed content-type: ${claimedContentType})`);
	}
};
var BlockedExternalUnsupportedBytesError = class extends ImageSecurityError {
	constructor(contentType) {
		super(`Blocked external image with unsupported bytes signature (content-type: ${contentType})`);
	}
};
var InvalidInlineImageMalformedBase64Error = class extends ImageSecurityError {
	constructor() {
		super("Invalid inline image: malformed base64 payload");
	}
};

//#endregion
export { BlockedConnectionToPrivateIpError, BlockedDisallowedPortError, BlockedEmbeddedCredentialsError, BlockedExternalImageExceedingError, BlockedExternalImageLargerThanError, BlockedExternalUnsupportedBytesError, BlockedInlineImageExceedingError, BlockedInlineUnsupportedBytesError, BlockedUnsupportedSchemeError, BlockedUrlResolvingToPrivateIpError, ExternalImageResponseBodyEmptyError, FailedToDownloadError, ImageSecurityError, InvalidExternalImageUrlError, InvalidInlineImageMalformedBase64Error, NoIpResolvedError, RedirectMissingLocationError, TimedOutDownloadingError, TooManyRedirectsError, UnableToResolveHostError, UnexpectedRedirectStateError };