@smarterplan/ngx-smarterplan-core 1.4.22 → 1.4.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/esm2022/lib/components/csv-export/csv-export.component.mjs +8 -4
  2. package/esm2022/lib/components/inventory-runs/inventory-files.component.mjs +125 -0
  3. package/esm2022/lib/components/inventory-runs/inventory-runs.component.mjs +150 -0
  4. package/esm2022/lib/components/menu-bar/menu-bar.component.mjs +11 -7
  5. package/esm2022/lib/components/splat-viewer/splat-viewer.component.mjs +2 -2
  6. package/esm2022/lib/helpers.service.mjs +34 -1
  7. package/esm2022/lib/ngx-smarterplan-core.module.mjs +19 -5
  8. package/esm2022/lib/services/matterport-import.service.mjs +4 -3
  9. package/esm2022/lib/services/models/inventory.service.mjs +252 -0
  10. package/esm2022/lib/services/models/plan.service.mjs +46 -17
  11. package/esm2022/lib/services/models/ticket.service.mjs +7 -6
  12. package/esm2022/lib/services/zone-drawer.service.mjs +3 -3
  13. package/esm2022/lib/types.service.mjs +2 -1
  14. package/esm2022/public-api.mjs +4 -1
  15. package/fesm2022/smarterplan-ngx-smarterplan-core.mjs +717 -126
  16. package/fesm2022/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
  17. package/lib/components/csv-export/csv-export.component.d.ts +1 -0
  18. package/lib/components/inventory-runs/inventory-files.component.d.ts +23 -0
  19. package/lib/components/inventory-runs/inventory-runs.component.d.ts +49 -0
  20. package/lib/components/menu-bar/menu-bar.component.d.ts +1 -0
  21. package/lib/components/splat-viewer/splat-viewer.component.d.ts +1 -1
  22. package/lib/helpers.service.d.ts +28 -0
  23. package/lib/ngx-smarterplan-core.module.d.ts +9 -6
  24. package/lib/services/models/inventory.service.d.ts +112 -0
  25. package/lib/services/models/plan.service.d.ts +10 -1
  26. package/lib/services/models/ticket.service.d.ts +5 -5
  27. package/lib/types.service.d.ts +2 -1
  28. package/package.json +2 -1
  29. package/public-api.d.ts +3 -0
  30. package/src/assets/viewers/splat/{chunk-WZ5Z4TU3.js → chunk-EG4HD6E6.js} +2 -2
  31. package/src/assets/viewers/splat/{convert-4DRLH77X.js → convert-AJMRDWU6.js} +1 -1
  32. package/src/assets/viewers/splat/convert.html +1 -1
  33. package/src/assets/viewers/splat/{converter-SLBB5MHG.js → converter-UV7KH5KN.js} +1 -1
  34. package/src/assets/viewers/splat/index.html +1 -1
  35. package/src/assets/viewers/splat/{viewer-W4X3FWQJ.js → viewer-QLWW4L3N.js} +2 -2
  36. /package/src/assets/viewers/splat/{chunk-BYLI4YBI.js → chunk-KX25RBTZ.js} +0 -0
  37. /package/src/assets/viewers/splat/{spz-DEYRea_v-QE6YSGIB.js → spz-DEYRea_v-ZGM37WHQ.js} +0 -0
@@ -1,18 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Input, Component, InjectionToken, Inject, EventEmitter, isDevMode, Output, Pipe, ViewChild, HostListener, NgModule } from '@angular/core';
3
- import * as i1 from '@ngx-translate/core';
2
+ import { Injectable, InjectionToken, Inject, EventEmitter, isDevMode, Input, Component, Output, Pipe, ViewChild, HostListener, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@ngx-translate/core';
4
4
  import { TranslateModule } from '@ngx-translate/core';
5
- import { Subject, BehaviorSubject, takeUntil, Observable } from 'rxjs';
5
+ import AdjustIcon from '@iconify/icons-mdi/adjust';
6
+ import CloseCircleOutlineIcon from '@iconify/icons-mdi/close-circle-outline';
6
7
  import * as i1$2 from '@ng-bootstrap/ng-bootstrap';
7
8
  import { NgbDate, NgbModule } from '@ng-bootstrap/ng-bootstrap';
8
- import * as i1$1 from '@angular/router';
9
+ import * as i1 from '@angular/router';
9
10
  import { RouterModule } from '@angular/router';
11
+ import { Subject, BehaviorSubject, takeUntil, Observable } from 'rxjs';
10
12
  import * as THREE from 'three';
11
13
  import { Matrix4, Vector3, Color, Object3D, Euler, PerspectiveCamera, CylinderBufferGeometry, BoxGeometry, MeshBasicMaterial, NormalBlending, BackSide, Mesh, EdgesGeometry, AdditiveBlending, ShaderMaterial, AnimationMixer, VectorKeyframeTrack, InterpolateSmooth, AnimationClip, LoopOnce, Group, PlaneBufferGeometry, CanvasTexture, Texture, LinearFilter, Box3, MathUtils } from 'three';
12
14
  import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
13
15
  import { Storage, Auth, API, graphqlOperation, Cache } from 'aws-amplify';
14
16
  import { DateTime } from 'luxon';
15
- import * as i11 from '@angular/common';
17
+ import * as i2 from '@angular/common';
16
18
  import { CommonModule } from '@angular/common';
17
19
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
18
20
  import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader';
@@ -24,20 +26,25 @@ import { Line2 } from 'three/examples/jsm/lines/Line2';
24
26
  import { LineGeometry } from 'three/examples/jsm/lines/LineGeometry';
25
27
  import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial';
26
28
  import * as FileSaver from 'file-saver';
29
+ import fileDownloadIcon from '@iconify/icons-mdi/file-download-outline';
30
+ import * as i1$3 from '@abhinavakhil/iconify-angular';
31
+ import { IconModule } from '@abhinavakhil/iconify-angular';
27
32
  import levenshtein from 'js-levenshtein';
28
33
  import { GlobalWorkerOptions, getDocument } from 'pdfjs-dist';
29
34
  import panzoom from 'panzoom';
30
35
  import videojs from 'video.js';
36
+ import UserPositionIcon from '@iconify/icons-mdi/human-male';
31
37
  import InformationIcon from '@iconify/icons-mdi/information-outline';
32
38
  import AccidentIcon from '@iconify/icons-mdi/alert';
33
39
  import WordOrderIcon from '@iconify/icons-mdi/account-hard-hat';
34
40
  import ReportingIcon from '@iconify/icons-mdi/file-document-outline';
35
41
  import MaintenanceIcon from '@iconify/icons-mdi/tools';
36
42
  import { first } from 'rxjs/operators';
37
- import * as i1$3 from '@angular/platform-browser';
43
+ import * as i1$4 from '@angular/platform-browser';
38
44
  import { Observable as Observable$1 } from 'rxjs/internal/Observable';
39
45
  import * as i3 from '@angular/forms';
40
46
  import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
47
+ import checkIcon from '@iconify/icons-mdi/check';
41
48
  import * as CryptoJS from 'crypto-js';
42
49
  import { v4 } from 'uuid';
43
50
 
@@ -53,60 +60,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
53
60
  }]
54
61
  }], ctorParameters: () => [] });
55
62
 
56
- class CsvExportComponent {
57
- /** Header of the CSV, titles for each columns */
58
- headers = [];
59
- /** Array of each rows (array of array of string), if it's not set, then the function getRows() will be used */
60
- rowsInput = undefined;
61
- /** Function used to get rows if rowsInput is not set, call each time the user click on the button to generate the CSV file */
62
- getRows = undefined;
63
- /** Title of the file to download */
64
- title = "file";
65
- /** Label for the button to click */
66
- buttonLabel = "Export";
67
- /** Delimiter for the CSV */
68
- delimeter = ";";
69
- async onClickDownload() {
70
- let rows = this.rowsInput;
71
- if (!rows) {
72
- rows = await Promise.resolve(this.getRows());
73
- }
74
- const data = `data:text/csv;charset=utf-8,${this.headers.join(this.delimeter)}\n${rows
75
- .map((row) =>
76
- /** Clean each rows/cells */
77
- row
78
- .map((value) => value
79
- .replace(this.delimeter, " ")
80
- .replace("\n", " ")
81
- .replace("\r", " "))
82
- .join(this.delimeter))
83
- .join("\n")}`;
84
- /** Create a link to download the file */
85
- const link = document.createElement("a");
86
- link.setAttribute("href", encodeURI(data));
87
- link.setAttribute("download", `${this.title}.csv`);
88
- document.body.append(link);
89
- link.click();
90
- link.remove();
91
- }
92
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CsvExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
93
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CsvExportComponent, selector: "lib-csv-export", inputs: { headers: "headers", rowsInput: "rowsInput", getRows: "getRows", title: "title", buttonLabel: "buttonLabel" }, ngImport: i0, template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\n <span class=\"iconify\" data-icon=\"mdi:file-download-outline\"></span>\n {{ buttonLabel | translate}}\n</span>\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"], dependencies: [{ kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
94
- }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CsvExportComponent, decorators: [{
96
- type: Component,
97
- args: [{ selector: 'lib-csv-export', template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\n <span class=\"iconify\" data-icon=\"mdi:file-download-outline\"></span>\n {{ buttonLabel | translate}}\n</span>\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"] }]
98
- }], propDecorators: { headers: [{
99
- type: Input
100
- }], rowsInput: [{
101
- type: Input
102
- }], getRows: [{
103
- type: Input
104
- }], title: [{
105
- type: Input
106
- }], buttonLabel: [{
107
- type: Input
108
- }] } });
109
-
110
63
  /**
111
64
  * Injection token holding the Matterport SDK application key.
112
65
  * Each consuming app must provide its own value via its environment file
@@ -270,6 +223,7 @@ var InventoryStatus;
270
223
  InventoryStatus["ERROR_FILE_OBJ_NOT_EXIST"] = "ERROR_FILE_OBJ_NOT_EXIST";
271
224
  InventoryStatus["ERROR_FILE_JSON_NOT_EXIST"] = "ERROR_FILE_JSON_NOT_EXIST";
272
225
  InventoryStatus["ERROR_FILE_MODEL_NOT_EXIST"] = "ERROR_FILE_MODEL_NOT_EXIST";
226
+ InventoryStatus["CANCELLED"] = "CANCELLED";
273
227
  })(InventoryStatus || (InventoryStatus = {}));
274
228
  var TypeNote;
275
229
  (function (TypeNote) {
@@ -2113,7 +2067,7 @@ class BaseUserService {
2113
2067
  getSpModule() {
2114
2068
  return this.spModule;
2115
2069
  }
2116
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseUserService, deps: [{ token: ProfileService }, { token: MissionService }, { token: PropertyService }, { token: i1$1.Router }, { token: i11.Location }, { token: i0.NgZone }, { token: i1.TranslateService }, { token: 'SPModule' }], target: i0.ɵɵFactoryTarget.Injectable });
2070
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseUserService, deps: [{ token: ProfileService }, { token: MissionService }, { token: PropertyService }, { token: i1.Router }, { token: i2.Location }, { token: i0.NgZone }, { token: i1$1.TranslateService }, { token: 'SPModule' }], target: i0.ɵɵFactoryTarget.Injectable });
2117
2071
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseUserService, providedIn: "root" });
2118
2072
  }
2119
2073
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseUserService, decorators: [{
@@ -2121,7 +2075,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2121
2075
  args: [{
2122
2076
  providedIn: "root",
2123
2077
  }]
2124
- }], ctorParameters: () => [{ type: ProfileService }, { type: MissionService }, { type: PropertyService }, { type: i1$1.Router }, { type: i11.Location }, { type: i0.NgZone }, { type: i1.TranslateService }, { type: SpModule, decorators: [{
2078
+ }], ctorParameters: () => [{ type: ProfileService }, { type: MissionService }, { type: PropertyService }, { type: i1.Router }, { type: i2.Location }, { type: i0.NgZone }, { type: i1$1.TranslateService }, { type: SpModule, decorators: [{
2125
2079
  type: Inject,
2126
2080
  args: ['SPModule']
2127
2081
  }] }] });
@@ -2676,7 +2630,7 @@ class MatterportMeasurementService {
2676
2630
  getVisibility() {
2677
2631
  return this.visibility;
2678
2632
  }
2679
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportMeasurementService, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
2633
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportMeasurementService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
2680
2634
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportMeasurementService, providedIn: 'root' });
2681
2635
  }
2682
2636
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportMeasurementService, decorators: [{
@@ -2684,7 +2638,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
2684
2638
  args: [{
2685
2639
  providedIn: 'root',
2686
2640
  }]
2687
- }], ctorParameters: () => [{ type: i1$1.Router }] });
2641
+ }], ctorParameters: () => [{ type: i1.Router }] });
2688
2642
 
2689
2643
  class MatterportNavigationService {
2690
2644
  sweepCollection = null;
@@ -6733,7 +6687,7 @@ class MatterportService {
6733
6687
  floorSequence: data.floorInfo?.sequence ?? (typeof data.floor === 'number' ? data.floor : null),
6734
6688
  };
6735
6689
  }
6736
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportService, deps: [{ token: 'config' }, { token: MATTERPORT_SDK_KEY }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: BaseVisibilityService }, { token: i0.NgZone }, { token: MatterportMeasurementService }, { token: MatterportNavigationService }, { token: MatterportPointerService }, { token: MatterportObject3DService }, { token: MatterportTagService }], target: i0.ɵɵFactoryTarget.Injectable });
6690
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportService, deps: [{ token: 'config' }, { token: MATTERPORT_SDK_KEY }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: BaseVisibilityService }, { token: i0.NgZone }, { token: MatterportMeasurementService }, { token: MatterportNavigationService }, { token: MatterportPointerService }, { token: MatterportObject3DService }, { token: MatterportTagService }], target: i0.ɵɵFactoryTarget.Injectable });
6737
6691
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportService, providedIn: 'root' });
6738
6692
  }
6739
6693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportService, decorators: [{
@@ -6747,7 +6701,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
6747
6701
  }] }, { type: undefined, decorators: [{
6748
6702
  type: Inject,
6749
6703
  args: [MATTERPORT_SDK_KEY]
6750
- }] }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: BaseVisibilityService }, { type: i0.NgZone }, { type: MatterportMeasurementService }, { type: MatterportNavigationService }, { type: MatterportPointerService }, { type: MatterportObject3DService }, { type: MatterportTagService }] });
6704
+ }] }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: BaseVisibilityService }, { type: i0.NgZone }, { type: MatterportMeasurementService }, { type: MatterportNavigationService }, { type: MatterportPointerService }, { type: MatterportObject3DService }, { type: MatterportTagService }] });
6751
6705
 
6752
6706
  /**
6753
6707
  * Builds an orthonormal frame from three points, or null when they are (nearly) collinear.
@@ -11590,13 +11544,13 @@ class ModalSwitchVisitComponent {
11590
11544
  queryParams: { model3D: this.model3D },
11591
11545
  });
11592
11546
  }
11593
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModalSwitchVisitComponent, deps: [{ token: i1$2.NgbActiveModal }, { token: i1$1.Router }, { token: ViewerService }], target: i0.ɵɵFactoryTarget.Component });
11594
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ModalSwitchVisitComponent, selector: "lib-modal-switch-visit", inputs: { content: "content", model3D: "model3D", spaceID: "spaceID", dataToMove: "dataToMove" }, ngImport: i0, template: "<div class=\"modal-container\">\n <p>{{content}}</p>\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\n</div>\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"], dependencies: [{ kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
11547
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModalSwitchVisitComponent, deps: [{ token: i1$2.NgbActiveModal }, { token: i1.Router }, { token: ViewerService }], target: i0.ɵɵFactoryTarget.Component });
11548
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ModalSwitchVisitComponent, selector: "lib-modal-switch-visit", inputs: { content: "content", model3D: "model3D", spaceID: "spaceID", dataToMove: "dataToMove" }, ngImport: i0, template: "<div class=\"modal-container\">\n <p>{{content}}</p>\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\n</div>\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
11595
11549
  }
11596
11550
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ModalSwitchVisitComponent, decorators: [{
11597
11551
  type: Component,
11598
11552
  args: [{ selector: 'lib-modal-switch-visit', template: "<div class=\"modal-container\">\n <p>{{content}}</p>\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"switchVisit()\">{{'Yes, switch visit' | translate }}</button>\n <button class=\"btn btn-outline-primary rounded-pill\"(click)=\"activeModal.close()\">{{'No, stay here' | translate }}</button>\n</div>\n", styles: [".modal-container{margin:10px}button{margin-right:8px}\n"] }]
11599
- }], ctorParameters: () => [{ type: i1$2.NgbActiveModal }, { type: i1$1.Router }, { type: ViewerService }], propDecorators: { content: [{
11553
+ }], ctorParameters: () => [{ type: i1$2.NgbActiveModal }, { type: i1.Router }, { type: ViewerService }], propDecorators: { content: [{
11600
11554
  type: Input
11601
11555
  }], model3D: [{
11602
11556
  type: Input
@@ -12146,6 +12100,92 @@ function pointToString(point) {
12146
12100
  const z = point.z.toFixed(3);
12147
12101
  return `{ x: ${x}, y: ${y}, z: ${z} }`;
12148
12102
  }
12103
+ /**
12104
+ * Icon data of an @iconify/icons-* import. Those packages are CommonJS: imported from a library
12105
+ * bundle, the default import can be the whole module, with the data under `default`.
12106
+ */
12107
+ function iconData(icon) {
12108
+ return icon.default ?? icon;
12109
+ }
12110
+ /**
12111
+ * Bundled icons for the markers drawn on plans. The iconify API no longer serves the
12112
+ * `prefix:name.svg` URLs they used to be loaded from, which left the markers blank.
12113
+ */
12114
+ const PLAN_ICONS = {
12115
+ adjust: iconData(AdjustIcon),
12116
+ closeCircleOutline: iconData(CloseCircleOutlineIcon),
12117
+ };
12118
+ /** Encodes an SVG as a data URL; parentheses are escaped so it also works in an unquoted url(). */
12119
+ function svgToDataUrl(svg) {
12120
+ const encoded = encodeURIComponent(svg).replace(/\(/g, "%28").replace(/\)/g, "%29");
12121
+ return `data:image/svg+xml;charset=utf-8,${encoded}`;
12122
+ }
12123
+ /**
12124
+ * Renders a bundled iconify icon as a data URL, without any request to the iconify API.
12125
+ * @param size width and height in px, needed where the intrinsic size is read (canvas drawing)
12126
+ */
12127
+ function iconToDataUrl(icon, color = "currentColor", size = 17) {
12128
+ const data = iconData(icon);
12129
+ const width = data.width ?? 24;
12130
+ const height = data.height ?? 24;
12131
+ const body = data.body.replace(/currentColor/g, color);
12132
+ return svgToDataUrl(`<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${width} ${height}">${body}</svg>`);
12133
+ }
12134
+
12135
+ class CsvExportComponent {
12136
+ fileDownloadIcon = iconData(fileDownloadIcon);
12137
+ /** Header of the CSV, titles for each columns */
12138
+ headers = [];
12139
+ /** Array of each rows (array of array of string), if it's not set, then the function getRows() will be used */
12140
+ rowsInput = undefined;
12141
+ /** Function used to get rows if rowsInput is not set, call each time the user click on the button to generate the CSV file */
12142
+ getRows = undefined;
12143
+ /** Title of the file to download */
12144
+ title = "file";
12145
+ /** Label for the button to click */
12146
+ buttonLabel = "Export";
12147
+ /** Delimiter for the CSV */
12148
+ delimeter = ";";
12149
+ async onClickDownload() {
12150
+ let rows = this.rowsInput;
12151
+ if (!rows) {
12152
+ rows = await Promise.resolve(this.getRows());
12153
+ }
12154
+ const data = `data:text/csv;charset=utf-8,${this.headers.join(this.delimeter)}\n${rows
12155
+ .map((row) =>
12156
+ /** Clean each rows/cells */
12157
+ row
12158
+ .map((value) => value
12159
+ .replace(this.delimeter, " ")
12160
+ .replace("\n", " ")
12161
+ .replace("\r", " "))
12162
+ .join(this.delimeter))
12163
+ .join("\n")}`;
12164
+ /** Create a link to download the file */
12165
+ const link = document.createElement("a");
12166
+ link.setAttribute("href", encodeURI(data));
12167
+ link.setAttribute("download", `${this.title}.csv`);
12168
+ document.body.append(link);
12169
+ link.click();
12170
+ link.remove();
12171
+ }
12172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CsvExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CsvExportComponent, selector: "lib-csv-export", inputs: { headers: "headers", rowsInput: "rowsInput", getRows: "getRows", title: "title", buttonLabel: "buttonLabel" }, ngImport: i0, template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\n <span class=\"iconify\" [icIcon]=\"fileDownloadIcon\"></span>\n {{ buttonLabel | translate}}\n</span>\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"], dependencies: [{ kind: "directive", type: i1$3.IconDirective, selector: "ic-icon,[icIcon]", inputs: ["icIcon", "icon", "color", "inline", "box", "size", "width", "height", "align", "hFlip", "vFlip", "flip", "rotate"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
12174
+ }
12175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CsvExportComponent, decorators: [{
12176
+ type: Component,
12177
+ args: [{ selector: 'lib-csv-export', template: "<span [style.cursor]=\"'pointer'\" (click)=\"onClickDownload()\" class=\"download-csv d-flex\">\n <span class=\"iconify\" [icIcon]=\"fileDownloadIcon\"></span>\n {{ buttonLabel | translate}}\n</span>\n", styles: [".download-csv{color:var(--smarterplan-primary)}\n"] }]
12178
+ }], propDecorators: { headers: [{
12179
+ type: Input
12180
+ }], rowsInput: [{
12181
+ type: Input
12182
+ }], getRows: [{
12183
+ type: Input
12184
+ }], title: [{
12185
+ type: Input
12186
+ }], buttonLabel: [{
12187
+ type: Input
12188
+ }] } });
12149
12189
 
12150
12190
  /* eslint-disable no-case-declarations */
12151
12191
  /* eslint-disable no-await-in-loop */
@@ -12816,7 +12856,7 @@ function getCoefficientsForImage(img, rectangle) {
12816
12856
  return { coeffX, coeffY };
12817
12857
  }
12818
12858
  function styleButton(button) {
12819
- button.style.backgroundImage = `url("https://api.iconify.design/mdi:adjust.svg?color=green&height=17&width=17")`;
12859
+ button.style.backgroundImage = `url("${iconToDataUrl(PLAN_ICONS.adjust, "green")}")`;
12820
12860
  button.style.backgroundColor = "transparent";
12821
12861
  button.style.position = "absolute";
12822
12862
  button.style.border = "none";
@@ -13124,7 +13164,7 @@ class ContentService {
13124
13164
  this.modalReference.componentInstance.navigateToSlide(slide);
13125
13165
  }
13126
13166
  }
13127
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentService, deps: [{ token: i1$2.NgbModal }, { token: i1$1.Router }, { token: CommentService }], target: i0.ɵɵFactoryTarget.Injectable });
13167
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentService, deps: [{ token: i1$2.NgbModal }, { token: i1.Router }, { token: CommentService }], target: i0.ɵɵFactoryTarget.Injectable });
13128
13168
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentService, providedIn: "root" });
13129
13169
  }
13130
13170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ContentService, decorators: [{
@@ -13132,7 +13172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
13132
13172
  args: [{
13133
13173
  providedIn: "root",
13134
13174
  }]
13135
- }], ctorParameters: () => [{ type: i1$2.NgbModal }, { type: i1$1.Router }, { type: CommentService }] });
13175
+ }], ctorParameters: () => [{ type: i1$2.NgbModal }, { type: i1.Router }, { type: CommentService }] });
13136
13176
 
13137
13177
  /* eslint-disable func-names */
13138
13178
  /* eslint-disable class-methods-use-this */
@@ -13144,6 +13184,7 @@ class PlanService {
13144
13184
  matterportService;
13145
13185
  visibilityService;
13146
13186
  contentService;
13187
+ translate;
13147
13188
  chosenPlan;
13148
13189
  currentPlan;
13149
13190
  currentSweep;
@@ -13154,6 +13195,8 @@ class PlanService {
13154
13195
  panzoom;
13155
13196
  isReady = false;
13156
13197
  userPositionBtn;
13198
+ /** Side of the current position marker, in px before scaling (tags are 10px). */
13199
+ userPositionSize = 16;
13157
13200
  coeffPlanX;
13158
13201
  coeffPlanY;
13159
13202
  calibrationPlan;
@@ -13173,7 +13216,7 @@ class PlanService {
13173
13216
  // tagService: BaseTagService,
13174
13217
  viewerService, router, matterportService,
13175
13218
  // private config: AppConfig,
13176
- visibilityService, contentService) {
13219
+ visibilityService, contentService, translate) {
13177
13220
  this.zoneService = zoneService;
13178
13221
  this.navigationService = navigationService;
13179
13222
  this.viewerService = viewerService;
@@ -13181,6 +13224,7 @@ class PlanService {
13181
13224
  this.matterportService = matterportService;
13182
13225
  this.visibilityService = visibilityService;
13183
13226
  this.contentService = contentService;
13227
+ this.translate = translate;
13184
13228
  this.API = apiInjected;
13185
13229
  this.matterportService.currentCameraPose.subscribe((pose) => {
13186
13230
  this.updateRotation(pose.rotation.y);
@@ -13415,6 +13459,7 @@ class PlanService {
13415
13459
  }
13416
13460
  this.styleButton(button, tagIconImage, sizeButton);
13417
13461
  button.id = element.id;
13462
+ this.clearBtn([element.id]);
13418
13463
  this.planDivContent.append(button);
13419
13464
  let x;
13420
13465
  let y;
@@ -13476,15 +13521,21 @@ class PlanService {
13476
13521
  this.userPositionBtn = document.createElement('button');
13477
13522
  this.userPositionBtn.id = 'currentPosition';
13478
13523
  this.planDivContent.append(this.userPositionBtn);
13479
- this.userPositionBtn.title = 'You are here';
13480
- this.styleButton(this.userPositionBtn, 'https://api.iconify.design/bx:bxs-user-circle.svg?color=green&height=17&width=17', sizeButton);
13524
+ this.userPositionBtn.title = this.translate.instant('You are here');
13525
+ this.styleButton(this.userPositionBtn, this.getUserPositionIcon(), sizeButton);
13526
+ // Drawn above the tags and larger than them, so it is never hidden among them
13527
+ this.userPositionBtn.style.width = `${this.userPositionSize}px`;
13528
+ this.userPositionBtn.style.height = `${this.userPositionSize}px`;
13529
+ this.userPositionBtn.style.zIndex = '1';
13530
+ this.userPositionBtn.style.filter = 'drop-shadow(0 0 2px rgba(0, 0, 0, 0.6))';
13481
13531
  }
13532
+ // Center of the marker on the plan
13482
13533
  let x;
13483
13534
  let y;
13484
13535
  if (this.calibrationPlan.new) {
13485
13536
  const position2D = this.transformPosition3DForNewCalibration(position);
13486
- x = position2D.x / position2D.coeffX - 5;
13487
- y = position2D.y / position2D.coeffY - 5;
13537
+ x = position2D.x / position2D.coeffX;
13538
+ y = position2D.y / position2D.coeffY;
13488
13539
  }
13489
13540
  else {
13490
13541
  x =
@@ -13496,12 +13547,27 @@ class PlanService {
13496
13547
  position.z * this.calibrationPlan.y) /
13497
13548
  this.coeffPlanY;
13498
13549
  }
13499
- this.userPositionBtn.style.top = `${y}px`;
13500
- this.userPositionBtn.style.left = `${x}px`;
13501
- this.moveOnPoint({ x: x + 5, y: y + 5 });
13550
+ const half = this.userPositionSize / 2;
13551
+ this.userPositionBtn.style.top = `${y - half}px`;
13552
+ this.userPositionBtn.style.left = `${x - half}px`;
13553
+ this.moveOnPoint({ x, y });
13502
13554
  }
13503
13555
  }
13504
13556
  }
13557
+ /**
13558
+ * Builds the current position marker from the bundled mdi icon (no network request),
13559
+ * as a white figure on a disc of the application's primary color.
13560
+ */
13561
+ getUserPositionIcon() {
13562
+ const color = getComputedStyle(document.documentElement)
13563
+ .getPropertyValue('--smarterplan-primary')
13564
+ .replace(/\s+/g, '') || '#53b6bb';
13565
+ const figure = iconData(UserPositionIcon).body.replace(/currentColor/g, '#fff');
13566
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">` +
13567
+ `<circle cx="12" cy="12" r="11" fill="${color}" stroke="#fff" stroke-width="1.5"/>` +
13568
+ `<g transform="translate(2.4 2.4) scale(0.8)">${figure}</g></svg>`;
13569
+ return svgToDataUrl(svg);
13570
+ }
13505
13571
  /**
13506
13572
  * Center the view of the plan on coordinates
13507
13573
  * @param coordinate Coordinate on the plan
@@ -13736,9 +13802,9 @@ class PlanService {
13736
13802
  });
13737
13803
  }
13738
13804
  clearBtn(idList) {
13805
+ // Every copy, not only the first: overlapping draws used to stack duplicates
13739
13806
  for (const id of idList) {
13740
- const button = document.getElementById(id);
13741
- if (button) {
13807
+ for (const button of Array.from((this.planDivContent ?? document).querySelectorAll(`button[id="${id}"]`))) {
13742
13808
  button.remove();
13743
13809
  }
13744
13810
  }
@@ -13763,9 +13829,9 @@ class PlanService {
13763
13829
  //For saving the rotation and adding scale
13764
13830
  let rotationRegex = /(rotate\(-?\d*\.?\d+deg\))/g;
13765
13831
  let rotationMatch = currentValue.style[property].match(rotationRegex);
13766
- if (rotationMatch.length > 0) {
13767
- currentValue.style[property] = `${values[i]} ${rotationMatch[0]}`;
13768
- }
13832
+ currentValue.style[property] = rotationMatch
13833
+ ? `${values[i]} ${rotationMatch[0]}`
13834
+ : values[i];
13769
13835
  }
13770
13836
  else {
13771
13837
  currentValue.style[property] = values[i];
@@ -13876,6 +13942,7 @@ class PlanService {
13876
13942
  const button = document.createElement('button');
13877
13943
  this.styleButton(button, cached.tagIcon, sizeButton);
13878
13944
  button.id = cached.elementID;
13945
+ this.clearBtn([cached.elementID]);
13879
13946
  this.planDivContent.append(button);
13880
13947
  if (this.calibrationPlan.new) {
13881
13948
  const newCoeffX = this.coeffPlanX /
@@ -13925,7 +13992,7 @@ class PlanService {
13925
13992
  // console.log(x, y);
13926
13993
  return { x, y, coeffX: newCoeffX, coeffY: newCoeffY };
13927
13994
  }
13928
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PlanService, deps: [{ token: 'currentAPIService' }, { token: ZoneService }, { token: NavigationService }, { token: ViewerService }, { token: i1$1.Router }, { token: MatterportService }, { token: BaseVisibilityService }, { token: ContentService }], target: i0.ɵɵFactoryTarget.Injectable });
13995
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PlanService, deps: [{ token: 'currentAPIService' }, { token: ZoneService }, { token: NavigationService }, { token: ViewerService }, { token: i1.Router }, { token: MatterportService }, { token: BaseVisibilityService }, { token: ContentService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
13929
13996
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PlanService, providedIn: 'root' });
13930
13997
  }
13931
13998
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PlanService, decorators: [{
@@ -13936,7 +14003,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
13936
14003
  }], ctorParameters: () => [{ type: undefined, decorators: [{
13937
14004
  type: Inject,
13938
14005
  args: ['currentAPIService']
13939
- }] }, { type: ZoneService }, { type: NavigationService }, { type: ViewerService }, { type: i1$1.Router }, { type: MatterportService }, { type: BaseVisibilityService }, { type: ContentService }] });
14006
+ }] }, { type: ZoneService }, { type: NavigationService }, { type: ViewerService }, { type: i1.Router }, { type: MatterportService }, { type: BaseVisibilityService }, { type: ContentService }, { type: i1$1.TranslateService }] });
13940
14007
 
13941
14008
  /* eslint-disable class-methods-use-this */
13942
14009
  /* eslint-disable no-restricted-syntax */
@@ -14341,7 +14408,7 @@ class EventService {
14341
14408
  meta.type = this.translate.instant(meta.type);
14342
14409
  return meta;
14343
14410
  }
14344
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EventService, deps: [{ token: 'currentAPIService' }, { token: BaseUserService }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
14411
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EventService, deps: [{ token: 'currentAPIService' }, { token: BaseUserService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
14345
14412
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EventService, providedIn: "root" });
14346
14413
  }
14347
14414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EventService, decorators: [{
@@ -14352,7 +14419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
14352
14419
  }], ctorParameters: () => [{ type: undefined, decorators: [{
14353
14420
  type: Inject,
14354
14421
  args: ['currentAPIService']
14355
- }] }, { type: BaseUserService }, { type: i1.TranslateService }] });
14422
+ }] }, { type: BaseUserService }, { type: i1$1.TranslateService }] });
14356
14423
 
14357
14424
  class AffectationService {
14358
14425
  API;
@@ -14645,7 +14712,7 @@ class NavigatorService {
14645
14712
  }
14646
14713
  // }
14647
14714
  }
14648
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigatorService, deps: [{ token: MatterportService }, { token: ViewerService }, { token: ZoneService }, { token: BaseUserService }, { token: ZoneChangeService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
14715
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigatorService, deps: [{ token: MatterportService }, { token: ViewerService }, { token: ZoneService }, { token: BaseUserService }, { token: ZoneChangeService }, { token: i1.Router }, { token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
14649
14716
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigatorService, providedIn: 'root' });
14650
14717
  }
14651
14718
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigatorService, decorators: [{
@@ -14653,7 +14720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
14653
14720
  args: [{
14654
14721
  providedIn: 'root',
14655
14722
  }]
14656
- }], ctorParameters: () => [{ type: MatterportService }, { type: ViewerService }, { type: ZoneService }, { type: BaseUserService }, { type: ZoneChangeService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }] });
14723
+ }], ctorParameters: () => [{ type: MatterportService }, { type: ViewerService }, { type: ZoneService }, { type: BaseUserService }, { type: ZoneChangeService }, { type: i1.Router }, { type: i1.ActivatedRoute }] });
14657
14724
 
14658
14725
  /* eslint-disable class-methods-use-this */
14659
14726
  class InterventionService {
@@ -14914,11 +14981,11 @@ class TicketsService extends BaseObjectService {
14914
14981
  spaceSubscription;
14915
14982
  dateFilter;
14916
14983
  ticketTypeFilter;
14917
- reportingIcon = ReportingIcon;
14918
- maintenanceIcon = MaintenanceIcon;
14919
- workorderIcon = WordOrderIcon;
14920
- informationIcon = InformationIcon;
14921
- accidentIcon = AccidentIcon;
14984
+ reportingIcon = iconData(ReportingIcon);
14985
+ maintenanceIcon = iconData(MaintenanceIcon);
14986
+ workorderIcon = iconData(WordOrderIcon);
14987
+ informationIcon = iconData(InformationIcon);
14988
+ accidentIcon = iconData(AccidentIcon);
14922
14989
  updateDone = new Subject();
14923
14990
  updating = new Subject();
14924
14991
  API;
@@ -16314,7 +16381,7 @@ class SearchBarComponent {
16314
16381
  this.searchEvent.emit(results);
16315
16382
  }
16316
16383
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchBarComponent, deps: [{ token: SearchService }], target: i0.ɵɵFactoryTarget.Component });
16317
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchBarComponent, selector: "lib-search-bar", inputs: { searchable: "searchable", objectType: "objectType" }, outputs: { searchEvent: "searchEvent" }, ngImport: i0, template: "<div class=\"col-md-8 searchbar\">\n <div class=\"row depend\">\n <div class=\"col-md-5\">\n <input id=\"searchbar\" type=\"text\" class=\"form-control\" placeholder=\"keyword\" />\n </div>\n <div class=\"col-md-5\">\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSubmit()\">{{ 'Search' |\n translate}}</button>\n </div>\n </div>\n</div>", styles: [".searchbar{margin-bottom:10px}\n"], dependencies: [{ kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
16384
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchBarComponent, selector: "lib-search-bar", inputs: { searchable: "searchable", objectType: "objectType" }, outputs: { searchEvent: "searchEvent" }, ngImport: i0, template: "<div class=\"col-md-8 searchbar\">\n <div class=\"row depend\">\n <div class=\"col-md-5\">\n <input id=\"searchbar\" type=\"text\" class=\"form-control\" placeholder=\"keyword\" />\n </div>\n <div class=\"col-md-5\">\n <button class=\"btn btn-outline-primary rounded-pill\" (click)=\"onSubmit()\">{{ 'Search' |\n translate}}</button>\n </div>\n </div>\n</div>", styles: [".searchbar{margin-bottom:10px}\n"], dependencies: [{ kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
16318
16385
  }
16319
16386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchBarComponent, decorators: [{
16320
16387
  type: Component,
@@ -16380,7 +16447,7 @@ class DurationToStringPipe {
16380
16447
  });
16381
16448
  return dateObserver;
16382
16449
  }
16383
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DurationToStringPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
16450
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DurationToStringPipe, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
16384
16451
  static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DurationToStringPipe, name: "durationToString" });
16385
16452
  }
16386
16453
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DurationToStringPipe, decorators: [{
@@ -16388,7 +16455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
16388
16455
  args: [{
16389
16456
  name: 'durationToString'
16390
16457
  }]
16391
- }], ctorParameters: () => [{ type: i1.TranslateService }] });
16458
+ }], ctorParameters: () => [{ type: i1$1.TranslateService }] });
16392
16459
 
16393
16460
  class HashtagService {
16394
16461
  currentSpaceID;
@@ -16506,7 +16573,7 @@ class SafeUrlPipe {
16506
16573
  transform(url) {
16507
16574
  return this.sanitizer.bypassSecurityTrustResourceUrl(url);
16508
16575
  }
16509
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
16576
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
16510
16577
  static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SafeUrlPipe, name: "safeUrl" });
16511
16578
  }
16512
16579
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SafeUrlPipe, decorators: [{
@@ -16514,7 +16581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
16514
16581
  args: [{
16515
16582
  name: 'safeUrl'
16516
16583
  }]
16517
- }], ctorParameters: () => [{ type: i1$3.DomSanitizer }] });
16584
+ }], ctorParameters: () => [{ type: i1$4.DomSanitizer }] });
16518
16585
 
16519
16586
  class TimeDateToLocalStringPipe {
16520
16587
  translate;
@@ -16602,7 +16669,7 @@ class TimeDateToLocalStringPipe {
16602
16669
  });
16603
16670
  return dateObserver;
16604
16671
  }
16605
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeDateToLocalStringPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
16672
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeDateToLocalStringPipe, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe });
16606
16673
  static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: TimeDateToLocalStringPipe, name: "timeDateString" });
16607
16674
  }
16608
16675
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TimeDateToLocalStringPipe, decorators: [{
@@ -16610,7 +16677,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
16610
16677
  args: [{
16611
16678
  name: 'timeDateString'
16612
16679
  }]
16613
- }], ctorParameters: () => [{ type: i1.TranslateService }] });
16680
+ }], ctorParameters: () => [{ type: i1$1.TranslateService }] });
16614
16681
 
16615
16682
  class UsernameFromIdPipe {
16616
16683
  userService;
@@ -16766,7 +16833,7 @@ class LoaderComponent {
16766
16833
  document.documentElement.style.setProperty('--color', this.color);
16767
16834
  }
16768
16835
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16769
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LoaderComponent, selector: "lib-loader", inputs: { useLogo: "useLogo", color: "color" }, ngImport: i0, template: "<div class=\"sk-fading-circle\">\n <img *ngIf=\"useLogo\" src=\"../../../../assets/icons/smarterplan.svg\">\n <div class=\"sk-circle1 sk-circle\"></div>\n <div class=\"sk-circle2 sk-circle\"></div>\n <div class=\"sk-circle3 sk-circle\"></div>\n <div class=\"sk-circle4 sk-circle\"></div>\n <div class=\"sk-circle5 sk-circle\"></div>\n <div class=\"sk-circle6 sk-circle\"></div>\n <div class=\"sk-circle7 sk-circle\"></div>\n <div class=\"sk-circle8 sk-circle\"></div>\n <div class=\"sk-circle9 sk-circle\"></div>\n <div class=\"sk-circle10 sk-circle\"></div>\n <div class=\"sk-circle11 sk-circle\"></div>\n <div class=\"sk-circle12 sk-circle\"></div>\n</div>\n", styles: [".sk-fading-circle{width:88px;height:88px;position:relative}.sk-fading-circle img{width:2rem;position:absolute;left:calc(50% - 16px);top:calc(50% - 16px)}.sk-fading-circle .sk-circle{width:100%;height:100%;position:absolute;left:0;top:0}.sk-fading-circle .sk-circle:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--color);border-radius:100%;-webkit-animation:sk-circleFadeDelay 1.2s infinite ease-in-out both;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.sk-fading-circle .sk-circle3{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.sk-fading-circle .sk-circle4{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sk-fading-circle .sk-circle5{-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.sk-fading-circle .sk-circle6{-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.sk-fading-circle .sk-circle7{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.sk-fading-circle .sk-circle8{-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.sk-fading-circle .sk-circle9{-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.sk-fading-circle .sk-circle10{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sk-fading-circle .sk-circle11{-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.sk-fading-circle .sk-circle12{-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-fading-circle .sk-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
16836
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LoaderComponent, selector: "lib-loader", inputs: { useLogo: "useLogo", color: "color" }, ngImport: i0, template: "<div class=\"sk-fading-circle\">\n <img *ngIf=\"useLogo\" src=\"../../../../assets/icons/smarterplan.svg\">\n <div class=\"sk-circle1 sk-circle\"></div>\n <div class=\"sk-circle2 sk-circle\"></div>\n <div class=\"sk-circle3 sk-circle\"></div>\n <div class=\"sk-circle4 sk-circle\"></div>\n <div class=\"sk-circle5 sk-circle\"></div>\n <div class=\"sk-circle6 sk-circle\"></div>\n <div class=\"sk-circle7 sk-circle\"></div>\n <div class=\"sk-circle8 sk-circle\"></div>\n <div class=\"sk-circle9 sk-circle\"></div>\n <div class=\"sk-circle10 sk-circle\"></div>\n <div class=\"sk-circle11 sk-circle\"></div>\n <div class=\"sk-circle12 sk-circle\"></div>\n</div>\n", styles: [".sk-fading-circle{width:88px;height:88px;position:relative}.sk-fading-circle img{width:2rem;position:absolute;left:calc(50% - 16px);top:calc(50% - 16px)}.sk-fading-circle .sk-circle{width:100%;height:100%;position:absolute;left:0;top:0}.sk-fading-circle .sk-circle:before{content:\"\";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--color);border-radius:100%;-webkit-animation:sk-circleFadeDelay 1.2s infinite ease-in-out both;animation:sk-circleFadeDelay 1.2s infinite ease-in-out both}.sk-fading-circle .sk-circle2{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.sk-fading-circle .sk-circle3{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}.sk-fading-circle .sk-circle4{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.sk-fading-circle .sk-circle5{-webkit-transform:rotate(120deg);-ms-transform:rotate(120deg);transform:rotate(120deg)}.sk-fading-circle .sk-circle6{-webkit-transform:rotate(150deg);-ms-transform:rotate(150deg);transform:rotate(150deg)}.sk-fading-circle .sk-circle7{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.sk-fading-circle .sk-circle8{-webkit-transform:rotate(210deg);-ms-transform:rotate(210deg);transform:rotate(210deg)}.sk-fading-circle .sk-circle9{-webkit-transform:rotate(240deg);-ms-transform:rotate(240deg);transform:rotate(240deg)}.sk-fading-circle .sk-circle10{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.sk-fading-circle .sk-circle11{-webkit-transform:rotate(300deg);-ms-transform:rotate(300deg);transform:rotate(300deg)}.sk-fading-circle .sk-circle12{-webkit-transform:rotate(330deg);-ms-transform:rotate(330deg);transform:rotate(330deg)}.sk-fading-circle .sk-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-fading-circle .sk-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-fading-circle .sk-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-fading-circle .sk-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sk-fading-circle .sk-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.sk-fading-circle .sk-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.sk-fading-circle .sk-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.sk-fading-circle .sk-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sk-fading-circle .sk-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sk-fading-circle .sk-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sk-fading-circle .sk-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes sk-circleFadeDelay{0%,39%,to{opacity:0}40%{opacity:1}}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
16770
16837
  }
16771
16838
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LoaderComponent, decorators: [{
16772
16839
  type: Component,
@@ -16828,7 +16895,7 @@ class SupportModalComponent {
16828
16895
  }
16829
16896
  }
16830
16897
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SupportModalComponent, deps: [{ token: SupportService }, { token: i1$2.NgbActiveModal }, { token: i3.UntypedFormBuilder }, { token: BaseUserService }, { token: ValidatorsService }], target: i0.ɵɵFactoryTarget.Component });
16831
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SupportModalComponent, selector: "app-support-modal", ngImport: i0, template: "<div class=\"modal-header\">\n <h5 class=\"modal-title\" translate=\"Help\"></h5>\n</div>\n<div class=\"modal-body\">\n <div class=\"support-loader-container\">\n <lib-loader *ngIf=\"loading\"></lib-loader>\n </div>\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"supportForm\" style=\"margin-top:1rem;\" *ngIf=\"!loading && status==='new'\">\n <div>\n <label>{{'Title' | translate}} *</label>\n <div>\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" data-testid=\"new-support-title\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['title'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-title-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['title'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['title'])\"></span>\n </div>\n </div>\n <div *ngIf=\"!currentUser\">\n <label>{{'Email' | translate}} *</label>\n <div>\n <input type=\"email\" class=\"form-control\" formControlName=\"email\" data-testid=\"new-support-email\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['email'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-email-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['email'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['email'])\"></span>\n </div>\n </div>\n <div>\n <label>{{'Description' | translate}} *</label>\n <div>\n <textarea formControlName=\"description\" class=\"form-control\"\n data-testid=\"new-support-description\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['description'])}\"></textarea>\n </div>\n <div class=\"invalid-feedback\" >\n <span data-testid=\"new-support-description-invalid\" [translate]=\" validatorsService.getError(supportForm.controls['description'])\"\n *ngIf=\"validatorsService.isControlError(supportForm.controls['description'])\"></span>\n </div>\n </div>\n </form>\n\n <div *ngIf=\"status ==='send'\" translate=\"Your request has been registered\" data-testid=\"new-support-send-info\">\n </div>\n <div *ngIf=\"status ==='error'\" translate=\"An error has occurred, please renew your request\"\n data-testid=\"new-support-error-info\">\n\n </div>\n</div>\n<div class=\"modal-footer\">\n <button type=\"button\" class=\"btn rounded-pill btn-museum\" data-dismiss=\"modal\" translate=\"Close\" (click)=\"onClose()\"\n data-testid=\"new-support-close-btn\"></button>\n <button *ngIf=\"!loading && status==='new'\" type=\"button\" class=\"btn rounded-pill btn-museum\" translate=\"Submit\"\n (click)=\"onSubmit()\" [disabled]=\"!supportForm.valid\" data-testid=\"new-support-submit-btn\"></button>\n</div>", styles: [".support-loader-container{width:88px;margin:auto}.invalid-feedback{height:16px}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
16898
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SupportModalComponent, selector: "app-support-modal", ngImport: i0, template: "<div class=\"modal-header\">\n <h5 class=\"modal-title\" translate=\"Help\"></h5>\n</div>\n<div class=\"modal-body\">\n <div class=\"support-loader-container\">\n <lib-loader *ngIf=\"loading\"></lib-loader>\n </div>\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"supportForm\" style=\"margin-top:1rem;\" *ngIf=\"!loading && status==='new'\">\n <div>\n <label>{{'Title' | translate}} *</label>\n <div>\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" data-testid=\"new-support-title\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['title'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-title-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['title'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['title'])\"></span>\n </div>\n </div>\n <div *ngIf=\"!currentUser\">\n <label>{{'Email' | translate}} *</label>\n <div>\n <input type=\"email\" class=\"form-control\" formControlName=\"email\" data-testid=\"new-support-email\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['email'])}\"\n maxlength=\"255\">\n </div>\n <div class=\"invalid-feedback\">\n <span data-testid=\"new-support-email-invalid\" [translate]=\"validatorsService.getError(supportForm.controls['email'])\"\n *ngIf=\" validatorsService.isControlError(supportForm.controls['email'])\"></span>\n </div>\n </div>\n <div>\n <label>{{'Description' | translate}} *</label>\n <div>\n <textarea formControlName=\"description\" class=\"form-control\"\n data-testid=\"new-support-description\"\n [ngClass]=\"{'is-invalid' : validatorsService.isControlError(supportForm.controls['description'])}\"></textarea>\n </div>\n <div class=\"invalid-feedback\" >\n <span data-testid=\"new-support-description-invalid\" [translate]=\" validatorsService.getError(supportForm.controls['description'])\"\n *ngIf=\"validatorsService.isControlError(supportForm.controls['description'])\"></span>\n </div>\n </div>\n </form>\n\n <div *ngIf=\"status ==='send'\" translate=\"Your request has been registered\" data-testid=\"new-support-send-info\">\n </div>\n <div *ngIf=\"status ==='error'\" translate=\"An error has occurred, please renew your request\"\n data-testid=\"new-support-error-info\">\n\n </div>\n</div>\n<div class=\"modal-footer\">\n <button type=\"button\" class=\"btn rounded-pill btn-museum\" data-dismiss=\"modal\" translate=\"Close\" (click)=\"onClose()\"\n data-testid=\"new-support-close-btn\"></button>\n <button *ngIf=\"!loading && status==='new'\" type=\"button\" class=\"btn rounded-pill btn-museum\" translate=\"Submit\"\n (click)=\"onSubmit()\" [disabled]=\"!supportForm.valid\" data-testid=\"new-support-submit-btn\"></button>\n</div>", styles: [".support-loader-container{width:88px;margin:auto}.invalid-feedback{height:16px}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: LoaderComponent, selector: "lib-loader", inputs: ["useLogo", "color"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
16832
16899
  }
16833
16900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SupportModalComponent, decorators: [{
16834
16901
  type: Component,
@@ -16865,7 +16932,7 @@ class LocaleService {
16865
16932
  const currentLang = this.translate.getCurrentLang() || this.translate.getFallbackLang() || "fr";
16866
16933
  return currentLang.replace(/^[_-]+/, '').substring(0, 2);
16867
16934
  }
16868
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
16935
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleService, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
16869
16936
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleService, providedIn: "root" });
16870
16937
  }
16871
16938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocaleService, decorators: [{
@@ -16873,7 +16940,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
16873
16940
  args: [{
16874
16941
  providedIn: "root",
16875
16942
  }]
16876
- }], ctorParameters: () => [{ type: i1.TranslateService }] });
16943
+ }], ctorParameters: () => [{ type: i1$1.TranslateService }] });
16877
16944
 
16878
16945
  /* eslint-disable class-methods-use-this */
16879
16946
  var CacheKeys;
@@ -18271,8 +18338,8 @@ class NavigationBarComponent {
18271
18338
  onHideClick() {
18272
18339
  this.baseVisibilityService.isChangePositionVisible.next(false);
18273
18340
  }
18274
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationBarComponent, deps: [{ token: 'currentAwsKinesisAnalyticsService' }, { token: i1$1.Router }, { token: SpaceService }, { token: BaseUserService }, { token: ZoneService }, { token: VisitService }, { token: ViewerService }, { token: NavigatorService }, { token: ZoneChangeService }, { token: BaseVisibilityService }], target: i0.ɵɵFactoryTarget.Component });
18275
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NavigationBarComponent, selector: "lib-navigation-bar", viewQueries: [{ propertyName: "navbarSelectMenu", first: true, predicate: ["navbarSelectMenu"], descendants: true }], ngImport: i0, template: "<nav class=\"navbar navbar-expand-md navbar-dark navbar-inverse second-nav\">\n <div class=\"d-flex w-100\">\n <div #navbarSelectMenu class=\"w-100\" id=\"nav-item-container-blue\">\n <div class=\"d-flex flex-column flex-md-row p-1 mt-2\">\n <select class=\"form-control flex-fill flex-lg-fill-unset location select-menu\"\n [(ngModel)]=\"selectedLocation\" (ngModelChange)=\"onLocationClick()\">\n <option [ngValue]=\"null\" selected>{{ 'Location' | translate }}</option>\n <option *ngFor=\"let loc of locations; index as index\" [ngValue]=\"loc\"> {{ loc.name }}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" (change)=\"onVisitClick($event)\"\n *ngIf=\"visitsPerSpace && visitsPerSpace.length > 1\">\n <option value=\"default\" selected disabled hidden>{{'Visit' | translate}}</option>\n <option *ngFor=\"let visit of visitsPerSpace; index as index\" value=\"{{index}}\">{{ visit.name}}\n </option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset floor select-menu\" [(ngModel)]=\"selectedFloor\"\n (ngModelChange)=\"onFloorClick()\">\n <option [ngValue]=\"null\" selected>{{'Floor' | translate}}</option>\n <option *ngFor=\"let floor of floorsPerSpace\" [ngValue]=\"floor\">{{ floor.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu zone\" [(ngModel)]=\"selectedZone\"\n (ngModelChange)=\"onZoneClick()\">\n <option [ngValue]=\"null\" selected>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of zonesPerFloor\" [ngValue]=\"zone\"><span\n *ngIf=\"zone.code_ref\">{{zone.code_ref}}_</span>{{zone.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" [(ngModel)]=\"selectedChildZone\"\n *ngIf=\"childrenZones && childrenZones.length>0\" (ngModelChange)=\"onChildZoneClick()\">\n <option [ngValue]=\"null\" selected disabled>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of childrenZones\" [ngValue]=\"zone\">{{ zone.name}}</option>\n </select>\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d d-none d-lg-block\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1\" *ngIf=\"showLocation()\">\n <p class=\"fw-bold lh-base align-middle text-center\">\n {{ showLocation() }}\n </p>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1 d-block d-lg-none\">\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n </div>\n </div>\n</nav>", styles: [":host{position:sticky;top:0;height:123px}.navbar{z-index:200;padding:.4rem 1rem}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0}@media (min-width: 992px){.flex-lg-fill-unset{flex:unset!important}}.form-control{width:100%;min-width:80px;max-width:18%}.location{width:auto;max-width:35%}.floor,.zone{width:auto;max-width:30%}button{color:#fff;padding:5px 10px;font-size:1.1em}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}.btn-3d .icon-go-to-3d{width:30px;height:30px;background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23565656;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A');border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23FFFFFF;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A')}.btn-3d[disabled]:hover .icon-go-to-3d{fill:var(--smarterplan-primary)}.outer_circle{background-color:#ebebeb;border-radius:50%;width:32px;height:32px;padding:1px}@media (max-width: 767px){.navbar{padding:.2rem .5rem}.form-control,.location,.floor,.zone{max-width:100%;margin-bottom:15px}input,select{margin-right:0;margin-bottom:15px}}\n"], dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
18341
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationBarComponent, deps: [{ token: 'currentAwsKinesisAnalyticsService' }, { token: i1.Router }, { token: SpaceService }, { token: BaseUserService }, { token: ZoneService }, { token: VisitService }, { token: ViewerService }, { token: NavigatorService }, { token: ZoneChangeService }, { token: BaseVisibilityService }], target: i0.ɵɵFactoryTarget.Component });
18342
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NavigationBarComponent, selector: "lib-navigation-bar", viewQueries: [{ propertyName: "navbarSelectMenu", first: true, predicate: ["navbarSelectMenu"], descendants: true }], ngImport: i0, template: "<nav class=\"navbar navbar-expand-md navbar-dark navbar-inverse second-nav\">\n <div class=\"d-flex w-100\">\n <div #navbarSelectMenu class=\"w-100\" id=\"nav-item-container-blue\">\n <div class=\"d-flex flex-column flex-md-row p-1 mt-2\">\n <select class=\"form-control flex-fill flex-lg-fill-unset location select-menu\"\n [(ngModel)]=\"selectedLocation\" (ngModelChange)=\"onLocationClick()\">\n <option [ngValue]=\"null\" selected>{{ 'Location' | translate }}</option>\n <option *ngFor=\"let loc of locations; index as index\" [ngValue]=\"loc\"> {{ loc.name }}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" (change)=\"onVisitClick($event)\"\n *ngIf=\"visitsPerSpace && visitsPerSpace.length > 1\">\n <option value=\"default\" selected disabled hidden>{{'Visit' | translate}}</option>\n <option *ngFor=\"let visit of visitsPerSpace; index as index\" value=\"{{index}}\">{{ visit.name}}\n </option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset floor select-menu\" [(ngModel)]=\"selectedFloor\"\n (ngModelChange)=\"onFloorClick()\">\n <option [ngValue]=\"null\" selected>{{'Floor' | translate}}</option>\n <option *ngFor=\"let floor of floorsPerSpace\" [ngValue]=\"floor\">{{ floor.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu zone\" [(ngModel)]=\"selectedZone\"\n (ngModelChange)=\"onZoneClick()\">\n <option [ngValue]=\"null\" selected>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of zonesPerFloor\" [ngValue]=\"zone\"><span\n *ngIf=\"zone.code_ref\">{{zone.code_ref}}_</span>{{zone.name}}</option>\n </select>\n <select class=\"form-control flex-fill flex-lg-fill-unset select-menu\" [(ngModel)]=\"selectedChildZone\"\n *ngIf=\"childrenZones && childrenZones.length>0\" (ngModelChange)=\"onChildZoneClick()\">\n <option [ngValue]=\"null\" selected disabled>{{'Zone' | translate}}</option>\n <option *ngFor=\"let zone of childrenZones\" [ngValue]=\"zone\">{{ zone.name}}</option>\n </select>\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d d-none d-lg-block\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1\" *ngIf=\"showLocation()\">\n <p class=\"fw-bold lh-base align-middle text-center\">\n {{ showLocation() }}\n </p>\n </div>\n <div class=\"row align-items-center justify-content-center ml-0 p-1 d-block d-lg-none\">\n <button (click)=\"goTo()\"\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center btn-3d\"\n [disabled]=\"!selectedLocation || !selectedModel3d || !canGo()\">\n <i class=\"icon-go-to-3d d-inline-block\"></i> {{'3D visit' | translate}}\n </button>\n </div>\n </div>\n </div>\n</nav>", styles: [":host{position:sticky;top:0;height:123px}.navbar{z-index:200;padding:.4rem 1rem}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0}@media (min-width: 992px){.flex-lg-fill-unset{flex:unset!important}}.form-control{width:100%;min-width:80px;max-width:18%}.location{width:auto;max-width:35%}.floor,.zone{width:auto;max-width:30%}button{color:#fff;padding:5px 10px;font-size:1.1em}.navbar-toggler{margin-right:1em}.select-menu{max-width:inherit}.btn-3d .icon-go-to-3d{width:30px;height:30px;background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23565656;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A');border:none;vertical-align:middle;fill:var(--smarterplan-primary)}.btn-3d:hover:enabled .icon-go-to-3d{background:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"utf-8\"?>%0A<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->%0A<svg version=\"1.1\" id=\"Calque_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"%0A%09 viewBox=\"0 0 60 60\" style=\"enable-background:new 0 0 60 60;\" xml:space=\"preserve\">%0A<style type=\"text/css\">%0A%09.st0{fill:%23FFFFFF;}%0A<\\/style>%0A<g>%0A%09<path class=\"st0\" d=\"M43.9,32.1V17.7c0-0.4-0.2-0.7-0.5-0.9l-12.8-8c-0.2-0.1-0.4-0.2-0.6-0.2c-0.2,0-0.4,0.1-0.6,0.2l-12.8,8%0A%09%09c-0.3,0.2-0.5,0.5-0.5,0.9v14.4c0,0.4,0.2,0.7,0.5,0.9l12.8,8c0.3,0.2,0.8,0.2,1.1,0l12.8-8C43.7,32.8,43.9,32.5,43.9,32.1z%0A%09%09 M28.9,38.2l-10.7-6.7v-12l10.7,6.7V38.2z M30,24.4l-10.8-6.8L30,10.9l10.8,6.8L30,24.4z M41.8,31.5l-10.7,6.7v-12l10.7-6.7V31.5z\"%0A%09%09/>%0A%09<path class=\"st0\" d=\"M56.1,29.3l-10.3-6.8v2l1.4,1v0l0.8,0.5l0,0l7,4.8c0.3,0.2,0.4,0.5,0.4,0.8c0,0.3-0.2,0.6-0.4,0.8l-6.8,4.7%0A%09%09l0,0l-0.9,0.7v0l-2.9,2v0l-13.8,9.6c-0.3,0.2-0.8,0.2-1.1,0l-14.2-9.8l-2.6-1.8v0L5,32.4c-0.3-0.2-0.4-0.5-0.4-0.8%0A%09%09c0-0.3,0.2-0.6,0.4-0.8l0,0l7.3-5l0,0l0.5-0.3v0l1.4-1v-2L3.9,29.3c-0.8,0.5-1.2,1.4-1.2,2.4c0,0.9,0.5,1.8,1.2,2.4l8.8,6.1v0%0A%09%09l4.5,3.1l11.2,7.7c1,0.7,2.3,0.7,3.3,0l13.7-9.5l1.9-1.3v0l8.8-6.1c0.8-0.5,1.2-1.4,1.2-2.4S56.9,29.8,56.1,29.3z\"/>%0A</g>%0A</svg>%0A')}.btn-3d[disabled]:hover .icon-go-to-3d{fill:var(--smarterplan-primary)}.outer_circle{background-color:#ebebeb;border-radius:50%;width:32px;height:32px;padding:1px}@media (max-width: 767px){.navbar{padding:.2rem .5rem}.form-control,.location,.floor,.zone{max-width:100%;margin-bottom:15px}input,select{margin-right:0;margin-bottom:15px}}\n"], dependencies: [{ kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
18276
18343
  }
18277
18344
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NavigationBarComponent, decorators: [{
18278
18345
  type: Component,
@@ -18280,7 +18347,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
18280
18347
  }], ctorParameters: () => [{ type: undefined, decorators: [{
18281
18348
  type: Inject,
18282
18349
  args: ['currentAwsKinesisAnalyticsService']
18283
- }] }, { type: i1$1.Router }, { type: SpaceService }, { type: BaseUserService }, { type: ZoneService }, { type: VisitService }, { type: ViewerService }, { type: NavigatorService }, { type: ZoneChangeService }, { type: BaseVisibilityService }], propDecorators: { navbarSelectMenu: [{
18350
+ }] }, { type: i1.Router }, { type: SpaceService }, { type: BaseUserService }, { type: ZoneService }, { type: VisitService }, { type: ViewerService }, { type: NavigatorService }, { type: ZoneChangeService }, { type: BaseVisibilityService }], propDecorators: { navbarSelectMenu: [{
18284
18351
  type: ViewChild,
18285
18352
  args: ['navbarSelectMenu']
18286
18353
  }] } });
@@ -18324,6 +18391,7 @@ class MenuBarComponent {
18324
18391
  formatter;
18325
18392
  filterService;
18326
18393
  cacheService;
18394
+ checkIcon = iconData(checkIcon);
18327
18395
  user;
18328
18396
  mission;
18329
18397
  isCollapsed = true;
@@ -18544,19 +18612,19 @@ class MenuBarComponent {
18544
18612
  localStorage.setItem('endDate', endDate.getTime().toString());
18545
18613
  }
18546
18614
  }
18547
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuBarComponent, deps: [{ token: i1$1.Router }, { token: LocaleService }, { token: BaseUserService }, { token: NavigatorService }, { token: SupportService }, { token: BaseVisibilityService }, { token: i1$2.NgbCalendar }, { token: i1$2.NgbDateParserFormatter }, { token: FilterService }, { token: AmplifyCacheService }], target: i0.ɵɵFactoryTarget.Component });
18548
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuBarComponent, selector: "lib-menu-bar", inputs: { cacheName: "cacheName" }, ngImport: i0, template: "<div id=\"menu-bar\">\n <div *ngIf=\"!isVisitor\">\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\n </div>\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <p *ngIf=\"user && mission\" class=\"p-2\">\n <span class=\"username\">{{ user.displayName }}</span><br />\n <span class=\"user-role\">{{ mission.role }}</span><br />\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\n translate}}</span>\n </p>\n <div class=\"dropdown-divider\"></div>\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\n {{'Users management' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/profile\">\n {{'Profile' | translate}}</a>\n <div class=\"dropdown-divider\"></div>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\n [animation]=\"false\">\n <form\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\n (click)=\"onSubmit()\">{{'Search' |\n translate}}</button>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <div class=\"input-group date-selector m-1\">\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\n [value]=\"fromDate | formatDateNumberToDigits\"\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\n <ng-template #t let-date let-focused=\"focused\">\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\n <div class=\"input-group date-selector m-1\">\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\n <button\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\n {{'Apply' | translate}}\n </button>\n <span\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n *ngIf=\"isDateFilterApplied && !dateChanged\">\n <span class=\"iconify\" data-icon=\"ion:checkmark\" data-width=\"15\" data-height=\"15\"></span>\n {{\"Applied\" | translate}}\n </span>\n <button\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\n |\n translate}}</button>\n <div\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\n for=\"btn-check-outlined\">{{\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\n </div>\n </div>\n </form>\n </div>\n </div>\n </nav>\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\n </div>\n <div *ngIf=\"isVisitor && isVisible\">\n <div class=\"visitor-div\">\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\n </div>\n <div class=\"avatar-container-menu\">\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "directive", type: i1$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "component", type: AvatarComponent, selector: "lib-avatar", inputs: ["size", "userID"] }, { kind: "component", type: NavigationBarComponent, selector: "lib-navigation-bar" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" }] });
18615
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuBarComponent, deps: [{ token: i1.Router }, { token: LocaleService }, { token: BaseUserService }, { token: NavigatorService }, { token: SupportService }, { token: BaseVisibilityService }, { token: i1$2.NgbCalendar }, { token: i1$2.NgbDateParserFormatter }, { token: FilterService }, { token: AmplifyCacheService }], target: i0.ɵɵFactoryTarget.Component });
18616
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuBarComponent, selector: "lib-menu-bar", inputs: { cacheName: "cacheName" }, ngImport: i0, template: "<div id=\"menu-bar\">\n <div *ngIf=\"!isVisitor\">\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\n </div>\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <p *ngIf=\"user && mission\" class=\"p-2\">\n <span class=\"username\">{{ user.displayName }}</span><br />\n <span class=\"user-role\">{{ mission.role }}</span><br />\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\n translate}}</span>\n </p>\n <div class=\"dropdown-divider\"></div>\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\n {{'Users management' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/profile\">\n {{'Profile' | translate}}</a>\n <div class=\"dropdown-divider\"></div>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\n [animation]=\"false\">\n <form\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\n (click)=\"onSubmit()\">{{'Search' |\n translate}}</button>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <div class=\"input-group date-selector m-1\">\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\n [value]=\"fromDate | formatDateNumberToDigits\"\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\n <ng-template #t let-date let-focused=\"focused\">\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\n <div class=\"input-group date-selector m-1\">\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\n <button\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\n {{'Apply' | translate}}\n </button>\n <span\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n *ngIf=\"isDateFilterApplied && !dateChanged\">\n <span class=\"iconify\" [icIcon]=\"checkIcon\" width=\"15\" height=\"15\"></span>\n {{\"Applied\" | translate}}\n </span>\n <button\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\n |\n translate}}</button>\n <div\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\n for=\"btn-check-outlined\">{{\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\n </div>\n </div>\n </form>\n </div>\n </div>\n </nav>\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\n </div>\n <div *ngIf=\"isVisitor && isVisible\">\n <div class=\"visitor-div\">\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\n </div>\n <div class=\"avatar-container-menu\">\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "directive", type: i1$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "directive", type: i1$3.IconDirective, selector: "ic-icon,[icIcon]", inputs: ["icIcon", "icon", "color", "inline", "box", "size", "width", "height", "align", "hFlip", "vFlip", "flip", "rotate"] }, { kind: "component", type: AvatarComponent, selector: "lib-avatar", inputs: ["size", "userID"] }, { kind: "component", type: NavigationBarComponent, selector: "lib-navigation-bar" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FormatDateNumberToDigitsPipe, name: "formatDateNumberToDigits" }] });
18549
18617
  }
18550
18618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuBarComponent, decorators: [{
18551
18619
  type: Component,
18552
- args: [{ selector: 'lib-menu-bar', template: "<div id=\"menu-bar\">\n <div *ngIf=\"!isVisitor\">\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\n </div>\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <p *ngIf=\"user && mission\" class=\"p-2\">\n <span class=\"username\">{{ user.displayName }}</span><br />\n <span class=\"user-role\">{{ mission.role }}</span><br />\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\n translate}}</span>\n </p>\n <div class=\"dropdown-divider\"></div>\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\n {{'Users management' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/profile\">\n {{'Profile' | translate}}</a>\n <div class=\"dropdown-divider\"></div>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\n [animation]=\"false\">\n <form\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\n (click)=\"onSubmit()\">{{'Search' |\n translate}}</button>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <div class=\"input-group date-selector m-1\">\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\n [value]=\"fromDate | formatDateNumberToDigits\"\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\n <ng-template #t let-date let-focused=\"focused\">\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\n <div class=\"input-group date-selector m-1\">\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\n <button\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\n {{'Apply' | translate}}\n </button>\n <span\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n *ngIf=\"isDateFilterApplied && !dateChanged\">\n <span class=\"iconify\" data-icon=\"ion:checkmark\" data-width=\"15\" data-height=\"15\"></span>\n {{\"Applied\" | translate}}\n </span>\n <button\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\n |\n translate}}</button>\n <div\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\n for=\"btn-check-outlined\">{{\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\n </div>\n </div>\n </form>\n </div>\n </div>\n </nav>\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\n </div>\n <div *ngIf=\"isVisitor && isVisible\">\n <div class=\"visitor-div\">\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\n </div>\n <div class=\"avatar-container-menu\">\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"] }]
18553
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: LocaleService }, { type: BaseUserService }, { type: NavigatorService }, { type: SupportService }, { type: BaseVisibilityService }, { type: i1$2.NgbCalendar }, { type: i1$2.NgbDateParserFormatter }, { type: FilterService }, { type: AmplifyCacheService }], propDecorators: { cacheName: [{
18620
+ args: [{ selector: 'lib-menu-bar', template: "<div id=\"menu-bar\">\n <div *ngIf=\"!isVisitor\">\n <nav class=\"navbar navbar-expand-md navbar-light p-0\">\n <div class=\"container-fluid\" *ngIf=\"isVisible\">\n <div class=\"navbar-brand order-md-0\" [routerLink]=\"['/dashboard']\">\n <img alt=\"SmarterPlan\" src=\"../assets/images/logos/logo-immo.png\">\n </div>\n <div class=\"ms-auto nav-item dropdown profile_pic-container order-md-2\">\n <div class=\"profile_pic dropdown-toggle\" data-testid=\"dropdown-menu-button\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <p *ngIf=\"user && mission\" class=\"p-2\">\n <span class=\"username\">{{ user.displayName }}</span><br />\n <span class=\"user-role\">{{ mission.role }}</span><br />\n <span class=\"org\">{{ mission.organisation ? mission.organisation.name : \"No organisation\" |\n translate}}</span>\n </p>\n <div class=\"dropdown-divider\"></div>\n <!-- <a class=\"dropdown-item\" routerLink=\"/debug\" *ngIf=\"isManager\">Debug</a> -->\n <a class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/dashboard\">{{'Data management' | translate}}</a>\n <a class=\"dropdown-item\" data-testid=\"user-management-btn\" routerLink=\"/admin\" *ngIf=\"isManager\">\n {{'Users management' | translate}}</a>\n <a class=\"dropdown-item\" routerLink=\"/profile\">\n {{'Profile' | translate}}</a>\n <div class=\"dropdown-divider\"></div>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n <button class=\"navbar-toggler order-md-1\" (click)=\"navbarCollapse.toggle()\" type=\"button\"\n [attr.aria-expanded]=\"!isCollapsed\" aria-controls=\"navbar-collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-collapse order-md-1\" #navbarCollapse=\"ngbCollapse\" [(ngbCollapse)]=\"isCollapsed\"\n [animation]=\"false\">\n <form\n class=\"form-inline m-0 mt-2 form-container d-flex justify-content-start align-items-start align-items-md-center flex-column flex-md-row flex-nowrap filters-menu-block\">\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <input class=\"form-control search-button m-1\" placeholder=\"keyword\" id=\"mainSearchBar\" type=\"text\">\n <button class=\"btn btn-outline-primary rounded-pill m-1 w-fit-content h-fit-content align-self-md-center\"\n (click)=\"onSubmit()\">{{'Search' |\n translate}}</button>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-0\">\n <div class=\"input-group date-selector m-1\">\n <input #dpFromDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpFromDate\"\n [value]=\"fromDate | formatDateNumberToDigits\"\n (input)=\"fromDate = validateInput(fromDate, dpFromDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n <input name=\"datepicker\" class=\"form-control visually-hidden\" ngbDatepicker #datepicker=\"ngbDatepicker\"\n [autoClose]=\"'outside'\" (dateSelect)=\"onDateSelection($event)\" [displayMonths]=\"2\" [dayTemplate]=\"t\"\n outsideDays=\"hidden\" [startDate]=\"fromDate || calendar.getToday()\" [container]=\"'body'\" tabindex=\"-1\">\n <ng-template #t let-date let-focused=\"focused\">\n <span class=\"custom-day\" [class.focused]=\"focused\" [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\" (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n <span class=\"ms-1 p-2\">{{'to' | translate}}</span>\n <div class=\"input-group date-selector m-1\">\n <input #dpToDate class=\"form-control\" placeholder=\"dd/MM/yyyy\" name=\"dpToDate\"\n [value]=\"toDate | formatDateNumberToDigits\" (input)=\"toDate = validateInput(toDate, dpToDate.value)\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary calendar\" (click)=\"datepicker.toggle()\"\n type=\"button\"></button>\n </div>\n </div>\n </div>\n <div class=\"input-group search-button-container d-flex flex-row flex-nowrap p-0 m-1 justify-content-evenly\">\n <button\n class=\"btn btn-primary rounded-pill ms-1 w-25 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onApply()\" *ngIf=\"!isDateFilterApplied || dateChanged\">\n {{'Apply' | translate}}\n </button>\n <span\n class=\"appliedText ms-1 py-2 align-self-md-center pb-md-0 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n *ngIf=\"isDateFilterApplied && !dateChanged\">\n <span class=\"iconify\" [icIcon]=\"checkIcon\" width=\"15\" height=\"15\"></span>\n {{\"Applied\" | translate}}\n </span>\n <button\n class=\"btn btn-outline-primary rounded-pill w-25 mx-2 w-md-fit-content h-md-fit-content align-self-md-center\"\n type=\"button\" (click)=\"onClearDates()\">{{'Clear'\n |\n translate}}</button>\n <div\n class=\"change-position-button align-self-end pb-2 align-self-md-center mx-2 pb-md-0 flex-nowrap w-25 w-md-fit-content h-md-fit-content\">\n <input type=\"checkbox\" class=\"btn-check\" id=\"btn-check-outlined\" autocomplete=\"off\">\n <label class=\"link-primary cursor-pointer text-decoration-underline\" (click)=\"onChangePositionClick()\"\n for=\"btn-check-outlined\">{{\n (isChangePositionVisible ? \"Close\" : \"Move to\") | translate }}</label>\n </div>\n </div>\n </form>\n </div>\n </div>\n </nav>\n <lib-navigation-bar *ngIf=\"isVisible && isChangePositionVisible\"></lib-navigation-bar>\n </div>\n <div *ngIf=\"isVisitor && isVisible\">\n <div class=\"visitor-div\">\n <div class=\"logo-container\" data-testid=\"dropdown-menu-button\">\n <img class=\"img-logo\" alt=\"SmarterPlanLogo\" src=\"../assets/images/logos/logo-reserve.png\">\n </div>\n <div class=\"avatar-container-menu\">\n <div class=\"profile_pic dropdown-toggle cursor-pointer\" data-bs-toggle=\"dropdown\">\n <lib-avatar></lib-avatar>\n </div>\n <div class=\"dropdown-menu dropdown-menu-right\">\n <button class=\"dropdown-item\" (click)=\"localeService.modal()\">{{'Language' | translate}}</button>\n <button class=\"dropdown-item\" (click)=\"openSupportForm()\">{{\"Help\" | translate}}</button>\n <button data-testid=\"logout-auth-btn\" class=\"dropdown-item\" (click)=\"signOut()\">{{\"Logout\" |\n translate}}</button>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["#menu-bar{position:sticky;top:0;z-index:200}.navbar{z-index:200}.navbar-brand{padding-top:5px;padding-bottom:5px;cursor:pointer}.navbar-brand img{height:70px}.profile_pic{border-radius:50%;height:45px;width:45px;margin:8px;border:.2px solid rgb(150,150,150)}.navbar-nav .profile-pic-container .dropdown-menu{position:absolute}.navbar.second-nav{z-index:199;background-color:var(--smarterplan-primary)}.profile_pic.dropdown-toggle:after{display:none}.navbar-light{border-bottom:1px solid var(--smarterplan-primary);background-color:#fff}.navbar form{width:100%;margin:0;padding:0}input,select{margin-right:15px}.select{background:transparent;border:none;color:#fff;margin:6px 20px 0;width:auto}button{padding:5px 10px}button:disabled,button[disabled]{color:#c04f4f}.navbar-toggler{margin-right:1em}.icon{height:40px;width:40px;color:var(--smarterplan-primary)}.search-button-container{width:auto;align-items:stretch;justify-items:start}.search-button-container .search-button{width:auto;border-radius:1rem!important}.visitor-div{background-color:var(--smarterplan-primary);height:60px;display:flex;justify-content:space-between}.profile_pic-container{margin-right:1em}.logo-container,.img-logo{height:100%}.change-position-button{margin-left:2rem}.change-position-button label,.change-position-button .btn-check:checked,.change-position-button .btn-check:focus,.change-position-button .btn-outline-primary,.change-position-button .btn{box-shadow:none!important;outline:0}.change-position-button label{border-radius:16px}.change-position-button .btn-check:checked+.btn{background-color:var(--smarterplan-primary);color:#fff!important}.filters-menu-block{width:auto}@media (min-width: 1200px){.navbar-brand img{height:100px}.profile_pic{height:60px;width:60px;margin:15px}}@media (min-width: 992px) and (max-width: 1199.98px){.navbar-brand img{height:80px}.profile_pic{height:50px;width:50px;margin:12px}}@media (min-width: 768px) and (max-width: 991.98px){.navbar-brand img{height:60px}.profile_pic{height:40px;width:40px;margin:10px}}@media (max-width: 767.98px){.navbar-brand img{height:50px}.profile_pic{height:30px;width:30px;margin:8px}.search-button-container,.filters-menu-block{width:100%}}.form-container{margin:.5rem 0}.navbar-collapse.show{display:flex;padding-bottom:.5rem}.hidden{width:0;margin:0;border:none;padding:0}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:var(--smarterplan-primary-lighter);color:#fff}.custom-day.faded{background-color:var(--smarterplan-primary-transparent)}.calendar{height:100%}.appliedText,.appliedText span{color:var(--smarterplan-primary)}@media (max-width: 767px){.form-inline{flex-direction:column}}.hidden{opacity:0}.date-selector{flex-wrap:nowrap}.date-selector input{min-width:80px;margin:0}@media (min-width: 768px){.w-md-fit-content{width:fit-content!important}.h-md-content{height:fit-content!important}}\n"] }]
18621
+ }], ctorParameters: () => [{ type: i1.Router }, { type: LocaleService }, { type: BaseUserService }, { type: NavigatorService }, { type: SupportService }, { type: BaseVisibilityService }, { type: i1$2.NgbCalendar }, { type: i1$2.NgbDateParserFormatter }, { type: FilterService }, { type: AmplifyCacheService }], propDecorators: { cacheName: [{
18554
18622
  type: Input
18555
18623
  }] } });
18556
18624
 
18557
18625
  /**
18558
18626
  * Gaussian splats, drawn by SuperSplat's viewer (PlayCanvas) in an iframe, as Matterport's showcase
18559
- * is: the page built from projects/splat-viewer, which each app serves from assets/viewers/splat.
18627
+ * is: the page built from src/lib/splat-viewer, which each app serves from assets/viewers/splat.
18560
18628
  *
18561
18629
  * The visit's Three.js scene stays underneath, unseen, holding the tags, their calibration and the
18562
18630
  * measurement, as it does for a model it draws itself; this hands the viewer what the scene holds,
@@ -18880,13 +18948,13 @@ class SplatViewerComponent {
18880
18948
  page.postMessage(command, window.location.origin);
18881
18949
  }
18882
18950
  }
18883
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SplatViewerComponent, deps: [{ token: ViewerService }, { token: i0.ElementRef }, { token: i1$3.DomSanitizer }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
18951
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SplatViewerComponent, deps: [{ token: ViewerService }, { token: i0.ElementRef }, { token: i1$4.DomSanitizer }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
18884
18952
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SplatViewerComponent, selector: "lib-splat-viewer", inputs: { modelKey: "modelKey", up: "up" }, outputs: { loadProgress: "loadProgress", loaded: "loaded", loadFailed: "loadFailed", modeChange: "modeChange" }, host: { listeners: { "window:message": "onMessage($event)" } }, viewQueries: [{ propertyName: "frame", first: true, predicate: ["frame"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: '<iframe #frame [src]="page" title="3D" allow="fullscreen; xr-spatial-tracking" allowfullscreen></iframe>', isInline: true, styles: [":host{display:block;color:var(--smarterplan-primary, rgb(83, 182, 187));background-color:var(--smarterplan-viewer-background, #e0f7ff)}iframe{display:block;width:100%;height:100%;border:0}\n"] });
18885
18953
  }
18886
18954
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SplatViewerComponent, decorators: [{
18887
18955
  type: Component,
18888
18956
  args: [{ selector: 'lib-splat-viewer', template: '<iframe #frame [src]="page" title="3D" allow="fullscreen; xr-spatial-tracking" allowfullscreen></iframe>', styles: [":host{display:block;color:var(--smarterplan-primary, rgb(83, 182, 187));background-color:var(--smarterplan-viewer-background, #e0f7ff)}iframe{display:block;width:100%;height:100%;border:0}\n"] }]
18889
- }], ctorParameters: () => [{ type: ViewerService }, { type: i0.ElementRef }, { type: i1$3.DomSanitizer }, { type: i1.TranslateService }], propDecorators: { modelKey: [{
18957
+ }], ctorParameters: () => [{ type: ViewerService }, { type: i0.ElementRef }, { type: i1$4.DomSanitizer }, { type: i1$1.TranslateService }], propDecorators: { modelKey: [{
18890
18958
  type: Input
18891
18959
  }], up: [{
18892
18960
  type: Input
@@ -18906,6 +18974,517 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
18906
18974
  args: ['window:message', ['$event']]
18907
18975
  }] } });
18908
18976
 
18977
+ /**
18978
+ * The minimum scores a detection can be asked to beat. The model keeps those scoring strictly more
18979
+ * (yolact's postprocess: score > threshold), and a score is at most 1: 1.0 would keep none.
18980
+ */
18981
+ const INVENTORY_CUTOFF_SCORES = ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9"];
18982
+ /** The model's own (machine-learning: configuration/inference.yaml, score_threshold). */
18983
+ const INVENTORY_DEFAULT_CUTOFF = "0.6";
18984
+ /** The panoramas' extensions the inventory reads (machine-learning: inference.py). */
18985
+ const PANORAMA = /\.(png|jpg|jpeg|tiff|bmp|gif)$/;
18986
+ /**
18987
+ * An inventory with no news for this long is taken to have stopped, its task gone without saying
18988
+ * so: it no longer keeps another from being launched.
18989
+ */
18990
+ const INVENTORY_STALE_AFTER_MS = 3 * 60 * 60 * 1000;
18991
+ /**
18992
+ * What is asked of each inventory: the most the API has of these, an environment whose backend
18993
+ * predates a field refusing any query that asks for it.
18994
+ */
18995
+ const RUN_FIELDS = [
18996
+ "id nodeID status MLInventoryModelName MLInventoryModelID cutoffScore createdAt updatedAt " +
18997
+ "imagesTotal imagesDone objectsFound errorMessage step resumeFrom",
18998
+ "id nodeID status MLInventoryModelName MLInventoryModelID cutoffScore createdAt updatedAt " +
18999
+ "imagesTotal imagesDone objectsFound errorMessage",
19000
+ "id nodeID status MLInventoryModelName MLInventoryModelID cutoffScore createdAt updatedAt",
19001
+ ];
19002
+ /**
19003
+ * The AI inventory: an Inventory record per visit, whose creation makes the app's Amplify Lambda
19004
+ * `inventory` start an ECS task that looks for equipment in the visit's panoramas, adds it to the
19005
+ * space, and writes on the record how it goes.
19006
+ */
19007
+ class InventoryService {
19008
+ API;
19009
+ /** Which of RUN_FIELDS the API has all of, as far as is known. */
19010
+ fieldsLevel = 0;
19011
+ constructor(apiInjected) {
19012
+ this.API = apiInjected;
19013
+ }
19014
+ /** The trained models. */
19015
+ async getModels() {
19016
+ const response = await this.API.__proto__.ModelsByStatus("TRAINED");
19017
+ return (response?.items ?? [])
19018
+ .filter((model) => !!model)
19019
+ .map((model) => ({
19020
+ id: model.id,
19021
+ name: (model.modelName ?? "").replace("_model", ""),
19022
+ }));
19023
+ }
19024
+ /** The space's inventories, the latest first. */
19025
+ async getRuns(spaceID) {
19026
+ const query = (fields) => `query InventoriesBySpace($spaceID: ID!, $limit: Int) {
19027
+ inventoriesBySpace(spaceID: $spaceID, limit: $limit) { items { ${fields} } }
19028
+ }`;
19029
+ let response;
19030
+ try {
19031
+ response = await API.graphql(graphqlOperation(query(RUN_FIELDS[this.fieldsLevel]), {
19032
+ spaceID,
19033
+ limit: 1000,
19034
+ }));
19035
+ }
19036
+ catch (error) {
19037
+ const unknownField = (error?.errors ?? []).some((e) => /FieldUndefined|Validation error/.test(e?.message ?? ""));
19038
+ if (!unknownField || this.fieldsLevel === RUN_FIELDS.length - 1) {
19039
+ throw error;
19040
+ }
19041
+ this.fieldsLevel += 1;
19042
+ return this.getRuns(spaceID);
19043
+ }
19044
+ const runs = (response?.data?.inventoriesBySpace?.items ?? []).filter((run) => !!run);
19045
+ return runs.sort((a, b) => b.createdAt.localeCompare(a.createdAt));
19046
+ }
19047
+ /** What the visit has of what its inventory needs; null when the bucket could not be read. */
19048
+ async checkFiles(model3D) {
19049
+ const folder = `visits/${model3D}`;
19050
+ const [inventory, sweeps] = await Promise.all([
19051
+ listFilesInFolder(`${folder}/inventory/`),
19052
+ listFilesInFolder(`${folder}/sweeps/`),
19053
+ ]);
19054
+ if (!inventory || !sweeps) {
19055
+ return null;
19056
+ }
19057
+ const keys = inventory.map((file) => file.key);
19058
+ return {
19059
+ panoramas: sweeps.filter((file) => PANORAMA.test(file.key ?? "")).length,
19060
+ dataJson: keys.includes(`${folder}/inventory/data.json`),
19061
+ modelObj: keys.includes(`${folder}/inventory/model.obj`),
19062
+ };
19063
+ }
19064
+ /** Whether the visit has all its inventory needs. */
19065
+ isComplete(files) {
19066
+ return !!files && files.panoramas > 0 && files.dataJson && files.modelObj;
19067
+ }
19068
+ /** The latest inventory of each visit, the latest first. */
19069
+ latestOfEachVisit(runs) {
19070
+ const latest = new Map();
19071
+ for (const run of runs) {
19072
+ if (!latest.has(run.nodeID)) {
19073
+ latest.set(run.nodeID, run);
19074
+ }
19075
+ }
19076
+ return [...latest.values()];
19077
+ }
19078
+ isToRun(run) {
19079
+ return (run.status === InventoryStatus.TO_RUN ||
19080
+ run.status === InventoryStatus.TO_RUN_ONE_IMAGE);
19081
+ }
19082
+ isStale(run, now = Date.now()) {
19083
+ return now - Date.parse(run.updatedAt || run.createdAt) > INVENTORY_STALE_AFTER_MS;
19084
+ }
19085
+ /**
19086
+ * Whether the inventory's task is yet to finish - cancelled ones included, until it has
19087
+ * stopped - and has not stopped without saying so.
19088
+ */
19089
+ isRunning(run, now = Date.now()) {
19090
+ return ["waiting", "running", "cancelling"].includes(this.state(run, now));
19091
+ }
19092
+ state(run, now = Date.now()) {
19093
+ if (run.status === InventoryStatus.SUCCESS) {
19094
+ return "done";
19095
+ }
19096
+ if (run.status === InventoryStatus.CANCELLED) {
19097
+ return run.step === "STOPPED" || this.isStale(run, now) ? "cancelled" : "cancelling";
19098
+ }
19099
+ if (!this.isToRun(run)) {
19100
+ return "failed";
19101
+ }
19102
+ if (this.isStale(run, now)) {
19103
+ return "stale";
19104
+ }
19105
+ return run.imagesTotal ? "running" : "waiting";
19106
+ }
19107
+ /**
19108
+ * Whether the inventory can be cancelled: running, by a task that stops when asked to - one
19109
+ * that says its step (machine-learning: inventory_job.py) - so not yet when it has not started.
19110
+ */
19111
+ canCancel(run, now = Date.now()) {
19112
+ return !!run.step && this.isToRun(run) && !this.isStale(run, now);
19113
+ }
19114
+ /**
19115
+ * Whether the inventory can be resumed from where it stopped: over without being done, by a
19116
+ * task that keeps what it analyses, with some panoramas analysed and some not.
19117
+ */
19118
+ canResume(run, now = Date.now()) {
19119
+ return (!!run.step &&
19120
+ !this.isRunning(run, now) &&
19121
+ run.status !== InventoryStatus.SUCCESS &&
19122
+ (run.imagesDone ?? 0) > 0 &&
19123
+ run.imagesDone < (run.imagesTotal ?? 0));
19124
+ }
19125
+ /** Asks the inventory's task to stop, after the panorama it is on: it inserts nothing. */
19126
+ async cancel(run) {
19127
+ await this.API.__proto__.UpdateInventory({
19128
+ id: run.id,
19129
+ status: InventoryStatus.CANCELLED,
19130
+ });
19131
+ }
19132
+ /**
19133
+ * Launches the inventory of the stopped one's visit again, from the panoramas that one
19134
+ * analysed, unless one is running in the space.
19135
+ */
19136
+ async resume(spaceID, run) {
19137
+ const runs = await this.getRuns(spaceID);
19138
+ if (runs.some((other) => this.isRunning(other))) {
19139
+ return "ALREADY_RUNNING";
19140
+ }
19141
+ await this.API.__proto__.CreateInventory({
19142
+ id: v4(),
19143
+ MLInventoryModelID: run.MLInventoryModelID,
19144
+ MLInventoryModelName: run.MLInventoryModelName,
19145
+ nodeID: run.nodeID,
19146
+ spaceID,
19147
+ cutoffScore: run.cutoffScore,
19148
+ status: InventoryStatus.TO_RUN,
19149
+ resumeFrom: run.id,
19150
+ });
19151
+ return "LAUNCHED";
19152
+ }
19153
+ /** How much of the panoramas is done, from 0 to 100. */
19154
+ percent(run) {
19155
+ return run.imagesTotal
19156
+ ? Math.round((100 * (run.imagesDone ?? 0)) / run.imagesTotal)
19157
+ : 0;
19158
+ }
19159
+ /** Why it failed, as a key to translate. */
19160
+ failure(run) {
19161
+ switch (run.status) {
19162
+ case InventoryStatus.ERROR_FILE_OBJ_NOT_EXIST:
19163
+ return "The visit's 3D mesh (model.obj) is missing.";
19164
+ case InventoryStatus.ERROR_FILE_JSON_NOT_EXIST:
19165
+ return "The visit's panorama positions (data.json) are missing.";
19166
+ case InventoryStatus.ERROR_FILE_MODEL_NOT_EXIST:
19167
+ return "The AI model's file is missing.";
19168
+ default:
19169
+ return "The analysis failed.";
19170
+ }
19171
+ }
19172
+ /**
19173
+ * Launches an inventory of each of the visits, unless one is already running in the space:
19174
+ * of all their panoramas, or of the one of `sweep` (the first 8 characters of its sweep, as
19175
+ * the panoramas are named) when it is given.
19176
+ */
19177
+ async launch(spaceID, nodeIDs, model, cutoffScore, sweep) {
19178
+ const runs = await this.getRuns(spaceID);
19179
+ if (runs.some((run) => this.isRunning(run))) {
19180
+ return "ALREADY_RUNNING";
19181
+ }
19182
+ // Those that stopped without saying so: said here, for them to read as stopped.
19183
+ await Promise.all(runs
19184
+ .filter((run) => this.isToRun(run) && this.isStale(run))
19185
+ .map((run) => this.API.__proto__
19186
+ .UpdateInventory({ id: run.id, status: InventoryStatus.ERROR })
19187
+ .catch((error) => console.warn("Inventory not marked as stopped", error))));
19188
+ await Promise.all(nodeIDs.map(async (nodeID) => {
19189
+ if (sweep) {
19190
+ // The Lambda takes the panorama from the visit, when the record is created.
19191
+ await this.API.__proto__.UpdateNode({
19192
+ id: nodeID,
19193
+ navigationForInventory: sweep,
19194
+ });
19195
+ }
19196
+ await this.API.__proto__.CreateInventory({
19197
+ id: v4(),
19198
+ MLInventoryModelID: model.id,
19199
+ MLInventoryModelName: model.name,
19200
+ nodeID,
19201
+ spaceID,
19202
+ cutoffScore,
19203
+ status: sweep
19204
+ ? InventoryStatus.TO_RUN_ONE_IMAGE
19205
+ : InventoryStatus.TO_RUN,
19206
+ });
19207
+ }));
19208
+ return "LAUNCHED";
19209
+ }
19210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryService, deps: [{ token: "currentAPIService" }], target: i0.ɵɵFactoryTarget.Injectable });
19211
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryService, providedIn: "root" });
19212
+ }
19213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryService, decorators: [{
19214
+ type: Injectable,
19215
+ args: [{
19216
+ providedIn: "root",
19217
+ }]
19218
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
19219
+ type: Inject,
19220
+ args: ["currentAPIService"]
19221
+ }] }] });
19222
+
19223
+ /** How long between two looks at the inventories while one is running. */
19224
+ const POLL_EVERY_MS = 10000;
19225
+ /**
19226
+ * How the latest AI inventory of each visit goes, as its ECS task writes it on its record: the step
19227
+ * it is at, the panoramas analysed and about how long the rest will take, then done with the
19228
+ * equipment added, or failed and why. One running can be cancelled, and one stopped resumed from
19229
+ * where it stopped. Looked at again every few seconds while one is running; refresh() after
19230
+ * launching one.
19231
+ */
19232
+ class InventoryRunsComponent {
19233
+ inventoryService;
19234
+ /** The space whose inventories to show. */
19235
+ spaceID;
19236
+ /** Only these visits' inventories; all of the space's when it is not given. */
19237
+ nodeIDs = null;
19238
+ /** A name for each visit, by its id. */
19239
+ labels = {};
19240
+ /** Whether one of the inventories shown is running: said when it changes. */
19241
+ runningChange = new EventEmitter();
19242
+ runs = [];
19243
+ /** The inventory whose cancelling waits for its confirmation. */
19244
+ confirmingCancel = null;
19245
+ /** The inventory being cancelled or resumed, its buttons disabled meanwhile. */
19246
+ busy = null;
19247
+ /** What went wrong, or why nothing was done, as a key to translate. */
19248
+ message = null;
19249
+ running = false;
19250
+ poll = null;
19251
+ /**
19252
+ * Each inventory's panoramas done when it was first seen analysing them, and when: how fast
19253
+ * it goes, for how long the rest will take.
19254
+ */
19255
+ firstSeen = new Map();
19256
+ constructor(inventoryService) {
19257
+ this.inventoryService = inventoryService;
19258
+ }
19259
+ ngOnChanges() {
19260
+ this.refresh();
19261
+ }
19262
+ ngOnDestroy() {
19263
+ this.stopPolling();
19264
+ }
19265
+ async refresh() {
19266
+ if (!this.spaceID) {
19267
+ return;
19268
+ }
19269
+ let runs;
19270
+ try {
19271
+ runs = await this.inventoryService.getRuns(this.spaceID);
19272
+ }
19273
+ catch (error) {
19274
+ console.error("Inventories not read", error);
19275
+ this.stopPolling();
19276
+ return;
19277
+ }
19278
+ this.runs = this.inventoryService
19279
+ .latestOfEachVisit(runs)
19280
+ .filter((run) => !this.nodeIDs || this.nodeIDs.includes(run.nodeID));
19281
+ const now = Date.now();
19282
+ for (const run of this.runs) {
19283
+ if (this.inventoryService.state(run) === "running" && !this.firstSeen.has(run.id)) {
19284
+ this.firstSeen.set(run.id, { at: now, done: run.imagesDone ?? 0 });
19285
+ }
19286
+ }
19287
+ const running = this.runs.some((run) => this.inventoryService.isRunning(run));
19288
+ if (running !== this.running) {
19289
+ this.running = running;
19290
+ this.runningChange.emit(running);
19291
+ }
19292
+ if (running && !this.poll) {
19293
+ this.poll = setInterval(() => this.refresh(), POLL_EVERY_MS);
19294
+ }
19295
+ else if (!running) {
19296
+ this.stopPolling();
19297
+ }
19298
+ }
19299
+ /**
19300
+ * About how many minutes the panoramas left will take, at the pace seen since the inventory
19301
+ * was first seen analysing them; null until a panorama has been done meanwhile.
19302
+ */
19303
+ minutesLeft(run) {
19304
+ const first = this.firstSeen.get(run.id);
19305
+ const done = run.imagesDone ?? 0;
19306
+ if (!first || done <= first.done || !run.imagesTotal) {
19307
+ return null;
19308
+ }
19309
+ const msPerPanorama = (Date.now() - first.at) / (done - first.done);
19310
+ return Math.max(1, Math.round(((run.imagesTotal - done) * msPerPanorama) / 60000));
19311
+ }
19312
+ async onConfirmCancel(run) {
19313
+ this.busy = run.id;
19314
+ this.message = null;
19315
+ try {
19316
+ await this.inventoryService.cancel(run);
19317
+ this.confirmingCancel = null;
19318
+ await this.refresh();
19319
+ }
19320
+ catch (error) {
19321
+ console.error("Inventory not cancelled", error);
19322
+ this.message = "The inventory could not be cancelled.";
19323
+ }
19324
+ finally {
19325
+ this.busy = null;
19326
+ }
19327
+ }
19328
+ async onResume(run) {
19329
+ this.busy = run.id;
19330
+ this.message = null;
19331
+ try {
19332
+ const resumed = await this.inventoryService.resume(this.spaceID, run);
19333
+ if (resumed === "ALREADY_RUNNING") {
19334
+ this.message = "An inventory is already running for this location.";
19335
+ }
19336
+ await this.refresh();
19337
+ }
19338
+ catch (error) {
19339
+ console.error("Inventory not resumed", error);
19340
+ this.message = "The inventory could not be resumed.";
19341
+ }
19342
+ finally {
19343
+ this.busy = null;
19344
+ }
19345
+ }
19346
+ stopPolling() {
19347
+ if (this.poll) {
19348
+ clearInterval(this.poll);
19349
+ this.poll = null;
19350
+ }
19351
+ }
19352
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryRunsComponent, deps: [{ token: InventoryService }], target: i0.ɵɵFactoryTarget.Component });
19353
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryRunsComponent, selector: "lib-inventory-runs", inputs: { spaceID: "spaceID", nodeIDs: "nodeIDs", labels: "labels" }, outputs: { runningChange: "runningChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"inventory-runs\" *ngIf=\"runs.length\">\n <h5>{{'Last inventory' | translate}}</h5>\n <div class=\"inventory-run\" *ngFor=\"let run of runs\">\n <div class=\"inventory-run-header\">\n <span class=\"no-lowercase\">{{ labels?.[run.nodeID] ?? run.nodeID }}</span>\n <span class=\"inventory-run-date\">{{ run.createdAt | date:'short' }}</span>\n </div>\n <ng-container [ngSwitch]=\"inventoryService.state(run)\">\n <div *ngSwitchCase=\"'waiting'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Waiting for the analysis to start\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'running'\">\n <ng-container [ngSwitch]=\"run.step\">\n <div *ngSwitchCase=\"'DOWNLOADING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Downloading the files of the visit\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'PLACING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Placing the objects in 3D\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'SAVING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Saving the equipment\u2026' | translate}}\n </div>\n <div *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n <span class=\"inventory-run-detail\" *ngIf=\"minutesLeft(run) as minutes\">\n {{'About' | translate}} {{ minutes }} {{'min left' | translate}}\n </span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"inventoryService.canCancel(run)\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"confirmingCancel !== run.id\" (click)=\"confirmingCancel = run.id\">\n {{'Cancel the inventory' | translate}}</button>\n <div class=\"inventory-run-confirm\" *ngIf=\"confirmingCancel === run.id\">\n <span>{{'It stops after the panorama it is on. Those analysed are kept, to resume from there.' | translate}}</span>\n <div class=\"mt-1\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill me-2\"\n [disabled]=\"busy === run.id\" (click)=\"onConfirmCancel(run)\">\n {{'Yes, cancel' | translate}}</button>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill\"\n [disabled]=\"busy === run.id\" (click)=\"confirmingCancel = null\">\n {{'No, go on' | translate}}</button>\n </div>\n </div>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'cancelling'\" class=\"text-warning\">\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n {{'Cancelling: it stops after the panorama it is on\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'cancelled'\">\n <span class=\"text-warning\">{{'Cancelled' | translate}}.</span>\n <span class=\"inventory-run-detail\" *ngIf=\"run.imagesTotal\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n </span>\n </div>\n <div *ngSwitchCase=\"'done'\" class=\"text-success\">\n <!-- How many, when the task says so: the image before inventory_job.py does not. -->\n <ng-container *ngIf=\"run.objectsFound != null; else doneOnly\">\n {{'Done' | translate}}: {{ run.objectsFound }} {{'equipment added' | translate}}.\n </ng-container>\n <ng-template #doneOnly>{{'Done' | translate}}.</ng-template>\n <span class=\"inventory-run-detail\">{{'Reload the page to see them in the list.' | translate}}</span>\n </div>\n <div *ngSwitchCase=\"'failed'\" class=\"text-danger\">\n {{ inventoryService.failure(run) | translate }}\n <span class=\"inventory-run-detail\" *ngIf=\"run.errorMessage\">{{ run.errorMessage }}</span>\n </div>\n <div *ngSwitchCase=\"'stale'\" class=\"text-warning\">\n {{'No news since' | translate}} {{ run.updatedAt | date:'short' }}:\n {{'the analysis has probably stopped.' | translate}}\n </div>\n </ng-container>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"inventoryService.canResume(run)\" [disabled]=\"busy === run.id\" (click)=\"onResume(run)\">\n {{'Resume from where it stopped' | translate}} ({{ run.imagesDone }} / {{ run.imagesTotal }})</button>\n </div>\n <div class=\"text-danger\" *ngIf=\"message\">{{ message | translate }}</div>\n</div>\n\n<!-- Something is being done, of which there is nothing to count. -->\n<ng-template #busyBar>\n <div class=\"progress mb-1\" role=\"progressbar\" aria-label=\"\u2026\">\n <div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 100%\"></div>\n </div>\n</ng-template>\n\n<ng-template #panoramas let-run>\n <div class=\"progress\" role=\"progressbar\" [attr.aria-valuenow]=\"inventoryService.percent(run)\"\n aria-valuemin=\"0\" aria-valuemax=\"100\">\n <div class=\"progress-bar\" [style.width.%]=\"inventoryService.percent(run)\"></div>\n </div>\n <div class=\"inventory-run-detail\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n ({{ inventoryService.percent(run) }}%)\n </div>\n</ng-template>\n", styles: [".inventory-runs{margin-top:1em}.inventory-runs h5{color:var(--smarterplan-primary)}.inventory-runs .inventory-run{background-color:#fff;border-radius:.25rem;padding:.5rem;margin-bottom:.5rem}.inventory-runs .inventory-run .inventory-run-header{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:.25rem}.inventory-runs .inventory-run .inventory-run-date,.inventory-runs .inventory-run .inventory-run-detail{font-size:.8rem;color:#6c757d}.inventory-runs .inventory-run .inventory-run-detail{display:block}.inventory-runs .inventory-run .progress-bar{background-color:var(--smarterplan-primary)}.inventory-runs .inventory-run .inventory-run-confirm{margin-top:.5rem;font-size:.85rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
19354
+ }
19355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryRunsComponent, decorators: [{
19356
+ type: Component,
19357
+ args: [{ selector: "lib-inventory-runs", template: "<div class=\"inventory-runs\" *ngIf=\"runs.length\">\n <h5>{{'Last inventory' | translate}}</h5>\n <div class=\"inventory-run\" *ngFor=\"let run of runs\">\n <div class=\"inventory-run-header\">\n <span class=\"no-lowercase\">{{ labels?.[run.nodeID] ?? run.nodeID }}</span>\n <span class=\"inventory-run-date\">{{ run.createdAt | date:'short' }}</span>\n </div>\n <ng-container [ngSwitch]=\"inventoryService.state(run)\">\n <div *ngSwitchCase=\"'waiting'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Waiting for the analysis to start\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'running'\">\n <ng-container [ngSwitch]=\"run.step\">\n <div *ngSwitchCase=\"'DOWNLOADING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Downloading the files of the visit\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'PLACING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Placing the objects in 3D\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'SAVING'\">\n <ng-container *ngTemplateOutlet=\"busyBar\"></ng-container>\n {{'Saving the equipment\u2026' | translate}}\n </div>\n <div *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n <span class=\"inventory-run-detail\" *ngIf=\"minutesLeft(run) as minutes\">\n {{'About' | translate}} {{ minutes }} {{'min left' | translate}}\n </span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"inventoryService.canCancel(run)\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"confirmingCancel !== run.id\" (click)=\"confirmingCancel = run.id\">\n {{'Cancel the inventory' | translate}}</button>\n <div class=\"inventory-run-confirm\" *ngIf=\"confirmingCancel === run.id\">\n <span>{{'It stops after the panorama it is on. Those analysed are kept, to resume from there.' | translate}}</span>\n <div class=\"mt-1\">\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill me-2\"\n [disabled]=\"busy === run.id\" (click)=\"onConfirmCancel(run)\">\n {{'Yes, cancel' | translate}}</button>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill\"\n [disabled]=\"busy === run.id\" (click)=\"confirmingCancel = null\">\n {{'No, go on' | translate}}</button>\n </div>\n </div>\n </ng-container>\n </div>\n <div *ngSwitchCase=\"'cancelling'\" class=\"text-warning\">\n <ng-container *ngTemplateOutlet=\"panoramas; context: { $implicit: run }\"></ng-container>\n {{'Cancelling: it stops after the panorama it is on\u2026' | translate}}\n </div>\n <div *ngSwitchCase=\"'cancelled'\">\n <span class=\"text-warning\">{{'Cancelled' | translate}}.</span>\n <span class=\"inventory-run-detail\" *ngIf=\"run.imagesTotal\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n </span>\n </div>\n <div *ngSwitchCase=\"'done'\" class=\"text-success\">\n <!-- How many, when the task says so: the image before inventory_job.py does not. -->\n <ng-container *ngIf=\"run.objectsFound != null; else doneOnly\">\n {{'Done' | translate}}: {{ run.objectsFound }} {{'equipment added' | translate}}.\n </ng-container>\n <ng-template #doneOnly>{{'Done' | translate}}.</ng-template>\n <span class=\"inventory-run-detail\">{{'Reload the page to see them in the list.' | translate}}</span>\n </div>\n <div *ngSwitchCase=\"'failed'\" class=\"text-danger\">\n {{ inventoryService.failure(run) | translate }}\n <span class=\"inventory-run-detail\" *ngIf=\"run.errorMessage\">{{ run.errorMessage }}</span>\n </div>\n <div *ngSwitchCase=\"'stale'\" class=\"text-warning\">\n {{'No news since' | translate}} {{ run.updatedAt | date:'short' }}:\n {{'the analysis has probably stopped.' | translate}}\n </div>\n </ng-container>\n <button type=\"button\" class=\"btn btn-sm btn-outline-primary rounded-pill mt-2\"\n *ngIf=\"inventoryService.canResume(run)\" [disabled]=\"busy === run.id\" (click)=\"onResume(run)\">\n {{'Resume from where it stopped' | translate}} ({{ run.imagesDone }} / {{ run.imagesTotal }})</button>\n </div>\n <div class=\"text-danger\" *ngIf=\"message\">{{ message | translate }}</div>\n</div>\n\n<!-- Something is being done, of which there is nothing to count. -->\n<ng-template #busyBar>\n <div class=\"progress mb-1\" role=\"progressbar\" aria-label=\"\u2026\">\n <div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 100%\"></div>\n </div>\n</ng-template>\n\n<ng-template #panoramas let-run>\n <div class=\"progress\" role=\"progressbar\" [attr.aria-valuenow]=\"inventoryService.percent(run)\"\n aria-valuemin=\"0\" aria-valuemax=\"100\">\n <div class=\"progress-bar\" [style.width.%]=\"inventoryService.percent(run)\"></div>\n </div>\n <div class=\"inventory-run-detail\">\n {{'Panoramas analysed' | translate}}: {{ run.imagesDone ?? 0 }} / {{ run.imagesTotal }}\n ({{ inventoryService.percent(run) }}%)\n </div>\n</ng-template>\n", styles: [".inventory-runs{margin-top:1em}.inventory-runs h5{color:var(--smarterplan-primary)}.inventory-runs .inventory-run{background-color:#fff;border-radius:.25rem;padding:.5rem;margin-bottom:.5rem}.inventory-runs .inventory-run .inventory-run-header{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:.25rem}.inventory-runs .inventory-run .inventory-run-date,.inventory-runs .inventory-run .inventory-run-detail{font-size:.8rem;color:#6c757d}.inventory-runs .inventory-run .inventory-run-detail{display:block}.inventory-runs .inventory-run .progress-bar{background-color:var(--smarterplan-primary)}.inventory-runs .inventory-run .inventory-run-confirm{margin-top:.5rem;font-size:.85rem}\n"] }]
19358
+ }], ctorParameters: () => [{ type: InventoryService }], propDecorators: { spaceID: [{
19359
+ type: Input
19360
+ }], nodeIDs: [{
19361
+ type: Input
19362
+ }], labels: [{
19363
+ type: Input
19364
+ }], runningChange: [{
19365
+ type: Output
19366
+ }] } });
19367
+
19368
+ /**
19369
+ * What a visit has of what its AI inventory needs (InventoryService.checkFiles), and where what is
19370
+ * missing comes from, for the screens to show before launching one. The mesh, which nothing else
19371
+ * puts in the bucket, can be sent from here: the .obj of the visit's MatterPak, as it is.
19372
+ */
19373
+ class InventoryFilesComponent {
19374
+ files;
19375
+ /** Said when the visit gets a file from here: [(files)]. */
19376
+ filesChange = new EventEmitter();
19377
+ /** The visit's Matterport model, the folder of its files. */
19378
+ model3D;
19379
+ /** How much of the .obj is sent, from 0 to 100, while it is. */
19380
+ uploadPercent = null;
19381
+ uploadName = null;
19382
+ /** Why the .obj was not sent, as a key to translate. */
19383
+ uploadError = null;
19384
+ async onModelObjSelected(event) {
19385
+ const input = event.target;
19386
+ const file = input.files?.[0];
19387
+ input.value = "";
19388
+ if (!file) {
19389
+ return;
19390
+ }
19391
+ if (!/\.obj$/i.test(file.name)) {
19392
+ this.uploadError = "Choose the .obj file of the MatterPak.";
19393
+ return;
19394
+ }
19395
+ this.uploadError = null;
19396
+ this.uploadName = file.name;
19397
+ this.uploadPercent = 0;
19398
+ try {
19399
+ // Where the inventory's task looks for it, whatever the file was called.
19400
+ await uploadFileToS3WithProgress(`visits/${this.model3D}/inventory/`, new File([file], "model.obj", { type: "text/plain" }), (fraction) => (this.uploadPercent = Math.round(fraction * 100)));
19401
+ this.files = { ...this.files, modelObj: true };
19402
+ this.filesChange.emit(this.files);
19403
+ }
19404
+ catch (error) {
19405
+ console.error("model.obj not sent", error);
19406
+ this.uploadError = "The file could not be sent.";
19407
+ }
19408
+ finally {
19409
+ this.uploadPercent = null;
19410
+ }
19411
+ }
19412
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19413
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InventoryFilesComponent, selector: "lib-inventory-files", inputs: { files: "files", model3D: "model3D" }, outputs: { filesChange: "filesChange" }, ngImport: i0, template: `
19414
+ <ul class="inventory-files" *ngIf="files; else unknown">
19415
+ <li [class.missing]="!files.panoramas">
19416
+ {{ files.panoramas ? "✓" : "✗" }} {{ "Panoramas" | translate }}: {{ files.panoramas }}
19417
+ <span class="hint" *ngIf="!files.panoramas">{{ "Import the 360° images of the visit first." | translate }}</span>
19418
+ </li>
19419
+ <li [class.missing]="!files.dataJson">
19420
+ {{ files.dataJson ? "✓" : "✗" }} {{ "Panorama positions" | translate }} (data.json)
19421
+ <span class="hint" *ngIf="!files.dataJson">{{ "Import all the images of the visit again (Virtual Visits): the import writes it." | translate }}</span>
19422
+ </li>
19423
+ <li [class.missing]="!files.modelObj">
19424
+ {{ files.modelObj ? "✓" : "✗" }} {{ "3D mesh" | translate }} (model.obj)
19425
+ <span class="hint" *ngIf="!files.modelObj">
19426
+ {{ "The .obj of the visit's MatterPak, from Matterport. Its textures are not needed." | translate }}
19427
+ <label class="btn btn-sm btn-outline-primary rounded-pill upload" *ngIf="uploadPercent === null">
19428
+ <input type="file" accept=".obj" (change)="onModelObjSelected($event)">
19429
+ {{ "Send the .obj" | translate }}
19430
+ </label>
19431
+ <span *ngIf="uploadPercent !== null" class="sending">
19432
+ <span class="progress" role="progressbar" [attr.aria-valuenow]="uploadPercent" aria-valuemin="0" aria-valuemax="100">
19433
+ <span class="progress-bar" [style.width.%]="uploadPercent"></span>
19434
+ </span>
19435
+ {{ "Sending" | translate }} {{ uploadName }} — {{ uploadPercent }}%
19436
+ </span>
19437
+ <span class="error" *ngIf="uploadError">{{ uploadError | translate }}</span>
19438
+ </span>
19439
+ </li>
19440
+ </ul>
19441
+ <ng-template #unknown>
19442
+ <p class="hint">{{ "The files of the visit could not be checked." | translate }}</p>
19443
+ </ng-template>
19444
+ `, isInline: true, styles: [".inventory-files{list-style:none;padding-left:0;margin-bottom:.5rem}.missing{color:var(--bs-danger, #dc3545)}.hint{display:block;font-size:.8rem;color:#6c757d;margin-left:1.2rem}.upload{margin-top:.25rem}.upload input{display:none}.sending{display:block;margin-top:.25rem}.progress{display:flex;height:6px;margin-bottom:.25rem}.progress-bar{transition:none;background-color:var(--smarterplan-primary)}.error{display:block;color:var(--bs-danger, #dc3545)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
19445
+ }
19446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InventoryFilesComponent, decorators: [{
19447
+ type: Component,
19448
+ args: [{ selector: "lib-inventory-files", template: `
19449
+ <ul class="inventory-files" *ngIf="files; else unknown">
19450
+ <li [class.missing]="!files.panoramas">
19451
+ {{ files.panoramas ? "✓" : "✗" }} {{ "Panoramas" | translate }}: {{ files.panoramas }}
19452
+ <span class="hint" *ngIf="!files.panoramas">{{ "Import the 360° images of the visit first." | translate }}</span>
19453
+ </li>
19454
+ <li [class.missing]="!files.dataJson">
19455
+ {{ files.dataJson ? "✓" : "✗" }} {{ "Panorama positions" | translate }} (data.json)
19456
+ <span class="hint" *ngIf="!files.dataJson">{{ "Import all the images of the visit again (Virtual Visits): the import writes it." | translate }}</span>
19457
+ </li>
19458
+ <li [class.missing]="!files.modelObj">
19459
+ {{ files.modelObj ? "✓" : "✗" }} {{ "3D mesh" | translate }} (model.obj)
19460
+ <span class="hint" *ngIf="!files.modelObj">
19461
+ {{ "The .obj of the visit's MatterPak, from Matterport. Its textures are not needed." | translate }}
19462
+ <label class="btn btn-sm btn-outline-primary rounded-pill upload" *ngIf="uploadPercent === null">
19463
+ <input type="file" accept=".obj" (change)="onModelObjSelected($event)">
19464
+ {{ "Send the .obj" | translate }}
19465
+ </label>
19466
+ <span *ngIf="uploadPercent !== null" class="sending">
19467
+ <span class="progress" role="progressbar" [attr.aria-valuenow]="uploadPercent" aria-valuemin="0" aria-valuemax="100">
19468
+ <span class="progress-bar" [style.width.%]="uploadPercent"></span>
19469
+ </span>
19470
+ {{ "Sending" | translate }} {{ uploadName }} — {{ uploadPercent }}%
19471
+ </span>
19472
+ <span class="error" *ngIf="uploadError">{{ uploadError | translate }}</span>
19473
+ </span>
19474
+ </li>
19475
+ </ul>
19476
+ <ng-template #unknown>
19477
+ <p class="hint">{{ "The files of the visit could not be checked." | translate }}</p>
19478
+ </ng-template>
19479
+ `, styles: [".inventory-files{list-style:none;padding-left:0;margin-bottom:.5rem}.missing{color:var(--bs-danger, #dc3545)}.hint{display:block;font-size:.8rem;color:#6c757d;margin-left:1.2rem}.upload{margin-top:.25rem}.upload input{display:none}.sending{display:block;margin-top:.25rem}.progress{display:flex;height:6px;margin-bottom:.25rem}.progress-bar{transition:none;background-color:var(--smarterplan-primary)}.error{display:block;color:var(--bs-danger, #dc3545)}\n"] }]
19480
+ }], propDecorators: { files: [{
19481
+ type: Input
19482
+ }], filesChange: [{
19483
+ type: Output
19484
+ }], model3D: [{
19485
+ type: Input
19486
+ }] } });
19487
+
18909
19488
  class NgxSmarterplanCoreModule {
18910
19489
  static forRoot(config) {
18911
19490
  return {
@@ -18933,11 +19512,14 @@ class NgxSmarterplanCoreModule {
18933
19512
  LoaderComponent,
18934
19513
  SupportModalComponent,
18935
19514
  FormatDateNumberToDigitsPipe,
18936
- SplatViewerComponent], imports: [FormsModule,
19515
+ SplatViewerComponent,
19516
+ InventoryRunsComponent,
19517
+ InventoryFilesComponent], imports: [FormsModule,
18937
19518
  ReactiveFormsModule,
18938
19519
  CommonModule,
18939
19520
  RouterModule,
18940
- NgbModule, i1.TranslateModule], exports: [CsvExportComponent,
19521
+ NgbModule,
19522
+ IconModule, i1$1.TranslateModule], exports: [CsvExportComponent,
18941
19523
  SearchBarComponent,
18942
19524
  TimeDateToLocalStringPipe,
18943
19525
  SafeUrlPipe,
@@ -18948,12 +19530,15 @@ class NgxSmarterplanCoreModule {
18948
19530
  LoaderComponent,
18949
19531
  SupportModalComponent,
18950
19532
  AvatarComponent,
18951
- SplatViewerComponent] });
19533
+ SplatViewerComponent,
19534
+ InventoryRunsComponent,
19535
+ InventoryFilesComponent] });
18952
19536
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxSmarterplanCoreModule, imports: [FormsModule,
18953
19537
  ReactiveFormsModule,
18954
19538
  CommonModule,
18955
19539
  RouterModule,
18956
19540
  NgbModule,
19541
+ IconModule,
18957
19542
  TranslateModule.forChild({
18958
19543
  extend: true
18959
19544
  })] });
@@ -18976,7 +19561,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
18976
19561
  LoaderComponent,
18977
19562
  SupportModalComponent,
18978
19563
  FormatDateNumberToDigitsPipe,
18979
- SplatViewerComponent
19564
+ SplatViewerComponent,
19565
+ InventoryRunsComponent,
19566
+ InventoryFilesComponent
18980
19567
  ],
18981
19568
  imports: [
18982
19569
  FormsModule,
@@ -18984,6 +19571,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
18984
19571
  CommonModule,
18985
19572
  RouterModule,
18986
19573
  NgbModule,
19574
+ IconModule,
18987
19575
  TranslateModule.forChild({
18988
19576
  extend: true
18989
19577
  })
@@ -19001,6 +19589,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
19001
19589
  SupportModalComponent,
19002
19590
  AvatarComponent,
19003
19591
  SplatViewerComponent,
19592
+ InventoryRunsComponent,
19593
+ InventoryFilesComponent,
19004
19594
  ]
19005
19595
  }]
19006
19596
  }] });
@@ -19308,6 +19898,9 @@ class MatterportImportService {
19308
19898
  }
19309
19899
  });
19310
19900
  await waitUntil(() => appIsLoaded === true);
19901
+ // The sweeps' positions, which the AI inventory places what it finds in the panoramas with:
19902
+ // with the images too, for a visit imported before it was written to have it.
19903
+ await uploadJsonToS3(`visits/${this.modelID}/inventory/`, JSON.stringify(Object.values(this.sweeps)), 'data.json');
19311
19904
  if (reloading) {
19312
19905
  await this.import360images(overrideExisting);
19313
19906
  return Promise.resolve(true);
@@ -19320,8 +19913,6 @@ class MatterportImportService {
19320
19913
  return Promise.reject(new Error('missing data (no main Building Zone)'));
19321
19914
  }
19322
19915
  console.log('importing data from matterport');
19323
- const json = JSON.stringify(Object.values(this.sweeps));
19324
- await uploadJsonToS3(`visits/${this.modelID}/inventory/`, json, 'data.json');
19325
19916
  const layerBuilding = await this.getLayerByName('BUILDING');
19326
19917
  const createdDefaultZone = await this.createZone(node.metadata, layerBuilding.id, surface, mainZone.id, Object.keys(this.sweeps), node);
19327
19918
  if (!createdDefaultZone) {
@@ -23282,13 +23873,13 @@ class MatterportTagCopyService {
23282
23873
  this.setStepLog('done', this.translate.instant('matterportCopy.recalibrateSummary', result));
23283
23874
  return result;
23284
23875
  }
23285
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, deps: [{ token: NavigationService }, { token: BaseUserService }, { token: PoiService }, { token: TicketsService }, { token: EquipmentService }, { token: Object3DService }, { token: FeatureService }, { token: MeasurementService }, { token: CommentService }, { token: HashtagService }, { token: MissionService }, { token: OperationService }, { token: DomainService }, { token: i1.TranslateService }, { token: ZoneService }], target: i0.ɵɵFactoryTarget.Injectable });
23876
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, deps: [{ token: NavigationService }, { token: BaseUserService }, { token: PoiService }, { token: TicketsService }, { token: EquipmentService }, { token: Object3DService }, { token: FeatureService }, { token: MeasurementService }, { token: CommentService }, { token: HashtagService }, { token: MissionService }, { token: OperationService }, { token: DomainService }, { token: i1$1.TranslateService }, { token: ZoneService }], target: i0.ɵɵFactoryTarget.Injectable });
23286
23877
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, providedIn: 'root' });
23287
23878
  }
23288
23879
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MatterportTagCopyService, decorators: [{
23289
23880
  type: Injectable,
23290
23881
  args: [{ providedIn: 'root' }]
23291
- }], ctorParameters: () => [{ type: NavigationService }, { type: BaseUserService }, { type: PoiService }, { type: TicketsService }, { type: EquipmentService }, { type: Object3DService }, { type: FeatureService }, { type: MeasurementService }, { type: CommentService }, { type: HashtagService }, { type: MissionService }, { type: OperationService }, { type: DomainService }, { type: i1.TranslateService }, { type: ZoneService }] });
23882
+ }], ctorParameters: () => [{ type: NavigationService }, { type: BaseUserService }, { type: PoiService }, { type: TicketsService }, { type: EquipmentService }, { type: Object3DService }, { type: FeatureService }, { type: MeasurementService }, { type: CommentService }, { type: HashtagService }, { type: MissionService }, { type: OperationService }, { type: DomainService }, { type: i1$1.TranslateService }, { type: ZoneService }] });
23292
23883
 
23293
23884
  /* eslint-disable class-methods-use-this */
23294
23885
  class OrganisationService {
@@ -23422,5 +24013,5 @@ function floatValidator() {
23422
24013
  * Generated bundle index. Do not edit.
23423
24014
  */
23424
24015
 
23425
- export { AffectationService, AvatarComponent, BaseLateralTabService, BaseTagService, BaseUserService, BaseVisibilityService, CameraMode, CaptureService, CaptureViewer, CommentService, CommentType, Config, ContentService, CsvExportComponent, DomainService, DomainType, DurationToStringPipe, EmailStatus, EquipmentService, EventService, EventStatus, EventType, FeatureService, FeatureType, FilterService, GAUSSIAN_SPLAT_PLY_SUFFIX, HashtagFromIdPipe, HashtagService, InterventionService, InventoryStatus, LayerService, LevelStatus, LoaderComponent, Locale, LocaleService, MATTERPORT_SDK_KEY, MatterportImportService, MatterportService, MatterportTagCopyService, MatterportViewType, MattertagActionMode, MattertagData, MeasurementService, MenuBarComponent, MissionService, NavigationService, NavigatorService, NgxSmarterplanCoreModule, NgxSmarterplanCoreService, NodeService, Object3DService, OperationService, OrganisationService, PaymentStatus, PlanService, PoiService, PoiType, ProfileEntity, ProfileService, ProfileStatus, PropertyService, PropertyType, RoleStatus, SafeUrlPipe, SearchBarComponent, SearchObjectType, SearchService, SpModule, SpaceService, SpaceStatus, SplatViewerComponent, StatusEquipment, SupportModalComponent, SupportService, SweepLocatorService, THREEJS_MODEL_UP_OPTIONS, TagAction, TemplateService, ThreeJsImportService, ThreeJsService, TicketPriority, TicketStatus, TicketType, TicketsService, TimeDateToLocalStringPipe, TypeNote, UsernameFromIdPipe, VIEWER_BACKGROUND, ValidatorsService, ViewerInteractions, ViewerService, VisitService, ZoneChangeService, ZoneService, applyRigidTransformToDirection, applyRigidTransformToPoint, applyRigidTransformToYRotationDeg, arraysContainSameElements, checkElementById, computeRigidTransform, convertObjToGlb, convertTimestampToLocalZone, copyFileInS3, copyFileInS3ViaDownload, dateHasExpired, dateTimeToLocalString, deleteFromS3, distance, downloadBlob, downloadEquipmentDocument, downloadFile, downloadFileAsObject, durationToString, emailValidator, enumToArray, filterUniqueArrayByID, floatValidator, getBufferForFileFromS3, getCoefficientsForImage, getCurrentLang, getDistanceBetweenTwoPoints, getHighestLevelForMissions, getHighestRoleForMissions, getLevelsBelow, getLocaleLong, getLocaleShort, getMetaForImage, getRolesBelowForManager, getSignedFile, getSignedImageUrlForEquipment, getSignedImageUrlForProfile, getSignedImageUrlForSpace, getSpaceIDFromUrl, getThreeJsPoiOrigin, getVisitUrl, hasObjModel, isEmptyObject, isGaussianSplatFile, isGaussianSplatPly, isStreamedSplatFile, listFilesInFolder, mean, noEmptyValidator, numberToDateString, openDocument, openModalForVisitSwitch, parseThreeJsPlacement, poiTypeToString, pointToString, readObj, removeAllFilesFromFolderS3, removeNullKeysFromObject, showScanPointsOnPlanInDiv, shuffleArray, solveThreeJsAlignment, sortAlphabeticallyOnName, stringLocaleToEnum, stringToLowercaseNoSpaces, styleButton, textValidator, translateDatePeriod, uploadBase64Image, uploadBase64ImageWithRetry, uploadFileToS3, uploadFileToS3WithProgress, uploadJsonToS3, validEmail, wait, waitUntil };
24016
+ export { AffectationService, AvatarComponent, BaseLateralTabService, BaseTagService, BaseUserService, BaseVisibilityService, CameraMode, CaptureService, CaptureViewer, CommentService, CommentType, Config, ContentService, CsvExportComponent, DomainService, DomainType, DurationToStringPipe, EmailStatus, EquipmentService, EventService, EventStatus, EventType, FeatureService, FeatureType, FilterService, GAUSSIAN_SPLAT_PLY_SUFFIX, HashtagFromIdPipe, HashtagService, INVENTORY_CUTOFF_SCORES, INVENTORY_DEFAULT_CUTOFF, INVENTORY_STALE_AFTER_MS, InterventionService, InventoryFilesComponent, InventoryRunsComponent, InventoryService, InventoryStatus, LayerService, LevelStatus, LoaderComponent, Locale, LocaleService, MATTERPORT_SDK_KEY, MatterportImportService, MatterportService, MatterportTagCopyService, MatterportViewType, MattertagActionMode, MattertagData, MeasurementService, MenuBarComponent, MissionService, NavigationService, NavigatorService, NgxSmarterplanCoreModule, NgxSmarterplanCoreService, NodeService, Object3DService, OperationService, OrganisationService, PLAN_ICONS, PaymentStatus, PlanService, PoiService, PoiType, ProfileEntity, ProfileService, ProfileStatus, PropertyService, PropertyType, RoleStatus, SafeUrlPipe, SearchBarComponent, SearchObjectType, SearchService, SpModule, SpaceService, SpaceStatus, SplatViewerComponent, StatusEquipment, SupportModalComponent, SupportService, SweepLocatorService, THREEJS_MODEL_UP_OPTIONS, TagAction, TemplateService, ThreeJsImportService, ThreeJsService, TicketPriority, TicketStatus, TicketType, TicketsService, TimeDateToLocalStringPipe, TypeNote, UsernameFromIdPipe, VIEWER_BACKGROUND, ValidatorsService, ViewerInteractions, ViewerService, VisitService, ZoneChangeService, ZoneService, applyRigidTransformToDirection, applyRigidTransformToPoint, applyRigidTransformToYRotationDeg, arraysContainSameElements, checkElementById, computeRigidTransform, convertObjToGlb, convertTimestampToLocalZone, copyFileInS3, copyFileInS3ViaDownload, dateHasExpired, dateTimeToLocalString, deleteFromS3, distance, downloadBlob, downloadEquipmentDocument, downloadFile, downloadFileAsObject, durationToString, emailValidator, enumToArray, filterUniqueArrayByID, floatValidator, getBufferForFileFromS3, getCoefficientsForImage, getCurrentLang, getDistanceBetweenTwoPoints, getHighestLevelForMissions, getHighestRoleForMissions, getLevelsBelow, getLocaleLong, getLocaleShort, getMetaForImage, getRolesBelowForManager, getSignedFile, getSignedImageUrlForEquipment, getSignedImageUrlForProfile, getSignedImageUrlForSpace, getSpaceIDFromUrl, getThreeJsPoiOrigin, getVisitUrl, hasObjModel, iconData, iconToDataUrl, isEmptyObject, isGaussianSplatFile, isGaussianSplatPly, isStreamedSplatFile, listFilesInFolder, mean, noEmptyValidator, numberToDateString, openDocument, openModalForVisitSwitch, parseThreeJsPlacement, poiTypeToString, pointToString, readObj, removeAllFilesFromFolderS3, removeNullKeysFromObject, showScanPointsOnPlanInDiv, shuffleArray, solveThreeJsAlignment, sortAlphabeticallyOnName, stringLocaleToEnum, stringToLowercaseNoSpaces, styleButton, svgToDataUrl, textValidator, translateDatePeriod, uploadBase64Image, uploadBase64ImageWithRetry, uploadFileToS3, uploadFileToS3WithProgress, uploadJsonToS3, validEmail, wait, waitUntil };
23426
24017
  //# sourceMappingURL=smarterplan-ngx-smarterplan-core.mjs.map