High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(web): manual face tagging and deletion (#16062)
Alex007eaaceb9b8
diff --git a/i18n/en.json b/i18n/en.jsonindex b6f75ce4f1..5d747de774 100644--- a/i18n/en.json+++ b/i18n/en.json@@ -1,5 +1,9 @@{+ "delete_face": "Delete face",+ "tag_people": "Tag People",+ "error_delete_face": "Error deleting face from asset","search_by_description_example": "Hiking day in Sapa",+ "confirm_delete_face": "Are you sure you want to delete {name} face from the asset?","search_by_description": "Search by description","about": "About","account": "Account",diff --git a/mobile/openapi/README.md b/mobile/openapi/README.mdindex e86ac93350..80d85bac9a 100644--- a/mobile/openapi/README.md+++ b/mobile/openapi/README.md@@ -118,6 +118,8 @@ Class | Method | HTTP request | Description*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive |*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info |*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates |+*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces |+*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} |*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces |*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} |*FileReportsApi* | [**fixAuditFiles**](doc//FileReportsApi.md#fixauditfiles) | **POST** /reports/fix |@@ -278,6 +280,8 @@ Class | Method | HTTP request | Description- [AssetBulkUploadCheckResult](doc//AssetBulkUploadCheckResult.md)- [AssetDeltaSyncDto](doc//AssetDeltaSyncDto.md)- [AssetDeltaSyncResponseDto](doc//AssetDeltaSyncResponseDto.md)+ - [AssetFaceCreateDto](doc//AssetFaceCreateDto.md)+ - [AssetFaceDeleteDto](doc//AssetFaceDeleteDto.md)- [AssetFaceResponseDto](doc//AssetFaceResponseDto.md)- [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md)- [AssetFaceUpdateItem](doc//AssetFaceUpdateItem.md)diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dartindex e5794a2694..893587e7fc 100644--- a/mobile/openapi/lib/api.dart+++ b/mobile/openapi/lib/api.dart@@ -87,6 +87,8 @@ part 'model/asset_bulk_upload_check_response_dto.dart';part 'model/asset_bulk_upload_check_result.dart';part 'model/asset_delta_sync_dto.dart';part 'model/asset_delta_sync_response_dto.dart';+part 'model/asset_face_create_dto.dart';+part 'model/asset_face_delete_dto.dart';part 'model/asset_face_response_dto.dart';part 'model/asset_face_update_dto.dart';part 'model/asset_face_update_item.dart';diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dartindex addda0a7a3..e92ee93e42 100644--- a/mobile/openapi/lib/api/faces_api.dart+++ b/mobile/openapi/lib/api/faces_api.dart@@ -16,6 +16,89 @@ class FacesApi {final ApiClient apiClient;+ /// Performs an HTTP 'POST /faces' operation and returns the [Response].+ /// Parameters:+ ///+ /// * [AssetFaceCreateDto] assetFaceCreateDto (required):+ Future<Response> createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto,) async {+ // ignore: prefer_const_declarations+ final path = r'/faces';++ // ignore: prefer_final_locals+ Object? postBody = assetFaceCreateDto;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>['application/json'];+++ return apiClient.invokeAPI(+ path,+ 'POST',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ /// Parameters:+ ///+ /// * [AssetFaceCreateDto] assetFaceCreateDto (required):+ Future<void> createFace(AssetFaceCreateDto assetFaceCreateDto,) async {+ final response = await createFaceWithHttpInfo(assetFaceCreateDto,);+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ }++ /// Performs an HTTP 'DELETE /faces/{id}' operation and returns the [Response].+ /// Parameters:+ ///+ /// * [String] id (required):+ ///+ /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required):+ Future<Response> deleteFaceWithHttpInfo(String id, AssetFaceDeleteDto assetFaceDeleteDto,) async {+ // ignore: prefer_const_declarations+ final path = r'/faces/{id}'+ .replaceAll('{id}', id);++ // ignore: prefer_final_locals+ Object? postBody = assetFaceDeleteDto;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>['application/json'];+++ return apiClient.invokeAPI(+ path,+ 'DELETE',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ /// Parameters:+ ///+ /// * [String] id (required):+ ///+ /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required):+ Future<void> deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto,) async {+ final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto,);+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ }+/// Performs an HTTP 'GET /faces' operation and returns the [Response]./// Parameters:///diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dartindex 54a8959f6a..7c2dc53455 100644--- a/mobile/openapi/lib/api_client.dart+++ b/mobile/openapi/lib/api_client.dart@@ -230,6 +230,10 @@ class ApiClient {return AssetDeltaSyncDto.fromJson(value);case 'AssetDeltaSyncResponseDto':return AssetDeltaSyncResponseDto.fromJson(value);+ case 'AssetFaceCreateDto':+ return AssetFaceCreateDto.fromJson(value);+ case 'AssetFaceDeleteDto':+ return AssetFaceDeleteDto.fromJson(value);case 'AssetFaceResponseDto':return AssetFaceResponseDto.fromJson(value);case 'AssetFaceUpdateDto':diff --git a/mobile/openapi/lib/model/asset_face_create_dto.dart b/mobile/openapi/lib/model/asset_face_create_dto.dartnew file mode 100644index 0000000000..29e8244a96--- /dev/null+++ b/mobile/openapi/lib/model/asset_face_create_dto.dart@@ -0,0 +1,155 @@+//+// AUTO-GENERATED FILE, DO NOT MODIFY!+//+// @dart=2.18++// ignore_for_file: unused_element, unused_import+// ignore_for_file: always_put_required_named_parameters_first+// ignore_for_file: constant_identifier_names+// ignore_for_file: lines_longer_than_80_chars++part of openapi.api;++class AssetFaceCreateDto {+ /// Returns a new [AssetFaceCreateDto] instance.+ AssetFaceCreateDto({+ required this.assetId,+ required this.height,+ required this.imageHeight,+ required this.imageWidth,+ required this.personId,+ required this.width,+ required this.x,+ required this.y,+ });++ String assetId;++ int height;++ int imageHeight;++ int imageWidth;++ String personId;++ int width;++ int x;++ int y;++ @override+ bool operator ==(Object other) => identical(this, other) || other is AssetFaceCreateDto &&+ other.assetId == assetId &&+ other.height == height &&+ other.imageHeight == imageHeight &&+ other.imageWidth == imageWidth &&+ other.personId == personId &&+ other.width == width &&+ other.x == x &&+ other.y == y;++ @override+ int get hashCode =>+ // ignore: unnecessary_parenthesis+ (assetId.hashCode) ++ (height.hashCode) ++ (imageHeight.hashCode) ++ (imageWidth.hashCode) ++ (personId.hashCode) ++ (width.hashCode) ++ (x.hashCode) ++ (y.hashCode);++ @override+ String toString() => 'AssetFaceCreateDto[assetId=$assetId, height=$height, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, width=$width, x=$x, y=$y]';++ Map<String, dynamic> toJson() {+ final json = <String, dynamic>{};+ json[r'assetId'] = this.assetId;+ json[r'height'] = this.height;+ json[r'imageHeight'] = this.imageHeight;+ json[r'imageWidth'] = this.imageWidth;+ json[r'personId'] = this.personId;+ json[r'width'] = this.width;+ json[r'x'] = this.x;+ json[r'y'] = this.y;+ return json;+ }++ /// Returns a new [AssetFaceCreateDto] instance and imports its values from+ /// [value] if it's a [Map], null otherwise.+ // ignore: prefer_constructors_over_static_methods+ static AssetFaceCreateDto? fromJson(dynamic value) {+ upgradeDto(value, "AssetFaceCreateDto");+ if (value is Map) {+ final json = value.cast<String, dynamic>();++ return AssetFaceCreateDto(+ assetId: mapValueOfType<String>(json, r'assetId')!,+ height: mapValueOfType<int>(json, r'height')!,+ imageHeight: mapValueOfType<int>(json, r'imageHeight')!,+ imageWidth: mapValueOfType<int>(json, r'imageWidth')!,+ personId: mapValueOfType<String>(json, r'personId')!,+ width: mapValueOfType<int>(json, r'width')!,+ x: mapValueOfType<int>(json, r'x')!,+ y: mapValueOfType<int>(json, r'y')!,+ );+ }+ return null;+ }++ static List<AssetFaceCreateDto> listFromJson(dynamic json, {bool growable = false,}) {+ final result = <AssetFaceCreateDto>[];+ if (json is List && json.isNotEmpty) {+ for (final row in json) {+ final value = AssetFaceCreateDto.fromJson(row);+ if (value != null) {+ result.add(value);+ }+ }+ }+ return result.toList(growable: growable);+ }++ static Map<String, AssetFaceCreateDto> mapFromJson(dynamic json) {+ final map = <String, AssetFaceCreateDto>{};+ if (json is Map && json.isNotEmpty) {+ json = json.cast<String, dynamic>(); // ignore: parameter_assignments+ for (final entry in json.entries) {+ final value = AssetFaceCreateDto.fromJson(entry.value);+ if (value != null) {+ map[entry.key] = value;+ }+ }+ }+ return map;+ }++ // maps a json object with a list of AssetFaceCreateDto-objects as value to a dart map+ static Map<String, List<AssetFaceCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {+ final map = <String, List<AssetFaceCreateDto>>{};+ if (json is Map && json.isNotEmpty) {+ // ignore: parameter_assignments+ json = json.cast<String, dynamic>();+ for (final entry in json.entries) {+ map[entry.key] = AssetFaceCreateDto.listFromJson(entry.value, growable: growable,);+ }+ }+ return map;+ }++ /// The list of required keys that must be present in a JSON.+ static const requiredKeys = <String>{+ 'assetId',+ 'height',+ 'imageHeight',+ 'imageWidth',+ 'personId',+ 'width',+ 'x',+ 'y',+ };+}+diff --git a/mobile/openapi/lib/model/asset_face_delete_dto.dart b/mobile/openapi/lib/model/asset_face_delete_dto.dartnew file mode 100644index 0000000000..2e53b0699c--- /dev/null+++ b/mobile/openapi/lib/model/asset_face_delete_dto.dart@@ -0,0 +1,99 @@+//+// AUTO-GENERATED FILE, DO NOT MODIFY!+//+// @dart=2.18++// ignore_for_file: unused_element, unused_import+// ignore_for_file: always_put_required_named_parameters_first+// ignore_for_file: constant_identifier_names+// ignore_for_file: lines_longer_than_80_chars++part of openapi.api;++class AssetFaceDeleteDto {+ /// Returns a new [AssetFaceDeleteDto] instance.+ AssetFaceDeleteDto({+ required this.force,+ });++ bool force;++ @override+ bool operator ==(Object other) => identical(this, other) || other is AssetFaceDeleteDto &&+ other.force == force;++ @override+ int get hashCode =>+ // ignore: unnecessary_parenthesis+ (force.hashCode);++ @override+ String toString() => 'AssetFaceDeleteDto[force=$force]';++ Map<String, dynamic> toJson() {+ final json = <String, dynamic>{};+ json[r'force'] = this.force;+ return json;+ }++ /// Returns a new [AssetFaceDeleteDto] instance and imports its values from+ /// [value] if it's a [Map], null otherwise.+ // ignore: prefer_constructors_over_static_methods+ static AssetFaceDeleteDto? fromJson(dynamic value) {+ upgradeDto(value, "AssetFaceDeleteDto");+ if (value is Map) {+ final json = value.cast<String, dynamic>();++ return AssetFaceDeleteDto(+ force: mapValueOfType<bool>(json, r'force')!,+ );+ }+ return null;+ }++ static List<AssetFaceDeleteDto> listFromJson(dynamic json, {bool growable = false,}) {+ final result = <AssetFaceDeleteDto>[];+ if (json is List && json.isNotEmpty) {+ for (final row in json) {+ final value = AssetFaceDeleteDto.fromJson(row);+ if (value != null) {+ result.add(value);+ }+ }+ }+ return result.toList(growable: growable);+ }++ static Map<String, AssetFaceDeleteDto> mapFromJson(dynamic json) {+ final map = <String, AssetFaceDeleteDto>{};+ if (json is Map && json.isNotEmpty) {+ json = json.cast<String, dynamic>(); // ignore: parameter_assignments+ for (final entry in json.entries) {+ final value = AssetFaceDeleteDto.fromJson(entry.value);+ if (value != null) {+ map[entry.key] = value;+ }+ }+ }+ return map;+ }++ // maps a json object with a list of AssetFaceDeleteDto-objects as value to a dart map+ static Map<String, List<AssetFaceDeleteDto>> mapListFromJson(dynamic json, {bool growable = false,}) {+ final map = <String, List<AssetFaceDeleteDto>>{};+ if (json is Map && json.isNotEmpty) {+ // ignore: parameter_assignments+ json = json.cast<String, dynamic>();+ for (final entry in json.entries) {+ map[entry.key] = AssetFaceDeleteDto.listFromJson(entry.value, growable: growable,);+ }+ }+ return map;+ }++ /// The list of required keys that must be present in a JSON.+ static const requiredKeys = <String>{+ 'force',+ };+}+diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.jsonindex 1d0f065992..7417f98c2b 100644--- a/open-api/immich-openapi-specs.json+++ b/open-api/immich-openapi-specs.json@@ -2428,9 +2428,85 @@"tags": ["Faces"]+ },+ "post": {+ "operationId": "createFace",+ "parameters": [],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/AssetFaceCreateDto"+ }+ }+ },+ "required": true+ },+ "responses": {+ "201": {+ "description": ""+ }+ },+ "security": [+ {+ "bearer": []+ },+ {+ "cookie": []+ },+ {+ "api_key": []+ }+ ],+ "tags": [+ "Faces"+ ]}},"/faces/{id}": {+ "delete": {+ "operationId": "deleteFace",+ "parameters": [+ {+ "name": "id",+ "required": true,+ "in": "path",+ "schema": {+ "format": "uuid",+ "type": "string"+ }+ }+ ],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/AssetFaceDeleteDto"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": ""+ }+ },+ "security": [+ {+ "bearer": []+ },+ {+ "cookie": []+ },+ {+ "api_key": []+ }+ ],+ "tags": [+ "Faces"+ ]+ },"put": {"operationId": "reassignFacesById","parameters": [@@ -8172,6 +8248,58 @@],"type": "object"},+ "AssetFaceCreateDto": {+ "properties": {+ "assetId": {+ "format": "uuid",+ "type": "string"+ },+ "height": {+ "type": "integer"+ },+ "imageHeight": {+ "type": "integer"+ },+ "imageWidth": {+ "type": "integer"+ },+ "personId": {+ "format": "uuid",+ "type": "string"+ },+ "width": {+ "type": "integer"+ },+ "x": {+ "type": "integer"+ },+ "y": {+ "type": "integer"+ }+ },+ "required": [+ "assetId",+ "height",+ "imageHeight",+ "imageWidth",+ "personId",+ "width",+ "x",+ "y"+ ],+ "type": "object"+ },+ "AssetFaceDeleteDto": {+ "properties": {+ "force": {+ "type": "boolean"+ }+ },+ "required": [+ "force"+ ],+ "type": "object"+ },"AssetFaceResponseDto": {"properties": {"boundingBoxX1": {diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.tsindex 8b2e881830..6d7f3c17aa 100644--- a/open-api/typescript-sdk/src/fetch-client.ts+++ b/open-api/typescript-sdk/src/fetch-client.ts@@ -523,6 +523,19 @@ export type AssetFaceResponseDto = {person: (PersonResponseDto) | null;sourceType?: SourceType;};+export type AssetFaceCreateDto = {+ assetId: string;+ height: number;+ imageHeight: number;+ imageWidth: number;+ personId: string;+ width: number;+ x: number;+ y: number;+};+export type AssetFaceDeleteDto = {+ force: boolean;+};export type FaceDto = {id: string;};@@ -2029,6 +2042,25 @@ export function getFaces({ id }: {...opts}));}+export function createFace({ assetFaceCreateDto }: {+ assetFaceCreateDto: AssetFaceCreateDto;+}, opts?: Oazapfts.RequestOpts) {+ return oazapfts.ok(oazapfts.fetchText("/faces", oazapfts.json({+ ...opts,+ method: "POST",+ body: assetFaceCreateDto+ })));+}+export function deleteFace({ id, assetFaceDeleteDto }: {+ id: string;+ assetFaceDeleteDto: AssetFaceDeleteDto;+}, opts?: Oazapfts.RequestOpts) {+ return oazapfts.ok(oazapfts.fetchText(`/faces/${encodeURIComponent(id)}`, oazapfts.json({+ ...opts,+ method: "DELETE",+ body: assetFaceDeleteDto+ })));+}export function reassignFacesById({ id, faceDto }: {id: string;faceDto: FaceDto;diff --git a/server/src/controllers/face.controller.ts b/server/src/controllers/face.controller.tsindex 7d93bfd34d..d94cd532f7 100644--- a/server/src/controllers/face.controller.ts+++ b/server/src/controllers/face.controller.ts@@ -1,7 +1,13 @@-import { Body, Controller, Get, Param, Put, Query } from '@nestjs/common';+import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';import { ApiTags } from '@nestjs/swagger';import { AuthDto } from 'src/dtos/auth.dto';-import { AssetFaceResponseDto, FaceDto, PersonResponseDto } from 'src/dtos/person.dto';+import {+ AssetFaceCreateDto,+ AssetFaceDeleteDto,+ AssetFaceResponseDto,+ FaceDto,+ PersonResponseDto,+} from 'src/dtos/person.dto';import { Permission } from 'src/enum';import { Auth, Authenticated } from 'src/middleware/auth.guard';import { PersonService } from 'src/services/person.service';@@ -12,6 +18,12 @@ import { UUIDParamDto } from 'src/validation';export class FaceController {constructor(private service: PersonService) {}+ @Post()+ @Authenticated({ permission: Permission.FACE_CREATE })+ createFace(@Auth() auth: AuthDto, @Body() dto: AssetFaceCreateDto) {+ return this.service.createFace(auth, dto);+ }+@Get()@Authenticated({ permission: Permission.FACE_READ })getFaces(@Auth() auth: AuthDto, @Query() dto: FaceDto): Promise<AssetFaceResponseDto[]> {@@ -27,4 +39,10 @@ export class FaceController {): Promise<PersonResponseDto> {return this.service.reassignFacesById(auth, id, dto);}++ @Delete(':id')+ @Authenticated({ permission: Permission.FACE_DELETE })+ deleteFace(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @Body() dto: AssetFaceDeleteDto) {+ return this.service.deleteFace(auth, id, dto);+ }}diff --git a/server/src/db.d.ts b/server/src/db.d.tsindex 255ac8cd20..dfb451afa7 100644--- a/server/src/db.d.ts+++ b/server/src/db.d.ts@@ -88,6 +88,7 @@ export interface AssetFaces {boundingBoxX2: Generated<number>;boundingBoxY1: Generated<number>;boundingBoxY2: Generated<number>;+ deletedAt: Timestamp | null;id: Generated<string>;imageHeight: Generated<number>;imageWidth: Generated<number>;@@ -334,6 +335,11 @@ export interface SocketIoAttachments {payload: Buffer | null;}+export interface SystemConfig {+ key: string;+ value: string | null;+}+export interface SystemMetadata {key: string;value: Json;@@ -448,6 +454,7 @@ export interface DB {shared_links: SharedLinks;smart_search: SmartSearch;socket_io_attachments: SocketIoAttachments;+ system_config: SystemConfig;system_metadata: SystemMetadata;tag_asset: TagAsset;tags: Tags;diff --git a/server/src/dtos/person.dto.ts b/server/src/dtos/person.dto.tsindex ca705154a2..0778c35b8f 100644--- a/server/src/dtos/person.dto.ts+++ b/server/src/dtos/person.dto.ts@@ -1,6 +1,6 @@import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';import { Type } from 'class-transformer';-import { IsArray, IsInt, IsNotEmpty, IsString, Max, Min, ValidateNested } from 'class-validator';+import { IsArray, IsInt, IsNotEmpty, IsNumber, IsString, Max, Min, ValidateNested } from 'class-validator';import { DateTime } from 'luxon';import { PropertyLifecycle } from 'src/decorators';import { AuthDto } from 'src/dtos/auth.dto';@@ -164,6 +164,43 @@ export class AssetFaceUpdateItem {assetId!: string;}+export class AssetFaceCreateDto extends AssetFaceUpdateItem {+ @ApiProperty({ type: 'integer' })+ @IsNotEmpty()+ @IsNumber()+ imageWidth!: number;++ @ApiProperty({ type: 'integer' })+ @IsNotEmpty()+ @IsNumber()+ imageHeight!: number;++ @ApiProperty({ type: 'integer' })+ @IsNotEmpty()+ @IsNumber()+ x!: number;++ @ApiProperty({ type: 'integer' })+ @IsNotEmpty()+ @IsNumber()+ y!: number;++ @ApiProperty({ type: 'integer' })+ @IsNotEmpty()+ @IsNumber()+ width!: number;++ @ApiProperty({ type: 'integer' })+ @IsNotEmpty()+ @IsNumber()+ height!: number;+}++export class AssetFaceDeleteDto {+ @IsNotEmpty()+ force!: boolean;+}+export class PersonStatisticsResponseDto {@ApiProperty({ type: 'integer' })assets!: number;diff --git a/server/src/entities/asset-face.entity.ts b/server/src/entities/asset-face.entity.tsindex 3a4e916cba..b556a8b7cf 100644--- a/server/src/entities/asset-face.entity.ts+++ b/server/src/entities/asset-face.entity.ts@@ -50,4 +50,7 @@ export class AssetFaceEntity {nullable: true,})person!: PersonEntity | null;++ @Column({ type: 'timestamptz' })+ deletedAt!: Date | null;}diff --git a/server/src/entities/asset.entity.ts b/server/src/entities/asset.entity.tsindex fd69673eb5..a325febce7 100644--- a/server/src/entities/asset.entity.ts+++ b/server/src/entities/asset.entity.ts@@ -202,10 +202,14 @@ export function withSmartSearch<O>(qb: SelectQueryBuilder<DB, 'assets', O>) {.select((eb) => eb.fn.toJson(eb.table('smart_search')).as('smartSearch'));}-export function withFaces(eb: ExpressionBuilder<DB, 'assets'>) {- return jsonArrayFrom(eb.selectFrom('asset_faces').selectAll().whereRef('asset_faces.assetId', '=', 'assets.id')).as(- 'faces',- );+export function withFaces(eb: ExpressionBuilder<DB, 'assets'>, withDeletedFace?: boolean) {+ return jsonArrayFrom(+ eb+ .selectFrom('asset_faces')+ .selectAll()+ .whereRef('asset_faces.assetId', '=', 'assets.id')+ .$if(!withDeletedFace, (qb) => qb.where('asset_faces.deletedAt', 'is', null)),+ ).as('faces');}export function withFiles(eb: ExpressionBuilder<DB, 'assets'>, type?: AssetFileType) {@@ -218,11 +222,12 @@ export function withFiles(eb: ExpressionBuilder<DB, 'assets'>, type?: AssetFileT).as('files');}-export function withFacesAndPeople(eb: ExpressionBuilder<DB, 'assets'>) {+export function withFacesAndPeople(eb: ExpressionBuilder<DB, 'assets'>, withDeletedFace?: boolean) {return eb.selectFrom('asset_faces').leftJoin('person', 'person.id', 'asset_faces.personId').whereRef('asset_faces.assetId', '=', 'assets.id')+ .$if(!withDeletedFace, (qb) => qb.where('asset_faces.deletedAt', 'is', null)).select((eb) =>eb.fn('jsonb_agg', [diff --git a/server/src/migrations/1739466714036-AddDeletedAtColumnToAssetFacesTable.ts b/server/src/migrations/1739466714036-AddDeletedAtColumnToAssetFacesTable.tsnew file mode 100644index 0000000000..e6f18e2618--- /dev/null+++ b/server/src/migrations/1739466714036-AddDeletedAtColumnToAssetFacesTable.ts@@ -0,0 +1,17 @@+import { MigrationInterface, QueryRunner } from 'typeorm';++export class AddDeletedAtColumnToAssetFacesTable1739466714036 implements MigrationInterface {+ public async up(queryRunner: QueryRunner): Promise<void> {+ await queryRunner.query(`+ ALTER TABLE asset_faces+ ADD COLUMN "deletedAt" TIMESTAMP WITH TIME ZONE DEFAULT NULL+ `);+ }++ public async down(queryRunner: QueryRunner): Promise<void> {+ await queryRunner.query(`+ ALTER TABLE asset_faces+ DROP COLUMN "deletedAt"+ `);+ }+}diff --git a/server/src/queries/asset.repository.sql b/server/src/queries/asset.repository.sqlindex 3efc560b3b..879152dc77 100644--- a/server/src/queries/asset.repository.sql+++ b/server/src/queries/asset.repository.sql@@ -96,6 +96,7 @@ selectleft join "person" on "person"."id" = "asset_faces"."personId"where"asset_faces"."assetId" = "assets"."id"+ and "asset_faces"."deletedAt" is null) as "faces",(selectdiff --git a/server/src/queries/person.repository.sql b/server/src/queries/person.repository.sqlindex 069d965202..e6868ae302 100644--- a/server/src/queries/person.repository.sql+++ b/server/src/queries/person.repository.sql@@ -42,6 +42,8 @@ selectfrom"person"left join "asset_faces" on "asset_faces"."personId" = "person"."id"+where+ "asset_faces"."deletedAt" is nullgroup by"person"."id"having@@ -67,6 +69,7 @@ from"asset_faces"where"asset_faces"."assetId" = $1+ and "asset_faces"."deletedAt" is nullorder by"asset_faces"."boundingBoxX1" asc@@ -90,6 +93,7 @@ from"asset_faces"where"asset_faces"."id" = $1+ and "asset_faces"."deletedAt" is null-- PersonRepository.getFaceByIdWithAssetsselect@@ -124,6 +128,7 @@ from"asset_faces"where"asset_faces"."id" = $1+ and "asset_faces"."deletedAt" is null-- PersonRepository.reassignFaceupdate "asset_faces"@@ -169,6 +174,8 @@ fromand "asset_faces"."personId" = $1and "assets"."isArchived" = $2and "assets"."deletedAt" is null+where+ "asset_faces"."deletedAt" is null-- PersonRepository.getNumberOfPeopleselect@@ -185,6 +192,7 @@ fromand "assets"."isArchived" = $2where"person"."ownerId" = $3+ and "asset_faces"."deletedAt" is null-- PersonRepository.refreshFaceswith@@ -235,6 +243,7 @@ fromwhere"asset_faces"."assetId" in ($1)and "asset_faces"."personId" in ($2)+ and "asset_faces"."deletedAt" is null-- PersonRepository.getRandomFaceselect@@ -243,9 +252,22 @@ from"asset_faces"where"asset_faces"."personId" = $1+ and "asset_faces"."deletedAt" is null-- PersonRepository.getLatestFaceDateselectmax("asset_job_status"."facesRecognizedAt")::text as "latestDate"from"asset_job_status"++-- PersonRepository.deleteAssetFace+delete from "asset_faces"+where+ "asset_faces"."id" = $1++-- PersonRepository.softDeleteAssetFaces+update "asset_faces"+set+ "deletedAt" = $1+where+ "asset_faces"."id" = $2diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.tsindex e2851ef623..139e652f03 100644--- a/server/src/repositories/asset.repository.ts+++ b/server/src/repositories/asset.repository.ts@@ -132,7 +132,7 @@ export type AssetPathEntity = Pick<AssetEntity, 'id' | 'originalPath' | 'isOffliexport interface GetByIdsRelations {exifInfo?: boolean;- faces?: { person?: boolean };+ faces?: { person?: boolean; withDeleted?: boolean };files?: boolean;library?: boolean;owner?: boolean;@@ -262,7 +262,11 @@ export class AssetRepository {.selectAll('assets').where('assets.id', '=', anyUuid(ids)).$if(!!exifInfo, withExif)- .$if(!!faces, (qb) => qb.select(faces?.person ? withFacesAndPeople : withFaces))+ .$if(!!faces, (qb) =>+ qb.select((eb) =>+ faces?.person ? withFacesAndPeople(eb, faces.withDeleted) : withFaces(eb, faces?.withDeleted),+ ),+ ).$if(!!files, (qb) => qb.select(withFiles)).$if(!!library, (qb) => qb.select(withLibrary)).$if(!!owner, (qb) => qb.select(withOwner))diff --git a/server/src/repositories/person.repository.ts b/server/src/repositories/person.repository.tsindex 751f9138e6..2ac2a59cf1 100644--- a/server/src/repositories/person.repository.ts+++ b/server/src/repositories/person.repository.ts@@ -130,6 +130,7 @@ export class PersonRepository {.$if(!!options.personId, (qb) => qb.where('asset_faces.personId', '=', options.personId!)).$if(!!options.sourceType, (qb) => qb.where('asset_faces.sourceType', '=', options.sourceType!)).$if(!!options.assetId, (qb) => qb.where('asset_faces.assetId', '=', options.assetId!))+ .where('asset_faces.deletedAt', 'is', null).stream() as AsyncIterableIterator<AssetFaceEntity>;}@@ -161,6 +162,7 @@ export class PersonRepository {.on('assets.deletedAt', 'is', null),).where('person.ownerId', '=', userId)+ .where('asset_faces.deletedAt', 'is', null).orderBy('person.isHidden', 'asc').orderBy('person.isFavorite', 'desc').having((eb) =>@@ -212,6 +214,7 @@ export class PersonRepository {.selectFrom('person').selectAll('person').leftJoin('asset_faces', 'asset_faces.personId', 'person.id')+ .where('asset_faces.deletedAt', 'is', null).having((eb) => eb.fn.count('asset_faces.assetId'), '=', 0).groupBy('person.id').execute() as Promise<PersonEntity[]>;@@ -224,6 +227,7 @@ export class PersonRepository {.selectAll('asset_faces').select(withPerson).where('asset_faces.assetId', '=', assetId)+ .where('asset_faces.deletedAt', 'is', null).orderBy('asset_faces.boundingBoxX1', 'asc').execute() as Promise<AssetFaceEntity[]>;}@@ -236,6 +240,7 @@ export class PersonRepository {.selectAll('asset_faces').select(withPerson).where('asset_faces.id', '=', id)+ .where('asset_faces.deletedAt', 'is', null).executeTakeFirstOrThrow() as Promise<AssetFaceEntity>;}@@ -253,6 +258,7 @@ export class PersonRepository {.select(withAsset).$if(!!relations?.faceSearch, (qb) => qb.select(withFaceSearch)).where('asset_faces.id', '=', id)+ .where('asset_faces.deletedAt', 'is', null).executeTakeFirst() as Promise<AssetFaceEntity | undefined>;}@@ -317,6 +323,7 @@ export class PersonRepository {.on('assets.deletedAt', 'is', null),).select((eb) => eb.fn.count(eb.fn('distinct', ['assets.id'])).as('count'))+ .where('asset_faces.deletedAt', 'is', null).executeTakeFirst();return {@@ -330,6 +337,7 @@ export class PersonRepository {.selectFrom('person').innerJoin('asset_faces', 'asset_faces.personId', 'person.id').where('person.ownerId', '=', userId)+ .where('asset_faces.deletedAt', 'is', null).innerJoin('assets', (join) =>join.onRef('assets.id', '=', 'asset_faces.assetId')@@ -434,6 +442,7 @@ export class PersonRepository {.select(withPerson).where('asset_faces.assetId', 'in', assetIds).where('asset_faces.personId', 'in', personIds)+ .where('asset_faces.deletedAt', 'is', null).execute() as Promise<AssetFaceEntity[]>;}@@ -443,6 +452,7 @@ export class PersonRepository {.selectFrom('asset_faces').selectAll('asset_faces').where('asset_faces.personId', '=', personId)+ .where('asset_faces.deletedAt', 'is', null).executeTakeFirst() as Promise<AssetFaceEntity | undefined>;}@@ -456,6 +466,20 @@ export class PersonRepository {return result?.latestDate;}+ async createAssetFace(face: Insertable<AssetFaces>): Promise<void> {+ await this.db.insertInto('asset_faces').values(face).execute();+ }++ @GenerateSql({ params: [DummyValue.UUID] })+ async deleteAssetFace(id: string): Promise<void> {+ await this.db.deleteFrom('asset_faces').where('asset_faces.id', '=', id).execute();+ }++ @GenerateSql({ params: [DummyValue.UUID] })+ async softDeleteAssetFaces(id: string): Promise<void> {+ await this.db.updateTable('asset_faces').set({ deletedAt: new Date() }).where('asset_faces.id', '=', id).execute();+ }+private async vacuum({ reindexVectors }: { reindexVectors: boolean }): Promise<void> {await sql`VACUUM ANALYZE asset_faces, face_search, person`.execute(this.db);await sql`REINDEX TABLE asset_faces`.execute(this.db);diff --git a/server/src/services/person.service.ts b/server/src/services/person.service.tsindex ecb8677f71..dd998cc0fe 100644--- a/server/src/services/person.service.ts+++ b/server/src/services/person.service.ts@@ -5,9 +5,13 @@ import { OnJob } from 'src/decorators';import { BulkIdErrorReason, BulkIdResponseDto } from 'src/dtos/asset-ids.response.dto';import { AuthDto } from 'src/dtos/auth.dto';import {+ AssetFaceCreateDto,+ AssetFaceDeleteDto,AssetFaceResponseDto,AssetFaceUpdateDto,FaceDto,+ mapFaces,+ mapPerson,MergePersonDto,PeopleResponseDto,PeopleUpdateDto,@@ -16,8 +20,6 @@ import {PersonSearchDto,PersonStatisticsResponseDto,PersonUpdateDto,- mapFaces,- mapPerson,} from 'src/dtos/person.dto';import { AssetFaceEntity } from 'src/entities/asset-face.entity';import { AssetEntity } from 'src/entities/asset.entity';@@ -295,7 +297,7 @@ export class PersonService extends BaseService {return JobStatus.SKIPPED;}- const relations = { exifInfo: true, faces: { person: false }, files: true };+ const relations = { exifInfo: true, faces: { person: false, withDeleted: true }, files: true };const [asset] = await this.assetRepository.getByIds([id], relations);const { previewFile } = getAssetFiles(asset.files);if (!asset || !previewFile) {@@ -717,4 +719,29 @@ export class PersonService extends BaseService {height: newHalfSize * 2,};}++ // TODO return a asset face response+ async createFace(auth: AuthDto, dto: AssetFaceCreateDto): Promise<void> {+ await Promise.all([+ this.requireAccess({ auth, permission: Permission.ASSET_READ, ids: [dto.assetId] }),+ this.requireAccess({ auth, permission: Permission.PERSON_READ, ids: [dto.personId] }),+ ]);++ await this.personRepository.createAssetFace({+ personId: dto.personId,+ assetId: dto.assetId,+ imageHeight: dto.imageHeight,+ imageWidth: dto.imageWidth,+ boundingBoxX1: dto.x,+ boundingBoxX2: dto.x + dto.width,+ boundingBoxY1: dto.y,+ boundingBoxY2: dto.y + dto.height,+ });+ }++ async deleteFace(auth: AuthDto, id: string, dto: AssetFaceDeleteDto): Promise<void> {+ await this.requireAccess({ auth, permission: Permission.FACE_DELETE, ids: [id] });++ return dto.force ? this.personRepository.deleteAssetFace(id) : this.personRepository.softDeleteAssetFaces(id);+ }}diff --git a/server/src/utils/access.ts b/server/src/utils/access.tsindex 466d8851e6..e88c8e1a63 100644--- a/server/src/utils/access.ts+++ b/server/src/utils/access.ts@@ -217,6 +217,10 @@ const checkOtherAccess = async (access: AccessRepository, request: OtherAccessRereturn await access.authDevice.checkOwnerAccess(auth.user.id, ids);}+ case Permission.FACE_DELETE: {+ return access.person.checkFaceOwnerAccess(auth.user.id, ids);+ }+case Permission.TAG_ASSET:case Permission.TAG_READ:case Permission.TAG_UPDATE:diff --git a/server/test/fixtures/face.stub.ts b/server/test/fixtures/face.stub.tsindex 4da4e6a0c4..74a59a85a8 100644--- a/server/test/fixtures/face.stub.ts+++ b/server/test/fixtures/face.stub.ts@@ -20,8 +20,9 @@ export const faceStub = {imageWidth: 1024,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId1', embedding: '[1, 2, 3, 4]' },+ deletedAt: new Date(),}),- primaryFace1: Object.freeze<NonNullableProperty<AssetFaceEntity>>({+ primaryFace1: Object.freeze<AssetFaceEntity>({id: 'assetFaceId2',assetId: assetStub.image.id,asset: assetStub.image,@@ -35,8 +36,9 @@ export const faceStub = {imageWidth: 1024,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId2', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),- mergeFace1: Object.freeze<NonNullableProperty<AssetFaceEntity>>({+ mergeFace1: Object.freeze<AssetFaceEntity>({id: 'assetFaceId3',assetId: assetStub.image.id,asset: assetStub.image,@@ -50,8 +52,9 @@ export const faceStub = {imageWidth: 1024,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId3', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),- start: Object.freeze<NonNullableProperty<AssetFaceEntity>>({+ start: Object.freeze<AssetFaceEntity>({id: 'assetFaceId5',assetId: assetStub.image.id,asset: assetStub.image,@@ -65,8 +68,9 @@ export const faceStub = {imageWidth: 2160,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId5', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),- middle: Object.freeze<NonNullableProperty<AssetFaceEntity>>({+ middle: Object.freeze<AssetFaceEntity>({id: 'assetFaceId6',assetId: assetStub.image.id,asset: assetStub.image,@@ -80,8 +84,9 @@ export const faceStub = {imageWidth: 400,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId6', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),- end: Object.freeze<NonNullableProperty<AssetFaceEntity>>({+ end: Object.freeze<AssetFaceEntity>({id: 'assetFaceId7',assetId: assetStub.image.id,asset: assetStub.image,@@ -95,6 +100,7 @@ export const faceStub = {imageWidth: 500,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId7', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),noPerson1: Object.freeze<AssetFaceEntity>({id: 'assetFaceId8',@@ -110,6 +116,7 @@ export const faceStub = {imageWidth: 1024,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId8', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),noPerson2: Object.freeze<AssetFaceEntity>({id: 'assetFaceId9',@@ -125,6 +132,7 @@ export const faceStub = {imageWidth: 1024,sourceType: SourceType.MACHINE_LEARNING,faceSearch: { faceId: 'assetFaceId9', embedding: '[1, 2, 3, 4]' },+ deletedAt: null,}),fromExif1: Object.freeze<AssetFaceEntity>({id: 'assetFaceId9',@@ -139,6 +147,7 @@ export const faceStub = {imageHeight: 500,imageWidth: 400,sourceType: SourceType.EXIF,+ deletedAt: null,}),fromExif2: Object.freeze<AssetFaceEntity>({id: 'assetFaceId9',@@ -153,5 +162,6 @@ export const faceStub = {imageHeight: 1024,imageWidth: 1024,sourceType: SourceType.EXIF,+ deletedAt: null,}),};diff --git a/server/test/repositories/person.repository.mock.ts b/server/test/repositories/person.repository.mock.tsindex 52240aafa2..c8a4253edc 100644--- a/server/test/repositories/person.repository.mock.ts+++ b/server/test/repositories/person.repository.mock.ts@@ -33,5 +33,9 @@ export const newPersonRepositoryMock = (): Mocked<RepositoryInterface<PersonRepogetFaceByIdWithAssets: vitest.fn(),getNumberOfPeople: vitest.fn(),getLatestFaceDate: vitest.fn(),++ createAssetFace: vitest.fn(),+ deleteAssetFace: vitest.fn(),+ softDeleteAssetFaces: vitest.fn(),};};diff --git a/web/package-lock.json b/web/package-lock.jsonindex e97731061e..ba8e71d679 100644--- a/web/package-lock.json+++ b/web/package-lock.json@@ -22,6 +22,7 @@"@photo-sphere-viewer/video-plugin": "^5.11.5","@zoom-image/svelte": "^0.3.0","dom-to-image": "^2.6.0",+ "fabric": "^6.5.4","handlebars": "^4.7.8","intl-messageformat": "^10.7.11","lodash-es": "^4.17.21",@@ -82,7 +83,7 @@"@oazapfts/runtime": "^1.0.2"},"devDependencies": {- "@types/node": "^22.13.2",+ "@types/node": "^22.13.4","typescript": "^5.3.3"}},@@ -1561,6 +1562,80 @@"mapbox-gl": ">=0.32.1 <2.0.0"}},+ "node_modules/@mapbox/node-pre-gyp": {+ "version": "1.0.11",+ "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",+ "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",+ "license": "BSD-3-Clause",+ "optional": true,+ "dependencies": {+ "detect-libc": "^2.0.0",+ "https-proxy-agent": "^5.0.0",+ "make-dir": "^3.1.0",+ "node-fetch": "^2.6.7",+ "nopt": "^5.0.0",+ "npmlog": "^5.0.1",+ "rimraf": "^3.0.2",+ "semver": "^7.3.5",+ "tar": "^6.1.11"+ },+ "bin": {+ "node-pre-gyp": "bin/node-pre-gyp"+ }+ },+ "node_modules/@mapbox/node-pre-gyp/node_modules/agent-base": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "debug": "4"+ },+ "engines": {+ "node": ">= 6.0.0"+ }+ },+ "node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "agent-base": "6",+ "debug": "4"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "semver": "^6.0.0"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "license": "ISC",+ "optional": true,+ "bin": {+ "semver": "bin/semver.js"+ }+ },"node_modules/@mapbox/point-geometry": {"version": "0.1.0","resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz",@@ -2375,6 +2450,16 @@"@testing-library/dom": ">=7.21.4"}},+ "node_modules/@tootallnate/once": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",+ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">= 10"+ }+ },"node_modules/@types/aria-query": {"version": "5.0.2","resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.2.tgz",@@ -2902,6 +2987,21 @@"svelte": "^3.0.0 || ^4.0.0 || ^5.0.0"}},+ "node_modules/abab": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",+ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==",+ "deprecated": "Use your platform's native atob() and btoa() methods instead",+ "license": "BSD-3-Clause",+ "optional": true+ },+ "node_modules/abbrev": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",+ "license": "ISC",+ "optional": true+ },"node_modules/acorn": {"version": "8.14.0","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",@@ -2914,6 +3014,17 @@"node": ">=0.4.0"}},+ "node_modules/acorn-globals": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz",+ "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "acorn": "^8.1.0",+ "acorn-walk": "^8.0.2"+ }+ },"node_modules/acorn-jsx": {"version": "5.3.2","resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",@@ -2932,6 +3043,19 @@"acorn": ">=8.9.0"}},+ "node_modules/acorn-walk": {+ "version": "8.3.4",+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",+ "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "acorn": "^8.11.0"+ },+ "engines": {+ "node": ">=0.4.0"+ }+ },"node_modules/agent-base": {"version": "7.1.0","resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz",@@ -2999,6 +3123,28 @@"node": ">= 8"}},+ "node_modules/aproba": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",+ "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",+ "license": "ISC",+ "optional": true+ },+ "node_modules/are-we-there-yet": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",+ "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",+ "deprecated": "This package is no longer supported.",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "delegates": "^1.0.0",+ "readable-stream": "^3.6.0"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/arg": {"version": "5.0.2","resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",@@ -3049,9 +3195,7 @@"version": "0.4.0","resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz","integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/autoprefixer": {"version": "10.4.20",@@ -3141,7 +3285,7 @@"version": "1.1.11","resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz","integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",- "dev": true,+ "devOptional": true,"dependencies": {"balanced-match": "^1.0.0","concat-map": "0.0.1"@@ -3275,6 +3419,22 @@],"license": "CC-BY-4.0"},+ "node_modules/canvas": {+ "version": "2.11.2",+ "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz",+ "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@mapbox/node-pre-gyp": "^1.0.0",+ "nan": "^2.17.0",+ "simple-get": "^3.0.3"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/chai": {"version": "5.1.2","resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz",@@ -3351,6 +3511,16 @@"node": ">= 6"}},+ "node_modules/chownr": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",+ "license": "ISC",+ "optional": true,+ "engines": {+ "node": ">=10"+ }+ },"node_modules/ci-info": {"version": "4.0.0","resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz",@@ -3468,6 +3638,16 @@"simple-swizzle": "^0.2.2"}},+ "node_modules/color-support": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",+ "license": "ISC",+ "optional": true,+ "bin": {+ "color-support": "bin.js"+ }+ },"node_modules/color/node_modules/color-convert": {"version": "2.0.1","resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",@@ -3490,9 +3670,7 @@"version": "1.0.8","resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz","integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"delayed-stream": "~1.0.0"},@@ -3512,7 +3690,14 @@"version": "0.0.1","resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz","integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",- "dev": true+ "devOptional": true+ },+ "node_modules/console-control-strings": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",+ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",+ "license": "ISC",+ "optional": true},"node_modules/cookie": {"version": "0.6.0",@@ -3575,6 +3760,13 @@"node": ">=4"}},+ "node_modules/cssom": {+ "version": "0.5.0",+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz",+ "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==",+ "license": "MIT",+ "optional": true+ },"node_modules/cssstyle": {"version": "3.0.0","resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz",@@ -3660,6 +3852,19 @@"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz","integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="},+ "node_modules/decompress-response": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",+ "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "mimic-response": "^2.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/deep-eql": {"version": "5.0.2","resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",@@ -3697,13 +3902,18 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz","integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",- "dev": true,"optional": true,- "peer": true,"engines": {"node": ">=0.4.0"}},+ "node_modules/delegates": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",+ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",+ "license": "MIT",+ "optional": true+ },"node_modules/dequal": {"version": "2.0.3","resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",@@ -3716,7 +3926,7 @@"version": "2.0.3","resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz","integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",- "dev": true,+ "devOptional": true,"engines": {"node": ">=8"}@@ -3749,6 +3959,20 @@"resolved": "https://registry.npmjs.org/dom-to-image/-/dom-to-image-2.6.0.tgz","integrity": "sha512-Dt0QdaHmLpjURjU7Tnu3AgYSF2LuOmksSGsUcE6ItvJoCWTBEmiMXcqBdNSAm9+QbbwD7JMoVsuuKX6ZVQv1qA=="},+ "node_modules/domexception": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz",+ "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",+ "deprecated": "Use your platform's native DOMException instead",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "webidl-conversions": "^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },"node_modules/dotenv": {"version": "16.4.7","resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",@@ -3810,9 +4034,7 @@"version": "4.5.0","resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz","integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",- "dev": true,"optional": true,- "peer": true,"engines": {"node": ">=0.12"},@@ -3944,6 +4166,28 @@"node": ">=0.8.0"}},+ "node_modules/escodegen": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",+ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",+ "license": "BSD-2-Clause",+ "optional": true,+ "dependencies": {+ "esprima": "^4.0.1",+ "estraverse": "^5.2.0",+ "esutils": "^2.0.2"+ },+ "bin": {+ "escodegen": "bin/escodegen.js",+ "esgenerate": "bin/esgenerate.js"+ },+ "engines": {+ "node": ">=6.0"+ },+ "optionalDependencies": {+ "source-map": "~0.6.1"+ }+ },"node_modules/eslint": {"version": "9.20.1","resolved": "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz",@@ -4344,6 +4588,20 @@"url": "https://opencollective.com/eslint"}},+ "node_modules/esprima": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",+ "license": "BSD-2-Clause",+ "optional": true,+ "bin": {+ "esparse": "bin/esparse.js",+ "esvalidate": "bin/esvalidate.js"+ },+ "engines": {+ "node": ">=4"+ }+ },"node_modules/esquery": {"version": "1.6.0","resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",@@ -4382,7 +4640,7 @@"version": "5.3.0","resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz","integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",- "dev": true,+ "devOptional": true,"engines": {"node": ">=4.0"}@@ -4401,7 +4659,7 @@"version": "2.0.3","resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz","integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",- "dev": true,+ "devOptional": true,"engines": {"node": ">=0.10.0"}@@ -4444,6 +4702,228 @@"node": ">=0.10.0"}},+ "node_modules/fabric": {+ "version": "6.5.4",+ "resolved": "https://registry.npmjs.org/fabric/-/fabric-6.5.4.tgz",+ "integrity": "sha512-X+O8G+3aDQSp3lxRekvIy/gMwtzcjAG7IvGXjb4PeUD6+nUJfSfGnaEWpni9aAcXuGz8zXhpMQQELV+4FfRTwA==",+ "license": "MIT",+ "engines": {+ "node": ">=16.20.0"+ },+ "optionalDependencies": {+ "canvas": "^2.11.2",+ "jsdom": "^20.0.1"+ }+ },+ "node_modules/fabric/node_modules/agent-base": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "debug": "4"+ },+ "engines": {+ "node": ">= 6.0.0"+ }+ },+ "node_modules/fabric/node_modules/cssstyle": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",+ "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "cssom": "~0.3.6"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/fabric/node_modules/cssstyle/node_modules/cssom": {+ "version": "0.3.8",+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",+ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==",+ "license": "MIT",+ "optional": true+ },+ "node_modules/fabric/node_modules/data-urls": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz",+ "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "abab": "^2.0.6",+ "whatwg-mimetype": "^3.0.0",+ "whatwg-url": "^11.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/fabric/node_modules/html-encoding-sniffer": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",+ "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "whatwg-encoding": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/fabric/node_modules/http-proxy-agent": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@tootallnate/once": "2",+ "agent-base": "6",+ "debug": "4"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/fabric/node_modules/https-proxy-agent": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "agent-base": "6",+ "debug": "4"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/fabric/node_modules/jsdom": {+ "version": "20.0.3",+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz",+ "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "abab": "^2.0.6",+ "acorn": "^8.8.1",+ "acorn-globals": "^7.0.0",+ "cssom": "^0.5.0",+ "cssstyle": "^2.3.0",+ "data-urls": "^3.0.2",+ "decimal.js": "^10.4.2",+ "domexception": "^4.0.0",+ "escodegen": "^2.0.0",+ "form-data": "^4.0.0",+ "html-encoding-sniffer": "^3.0.0",+ "http-proxy-agent": "^5.0.0",+ "https-proxy-agent": "^5.0.1",+ "is-potential-custom-element-name": "^1.0.1",+ "nwsapi": "^2.2.2",+ "parse5": "^7.1.1",+ "saxes": "^6.0.0",+ "symbol-tree": "^3.2.4",+ "tough-cookie": "^4.1.2",+ "w3c-xmlserializer": "^4.0.0",+ "webidl-conversions": "^7.0.0",+ "whatwg-encoding": "^2.0.0",+ "whatwg-mimetype": "^3.0.0",+ "whatwg-url": "^11.0.0",+ "ws": "^8.11.0",+ "xml-name-validator": "^4.0.0"+ },+ "engines": {+ "node": ">=14"+ },+ "peerDependencies": {+ "canvas": "^2.5.0"+ },+ "peerDependenciesMeta": {+ "canvas": {+ "optional": true+ }+ }+ },+ "node_modules/fabric/node_modules/tr46": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "punycode": "^2.1.1"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/fabric/node_modules/w3c-xmlserializer": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz",+ "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "xml-name-validator": "^4.0.0"+ },+ "engines": {+ "node": ">=14"+ }+ },+ "node_modules/fabric/node_modules/whatwg-encoding": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",+ "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "iconv-lite": "0.6.3"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/fabric/node_modules/whatwg-mimetype": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",+ "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/fabric/node_modules/whatwg-url": {+ "version": "11.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "tr46": "^3.0.0",+ "webidl-conversions": "^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/fabric/node_modules/xml-name-validator": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",+ "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",+ "license": "Apache-2.0",+ "optional": true,+ "engines": {+ "node": ">=12"+ }+ },"node_modules/factory.ts": {"version": "1.4.2","resolved": "https://registry.npmjs.org/factory.ts/-/factory.ts-1.4.2.tgz",@@ -4597,9 +5077,7 @@"version": "4.0.0","resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz","integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"asynckit": "^0.4.0","combined-stream": "^1.0.8",@@ -4622,6 +5100,39 @@"url": "https://github.com/sponsors/rawify"}},+ "node_modules/fs-minipass": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/fs-minipass/node_modules/minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/fs.realpath": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",+ "license": "ISC",+ "optional": true+ },"node_modules/fsevents": {"version": "2.3.3","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",@@ -4640,6 +5151,35 @@"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz","integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="},+ "node_modules/gauge": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",+ "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",+ "deprecated": "This package is no longer supported.",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "aproba": "^1.0.3 || ^2.0.0",+ "color-support": "^1.1.2",+ "console-control-strings": "^1.0.0",+ "has-unicode": "^2.0.1",+ "object-assign": "^4.1.1",+ "signal-exit": "^3.0.0",+ "string-width": "^4.2.3",+ "strip-ansi": "^6.0.1",+ "wide-align": "^1.1.2"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/gauge/node_modules/signal-exit": {+ "version": "3.0.7",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",+ "license": "ISC",+ "optional": true+ },"node_modules/geojson-vt": {"version": "3.2.1","resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz",@@ -4833,6 +5373,13 @@"node": ">=4"}},+ "node_modules/has-unicode": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",+ "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",+ "license": "ISC",+ "optional": true+ },"node_modules/hosted-git-info": {"version": "2.8.9","resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",@@ -4893,9 +5440,7 @@"version": "0.6.3","resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz","integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"safer-buffer": ">= 2.1.2 < 3.0.0"},@@ -4997,6 +5542,25 @@"node": ">=8"}},+ "node_modules/inflight": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "once": "^1.3.0",+ "wrappy": "1"+ }+ },+ "node_modules/inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",+ "license": "ISC",+ "optional": true+ },"node_modules/ini": {"version": "1.3.8","resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",@@ -5145,9 +5709,7 @@"version": "1.0.1","resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz","integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/is-promise": {"version": "2.2.2",@@ -5709,9 +6271,7 @@"version": "1.52.0","resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz","integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",- "dev": true,"optional": true,- "peer": true,"engines": {"node": ">= 0.6"}@@ -5720,9 +6280,7 @@"version": "2.1.35","resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz","integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"mime-db": "1.52.0"},@@ -5730,6 +6288,19 @@"node": ">= 0.6"}},+ "node_modules/mimic-response": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",+ "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/min-indent": {"version": "1.0.1","resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",@@ -5743,7 +6314,7 @@"version": "3.1.2","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz","integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",- "dev": true,+ "devOptional": true,"dependencies": {"brace-expansion": "^1.1.7"},@@ -5767,6 +6338,46 @@"node": ">=16 || 14 >=14.17"}},+ "node_modules/minizlib": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "minipass": "^3.0.0",+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/minizlib/node_modules/minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/mkdirp": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",+ "license": "MIT",+ "optional": true,+ "bin": {+ "mkdirp": "bin/cmd.js"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/mri": {"version": "1.2.0","resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",@@ -5805,6 +6416,13 @@"thenify-all": "^1.0.0"}},+ "node_modules/nan": {+ "version": "2.22.0",+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz",+ "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==",+ "license": "MIT",+ "optional": true+ },"node_modules/nanoid": {"version": "3.3.8","resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",@@ -5839,6 +6457,52 @@"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz","integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="},+ "node_modules/node-fetch": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "whatwg-url": "^5.0.0"+ },+ "engines": {+ "node": "4.x || >=6.0.0"+ },+ "peerDependencies": {+ "encoding": "^0.1.0"+ },+ "peerDependenciesMeta": {+ "encoding": {+ "optional": true+ }+ }+ },+ "node_modules/node-fetch/node_modules/tr46": {+ "version": "0.0.3",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",+ "license": "MIT",+ "optional": true+ },+ "node_modules/node-fetch/node_modules/webidl-conversions": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",+ "license": "BSD-2-Clause",+ "optional": true+ },+ "node_modules/node-fetch/node_modules/whatwg-url": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "tr46": "~0.0.3",+ "webidl-conversions": "^3.0.0"+ }+ },"node_modules/node-releases": {"version": "2.0.19","resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",@@ -5846,6 +6510,22 @@"dev": true,"license": "MIT"},+ "node_modules/nopt": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",+ "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "abbrev": "1"+ },+ "bin": {+ "nopt": "bin/nopt.js"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/normalize-package-data": {"version": "2.5.0","resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",@@ -5884,13 +6564,25 @@"node": ">=0.10.0"}},+ "node_modules/npmlog": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",+ "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",+ "deprecated": "This package is no longer supported.",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "are-we-there-yet": "^2.0.0",+ "console-control-strings": "^1.1.0",+ "gauge": "^3.0.0",+ "set-blocking": "^2.0.0"+ }+ },"node_modules/nwsapi": {"version": "2.2.7","resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz","integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/object-assign": {"version": "4.1.1",@@ -5908,6 +6600,16 @@"node": ">= 6"}},+ "node_modules/once": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "wrappy": "1"+ }+ },"node_modules/open": {"version": "8.4.2","resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",@@ -6020,9 +6722,7 @@"version": "7.1.2","resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz","integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"entities": "^4.4.0"},@@ -6039,6 +6739,16 @@"node": ">=8"}},+ "node_modules/path-is-absolute": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/path-key": {"version": "3.1.1","resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",@@ -6445,15 +7155,13 @@"version": "1.9.0","resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz","integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/punycode": {"version": "2.3.1","resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz","integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",- "dev": true,+ "devOptional": true,"engines": {"node": ">=6"}@@ -6462,9 +7170,7 @@"version": "2.2.0","resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz","integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/queue-microtask": {"version": "1.2.3",@@ -6606,6 +7312,21 @@"node": ">=8"}},+ "node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/readdirp": {"version": "3.6.0","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",@@ -6679,9 +7400,7 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz","integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/resolve": {"version": "1.22.8",@@ -6717,6 +7436,45 @@"node": ">=0.10.0"}},+ "node_modules/rimraf": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",+ "deprecated": "Rimraf versions prior to v4 are no longer supported",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "glob": "^7.1.3"+ },+ "bin": {+ "rimraf": "bin.js"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/rimraf/node_modules/glob": {+ "version": "7.2.3",+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",+ "deprecated": "Glob versions prior to v9 are no longer supported",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^3.1.1",+ "once": "^1.3.0",+ "path-is-absolute": "^1.0.0"+ },+ "engines": {+ "node": "*"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/rollup": {"version": "4.34.6","resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz",@@ -6870,21 +7628,38 @@"node": ">=6"}},+ "node_modules/safe-buffer": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true+ },"node_modules/safer-buffer": {"version": "2.1.2","resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz","integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/saxes": {"version": "6.0.0","resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz","integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"xmlchars": "^2.2.0"},@@ -6896,7 +7671,7 @@"version": "7.6.3","resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz","integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",- "dev": true,+ "devOptional": true,"license": "ISC","bin": {"semver": "bin/semver.js"@@ -6905,6 +7680,13 @@"node": ">=10"}},+ "node_modules/set-blocking": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",+ "license": "ISC",+ "optional": true+ },"node_modules/set-cookie-parser": {"version": "2.6.0","resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",@@ -7013,6 +7795,39 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/simple-concat": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true+ },+ "node_modules/simple-get": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",+ "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "decompress-response": "^4.2.0",+ "once": "^1.3.1",+ "simple-concat": "^1.0.0"+ }+ },"node_modules/simple-swizzle": {"version": "0.2.2","resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",@@ -7208,6 +8023,16 @@"dev": true,"license": "MIT"},+ "node_modules/string_decoder": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "safe-buffer": "~5.2.0"+ }+ },"node_modules/string-width": {"version": "4.2.3","resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",@@ -8026,9 +8851,7 @@"version": "3.2.4","resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz","integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/tailwind-merge": {"version": "2.6.0",@@ -8140,6 +8963,34 @@}}},+ "node_modules/tar": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",+ "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "chownr": "^2.0.0",+ "fs-minipass": "^2.0.0",+ "minipass": "^5.0.0",+ "minizlib": "^2.1.1",+ "mkdirp": "^1.0.3",+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/tar/node_modules/minipass": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",+ "license": "ISC",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/test-exclude": {"version": "7.0.1","resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz",@@ -8295,9 +9146,7 @@"version": "4.1.3","resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz","integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"psl": "^1.1.33","punycode": "^2.1.1",@@ -8420,9 +9269,7 @@"version": "0.2.0","resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz","integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",- "dev": true,"optional": true,- "peer": true,"engines": {"node": ">= 4.0.0"}@@ -8471,9 +9318,7 @@"version": "1.5.10","resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz","integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",- "dev": true,"optional": true,- "peer": true,"dependencies": {"querystringify": "^2.1.1","requires-port": "^1.0.0"@@ -8765,9 +9610,7 @@"version": "7.0.0","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz","integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",- "dev": true,"optional": true,- "peer": true,"engines": {"node": ">=12"}@@ -8842,6 +9685,16 @@"node": ">=8"}},+ "node_modules/wide-align": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",+ "license": "ISC",+ "optional": true,+ "dependencies": {+ "string-width": "^1.0.2 || 2 || 3 || 4"+ }+ },"node_modules/wordwrap": {"version": "1.0.0","resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",@@ -8944,6 +9797,13 @@"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==","dev": true},+ "node_modules/wrappy": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",+ "license": "ISC",+ "optional": true+ },"node_modules/ws": {"version": "8.17.1","resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",@@ -8980,9 +9840,7 @@"version": "2.2.0","resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz","integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",- "dev": true,- "optional": true,- "peer": true+ "optional": true},"node_modules/xmlhttprequest-ssl": {"version": "2.1.2",@@ -9001,6 +9859,13 @@"node": ">=10"}},+ "node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "license": "ISC",+ "optional": true+ },"node_modules/yaml": {"version": "2.7.0","resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",diff --git a/web/package.json b/web/package.jsonindex 2ca8a71848..b457af0619 100644--- a/web/package.json+++ b/web/package.json@@ -78,6 +78,7 @@"@photo-sphere-viewer/video-plugin": "^5.11.5","@zoom-image/svelte": "^0.3.0","dom-to-image": "^2.6.0",+ "fabric": "^6.5.4","handlebars": "^4.7.8","intl-messageformat": "^10.7.11","lodash-es": "^4.17.21",diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelteindex cdc00e247f..a83c5edd1e 100644--- a/web/src/lib/components/asset-viewer/detail-panel.svelte+++ b/web/src/lib/components/asset-viewer/detail-panel.svelte@@ -25,7 +25,6 @@type ExifResponseDto,} from '@immich/sdk';import {- mdiAccountOff,mdiCalendar,mdiCameraIris,mdiClose,@@ -34,6 +33,7 @@mdiImageOutline,mdiInformationOutline,mdiPencil,+ mdiPlus,} from '@mdi/js';import { DateTime } from 'luxon';import { t } from 'svelte-i18n';@@ -46,6 +46,7 @@import AlbumListItemDetails from './album-list-item-details.svelte';import Portal from '$lib/components/shared-components/portal/portal.svelte';import { getMetadataSearchQuery } from '$lib/utils/metadata-search';+ import { isFaceEditMode } from '$lib/stores/face-edit.svelte';interface Props {asset: AssetResponseDto;@@ -186,20 +187,11 @@<DetailPanelDescription {asset} {isOwner} /><DetailPanelRating {asset} {isOwner} />- {#if (!isSharedLink() && unassignedFaces.length > 0) || people.length > 0}+ {#if !isSharedLink() && isOwner}<section class="px-4 pt-4 text-sm"><div class="flex h-10 w-full items-center justify-between"><h2>{$t('people').toUpperCase()}</h2><div class="flex gap-2 items-center">- {#if unassignedFaces.length > 0}- <Icon- ariaLabel={$t('asset_has_unassigned_faces')}- title={$t('asset_has_unassigned_faces')}- color="currentColor"- path={mdiAccountOff}- size="24"- />- {/if}{#if people.some((person) => person.isHidden)}<CircleIconButtontitle={$t('show_hidden_people')}@@ -210,13 +202,24 @@/>{/if}<CircleIconButton- title={$t('edit_people')}- icon={mdiPencil}+ title={$t('tag_people')}+ icon={mdiPlus}padding="1"size="20"buttonSize="32"- onclick={() => (showEditFaces = true)}+ onclick={() => (isFaceEditMode.value = !isFaceEditMode.value)}/>++ {#if people.length > 0 || unassignedFaces.length > 0}+ <CircleIconButton+ title={$t('edit_people')}+ icon={mdiPencil}+ padding="1"+ size="20"+ buttonSize="32"+ onclick={() => (showEditFaces = true)}+ />+ {/if}</div></div>diff --git a/web/src/lib/components/asset-viewer/face-editor/face-editor.svelte b/web/src/lib/components/asset-viewer/face-editor/face-editor.sveltenew file mode 100644index 0000000000..fdf42000f0--- /dev/null+++ b/web/src/lib/components/asset-viewer/face-editor/face-editor.svelte@@ -0,0 +1,310 @@+<script lang="ts">+ import ImageThumbnail from '$lib/components/assets/thumbnail/image-thumbnail.svelte';+ import { dialogController } from '$lib/components/shared-components/dialog/dialog';+ import { notificationController } from '$lib/components/shared-components/notification/notification';+ import { isFaceEditMode } from '$lib/stores/face-edit.svelte';+ import { getPeopleThumbnailUrl } from '$lib/utils';+ import { getAllPeople, createFace, type PersonResponseDto } from '@immich/sdk';+ import { Button } from '@immich/ui';+ import { Canvas, InteractiveFabricObject, Rect } from 'fabric';+ import { onMount } from 'svelte';+ import { assetViewingStore } from '$lib/stores/asset-viewing.store';+ import { handleError } from '$lib/utils/handle-error';++ interface Props {+ imgElement: HTMLImageElement;+ containerWidth: number;+ containerHeight: number;+ assetId: string;+ }++ let { imgElement, containerWidth, containerHeight, assetId }: Props = $props();++ let canvasEl: HTMLCanvasElement | undefined = $state();+ let canvas: Canvas | undefined = $state();+ let faceRect: Rect | undefined = $state();+ let faceSelectorEl: HTMLDivElement | undefined = $state();++ const configureControlStyle = () => {+ InteractiveFabricObject.ownDefaults = {+ ...InteractiveFabricObject.ownDefaults,+ cornerStyle: 'circle',+ cornerColor: 'rgb(153,166,251)',+ cornerSize: 10,+ padding: 8,+ transparentCorners: false,+ lockRotation: true,+ hasBorders: true,+ };+ };++ const setupCanvas = () => {+ if (!canvasEl || !imgElement) {+ return;+ }++ canvas = new Canvas(canvasEl);+ configureControlStyle();++ faceRect = new Rect({+ fill: 'rgba(66,80,175,0.25)',+ stroke: 'rgb(66,80,175)',+ strokeWidth: 2,+ strokeUniform: true,+ width: 112,+ height: 112,+ objectCaching: true,+ rx: 8,+ ry: 8,+ });++ canvas.add(faceRect);+ canvas.setActiveObject(faceRect);+ };++ onMount(async () => {+ setupCanvas();+ await getPeople();+ });++ $effect(() => {+ const { actualWidth, actualHeight } = getContainedSize(imgElement);+ const offsetArea = {+ width: (containerWidth - actualWidth) / 2,+ height: (containerHeight - actualHeight) / 2,+ };++ const imageBoundingBox = {+ top: offsetArea.height,+ left: offsetArea.width,+ width: containerWidth - offsetArea.width * 2,+ height: containerHeight - offsetArea.height * 2,+ };++ if (!canvas) {+ return;+ }++ canvas.setDimensions({+ width: containerWidth,+ height: containerHeight,+ });++ if (!faceRect) {+ return;+ }++ faceRect.set({+ top: imageBoundingBox.top + 200,+ left: imageBoundingBox.left + 200,+ });++ faceRect.setCoords();+ positionFaceSelector();+ });++ const getContainedSize = (img: HTMLImageElement): { actualWidth: number; actualHeight: number } => {+ const ratio = img.naturalWidth / img.naturalHeight;+ let actualWidth = img.height * ratio;+ let actualHeight = img.height;+ if (actualWidth > img.width) {+ actualWidth = img.width;+ actualHeight = img.width / ratio;+ }+ return { actualWidth, actualHeight };+ };++ const cancel = () => {+ isFaceEditMode.value = false;+ };++ let page = $state(1);+ let candidates = $state<PersonResponseDto[]>([]);++ const getPeople = async () => {+ const { hasNextPage, people, total } = await getAllPeople({ page, size: 250, withHidden: false });++ if (candidates.length === total) {+ return;+ }++ candidates = [...candidates, ...people];++ if (hasNextPage) {+ page++;+ }+ };++ const positionFaceSelector = () => {+ if (!faceRect || !faceSelectorEl) {+ return;+ }++ const rect = faceRect.getBoundingRect();+ const selectorWidth = faceSelectorEl.offsetWidth;+ const selectorHeight = faceSelectorEl.offsetHeight;++ const spaceAbove = rect.top;+ const spaceBelow = containerHeight - (rect.top + rect.height);+ const spaceLeft = rect.left;+ const spaceRight = containerWidth - (rect.left + rect.width);++ let top, left;++ if (+ spaceBelow >= selectorHeight ||+ (spaceBelow >= spaceAbove && spaceBelow >= spaceLeft && spaceBelow >= spaceRight)+ ) {+ top = rect.top + rect.height + 15;+ left = rect.left;+ } else if (+ spaceAbove >= selectorHeight ||+ (spaceAbove >= spaceBelow && spaceAbove >= spaceLeft && spaceAbove >= spaceRight)+ ) {+ top = rect.top - selectorHeight - 15;+ left = rect.left;+ } else if (+ spaceRight >= selectorWidth ||+ (spaceRight >= spaceLeft && spaceRight >= spaceAbove && spaceRight >= spaceBelow)+ ) {+ top = rect.top;+ left = rect.left + rect.width + 15;+ } else {+ top = rect.top;+ left = rect.left - selectorWidth - 15;+ }++ if (left + selectorWidth > containerWidth) {+ left = containerWidth - selectorWidth - 15;+ }++ if (left < 0) {+ left = 15;+ }++ if (top + selectorHeight > containerHeight) {+ top = containerHeight - selectorHeight - 15;+ }++ if (top < 0) {+ top = 15;+ }++ faceSelectorEl.style.top = `${top}px`;+ faceSelectorEl.style.left = `${left}px`;+ };++ $effect(() => {+ if (faceRect) {+ faceRect.on('moving', positionFaceSelector);+ faceRect.on('scaling', positionFaceSelector);+ }+ });++ const getFaceCroppedCoordinates = () => {+ if (!faceRect || !imgElement) {+ return;+ }++ const { left, top, width, height } = faceRect.getBoundingRect();+ const { actualWidth, actualHeight } = getContainedSize(imgElement);++ const offsetArea = {+ width: (containerWidth - actualWidth) / 2,+ height: (containerHeight - actualHeight) / 2,+ };++ const x1Coeff = (left - offsetArea.width) / actualWidth;+ const y1Coeff = (top - offsetArea.height) / actualHeight;+ const x2Coeff = (left + width - offsetArea.width) / actualWidth;+ const y2Coeff = (top + height - offsetArea.height) / actualHeight;++ // transpose to the natural image location+ const x1 = x1Coeff * imgElement.naturalWidth;+ const y1 = y1Coeff * imgElement.naturalHeight;+ const x2 = x2Coeff * imgElement.naturalWidth;+ const y2 = y2Coeff * imgElement.naturalHeight;++ return {+ imageWidth: imgElement.naturalWidth,+ imageHeight: imgElement.naturalHeight,+ x: Math.floor(x1),+ y: Math.floor(y1),+ width: Math.floor(x2 - x1),+ height: Math.floor(y2 - y1),+ };+ };++ const tagFace = async (person: PersonResponseDto) => {+ try {+ const data = getFaceCroppedCoordinates();+ if (!data) {+ notificationController.show({+ message: 'Error tagging face - cannot get bounding box coordinates',+ });+ return;+ }++ const isConfirmed = await dialogController.show({+ prompt: `Do you want to tag this face as ${person.name}?`,+ });++ if (!isConfirmed) {+ return;+ }++ await createFace({+ assetFaceCreateDto: {+ assetId,+ personId: person.id,+ ...data,+ },+ });++ await assetViewingStore.setAssetId(assetId);+ } catch (error) {+ handleError(error, 'Error tagging face');+ } finally {+ isFaceEditMode.value = false;+ }+ };+</script>++<div class="absolute left-0 top-0">+ <canvas bind:this={canvasEl} id="face-editor" class="absolute top-0 left-0"></canvas>++ <div+ id="face-selector"+ bind:this={faceSelectorEl}+ class="absolute top-[calc(50%-250px)] left-[calc(50%-125px)] max-w-[250px] w-[250px] bg-white backdrop-blur-sm px-2 py-4 rounded-xl border border-gray-200"+ >+ <p class="text-center text-sm">Select a person to tag</p>++ <div class="max-h-[250px] overflow-y-auto mt-2">+ <div class="mt-2 rounded-lg">+ {#each candidates as person}+ <button+ onclick={() => tagFace(person)}+ type="button"+ class="w-full flex place-items-center gap-2 rounded-lg pl-1 pr-4 py-2 hover:bg-immich-primary/25"+ >+ <ImageThumbnail+ curve+ shadow+ url={getPeopleThumbnailUrl(person)}+ altText={person.name}+ title={person.name}+ widthStyle="30px"+ heightStyle="30px"+ />+ <p class="text-sm">+ {person.name}+ </p>+ </button>+ {/each}+ </div>+ </div>++ <Button size="small" fullWidth onclick={cancel} color="danger" class="mt-2">Cancel</Button>+ </div>+</div>diff --git a/web/src/lib/components/asset-viewer/photo-viewer.spec.ts b/web/src/lib/components/asset-viewer/photo-viewer.spec.tsindex 31b690ad0c..d90fb89c23 100644--- a/web/src/lib/components/asset-viewer/photo-viewer.spec.ts+++ b/web/src/lib/components/asset-viewer/photo-viewer.spec.ts@@ -7,6 +7,14 @@ import { sharedLinkFactory } from '@test-data/factories/shared-link-factory';import { render } from '@testing-library/svelte';import type { MockInstance } from 'vitest';+class ResizeObserver {+ observe() {}+ unobserve() {}+ disconnect() {}+}++globalThis.ResizeObserver = ResizeObserver;+vi.mock('$lib/utils', async (originalImport) => {const meta = await originalImport<typeof import('$lib/utils')>();return {diff --git a/web/src/lib/components/asset-viewer/photo-viewer.svelte b/web/src/lib/components/asset-viewer/photo-viewer.svelteindex 2e0355611b..582f56fab3 100644--- a/web/src/lib/components/asset-viewer/photo-viewer.svelte+++ b/web/src/lib/components/asset-viewer/photo-viewer.svelte@@ -2,7 +2,6 @@import { shortcuts } from '$lib/actions/shortcut';import { zoomImageAction, zoomed } from '$lib/actions/zoom-image';import BrokenAsset from '$lib/components/assets/broken-asset.svelte';- import { photoViewer } from '$lib/stores/assets.store';import { boundingBoxesArray } from '$lib/stores/people.store';import { alwaysLoadOriginalFile } from '$lib/stores/preferences.store';import { SlideshowLook, SlideshowState, slideshowLookCssMapping, slideshowStore } from '$lib/stores/slideshow.store';@@ -19,6 +18,9 @@import LoadingSpinner from '../shared-components/loading-spinner.svelte';import { NotificationType, notificationController } from '../shared-components/notification/notification';import { handleError } from '$lib/utils/handle-error';+ import FaceEditor from '$lib/components/asset-viewer/face-editor/face-editor.svelte';+ import { photoViewerImgElement } from '$lib/stores/assets.store';+ import { isFaceEditMode } from '$lib/stores/face-edit.svelte';interface Props {asset: AssetResponseDto;@@ -91,7 +93,7 @@}try {- await copyImageToClipboard($photoViewer ?? assetFileUrl);+ await copyImageToClipboard($photoViewerImgElement ?? assetFileUrl);notificationController.show({type: NotificationType.Info,message: $t('copied_image_to_clipboard'),@@ -106,6 +108,12 @@$zoomed = $zoomed ? false : true;};+ $effect(() => {+ if (isFaceEditMode.value && $photoZoomState.currentZoom > 1) {+ zoomToggle();+ }+ });+const onCopyShortcut = (event: KeyboardEvent) => {if (globalThis.getSelection()?.type === 'Range') {return;@@ -159,6 +167,9 @@});let imageLoaderUrl = $derived(getAssetUrl(asset.id, useOriginalImage, asset.thumbhash));++ let containerWidth = $state(0);+ let containerHeight = $state(0);</script><svelte:window@@ -172,7 +183,12 @@{/if}<!-- svelte-ignore a11y_missing_attribute --><img bind:this={loader} style="display:none" src={imageLoaderUrl} aria-hidden="true" />-<div bind:this={element} class="relative h-full select-none">+<div+ bind:this={element}+ class="relative h-full select-none"+ bind:clientWidth={containerWidth}+ bind:clientHeight={containerHeight}+><imgstyle="display:none"src={imageLoaderUrl}@@ -201,7 +217,7 @@/>{/if}<img- bind:this={$photoViewer}+ bind:this={$photoViewerImgElement}src={assetFileUrl}alt={$getAltText(asset)}class="h-full w-full {$slideshowState === SlideshowState.None@@ -209,13 +225,17 @@: slideshowLookCssMapping[$slideshowLook]}"draggable="false"/>- {#each getBoundingBox($boundingBoxesArray, $photoZoomState, $photoViewer) as boundingbox}+ {#each getBoundingBox($boundingBoxesArray, $photoZoomState, $photoViewerImgElement) as boundingbox}<divclass="absolute border-solid border-white border-[3px] rounded-lg"style="top: {boundingbox.top}px; left: {boundingbox.left}px; height: {boundingbox.height}px; width: {boundingbox.width}px;"></div>{/each}</div>++ {#if isFaceEditMode.value}+ <FaceEditor imgElement={$photoViewerImgElement} {containerWidth} {containerHeight} assetId={asset.id} />+ {/if}{/if}</div>diff --git a/web/src/lib/components/elements/buttons/circle-icon-button.svelte b/web/src/lib/components/elements/buttons/circle-icon-button.svelteindex 849c811d70..c243c06f92 100644--- a/web/src/lib/components/elements/buttons/circle-icon-button.svelte+++ b/web/src/lib/components/elements/buttons/circle-icon-button.svelte@@ -64,7 +64,7 @@transparent: 'bg-transparent hover:bg-[#d3d3d3] dark:text-immich-dark-fg',opaque: 'bg-transparent hover:bg-immich-bg/30 text-white hover:dark:text-white',light: 'bg-white hover:bg-[#d3d3d3]',- red: 'text-red-400 hover:bg-[#d3d3d3]',+ red: 'text-red-400 bg-red-100 hover:bg-[#d3d3d3]',dark: 'bg-[#202123] hover:bg-[#d3d3d3]',alert: 'text-[#ff0000] hover:text-white',gray: 'bg-[#d3d3d3] hover:bg-[#e2e7e9] text-immich-dark-gray hover:text-black',diff --git a/web/src/lib/components/faces-page/assign-face-side-panel.svelte b/web/src/lib/components/faces-page/assign-face-side-panel.svelteindex fe6a454307..59bcf6a84c 100644--- a/web/src/lib/components/faces-page/assign-face-side-panel.svelte+++ b/web/src/lib/components/faces-page/assign-face-side-panel.svelte@@ -6,7 +6,7 @@import { mdiArrowLeftThin, mdiClose, mdiMagnify, mdiPlus } from '@mdi/js';import { linear } from 'svelte/easing';import { fly } from 'svelte/transition';- import { photoViewer } from '$lib/stores/assets.store';+ import { photoViewerImgElement } from '$lib/stores/assets.store';import ImageThumbnail from '../assets/thumbnail/image-thumbnail.svelte';import LoadingSpinner from '../shared-components/loading-spinner.svelte';import SearchPeople from '$lib/components/faces-page/people-search.svelte';@@ -62,7 +62,7 @@const handleCreatePerson = async () => {const timeout = setTimeout(() => (isShowLoadingNewPerson = true), timeBeforeShowLoadingSpinner);- const newFeaturePhoto = await zoomImageToBase64(editedFace, assetId, assetType, $photoViewer);+ const newFeaturePhoto = await zoomImageToBase64(editedFace, assetId, assetType, $photoViewerImgElement);onCreatePerson(newFeaturePhoto);diff --git a/web/src/lib/components/faces-page/person-side-panel.svelte b/web/src/lib/components/faces-page/person-side-panel.svelteindex f2bab9996a..7bf87fc67b 100644--- a/web/src/lib/components/faces-page/person-side-panel.svelte+++ b/web/src/lib/components/faces-page/person-side-panel.svelte@@ -13,9 +13,10 @@AssetTypeEnum,type AssetFaceResponseDto,type PersonResponseDto,+ deleteFace,} from '@immich/sdk';import Icon from '$lib/components/elements/icon.svelte';- import { mdiAccountOff, mdiArrowLeftThin, mdiPencil, mdiRestart } from '@mdi/js';+ import { mdiAccountOff, mdiArrowLeftThin, mdiPencil, mdiRestart, mdiTrashCan } from '@mdi/js';import { onMount } from 'svelte';import { linear } from 'svelte/easing';import { fly } from 'svelte/transition';@@ -24,8 +25,10 @@import AssignFaceSidePanel from './assign-face-side-panel.svelte';import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';import { zoomImageToBase64 } from '$lib/utils/people-utils';- import { photoViewer } from '$lib/stores/assets.store';+ import { photoViewerImgElement } from '$lib/stores/assets.store';import { t } from 'svelte-i18n';+ import { dialogController } from '$lib/components/shared-components/dialog/dialog';+ import { assetViewingStore } from '$lib/stores/asset-viewing.store';interface Props {assetId: string;@@ -163,6 +166,30 @@editedFace = face;showSelectedFaces = true;};++ const deleteAssetFace = async (face: AssetFaceResponseDto) => {+ try {+ if (!face.person) {+ return;+ }++ const isConfirmed = await dialogController.show({+ prompt: $t('confirm_delete_face', { values: { name: face.person.name } }),+ });++ if (!isConfirmed) {+ return;+ }++ await deleteFace({ id: face.id, assetFaceDeleteDto: { force: false } });++ peopleWithFaces = peopleWithFaces.filter((f) => f.id !== face.id);++ await assetViewingStore.setAssetId(assetId);+ } catch (error) {+ handleError(error, $t('error_delete_face'));+ }+ };</script><section@@ -242,7 +269,7 @@hidden={face.person.isHidden}/>{:else}- {#await zoomImageToBase64(face, assetId, assetType, $photoViewer)}+ {#await zoomImageToBase64(face, assetId, assetType, $photoViewerImgElement)}<ImageThumbnailcurveshadow@@ -308,6 +335,19 @@</div>{/if}</div>+ {#if face.person != null}+ <div class="absolute -right-[5px] top-[25px] h-[20px] w-[20px] rounded-full">+ <CircleIconButton+ color="red"+ icon={mdiTrashCan}+ title={$t('delete_face')}+ size="18"+ padding="1"+ class="absolute left-1/2 top-1/2 translate-x-[-50%] translate-y-[-50%] transform"+ onclick={() => deleteAssetFace(face)}+ />+ </div>+ {/if}</div></div>{/each}diff --git a/web/src/lib/stores/assets.store.ts b/web/src/lib/stores/assets.store.tsindex 4bdc2606fa..8e02562e85 100644--- a/web/src/lib/stores/assets.store.ts+++ b/web/src/lib/stores/assets.store.ts@@ -148,7 +148,7 @@ interface UpdateStackAssets {values: string[];}-export const photoViewer = writable<HTMLImageElement | null>(null);+export const photoViewerImgElement = writable<HTMLImageElement | null>(null);type PendingChange = AddAsset | UpdateAsset | DeleteAsset | TrashAssets | UpdateStackAssets;diff --git a/web/src/lib/stores/face-edit.svelte.ts b/web/src/lib/stores/face-edit.svelte.tsnew file mode 100644index 0000000000..0b2f436099--- /dev/null+++ b/web/src/lib/stores/face-edit.svelte.ts@@ -0,0 +1 @@+export const isFaceEditMode = $state({ value: false });diff --git a/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelteindex b485dd532b..ff99599c51 100644--- a/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/photos/[[assetId=id]]/+page.svelte@@ -1,4 +1,5 @@<script lang="ts">+ import { beforeNavigate } from '$app/navigation';import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';import AddToAlbum from '$lib/components/photos-page/actions/add-to-album.svelte';import ArchiveAction from '$lib/components/photos-page/actions/archive-action.svelte';@@ -22,6 +23,7 @@import { AssetInteraction } from '$lib/stores/asset-interaction.svelte';import { assetViewingStore } from '$lib/stores/asset-viewing.store';import { AssetStore } from '$lib/stores/assets.store';+ import { isFaceEditMode } from '$lib/stores/face-edit.svelte';import { preferences, user } from '$lib/stores/user.store';import type { OnLink, OnUnlink } from '$lib/utils/actions';import { openFileUploadDialog } from '$lib/utils/file-uploader';@@ -68,6 +70,10 @@onDestroy(() => {assetStore.destroy();});++ beforeNavigate(() => {+ isFaceEditMode.value = false;+ });</script>{#if assetInteraction.selectionActive}