@posiwise/user-module 0.0.177 → 0.0.178

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.
@@ -9,7 +9,7 @@ import { RouterModule } from "@angular/router";
9
9
  import * as i9$1 from "@angular-magic/ngx-gp-autocomplete";
10
10
  import { NgxGpAutocompleteModule } from "@angular-magic/ngx-gp-autocomplete";
11
11
  import { AppConfigService } from "@posiwise/app-config-service";
12
- import * as i5$2 from "@posiwise/app-loader";
12
+ import * as i5$1 from "@posiwise/app-loader";
13
13
  import { AppLoaderModule } from "@posiwise/app-loader";
14
14
  import * as i8$1 from "@posiwise/core-guards";
15
15
  import { TrackDirtyFormDirective } from "@posiwise/core-guards";
@@ -55,7 +55,7 @@ import { ValidateForm, appendQueryParam, clearQueryParams } from "@posiwise/util
55
55
  import { StatusCodes } from "http-status-codes";
56
56
  import { firstValueFrom, forkJoin, from, interval, map } from "rxjs";
57
57
  import { getDomain } from "tldts";
58
- import * as i3 from "@posiwise/common-services";
58
+ import * as i3$2 from "@posiwise/common-services";
59
59
  import { FormHelperService, PermissionService, ValidationService, hasKnowledgeAlpha } from "@posiwise/common-services";
60
60
  import * as i14 from "@jsverse/transloco";
61
61
  import cloneDeep from "lodash/cloneDeep";
@@ -63,10 +63,10 @@ import sortBy from "lodash/sortBy";
63
63
  import { distinct, mergeMap } from "rxjs/operators";
64
64
  import { HttpErrorResponse, HttpParams } from "@angular/common/http";
65
65
  import { GetUser, getUser } from "@posiwise/app-store";
66
- import * as i4$2 from "@ngrx/store";
66
+ import * as i3$1 from "@ngrx/store";
67
67
  import * as i2$1 from "@posiwise/admin-module-utils";
68
68
  import { AppAdmin } from "@posiwise/admin-module-utils";
69
- import * as i5$1 from "@angular/cdk/clipboard";
69
+ import * as i3 from "@angular/cdk/clipboard";
70
70
  import * as i5 from "primeng/table";
71
71
  import moment from "moment";
72
72
  import * as i4$1 from "primeng/autocomplete";
@@ -102,7 +102,7 @@ var AccountComponent = class AccountComponent {
102
102
  static {
103
103
  this.ɵfac = i0.ɵɵngDeclareFactory({
104
104
  minVersion: "12.0.0",
105
- version: "22.2.0",
105
+ version: "22.2.3",
106
106
  ngImport: i0,
107
107
  type: AccountComponent,
108
108
  deps: [{ token: i1$2.Router }],
@@ -112,7 +112,7 @@ var AccountComponent = class AccountComponent {
112
112
  static {
113
113
  this.ɵcmp = i0.ɵɵngDeclareComponent({
114
114
  minVersion: "14.0.0",
115
- version: "22.2.0",
115
+ version: "22.2.3",
116
116
  type: AccountComponent,
117
117
  isStandalone: false,
118
118
  selector: "pw-user-account",
@@ -136,7 +136,7 @@ var AccountComponent = class AccountComponent {
136
136
  };
137
137
  i0.ɵɵngDeclareClassMetadata({
138
138
  minVersion: "12.0.0",
139
- version: "22.2.0",
139
+ version: "22.2.3",
140
140
  ngImport: i0,
141
141
  type: AccountComponent,
142
142
  decorators: [{
@@ -518,15 +518,15 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
518
518
  static {
519
519
  this.ɵfac = i0.ɵɵngDeclareFactory({
520
520
  minVersion: "12.0.0",
521
- version: "22.2.0",
521
+ version: "22.2.3",
522
522
  ngImport: i0,
523
523
  type: AccountDetailsComponent,
524
524
  deps: [
525
525
  { token: i1$1.UntypedFormBuilder },
526
526
  { token: i2$2.NgbModal },
527
- { token: i3.AuthService },
528
- { token: i3.GeoService },
529
- { token: i3.ProfileService },
527
+ { token: i3$2.AuthService },
528
+ { token: i3$2.GeoService },
529
+ { token: i3$2.ProfileService },
530
530
  { token: i0.Injector },
531
531
  { token: i0.ChangeDetectorRef },
532
532
  { token: i2$3.ConfirmDialogService }
@@ -537,7 +537,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
537
537
  static {
538
538
  this.ɵcmp = i0.ɵɵngDeclareComponent({
539
539
  minVersion: "17.0.0",
540
- version: "22.2.0",
540
+ version: "22.2.3",
541
541
  type: AccountDetailsComponent,
542
542
  isStandalone: false,
543
543
  selector: "pw-account-details",
@@ -559,7 +559,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
559
559
  dependencies: [
560
560
  {
561
561
  kind: "component",
562
- type: i5$2.AppLoaderComponent,
562
+ type: i5$1.AppLoaderComponent,
563
563
  selector: "pw-loader",
564
564
  inputs: [
565
565
  "isVisible",
@@ -857,7 +857,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
857
857
  __decorate([ValidateForm("profileForm")], AccountDetailsComponent.prototype, "onProfileFormSubmit", null);
858
858
  i0.ɵɵngDeclareClassMetadata({
859
859
  minVersion: "12.0.0",
860
- version: "22.2.0",
860
+ version: "22.2.3",
861
861
  ngImport: i0,
862
862
  type: AccountDetailsComponent,
863
863
  decorators: [{
@@ -872,9 +872,9 @@ i0.ɵɵngDeclareClassMetadata({
872
872
  ctorParameters: () => [
873
873
  { type: i1$1.UntypedFormBuilder },
874
874
  { type: i2$2.NgbModal },
875
- { type: i3.AuthService },
876
- { type: i3.GeoService },
877
- { type: i3.ProfileService },
875
+ { type: i3$2.AuthService },
876
+ { type: i3$2.GeoService },
877
+ { type: i3$2.ProfileService },
878
878
  { type: i0.Injector },
879
879
  { type: i0.ChangeDetectorRef },
880
880
  { type: i2$3.ConfirmDialogService }
@@ -915,7 +915,8 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
915
915
  this.userStore().subscribe((user) => {
916
916
  this.user = user;
917
917
  if (this.user) {
918
- cloneDeep(this.user.subscriptions).forEach((subscription) => {
918
+ const subs = cloneDeep(this.user.subscriptions);
919
+ subs.forEach((subscription) => {
919
920
  subscription.products.forEach((product) => {
920
921
  const prod = this.products.find((x) => x.id === product.id);
921
922
  if (prod) {
@@ -924,7 +925,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
924
925
  }
925
926
  });
926
927
  });
927
- this.subscribedPermissionKeys = Array.from(new Set(this.user.subscriptions.flatMap((x) => x.products).map((product) => product.permission_key)));
928
+ this.subscribedPermissionKeys = Array.from(/* @__PURE__ */ new Set([...this.user.subscriptions.flatMap((x) => x.products).map((product) => product.permission_key), ...this.addonPermissionKeys(subs)]));
928
929
  const prodPermissionKeys = this.products.map((p) => p.permission_key);
929
930
  this.subscribedPermissionKeys = this.subscribedPermissionKeys.filter((x) => prodPermissionKeys.includes(x));
930
931
  this.availableProducts = sortBy(this.getSingleCategoryProducts(), "is_subscribed");
@@ -934,6 +935,14 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
934
935
  this.cdr.markForCheck();
935
936
  });
936
937
  }
938
+ addonPermissionKeys(subscriptions) {
939
+ const current = subscriptions.find((x) => x.id === this.subscriptionId);
940
+ const heldKeys = (current?.products ?? []).map((p) => p.permission_key);
941
+ const heldIds = (current?.products ?? []).map((p) => p.id);
942
+ const addons = this.products.filter((p) => p.addon_for_permission_keys?.some((key) => heldKeys.includes(key)));
943
+ addons.forEach((p) => p["is_subscribed"] = heldIds.includes(p.id));
944
+ return addons.map((p) => p.permission_key);
945
+ }
937
946
  getSingleCategoryProducts(category = this.subscribedPermissionKeys[0]) {
938
947
  return this.products.filter((x) => category === x.permission_key);
939
948
  }
@@ -953,11 +962,11 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
953
962
  static {
954
963
  this.ɵfac = i0.ɵɵngDeclareFactory({
955
964
  minVersion: "12.0.0",
956
- version: "22.2.0",
965
+ version: "22.2.3",
957
966
  ngImport: i0,
958
967
  type: AddSubscriptionComponent,
959
968
  deps: [
960
- { token: i3.ProductService },
969
+ { token: i3$2.ProductService },
961
970
  { token: i0.Injector },
962
971
  { token: i0.ChangeDetectorRef }
963
972
  ],
@@ -967,7 +976,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
967
976
  static {
968
977
  this.ɵcmp = i0.ɵɵngDeclareComponent({
969
978
  minVersion: "17.0.0",
970
- version: "22.2.0",
979
+ version: "22.2.3",
971
980
  type: AddSubscriptionComponent,
972
981
  isStandalone: false,
973
982
  selector: "pw-add-subscription",
@@ -1026,7 +1035,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
1026
1035
  };
1027
1036
  i0.ɵɵngDeclareClassMetadata({
1028
1037
  minVersion: "12.0.0",
1029
- version: "22.2.0",
1038
+ version: "22.2.3",
1030
1039
  ngImport: i0,
1031
1040
  type: AddSubscriptionComponent,
1032
1041
  decorators: [{
@@ -1039,7 +1048,7 @@ i0.ɵɵngDeclareClassMetadata({
1039
1048
  }]
1040
1049
  }],
1041
1050
  ctorParameters: () => [
1042
- { type: i3.ProductService },
1051
+ { type: i3$2.ProductService },
1043
1052
  { type: i0.Injector },
1044
1053
  { type: i0.ChangeDetectorRef }
1045
1054
  ]
@@ -1054,7 +1063,7 @@ var SavedCardDetailsComponent = class SavedCardDetailsComponent {
1054
1063
  static {
1055
1064
  this.ɵfac = i0.ɵɵngDeclareFactory({
1056
1065
  minVersion: "12.0.0",
1057
- version: "22.2.0",
1066
+ version: "22.2.3",
1058
1067
  ngImport: i0,
1059
1068
  type: SavedCardDetailsComponent,
1060
1069
  deps: [],
@@ -1064,7 +1073,7 @@ var SavedCardDetailsComponent = class SavedCardDetailsComponent {
1064
1073
  static {
1065
1074
  this.ɵcmp = i0.ɵɵngDeclareComponent({
1066
1075
  minVersion: "17.0.0",
1067
- version: "22.2.0",
1076
+ version: "22.2.3",
1068
1077
  type: SavedCardDetailsComponent,
1069
1078
  isStandalone: false,
1070
1079
  selector: "pw-saved-card-details",
@@ -1082,7 +1091,7 @@ var SavedCardDetailsComponent = class SavedCardDetailsComponent {
1082
1091
  };
1083
1092
  i0.ɵɵngDeclareClassMetadata({
1084
1093
  minVersion: "12.0.0",
1085
- version: "22.2.0",
1094
+ version: "22.2.3",
1086
1095
  ngImport: i0,
1087
1096
  type: SavedCardDetailsComponent,
1088
1097
  decorators: [{
@@ -1116,7 +1125,7 @@ var ClearMaskedOnFocusDirective = class ClearMaskedOnFocusDirective {
1116
1125
  static {
1117
1126
  this.ɵfac = i0.ɵɵngDeclareFactory({
1118
1127
  minVersion: "12.0.0",
1119
- version: "22.2.0",
1128
+ version: "22.2.3",
1120
1129
  ngImport: i0,
1121
1130
  type: ClearMaskedOnFocusDirective,
1122
1131
  deps: [{
@@ -1130,7 +1139,7 @@ var ClearMaskedOnFocusDirective = class ClearMaskedOnFocusDirective {
1130
1139
  static {
1131
1140
  this.ɵdir = i0.ɵɵngDeclareDirective({
1132
1141
  minVersion: "14.0.0",
1133
- version: "22.2.0",
1142
+ version: "22.2.3",
1134
1143
  type: ClearMaskedOnFocusDirective,
1135
1144
  isStandalone: false,
1136
1145
  selector: "input[pwClearMaskedOnFocus]",
@@ -1141,7 +1150,7 @@ var ClearMaskedOnFocusDirective = class ClearMaskedOnFocusDirective {
1141
1150
  };
1142
1151
  i0.ɵɵngDeclareClassMetadata({
1143
1152
  minVersion: "12.0.0",
1144
- version: "22.2.0",
1153
+ version: "22.2.3",
1145
1154
  ngImport: i0,
1146
1155
  type: ClearMaskedOnFocusDirective,
1147
1156
  decorators: [{
@@ -1183,7 +1192,7 @@ var SubscriptionNameByIdPipe = class SubscriptionNameByIdPipe {
1183
1192
  static {
1184
1193
  this.ɵfac = i0.ɵɵngDeclareFactory({
1185
1194
  minVersion: "12.0.0",
1186
- version: "22.2.0",
1195
+ version: "22.2.3",
1187
1196
  ngImport: i0,
1188
1197
  type: SubscriptionNameByIdPipe,
1189
1198
  deps: [],
@@ -1193,7 +1202,7 @@ var SubscriptionNameByIdPipe = class SubscriptionNameByIdPipe {
1193
1202
  static {
1194
1203
  this.ɵpipe = i0.ɵɵngDeclarePipe({
1195
1204
  minVersion: "14.0.0",
1196
- version: "22.2.0",
1205
+ version: "22.2.3",
1197
1206
  ngImport: i0,
1198
1207
  type: SubscriptionNameByIdPipe,
1199
1208
  isStandalone: false,
@@ -1203,7 +1212,7 @@ var SubscriptionNameByIdPipe = class SubscriptionNameByIdPipe {
1203
1212
  };
1204
1213
  i0.ɵɵngDeclareClassMetadata({
1205
1214
  minVersion: "12.0.0",
1206
- version: "22.2.0",
1215
+ version: "22.2.3",
1207
1216
  ngImport: i0,
1208
1217
  type: SubscriptionNameByIdPipe,
1209
1218
  decorators: [{
@@ -1224,7 +1233,7 @@ var CredentialAvatarHuePipe = class CredentialAvatarHuePipe {
1224
1233
  static {
1225
1234
  this.ɵfac = i0.ɵɵngDeclareFactory({
1226
1235
  minVersion: "12.0.0",
1227
- version: "22.2.0",
1236
+ version: "22.2.3",
1228
1237
  ngImport: i0,
1229
1238
  type: CredentialAvatarHuePipe,
1230
1239
  deps: [],
@@ -1234,7 +1243,7 @@ var CredentialAvatarHuePipe = class CredentialAvatarHuePipe {
1234
1243
  static {
1235
1244
  this.ɵpipe = i0.ɵɵngDeclarePipe({
1236
1245
  minVersion: "14.0.0",
1237
- version: "22.2.0",
1246
+ version: "22.2.3",
1238
1247
  ngImport: i0,
1239
1248
  type: CredentialAvatarHuePipe,
1240
1249
  isStandalone: false,
@@ -1244,7 +1253,7 @@ var CredentialAvatarHuePipe = class CredentialAvatarHuePipe {
1244
1253
  };
1245
1254
  i0.ɵɵngDeclareClassMetadata({
1246
1255
  minVersion: "12.0.0",
1247
- version: "22.2.0",
1256
+ version: "22.2.3",
1248
1257
  ngImport: i0,
1249
1258
  type: CredentialAvatarHuePipe,
1250
1259
  decorators: [{
@@ -1263,7 +1272,7 @@ var HumanizeCredentialNamePipe = class HumanizeCredentialNamePipe {
1263
1272
  static {
1264
1273
  this.ɵfac = i0.ɵɵngDeclareFactory({
1265
1274
  minVersion: "12.0.0",
1266
- version: "22.2.0",
1275
+ version: "22.2.3",
1267
1276
  ngImport: i0,
1268
1277
  type: HumanizeCredentialNamePipe,
1269
1278
  deps: [],
@@ -1273,7 +1282,7 @@ var HumanizeCredentialNamePipe = class HumanizeCredentialNamePipe {
1273
1282
  static {
1274
1283
  this.ɵpipe = i0.ɵɵngDeclarePipe({
1275
1284
  minVersion: "14.0.0",
1276
- version: "22.2.0",
1285
+ version: "22.2.3",
1277
1286
  ngImport: i0,
1278
1287
  type: HumanizeCredentialNamePipe,
1279
1288
  isStandalone: false,
@@ -1283,7 +1292,7 @@ var HumanizeCredentialNamePipe = class HumanizeCredentialNamePipe {
1283
1292
  };
1284
1293
  i0.ɵɵngDeclareClassMetadata({
1285
1294
  minVersion: "12.0.0",
1286
- version: "22.2.0",
1295
+ version: "22.2.3",
1287
1296
  ngImport: i0,
1288
1297
  type: HumanizeCredentialNamePipe,
1289
1298
  decorators: [{
@@ -1448,12 +1457,12 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
1448
1457
  static {
1449
1458
  this.ɵfac = i0.ɵɵngDeclareFactory({
1450
1459
  minVersion: "12.0.0",
1451
- version: "22.2.0",
1460
+ version: "22.2.3",
1452
1461
  ngImport: i0,
1453
1462
  type: SubscriptionCredentialComponent,
1454
1463
  deps: [
1455
1464
  { token: i1$1.UntypedFormBuilder },
1456
- { token: i3.SubscriptionService },
1465
+ { token: i3$2.SubscriptionService },
1457
1466
  { token: i0.Injector },
1458
1467
  { token: i0.ChangeDetectorRef }
1459
1468
  ],
@@ -1463,7 +1472,7 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
1463
1472
  static {
1464
1473
  this.ɵcmp = i0.ɵɵngDeclareComponent({
1465
1474
  minVersion: "17.0.0",
1466
- version: "22.2.0",
1475
+ version: "22.2.3",
1467
1476
  type: SubscriptionCredentialComponent,
1468
1477
  isStandalone: false,
1469
1478
  selector: "pw-subscription-credential",
@@ -1494,7 +1503,7 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
1494
1503
  dependencies: [
1495
1504
  {
1496
1505
  kind: "component",
1497
- type: i5$2.AppLoaderComponent,
1506
+ type: i5$1.AppLoaderComponent,
1498
1507
  selector: "pw-loader",
1499
1508
  inputs: [
1500
1509
  "isVisible",
@@ -1716,7 +1725,7 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
1716
1725
  };
1717
1726
  i0.ɵɵngDeclareClassMetadata({
1718
1727
  minVersion: "12.0.0",
1719
- version: "22.2.0",
1728
+ version: "22.2.3",
1720
1729
  ngImport: i0,
1721
1730
  type: SubscriptionCredentialComponent,
1722
1731
  decorators: [{
@@ -1730,7 +1739,7 @@ i0.ɵɵngDeclareClassMetadata({
1730
1739
  }],
1731
1740
  ctorParameters: () => [
1732
1741
  { type: i1$1.UntypedFormBuilder },
1733
- { type: i3.SubscriptionService },
1742
+ { type: i3$2.SubscriptionService },
1734
1743
  { type: i0.Injector },
1735
1744
  { type: i0.ChangeDetectorRef }
1736
1745
  ],
@@ -1749,6 +1758,185 @@ i0.ɵɵngDeclareClassMetadata({
1749
1758
  }]
1750
1759
  }
1751
1760
  });
1761
+ var SubscriptionRemovalComponent = class SubscriptionRemovalComponent {
1762
+ constructor(subscriptionService, modalService, store, toast, translation, confirmDialog, cdr) {
1763
+ this.subscriptionService = subscriptionService;
1764
+ this.modalService = modalService;
1765
+ this.store = store;
1766
+ this.toast = toast;
1767
+ this.translation = translation;
1768
+ this.confirmDialog = confirmDialog;
1769
+ this.cdr = cdr;
1770
+ this.removed = new EventEmitter();
1771
+ this.reasonToCancel = "";
1772
+ }
1773
+ get isWholeSubscription() {
1774
+ return !this.target?.productId;
1775
+ }
1776
+ start(target) {
1777
+ this.target = target;
1778
+ if (this.user?.has_password) {
1779
+ this.passwordValidation.open();
1780
+ return;
1781
+ }
1782
+ this.confirmDialog.open({
1783
+ titleKey: "User.Subscriptions.SetPassword.Title",
1784
+ textKey: "User.Subscriptions.SetPassword.Text",
1785
+ confirmOnly: true
1786
+ });
1787
+ }
1788
+ onPasswordValidated(isSuccess) {
1789
+ if (!isSuccess) return;
1790
+ setTimeout(() => {
1791
+ this.modalService.open(this.reasonModal, {
1792
+ centered: true,
1793
+ windowClass: "modal-holder"
1794
+ });
1795
+ }, 100);
1796
+ }
1797
+ onConfirm() {
1798
+ const reason = this.reasonToCancel?.trim();
1799
+ if (!reason) {
1800
+ this.toast.error(this.translation.translate("User.Subscriptions.Validation.ReasonRequired"));
1801
+ return;
1802
+ }
1803
+ this.request(reason).subscribe(() => {
1804
+ this.store.dispatch(new GetUser());
1805
+ this.modalService.dismissAll();
1806
+ this.reset();
1807
+ this.removed.emit();
1808
+ });
1809
+ }
1810
+ reset() {
1811
+ this.target = null;
1812
+ this.reasonToCancel = "";
1813
+ this.cdr.markForCheck();
1814
+ }
1815
+ request(reason) {
1816
+ const body = { reason_to_cancel: reason };
1817
+ const { subscriptionId, productId } = this.target;
1818
+ if (this.isWholeSubscription) return this.subscriptionService.deleteWholeSubscription(subscriptionId, { body });
1819
+ const params = new HttpParams().set("product_id", productId);
1820
+ return this.subscriptionService.deleteSubscription(subscriptionId, {
1821
+ params,
1822
+ body
1823
+ });
1824
+ }
1825
+ static {
1826
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1827
+ minVersion: "12.0.0",
1828
+ version: "22.2.3",
1829
+ ngImport: i0,
1830
+ type: SubscriptionRemovalComponent,
1831
+ deps: [
1832
+ { token: i3$2.SubscriptionService },
1833
+ { token: i2$2.NgbModal },
1834
+ { token: i3$1.Store },
1835
+ { token: i3$2.CustomToastService },
1836
+ { token: i14.TranslocoService },
1837
+ { token: i2$3.ConfirmDialogService },
1838
+ { token: i0.ChangeDetectorRef }
1839
+ ],
1840
+ target: i0.ɵɵFactoryTarget.Component
1841
+ });
1842
+ }
1843
+ static {
1844
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1845
+ minVersion: "14.0.0",
1846
+ version: "22.2.3",
1847
+ type: SubscriptionRemovalComponent,
1848
+ isStandalone: false,
1849
+ selector: "pw-subscription-removal",
1850
+ inputs: { user: "user" },
1851
+ outputs: { removed: "removed" },
1852
+ viewQueries: [{
1853
+ propertyName: "passwordValidation",
1854
+ first: true,
1855
+ predicate: ["passwordValidation"],
1856
+ descendants: true
1857
+ }, {
1858
+ propertyName: "reasonModal",
1859
+ first: true,
1860
+ predicate: ["reasonModal"],
1861
+ descendants: true
1862
+ }],
1863
+ ngImport: i0,
1864
+ template: "<pw-password-validation #passwordValidation\n [destructive]=\"true\"\n (successEvent)=\"onPasswordValidated($event)\">\n</pw-password-validation>\n\n<ng-template #reasonModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Title' : 'User.Subscriptions.DeleteProduct.Title') | transloco }}\n </h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss(); reset()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Message' : 'User.Subscriptions.DeleteProduct.Message') | transloco }}\n </p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [placeholder]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"\n [attr.aria-label]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"></textarea>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reset()\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || !reasonToCancel.trim()\"\n (click)=\"onConfirm()\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription' : 'User.Subscriptions.DeleteProduct') | transloco }}\n </button>\n </div>\n</ng-template>\n",
1865
+ dependencies: [
1866
+ {
1867
+ kind: "directive",
1868
+ type: i1$1.DefaultValueAccessor,
1869
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
1870
+ },
1871
+ {
1872
+ kind: "directive",
1873
+ type: i1$1.NgControlStatus,
1874
+ selector: "[formControlName],[ngModel],[formControl]"
1875
+ },
1876
+ {
1877
+ kind: "component",
1878
+ type: i2$3.PasswordValidationComponent,
1879
+ selector: "pw-password-validation",
1880
+ inputs: ["confirmMessage", "destructive"],
1881
+ outputs: ["successEvent"]
1882
+ },
1883
+ {
1884
+ kind: "directive",
1885
+ type: i1$1.NgModel,
1886
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
1887
+ inputs: [
1888
+ "name",
1889
+ "disabled",
1890
+ "ngModel",
1891
+ "ngModelOptions"
1892
+ ],
1893
+ outputs: ["ngModelChange"],
1894
+ exportAs: ["ngModel"]
1895
+ },
1896
+ {
1897
+ kind: "pipe",
1898
+ type: i14.TranslocoPipe,
1899
+ name: "transloco"
1900
+ }
1901
+ ]
1902
+ });
1903
+ }
1904
+ };
1905
+ i0.ɵɵngDeclareClassMetadata({
1906
+ minVersion: "12.0.0",
1907
+ version: "22.2.3",
1908
+ ngImport: i0,
1909
+ type: SubscriptionRemovalComponent,
1910
+ decorators: [{
1911
+ type: Component,
1912
+ args: [{
1913
+ selector: "pw-subscription-removal",
1914
+ standalone: false,
1915
+ template: "<pw-password-validation #passwordValidation\n [destructive]=\"true\"\n (successEvent)=\"onPasswordValidated($event)\">\n</pw-password-validation>\n\n<ng-template #reasonModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Title' : 'User.Subscriptions.DeleteProduct.Title') | transloco }}\n </h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss(); reset()\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription.Message' : 'User.Subscriptions.DeleteProduct.Message') | transloco }}\n </p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [placeholder]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"\n [attr.aria-label]=\"'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco\"></textarea>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reset()\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || !reasonToCancel.trim()\"\n (click)=\"onConfirm()\">\n {{ (isWholeSubscription ? 'User.Subscriptions.DeleteSubscription' : 'User.Subscriptions.DeleteProduct') | transloco }}\n </button>\n </div>\n</ng-template>\n"
1916
+ }]
1917
+ }],
1918
+ ctorParameters: () => [
1919
+ { type: i3$2.SubscriptionService },
1920
+ { type: i2$2.NgbModal },
1921
+ { type: i3$1.Store },
1922
+ { type: i3$2.CustomToastService },
1923
+ { type: i14.TranslocoService },
1924
+ { type: i2$3.ConfirmDialogService },
1925
+ { type: i0.ChangeDetectorRef }
1926
+ ],
1927
+ propDecorators: {
1928
+ user: [{ type: Input }],
1929
+ removed: [{ type: Output }],
1930
+ passwordValidation: [{
1931
+ type: ViewChild,
1932
+ args: ["passwordValidation", { static: false }]
1933
+ }],
1934
+ reasonModal: [{
1935
+ type: ViewChild,
1936
+ args: ["reasonModal", { static: false }]
1937
+ }]
1938
+ }
1939
+ });
1752
1940
  const PRODUCTION_ENVIRONMENTS = [
1753
1941
  "prod",
1754
1942
  "production",
@@ -1941,13 +2129,13 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
1941
2129
  static {
1942
2130
  this.ɵfac = i0.ɵɵngDeclareFactory({
1943
2131
  minVersion: "12.0.0",
1944
- version: "22.2.0",
2132
+ version: "22.2.3",
1945
2133
  ngImport: i0,
1946
2134
  type: SecondaryPaymentMethodComponent,
1947
2135
  deps: [
1948
- { token: i3.SubscriptionService },
1949
- { token: i3.UserService },
1950
- { token: i3.CustomToastService },
2136
+ { token: i3$2.SubscriptionService },
2137
+ { token: i3$2.UserService },
2138
+ { token: i3$2.CustomToastService },
1951
2139
  { token: i14.TranslocoService },
1952
2140
  { token: i0.ChangeDetectorRef }
1953
2141
  ],
@@ -1957,7 +2145,7 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
1957
2145
  static {
1958
2146
  this.ɵcmp = i0.ɵɵngDeclareComponent({
1959
2147
  minVersion: "17.0.0",
1960
- version: "22.2.0",
2148
+ version: "22.2.3",
1961
2149
  type: SecondaryPaymentMethodComponent,
1962
2150
  isStandalone: false,
1963
2151
  selector: "pw-secondary-payment-method",
@@ -2048,7 +2236,7 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
2048
2236
  };
2049
2237
  i0.ɵɵngDeclareClassMetadata({
2050
2238
  minVersion: "12.0.0",
2051
- version: "22.2.0",
2239
+ version: "22.2.3",
2052
2240
  ngImport: i0,
2053
2241
  type: SecondaryPaymentMethodComponent,
2054
2242
  decorators: [{
@@ -2061,9 +2249,9 @@ i0.ɵɵngDeclareClassMetadata({
2061
2249
  }]
2062
2250
  }],
2063
2251
  ctorParameters: () => [
2064
- { type: i3.SubscriptionService },
2065
- { type: i3.UserService },
2066
- { type: i3.CustomToastService },
2252
+ { type: i3$2.SubscriptionService },
2253
+ { type: i3$2.UserService },
2254
+ { type: i3$2.CustomToastService },
2067
2255
  { type: i14.TranslocoService },
2068
2256
  { type: i0.ChangeDetectorRef }
2069
2257
  ],
@@ -2170,14 +2358,14 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
2170
2358
  static {
2171
2359
  this.ɵfac = i0.ɵɵngDeclareFactory({
2172
2360
  minVersion: "12.0.0",
2173
- version: "22.2.0",
2361
+ version: "22.2.3",
2174
2362
  ngImport: i0,
2175
2363
  type: UpdatePaymentDetailsComponent,
2176
2364
  deps: [
2177
2365
  { token: i1$1.UntypedFormBuilder },
2178
- { token: i3.ScriptLoaderService },
2179
- { token: i3.ProductService },
2180
- { token: i3.SubscriptionService },
2366
+ { token: i3$2.ScriptLoaderService },
2367
+ { token: i3$2.ProductService },
2368
+ { token: i3$2.SubscriptionService },
2181
2369
  { token: i0.Injector },
2182
2370
  { token: i0.ChangeDetectorRef }
2183
2371
  ],
@@ -2187,7 +2375,7 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
2187
2375
  static {
2188
2376
  this.ɵcmp = i0.ɵɵngDeclareComponent({
2189
2377
  minVersion: "17.0.0",
2190
- version: "22.2.0",
2378
+ version: "22.2.3",
2191
2379
  type: UpdatePaymentDetailsComponent,
2192
2380
  isStandalone: false,
2193
2381
  selector: "pw-update-payment-details",
@@ -2370,7 +2558,7 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
2370
2558
  __decorate([ValidateForm("form")], UpdatePaymentDetailsComponent.prototype, "onSave", null);
2371
2559
  i0.ɵɵngDeclareClassMetadata({
2372
2560
  minVersion: "12.0.0",
2373
- version: "22.2.0",
2561
+ version: "22.2.3",
2374
2562
  ngImport: i0,
2375
2563
  type: UpdatePaymentDetailsComponent,
2376
2564
  decorators: [{
@@ -2384,15 +2572,18 @@ i0.ɵɵngDeclareClassMetadata({
2384
2572
  }],
2385
2573
  ctorParameters: () => [
2386
2574
  { type: i1$1.UntypedFormBuilder },
2387
- { type: i3.ScriptLoaderService },
2388
- { type: i3.ProductService },
2389
- { type: i3.SubscriptionService },
2575
+ { type: i3$2.ScriptLoaderService },
2576
+ { type: i3$2.ProductService },
2577
+ { type: i3$2.SubscriptionService },
2390
2578
  { type: i0.Injector },
2391
2579
  { type: i0.ChangeDetectorRef }
2392
2580
  ],
2393
2581
  propDecorators: { onSave: [] }
2394
2582
  });
2395
2583
  var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends AppBaseComponent {
2584
+ get isFree() {
2585
+ return !this.product?.stripe_plan_id && !Number(this.product?.price_per_unit);
2586
+ }
2396
2587
  get totalAmount() {
2397
2588
  if (this.product) {
2398
2589
  const units = Number(this.form.get("units").value);
@@ -2507,7 +2698,8 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
2507
2698
  onPurchaseSubmit() {
2508
2699
  this.busy = true;
2509
2700
  this.passwordModalVisible = true;
2510
- if (this.subscription.stripe_customer_id) {
2701
+ if (this.isFree) this.enrollUserToSubscription();
2702
+ else if (this.subscription.stripe_customer_id) {
2511
2703
  if (this.showNewCard) this.updateCardDetails();
2512
2704
  else this.enrollUserToSubscription();
2513
2705
  } else if (this.form.valid) {
@@ -2625,17 +2817,17 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
2625
2817
  static {
2626
2818
  this.ɵfac = i0.ɵɵngDeclareFactory({
2627
2819
  minVersion: "12.0.0",
2628
- version: "22.2.0",
2820
+ version: "22.2.3",
2629
2821
  ngImport: i0,
2630
2822
  type: UpgradeSubscriptionComponent,
2631
2823
  deps: [
2632
2824
  { token: i0.Injector },
2633
- { token: i3.ProductService },
2825
+ { token: i3$2.ProductService },
2634
2826
  { token: i1$1.UntypedFormBuilder },
2635
2827
  { token: i2$2.NgbModal },
2636
- { token: i3.SubscriptionService },
2637
- { token: i4$2.Store },
2638
- { token: i3.ScriptLoaderService },
2828
+ { token: i3$2.SubscriptionService },
2829
+ { token: i3$1.Store },
2830
+ { token: i3$2.ScriptLoaderService },
2639
2831
  { token: i0.ChangeDetectorRef },
2640
2832
  { token: i2$3.ConfirmDialogService }
2641
2833
  ],
@@ -2645,7 +2837,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
2645
2837
  static {
2646
2838
  this.ɵcmp = i0.ɵɵngDeclareComponent({
2647
2839
  minVersion: "17.0.0",
2648
- version: "22.2.0",
2840
+ version: "22.2.3",
2649
2841
  type: UpgradeSubscriptionComponent,
2650
2842
  isStandalone: false,
2651
2843
  selector: "pw-upgrade-subscription",
@@ -2658,7 +2850,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
2658
2850
  }],
2659
2851
  usesInheritance: true,
2660
2852
  ngImport: i0,
2661
- template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if ((user && !cardDetails) || (cardDetails && showNewCard)) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n If you proceed, your credit card will be charged\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
2853
+ template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n @if (!isFree) {\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n }\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails && !isFree) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if (!isFree && ((user && !cardDetails) || (cardDetails && showNewCard))) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n @if (!isFree) {\n If you proceed, your credit card will be charged\n }\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
2662
2854
  styles: [".payment-left,.payment-right{border:1px solid rgb(204,204,204);height:100%}.payment-left h4,.payment-right h4{border-bottom:1px solid rgb(0,0,0);font-size:1rem;font-weight:600;margin:0 0 20px;padding:0 0 5px;text-transform:uppercase}.payment-left .summary-row.total,.payment-right .summary-row.total{padding:10px 0 0 10px}.payment-left .summary-row .summary-left,.payment-right .summary-row .summary-left{font-weight:600}.payment-provider{width:20%}@media(max-width:800px){.payment-provider{width:60%}}.summary-left{-webkit-box-flex:1;color:#555;flex-grow:1;-ms-flex-positive:1;font-weight:200;text-align:left}.summary-left.plan{color:#c93f00;font-size:14px;margin:5px 0}.summary-right{-webkit-box-flex:1;-webkit-box-pack:end;color:#000;flex-grow:1;-ms-flex-pack:end;-ms-flex-positive:1;justify-content:flex-end;text-align:right}\n"],
2663
2855
  dependencies: [
2664
2856
  {
@@ -2878,7 +3070,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
2878
3070
  __decorate([ValidateForm("form")], UpgradeSubscriptionComponent.prototype, "updateCardDetails", null);
2879
3071
  i0.ɵɵngDeclareClassMetadata({
2880
3072
  minVersion: "12.0.0",
2881
- version: "22.2.0",
3073
+ version: "22.2.3",
2882
3074
  ngImport: i0,
2883
3075
  type: UpgradeSubscriptionComponent,
2884
3076
  decorators: [{
@@ -2886,18 +3078,18 @@ i0.ɵɵngDeclareClassMetadata({
2886
3078
  args: [{
2887
3079
  selector: "pw-upgrade-subscription",
2888
3080
  standalone: false,
2889
- template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if ((user && !cardDetails) || (cardDetails && showNewCard)) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n If you proceed, your credit card will be charged\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
3081
+ template: "<h4 class=\"form-section m-3\">\n <i class=\"ft-check-circle\" aria-hidden=\"true\"></i> {{ 'Button.Payment' | transloco }}\n</h4>\n<div class=\"card-block\">\n <!-- Show Payment Page when there is user.has_stripe_account===false -->\n <ng-container>\n <form class=\"form\"\n (ngSubmit)=\"attemptPurchase()\"\n [formGroup]=\"form\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-body p-3 payment-left card pb-0\">\n <div class=\"card-body\">\n @if (product?.max_units > 1) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"mb-3\">\n <h4 class=\"title\">\n {{ 'User.Subscriptions.LicensesRequired' | transloco }}\n </h4>\n <div class=\"row btns-row\">\n <div class=\"col-md-4 col-8\">\n <pw-number-picker name=\"number-picker\"\n [(value)]=\"units\"\n [min]=\"subscription.min_units || product.min_units\"\n [max]=\"product.max_units\"\n step=\"1\"\n postfix=\"Units\"\n placeholder=\"Total Licenses\"\n [inputReadOnly]=\"false\"\n size=\"small\"\n pickStartAfter=\"500\"\n pickTimer=\"100\"\n [arrowKeys]=\"true\"\n (minReached)=\"onMinReached($event)\"\n (maxReached)=\"onMaxReached($event)\"\n (valueChange)=\"onUnitChange($event)\">\n </pw-number-picker>\n </div>\n </div>\n <div class=\"text-center\">\n <small class=\"form-text text-muted danger\">\n {{ unitError }}\n </small>\n </div>\n </div>\n @if (!isFree) {\n <p>\n If you proceed, your credit card will be charged\n <strong>{{ product.currency }}\n {{ totalAmount | number:'1.2-2' }}</strong>\n </p>\n }\n </div>\n </div>\n }\n <!-- Shows Saved Card: Shows when user has card details and not trying to update the card details -->\n @if (cardDetails && !isFree) {\n <pw-saved-card-details [data]=\"cardDetails\"\n (changeEvent)=\"showNewCard = $event\"\n [showNewCard]=\"showNewCard\">\n </pw-saved-card-details>\n }\n <!-- Add New Payment Starts, opens up when user doesn't have stripe account or tries to change the\n card details -->\n @if (!isFree && ((user && !cardDetails) || (cardDetails && showNewCard))) {\n <h4 class=\"title\">\n {{ 'User.Subscriptions.NewCard' | transloco }}?\n </h4>\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-card_number\">{{\n 'User.Subscriptions.CardNumber' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-card_number\"\n class=\"form-control\"\n formControlName=\"card_number\"\n placeholder=\"Card Number\"\n name=\"card_number\"\n aria-label=\"Card Number\" />\n @if (\n form.get('card_number').touched &&\n form.get('card_number').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter card number. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"mb-3\">\n <label for=\"upgrade-subscription-cvc\">{{\n 'User.Subscriptions.CVC' | transloco\n }}</label>\n <input type=\"text\"\n id=\"upgrade-subscription-cvc\"\n class=\"form-control\"\n formControlName=\"cvc\"\n placeholder=\"CVC\"\n name=\"cvc\"\n aria-label=\"CVC\" />\n @if (\n form.get('cvc').touched &&\n form.get('cvc').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter cvc. </span>\n </div>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only pw-label-style\" id=\"upgrade-subscription-exp_month-label\">Exp. Month</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_month-label'\"\n [options]=\"months\"\n formControlName=\"exp_month\"\n [placeholder]=\"'Exp. Month'\"\n optionValue=\"value\"\n [appendTo]=\"'body'\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_month').touched &&\n form.get('exp_month').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry month. </span>\n </div>\n }\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"mb-3\">\n <span class=\"sr-only\" id=\"upgrade-subscription-exp_year-label\">Exp. Year</span>\n <p-select\n [attr.aria-labelledby]=\"'upgrade-subscription-exp_year-label'\"\n [options]=\"years\"\n formControlName=\"exp_year\"\n [placeholder]=\"'Exp. Year'\"\n [appendTo]=\"'body'\"\n optionValue=\"value\"\n optionLabel=\"value\">\n </p-select>\n @if (\n form.get('exp_year').touched &&\n form.get('exp_year').errors?.required\n ) {\n <div class=\"danger\"\n >\n <span> Please enter expiry year. </span>\n </div>\n }\n </div>\n </div>\n @if (cardDetails) {\n <div class=\"col-12 mt-2\"\n >\n <a aria-label=\"Navigate to Target\"\n (click)=\"showNewCard = false; onDiscardToggle()\">Disregard and pay with current registered card</a>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n <!-- Purchase Summary -->\n @if (product) {\n <div class=\"col-md-6\"\n >\n <div class=\"purchase-summary card p-3 payment-right\">\n <div class=\"card-body\">\n <h4 class=\"title\">{{ 'Label.PurchaseSummary' | transloco }}</h4>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Plan' | transloco }}:</div>\n <div class=\"summary-right\">{{ product.name }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Price' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }}\n {{ (product.price_per_unit / 100) | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Seats' | transloco }}:</div>\n <div class=\"summary-right\">{{ form.get('units').value }}</div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">{{ 'Label.Total' | transloco }}:</div>\n <div class=\"summary-right\">\n {{ product.currency }} {{ totalAmount | number:'1.2-2' }}\n </div>\n </div>\n <div class=\"summary-row d-flex mb-2\">\n <div class=\"summary-left\">\n {{ 'Label.Recurrency' | transloco }}:\n </div>\n <div class=\"summary-right\">{{ product.billing_frequency }}</div>\n </div>\n </div>\n <div class=\"text-center\">\n <hr />\n <p>\n By subscribing you acknowledge and accept our terms of service and\n privacy policy\n </p>\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-center mt-3\">\n <img src=\"/assets/img/icons/powered_by_stripe_v2.png\"\n class=\"payment-provider\"\n alt=\"\" />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"form-actions text-end\">\n <button type=\"button\"\n class=\"btn btn-raised btn-outline-default me-1\"\n [disabled]=\"isPurchaseAttempted\"\n routerLink=\"/account/subscriptions\">\n <i class=\"ft-x\" aria-hidden=\"true\"></i>{{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-raised btn-primary\"\n [disabled]=\"isPurchaseAttempted\"\n [buttonBusy]=\"busy\">\n <i class=\"ft-check\" aria-hidden=\"true\"></i>\n {{ 'Button.Purchase' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </ng-container>\n</div>\n\n<pw-password-validation #passwordValidationModal\n (successEvent)=\"onValidatePassword($event)\">\n <div class=\"row\">\n <div class=\"col-12\">\n <p>\n @if (!isFree) {\n If you proceed, your credit card will be charged\n }\n @if (totalAmount) {\n <strong>{{ product.currency }} {{ totalAmount | number:'1.2-2' }}</strong>\n }\n </p>\n </div>\n </div>\n</pw-password-validation>\n",
2890
3082
  styles: [".payment-left,.payment-right{border:1px solid rgb(204,204,204);height:100%}.payment-left h4,.payment-right h4{border-bottom:1px solid rgb(0,0,0);font-size:1rem;font-weight:600;margin:0 0 20px;padding:0 0 5px;text-transform:uppercase}.payment-left .summary-row.total,.payment-right .summary-row.total{padding:10px 0 0 10px}.payment-left .summary-row .summary-left,.payment-right .summary-row .summary-left{font-weight:600}.payment-provider{width:20%}@media(max-width:800px){.payment-provider{width:60%}}.summary-left{-webkit-box-flex:1;color:#555;flex-grow:1;-ms-flex-positive:1;font-weight:200;text-align:left}.summary-left.plan{color:#c93f00;font-size:14px;margin:5px 0}.summary-right{-webkit-box-flex:1;-webkit-box-pack:end;color:#000;flex-grow:1;-ms-flex-pack:end;-ms-flex-positive:1;justify-content:flex-end;text-align:right}\n"]
2891
3083
  }]
2892
3084
  }],
2893
3085
  ctorParameters: () => [
2894
3086
  { type: i0.Injector },
2895
- { type: i3.ProductService },
3087
+ { type: i3$2.ProductService },
2896
3088
  { type: i1$1.UntypedFormBuilder },
2897
3089
  { type: i2$2.NgbModal },
2898
- { type: i3.SubscriptionService },
2899
- { type: i4$2.Store },
2900
- { type: i3.ScriptLoaderService },
3090
+ { type: i3$2.SubscriptionService },
3091
+ { type: i3$1.Store },
3092
+ { type: i3$2.ScriptLoaderService },
2901
3093
  { type: i0.ChangeDetectorRef },
2902
3094
  { type: i2$3.ConfirmDialogService }
2903
3095
  ],
@@ -3122,15 +3314,15 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
3122
3314
  static {
3123
3315
  this.ɵfac = i0.ɵɵngDeclareFactory({
3124
3316
  minVersion: "12.0.0",
3125
- version: "22.2.0",
3317
+ version: "22.2.3",
3126
3318
  ngImport: i0,
3127
3319
  type: UserSubscriptionDetailsComponent,
3128
3320
  deps: [
3129
3321
  { token: i1$1.UntypedFormBuilder },
3130
- { token: i3.GeoService },
3322
+ { token: i3$2.GeoService },
3131
3323
  { token: i2$2.NgbModal },
3132
- { token: i3.SubscriptionService },
3133
- { token: i4$2.Store },
3324
+ { token: i3$2.SubscriptionService },
3325
+ { token: i3$1.Store },
3134
3326
  { token: i0.Injector },
3135
3327
  { token: i0.ChangeDetectorRef },
3136
3328
  { token: i2$3.ConfirmDialogService }
@@ -3141,7 +3333,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
3141
3333
  static {
3142
3334
  this.ɵcmp = i0.ɵɵngDeclareComponent({
3143
3335
  minVersion: "17.0.0",
3144
- version: "22.2.0",
3336
+ version: "22.2.3",
3145
3337
  type: UserSubscriptionDetailsComponent,
3146
3338
  isStandalone: false,
3147
3339
  selector: "ng-component",
@@ -3488,7 +3680,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
3488
3680
  __decorate([ValidateForm("form")], UserSubscriptionDetailsComponent.prototype, "onSaveDetails", null);
3489
3681
  i0.ɵɵngDeclareClassMetadata({
3490
3682
  minVersion: "12.0.0",
3491
- version: "22.2.0",
3683
+ version: "22.2.3",
3492
3684
  ngImport: i0,
3493
3685
  type: UserSubscriptionDetailsComponent,
3494
3686
  decorators: [{
@@ -3501,10 +3693,10 @@ i0.ɵɵngDeclareClassMetadata({
3501
3693
  }],
3502
3694
  ctorParameters: () => [
3503
3695
  { type: i1$1.UntypedFormBuilder },
3504
- { type: i3.GeoService },
3696
+ { type: i3$2.GeoService },
3505
3697
  { type: i2$2.NgbModal },
3506
- { type: i3.SubscriptionService },
3507
- { type: i4$2.Store },
3698
+ { type: i3$2.SubscriptionService },
3699
+ { type: i3$1.Store },
3508
3700
  { type: i0.Injector },
3509
3701
  { type: i0.ChangeDetectorRef },
3510
3702
  { type: i2$3.ConfirmDialogService }
@@ -3518,19 +3710,16 @@ i0.ɵɵngDeclareClassMetadata({
3518
3710
  }
3519
3711
  });
3520
3712
  var UserSubscriptionListComponent = class UserSubscriptionListComponent extends AppBaseComponent {
3521
- constructor(subscriptionService, adminService, modalService, store, clipboard, injector, cdr, confirmDialog) {
3713
+ constructor(subscriptionService, adminService, clipboard, injector, cdr, confirmDialog) {
3522
3714
  super(injector);
3523
3715
  this.subscriptionService = subscriptionService;
3524
3716
  this.adminService = adminService;
3525
- this.modalService = modalService;
3526
- this.store = store;
3527
3717
  this.clipboard = clipboard;
3528
3718
  this.cdr = cdr;
3529
3719
  this.confirmDialog = confirmDialog;
3530
3720
  this.showApiKey = true;
3531
3721
  this.subscribedSubscriptions = [];
3532
3722
  this.isLoaded = false;
3533
- this.reasonToCancel = "";
3534
3723
  this.showTos = false;
3535
3724
  this.objectKeys = Object.keys;
3536
3725
  this.items = [
@@ -3565,18 +3754,18 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3565
3754
  this.clipboard.copy(accessCode);
3566
3755
  this.toast.success("Access Key copied to the clipboard");
3567
3756
  }
3568
- attemptUnsubscribe(item, productId) {
3569
- this.selectedSubscription = item;
3570
- this.selectedSubscription.productId = productId;
3571
- if (this.user.has_password) this.passwordValidationForUnsubscribe.open();
3572
- else this.noPasswordModal();
3757
+ deleteSubscription(subscription) {
3758
+ this.removal.start({ subscriptionId: subscription.id });
3573
3759
  }
3574
- openCancelSubscriptionModal() {
3575
- this.modalService.open(this.cancelSubscriptionModal, {
3576
- centered: true,
3577
- windowClass: "modal-holder"
3760
+ deleteProduct(subscription, product) {
3761
+ this.removal.start({
3762
+ subscriptionId: subscription.id,
3763
+ productId: product.id
3578
3764
  });
3579
3765
  }
3766
+ onRemoved() {
3767
+ this.getSubscribedProduct();
3768
+ }
3580
3769
  getSubscribedProduct() {
3581
3770
  this.userStore().subscribe((user) => {
3582
3771
  this.user = user;
@@ -3617,32 +3806,6 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3617
3806
  this.activeItem = this.menu["activeItem"];
3618
3807
  if (this.activeItem.id === "subscription") this.getSubscribedProduct();
3619
3808
  }
3620
- onUnsubscribe(item, reasonToCancel) {
3621
- const requestOptions = {
3622
- params: new HttpParams().set("product_id", item.productId),
3623
- body: { reason_to_cancel: reasonToCancel }
3624
- };
3625
- this.subscriptionService.deleteSubscription(item.id, requestOptions).subscribe(() => {
3626
- this.store.dispatch(new GetUser());
3627
- this.modalService.dismissAll();
3628
- this.getSubscribedProduct();
3629
- this.selectedSubscription = null;
3630
- this.reasonToCancel = "";
3631
- this.cdr.markForCheck();
3632
- });
3633
- }
3634
- onValidatePassword(isSuccess) {
3635
- if (isSuccess) setTimeout(() => {
3636
- this.openCancelSubscriptionModal();
3637
- }, 100);
3638
- }
3639
- onConfirmCancel() {
3640
- if (!this.reasonToCancel || this.reasonToCancel.trim() === "") {
3641
- this.toast.error(this.translation.translate("User.Subscriptions.Validation.ReasonRequired"));
3642
- return;
3643
- }
3644
- this.onUnsubscribe(this.selectedSubscription, this.reasonToCancel);
3645
- }
3646
3809
  discardEdit() {
3647
3810
  this.editing = false;
3648
3811
  this.selectedSubscription = null;
@@ -3703,15 +3866,13 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3703
3866
  static {
3704
3867
  this.ɵfac = i0.ɵɵngDeclareFactory({
3705
3868
  minVersion: "12.0.0",
3706
- version: "22.2.0",
3869
+ version: "22.2.3",
3707
3870
  ngImport: i0,
3708
3871
  type: UserSubscriptionListComponent,
3709
3872
  deps: [
3710
- { token: i3.SubscriptionService },
3873
+ { token: i3$2.SubscriptionService },
3711
3874
  { token: i2$1.AdminService },
3712
- { token: i2$2.NgbModal },
3713
- { token: i4$2.Store },
3714
- { token: i5$1.Clipboard },
3875
+ { token: i3.Clipboard },
3715
3876
  { token: i0.Injector },
3716
3877
  { token: i0.ChangeDetectorRef },
3717
3878
  { token: i2$3.ConfirmDialogService }
@@ -3722,7 +3883,7 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3722
3883
  static {
3723
3884
  this.ɵcmp = i0.ɵɵngDeclareComponent({
3724
3885
  minVersion: "17.0.0",
3725
- version: "22.2.0",
3886
+ version: "22.2.3",
3726
3887
  type: UserSubscriptionListComponent,
3727
3888
  isStandalone: false,
3728
3889
  selector: "pw-user-subscriptions-list",
@@ -3752,21 +3913,15 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3752
3913
  descendants: true
3753
3914
  },
3754
3915
  {
3755
- propertyName: "passwordValidationForUnsubscribe",
3916
+ propertyName: "removal",
3756
3917
  first: true,
3757
- predicate: ["passwordValidationForUnsubscribe"],
3758
- descendants: true
3759
- },
3760
- {
3761
- propertyName: "cancelSubscriptionModal",
3762
- first: true,
3763
- predicate: ["cancelSubscriptionModal"],
3918
+ predicate: SubscriptionRemovalComponent,
3764
3919
  descendants: true
3765
3920
  }
3766
3921
  ],
3767
3922
  usesInheritance: true,
3768
3923
  ngImport: i0,
3769
- template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Unsubscribe -->\n @if (\n subscription?.stripe_customer_id &&\n !product?.deleted &&\n !product?.trial_subscription\n ) {\n <button class=\"btn btn-outline-danger btn-sm\"\n (click)=\"attemptUnsubscribe(subscription, product.id)\">\n {{ 'User.Subscriptions.Unsubscribe' | transloco }}\n </button>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<!--\nValidate Password For Unsubscribe\n-->\n<pw-password-validation #passwordValidationForUnsubscribe\n [destructive]=\"true\"\n (successEvent)=\"onValidatePassword($event)\">\n</pw-password-validation>\n<!--\nCancel Subscription Modal\n-->\n<ng-template #cancelSubscriptionModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">{{ 'User.Subscriptions.CancelSubscription.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{ 'User.Subscriptions.CancelSubscription.Message' | transloco }}</p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [ngClass]=\"{'is-invalid': reasonToCancel && reasonToCancel.trim() === ''}\"\n placeholder=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"\n aria-label=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"></textarea>\n @if (reasonToCancel && reasonToCancel.trim() === '') {\n <div class=\"invalid-feedback\">\n {{ 'User.Subscriptions.Validation.ReasonRequired' | transloco }}\n </div>\n }\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || reasonToCancel.trim() === ''\"\n (click)=\"onConfirmCancel(); modal.close()\">\n {{ 'User.Subscriptions.CancelSubscription.ConfirmButton' | transloco }}\n </button>\n </div>\n</ng-template>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
3924
+ template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
3770
3925
  styles: [".btn-list{bottom:24px;left:0;padding:0 38px;right:0}.shadow-md{padding-bottom:70px!important}.bg-dark{border:0}.subscription-details{background:#fff;border:1px solid #e2e5ea;border-radius:12px;padding:16px 16px 6px;font-size:14px;font-variant-numeric:tabular-nums}.subscription-summary{border-bottom:1px solid #eef0f3;padding-bottom:12px}.seats-usage{display:inline-block;width:120px;height:6px;margin-left:8px;border-radius:999px;vertical-align:middle;overflow:hidden;background:linear-gradient(#5a6473,#5a6473) left/calc(var(--seats-pct, 0) * 100%) 100% no-repeat,#e2e5ea}.subscription-products-cards{padding-bottom:0!important}.subscription-products-cards .card-footer{position:static!important}.subscription-products-cards.card{background:#f7f8fa;border:1px solid #eef0f3;border-radius:8px;box-shadow:none!important;font-size:14px}.card-footer{background:transparent;border-top:1px solid #eef0f3}.card-footer .footer-note{color:#5a6473;font-size:.875rem}.card-footer .footer-tos-link{color:#5a6473;font-weight:500;text-decoration:underline}.card-footer .footer-tos-link:hover{color:var(--first)}.badge{font-weight:600;border-radius:4px}.badge.bg-success{background-color:#e6f4ec!important;color:#0f6b3a!important}.badge.bg-danger{background-color:#fbeae8!important;color:#c0392b!important}.badge.bg-warning{background-color:#fbf1e3!important;color:#8a5a00!important}.badge.bg-grey,.badge.bg-role-admin{background-color:#eef0f3!important;color:#5a6473!important}code{color:var(--text);min-width:0}.danger-zone{border-top:1px solid #e2e5ea;padding-top:16px;text-align:right}\n"],
3771
3926
  dependencies: [
3772
3927
  {
@@ -3813,16 +3968,6 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3813
3968
  "routerLink"
3814
3969
  ]
3815
3970
  },
3816
- {
3817
- kind: "directive",
3818
- type: i1$1.DefaultValueAccessor,
3819
- selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
3820
- },
3821
- {
3822
- kind: "directive",
3823
- type: i1$1.NgControlStatus,
3824
- selector: "[formControlName],[ngModel],[formControl]"
3825
- },
3826
3971
  {
3827
3972
  kind: "component",
3828
3973
  type: i2$3.PasswordValidationComponent,
@@ -3872,19 +4017,6 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3872
4017
  "fill"
3873
4018
  ]
3874
4019
  },
3875
- {
3876
- kind: "directive",
3877
- type: i1$1.NgModel,
3878
- selector: "[ngModel]:not([formControlName]):not([formControl])",
3879
- inputs: [
3880
- "name",
3881
- "disabled",
3882
- "ngModel",
3883
- "ngModelOptions"
3884
- ],
3885
- outputs: ["ngModelChange"],
3886
- exportAs: ["ngModel"]
3887
- },
3888
4020
  {
3889
4021
  kind: "component",
3890
4022
  type: i2$3.PrivacyAndTosComponent,
@@ -3901,6 +4033,13 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3901
4033
  "withImage"
3902
4034
  ]
3903
4035
  },
4036
+ {
4037
+ kind: "component",
4038
+ type: SubscriptionRemovalComponent,
4039
+ selector: "pw-subscription-removal",
4040
+ inputs: ["user"],
4041
+ outputs: ["removed"]
4042
+ },
3904
4043
  {
3905
4044
  kind: "pipe",
3906
4045
  type: i7$2.UpperCasePipe,
@@ -3927,7 +4066,7 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3927
4066
  };
3928
4067
  i0.ɵɵngDeclareClassMetadata({
3929
4068
  minVersion: "12.0.0",
3930
- version: "22.2.0",
4069
+ version: "22.2.3",
3931
4070
  ngImport: i0,
3932
4071
  type: UserSubscriptionListComponent,
3933
4072
  decorators: [{
@@ -3935,16 +4074,14 @@ i0.ɵɵngDeclareClassMetadata({
3935
4074
  args: [{
3936
4075
  selector: "pw-user-subscriptions-list",
3937
4076
  standalone: false,
3938
- template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Unsubscribe -->\n @if (\n subscription?.stripe_customer_id &&\n !product?.deleted &&\n !product?.trial_subscription\n ) {\n <button class=\"btn btn-outline-danger btn-sm\"\n (click)=\"attemptUnsubscribe(subscription, product.id)\">\n {{ 'User.Subscriptions.Unsubscribe' | transloco }}\n </button>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<!--\nValidate Password For Unsubscribe\n-->\n<pw-password-validation #passwordValidationForUnsubscribe\n [destructive]=\"true\"\n (successEvent)=\"onValidatePassword($event)\">\n</pw-password-validation>\n<!--\nCancel Subscription Modal\n-->\n<ng-template #cancelSubscriptionModal let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">{{ 'User.Subscriptions.CancelSubscription.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{ 'User.Subscriptions.CancelSubscription.Message' | transloco }}</p>\n <div class=\"mb-3\">\n <label for=\"reasonToCancel\" class=\"form-label\">\n {{ 'User.Subscriptions.CancelSubscription.ReasonLabel' | transloco }} <span class=\"text-danger\">*</span>\n </label>\n <textarea\n id=\"reasonToCancel\"\n class=\"form-control\"\n rows=\"4\"\n [(ngModel)]=\"reasonToCancel\"\n [ngClass]=\"{'is-invalid': reasonToCancel && reasonToCancel.trim() === ''}\"\n placeholder=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"\n aria-label=\"{{ 'User.Subscriptions.CancelSubscription.ReasonPlaceholder' | transloco }}\"></textarea>\n @if (reasonToCancel && reasonToCancel.trim() === '') {\n <div class=\"invalid-feedback\">\n {{ 'User.Subscriptions.Validation.ReasonRequired' | transloco }}\n </div>\n }\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.dismiss(); reasonToCancel = '';\">\n {{ 'User.Subscriptions.CancelSubscription.KeepItForNow' | transloco }}\n </button>\n <button type=\"button\"\n class=\"btn btn-danger\"\n [disabled]=\"!reasonToCancel || reasonToCancel.trim() === ''\"\n (click)=\"onConfirmCancel(); modal.close()\">\n {{ 'User.Subscriptions.CancelSubscription.ConfirmButton' | transloco }}\n </button>\n </div>\n</ng-template>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
4077
+ template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>Your Subscriptions</h2>\n <p>You'll find in this section the summary of your subscriptions.</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>Organisation:</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? '(After Trial)' : '' }}\n } @else {\n Free\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n aria-label=\"Navigate to Target\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n product.expired ? 'Expired' : 'Expiry Date'\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n pTooltip=\"Show Access Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n pTooltip=\"Copy Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n pTooltip=\"Change Key\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">Deleted</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">Trial</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n Paused collection\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">Free</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>Invited to use this product\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">as an admin</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n No product available for this subscription\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
3939
4078
  styles: [".btn-list{bottom:24px;left:0;padding:0 38px;right:0}.shadow-md{padding-bottom:70px!important}.bg-dark{border:0}.subscription-details{background:#fff;border:1px solid #e2e5ea;border-radius:12px;padding:16px 16px 6px;font-size:14px;font-variant-numeric:tabular-nums}.subscription-summary{border-bottom:1px solid #eef0f3;padding-bottom:12px}.seats-usage{display:inline-block;width:120px;height:6px;margin-left:8px;border-radius:999px;vertical-align:middle;overflow:hidden;background:linear-gradient(#5a6473,#5a6473) left/calc(var(--seats-pct, 0) * 100%) 100% no-repeat,#e2e5ea}.subscription-products-cards{padding-bottom:0!important}.subscription-products-cards .card-footer{position:static!important}.subscription-products-cards.card{background:#f7f8fa;border:1px solid #eef0f3;border-radius:8px;box-shadow:none!important;font-size:14px}.card-footer{background:transparent;border-top:1px solid #eef0f3}.card-footer .footer-note{color:#5a6473;font-size:.875rem}.card-footer .footer-tos-link{color:#5a6473;font-weight:500;text-decoration:underline}.card-footer .footer-tos-link:hover{color:var(--first)}.badge{font-weight:600;border-radius:4px}.badge.bg-success{background-color:#e6f4ec!important;color:#0f6b3a!important}.badge.bg-danger{background-color:#fbeae8!important;color:#c0392b!important}.badge.bg-warning{background-color:#fbf1e3!important;color:#8a5a00!important}.badge.bg-grey,.badge.bg-role-admin{background-color:#eef0f3!important;color:#5a6473!important}code{color:var(--text);min-width:0}.danger-zone{border-top:1px solid #e2e5ea;padding-top:16px;text-align:right}\n"]
3940
4079
  }]
3941
4080
  }],
3942
4081
  ctorParameters: () => [
3943
- { type: i3.SubscriptionService },
4082
+ { type: i3$2.SubscriptionService },
3944
4083
  { type: i2$1.AdminService },
3945
- { type: i2$2.NgbModal },
3946
- { type: i4$2.Store },
3947
- { type: i5$1.Clipboard },
4084
+ { type: i3.Clipboard },
3948
4085
  { type: i0.Injector },
3949
4086
  { type: i0.ChangeDetectorRef },
3950
4087
  { type: i2$3.ConfirmDialogService }
@@ -3966,13 +4103,9 @@ i0.ɵɵngDeclareClassMetadata({
3966
4103
  type: ViewChild,
3967
4104
  args: ["passwordValidationModalForKey", { static: false }]
3968
4105
  }],
3969
- passwordValidationForUnsubscribe: [{
3970
- type: ViewChild,
3971
- args: ["passwordValidationForUnsubscribe", { static: false }]
3972
- }],
3973
- cancelSubscriptionModal: [{
4106
+ removal: [{
3974
4107
  type: ViewChild,
3975
- args: ["cancelSubscriptionModal", { static: false }]
4108
+ args: [SubscriptionRemovalComponent, { static: false }]
3976
4109
  }]
3977
4110
  }
3978
4111
  });
@@ -4035,7 +4168,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4035
4168
  static {
4036
4169
  this.ɵfac = i0.ɵɵngDeclareFactory({
4037
4170
  minVersion: "12.0.0",
4038
- version: "22.2.0",
4171
+ version: "22.2.3",
4039
4172
  ngImport: i0,
4040
4173
  type: UserInvoiceComponent,
4041
4174
  deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }],
@@ -4045,7 +4178,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4045
4178
  static {
4046
4179
  this.ɵcmp = i0.ɵɵngDeclareComponent({
4047
4180
  minVersion: "17.0.0",
4048
- version: "22.2.0",
4181
+ version: "22.2.3",
4049
4182
  type: UserInvoiceComponent,
4050
4183
  isStandalone: false,
4051
4184
  selector: "pw-user-invoice",
@@ -4070,7 +4203,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4070
4203
  },
4071
4204
  {
4072
4205
  kind: "component",
4073
- type: i5$2.SkeletonTableComponent,
4206
+ type: i5$1.SkeletonTableComponent,
4074
4207
  selector: "pw-skeleton-table",
4075
4208
  inputs: [
4076
4209
  "rows",
@@ -4283,7 +4416,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4283
4416
  };
4284
4417
  i0.ɵɵngDeclareClassMetadata({
4285
4418
  minVersion: "12.0.0",
4286
- version: "22.2.0",
4419
+ version: "22.2.3",
4287
4420
  ngImport: i0,
4288
4421
  type: UserInvoiceComponent,
4289
4422
  decorators: [{
@@ -4316,17 +4449,17 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
4316
4449
  static {
4317
4450
  this.ɵfac = i0.ɵɵngDeclareFactory({
4318
4451
  minVersion: "12.0.0",
4319
- version: "22.2.0",
4452
+ version: "22.2.3",
4320
4453
  ngImport: i0,
4321
4454
  type: AiKnowledgeTabComponent,
4322
- deps: [{ token: i3.PermissionService }],
4455
+ deps: [{ token: i3$2.PermissionService }],
4323
4456
  target: i0.ɵɵFactoryTarget.Component
4324
4457
  });
4325
4458
  }
4326
4459
  static {
4327
4460
  this.ɵcmp = i0.ɵɵngDeclareComponent({
4328
4461
  minVersion: "17.0.0",
4329
- version: "22.2.0",
4462
+ version: "22.2.3",
4330
4463
  type: AiKnowledgeTabComponent,
4331
4464
  isStandalone: false,
4332
4465
  selector: "pw-ai-knowledge-tab",
@@ -4335,7 +4468,7 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
4335
4468
  dependencies: [
4336
4469
  {
4337
4470
  kind: "component",
4338
- type: i5$2.AppLoaderComponent,
4471
+ type: i5$1.AppLoaderComponent,
4339
4472
  selector: "pw-loader",
4340
4473
  inputs: [
4341
4474
  "isVisible",
@@ -4375,7 +4508,7 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
4375
4508
  };
4376
4509
  i0.ɵɵngDeclareClassMetadata({
4377
4510
  minVersion: "12.0.0",
4378
- version: "22.2.0",
4511
+ version: "22.2.3",
4379
4512
  ngImport: i0,
4380
4513
  type: AiKnowledgeTabComponent,
4381
4514
  decorators: [{
@@ -4386,7 +4519,7 @@ i0.ɵɵngDeclareClassMetadata({
4386
4519
  template: "@if (!ready) {\n <pw-loader [isVisible]=\"true\"></pw-loader>\n} @else if (!isAlpha) {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NotAvailable' | transloco\"></pw-no-data>\n} @else if (subscription) {\n <pw-ai-knowledge scope=\"personal\"\n [subscriptionId]=\"subscription.id\"\n [subscriptionName]=\"subscription.organisation\"\n [useOwnData]=\"useOwnData\"></pw-ai-knowledge>\n} @else {\n <pw-no-data [withImage]=\"true\" [message]=\"'AiKnowledge.NoSubscription' | transloco\"></pw-no-data>\n}\n"
4387
4520
  }]
4388
4521
  }],
4389
- ctorParameters: () => [{ type: i3.PermissionService }]
4522
+ ctorParameters: () => [{ type: i3$2.PermissionService }]
4390
4523
  });
4391
4524
  var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseComponent {
4392
4525
  constructor(commonService, profileService, store, injector, cdr) {
@@ -4447,13 +4580,13 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
4447
4580
  static {
4448
4581
  this.ɵfac = i0.ɵɵngDeclareFactory({
4449
4582
  minVersion: "12.0.0",
4450
- version: "22.2.0",
4583
+ version: "22.2.3",
4451
4584
  ngImport: i0,
4452
4585
  type: CommunicationTabComponent,
4453
4586
  deps: [
4454
- { token: i3.CommonService },
4455
- { token: i3.ProfileService },
4456
- { token: i4$2.Store },
4587
+ { token: i3$2.CommonService },
4588
+ { token: i3$2.ProfileService },
4589
+ { token: i3$1.Store },
4457
4590
  { token: i0.Injector },
4458
4591
  { token: i0.ChangeDetectorRef }
4459
4592
  ],
@@ -4463,7 +4596,7 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
4463
4596
  static {
4464
4597
  this.ɵcmp = i0.ɵɵngDeclareComponent({
4465
4598
  minVersion: "17.0.0",
4466
- version: "22.2.0",
4599
+ version: "22.2.3",
4467
4600
  type: CommunicationTabComponent,
4468
4601
  isStandalone: false,
4469
4602
  selector: "pw-communication-tab",
@@ -4535,7 +4668,7 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
4535
4668
  };
4536
4669
  i0.ɵɵngDeclareClassMetadata({
4537
4670
  minVersion: "12.0.0",
4538
- version: "22.2.0",
4671
+ version: "22.2.3",
4539
4672
  ngImport: i0,
4540
4673
  type: CommunicationTabComponent,
4541
4674
  decorators: [{
@@ -4548,9 +4681,9 @@ i0.ɵɵngDeclareClassMetadata({
4548
4681
  }]
4549
4682
  }],
4550
4683
  ctorParameters: () => [
4551
- { type: i3.CommonService },
4552
- { type: i3.ProfileService },
4553
- { type: i4$2.Store },
4684
+ { type: i3$2.CommonService },
4685
+ { type: i3$2.ProfileService },
4686
+ { type: i3$1.Store },
4554
4687
  { type: i0.Injector },
4555
4688
  { type: i0.ChangeDetectorRef }
4556
4689
  ]
@@ -4611,11 +4744,11 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
4611
4744
  static {
4612
4745
  this.ɵfac = i0.ɵɵngDeclareFactory({
4613
4746
  minVersion: "12.0.0",
4614
- version: "22.2.0",
4747
+ version: "22.2.3",
4615
4748
  ngImport: i0,
4616
4749
  type: OthersTabComponent,
4617
4750
  deps: [
4618
- { token: i3.CommonService },
4751
+ { token: i3$2.CommonService },
4619
4752
  { token: i0.Injector },
4620
4753
  { token: i0.ChangeDetectorRef }
4621
4754
  ],
@@ -4625,7 +4758,7 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
4625
4758
  static {
4626
4759
  this.ɵcmp = i0.ɵɵngDeclareComponent({
4627
4760
  minVersion: "17.0.0",
4628
- version: "22.2.0",
4761
+ version: "22.2.3",
4629
4762
  type: OthersTabComponent,
4630
4763
  isStandalone: false,
4631
4764
  selector: "pw-others-tab",
@@ -4696,7 +4829,7 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
4696
4829
  };
4697
4830
  i0.ɵɵngDeclareClassMetadata({
4698
4831
  minVersion: "12.0.0",
4699
- version: "22.2.0",
4832
+ version: "22.2.3",
4700
4833
  ngImport: i0,
4701
4834
  type: OthersTabComponent,
4702
4835
  decorators: [{
@@ -4708,7 +4841,7 @@ i0.ɵɵngDeclareClassMetadata({
4708
4841
  }]
4709
4842
  }],
4710
4843
  ctorParameters: () => [
4711
- { type: i3.CommonService },
4844
+ { type: i3$2.CommonService },
4712
4845
  { type: i0.Injector },
4713
4846
  { type: i0.ChangeDetectorRef }
4714
4847
  ]
@@ -4824,7 +4957,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
4824
4957
  static {
4825
4958
  this.ɵfac = i0.ɵɵngDeclareFactory({
4826
4959
  minVersion: "12.0.0",
4827
- version: "22.2.0",
4960
+ version: "22.2.3",
4828
4961
  ngImport: i0,
4829
4962
  type: SecurityTabComponent,
4830
4963
  deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }],
@@ -4834,7 +4967,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
4834
4967
  static {
4835
4968
  this.ɵcmp = i0.ɵɵngDeclareComponent({
4836
4969
  minVersion: "17.0.0",
4837
- version: "22.2.0",
4970
+ version: "22.2.3",
4838
4971
  type: SecurityTabComponent,
4839
4972
  isStandalone: false,
4840
4973
  selector: "pw-security-tab",
@@ -4909,7 +5042,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
4909
5042
  };
4910
5043
  i0.ɵɵngDeclareClassMetadata({
4911
5044
  minVersion: "12.0.0",
4912
- version: "22.2.0",
5045
+ version: "22.2.3",
4913
5046
  ngImport: i0,
4914
5047
  type: SecurityTabComponent,
4915
5048
  decorators: [{
@@ -4976,17 +5109,17 @@ var SettingsComponent = class SettingsComponent {
4976
5109
  static {
4977
5110
  this.ɵfac = i0.ɵɵngDeclareFactory({
4978
5111
  minVersion: "12.0.0",
4979
- version: "22.2.0",
5112
+ version: "22.2.3",
4980
5113
  ngImport: i0,
4981
5114
  type: SettingsComponent,
4982
- deps: [{ token: i1$2.Router }, { token: i3.PermissionService }],
5115
+ deps: [{ token: i1$2.Router }, { token: i3$2.PermissionService }],
4983
5116
  target: i0.ɵɵFactoryTarget.Component
4984
5117
  });
4985
5118
  }
4986
5119
  static {
4987
5120
  this.ɵcmp = i0.ɵɵngDeclareComponent({
4988
5121
  minVersion: "14.0.0",
4989
- version: "22.2.0",
5122
+ version: "22.2.3",
4990
5123
  type: SettingsComponent,
4991
5124
  isStandalone: false,
4992
5125
  selector: "pw-settings",
@@ -5010,7 +5143,7 @@ var SettingsComponent = class SettingsComponent {
5010
5143
  };
5011
5144
  i0.ɵɵngDeclareClassMetadata({
5012
5145
  minVersion: "12.0.0",
5013
- version: "22.2.0",
5146
+ version: "22.2.3",
5014
5147
  ngImport: i0,
5015
5148
  type: SettingsComponent,
5016
5149
  decorators: [{
@@ -5021,7 +5154,7 @@ i0.ɵɵngDeclareClassMetadata({
5021
5154
  template: "<pw-tabs [items]=\"items\"></pw-tabs>\n"
5022
5155
  }]
5023
5156
  }],
5024
- ctorParameters: () => [{ type: i1$2.Router }, { type: i3.PermissionService }],
5157
+ ctorParameters: () => [{ type: i1$2.Router }, { type: i3$2.PermissionService }],
5025
5158
  propDecorators: { menu: [{
5026
5159
  type: ViewChild,
5027
5160
  args: ["menuItems", { static: true }]
@@ -5053,12 +5186,12 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
5053
5186
  static {
5054
5187
  this.ɵfac = i0.ɵɵngDeclareFactory({
5055
5188
  minVersion: "12.0.0",
5056
- version: "22.2.0",
5189
+ version: "22.2.3",
5057
5190
  ngImport: i0,
5058
5191
  type: SupportComponent,
5059
5192
  deps: [
5060
5193
  { token: i0.Injector },
5061
- { token: i3.CommonService },
5194
+ { token: i3$2.CommonService },
5062
5195
  { token: i0.ChangeDetectorRef }
5063
5196
  ],
5064
5197
  target: i0.ɵɵFactoryTarget.Component
@@ -5067,7 +5200,7 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
5067
5200
  static {
5068
5201
  this.ɵcmp = i0.ɵɵngDeclareComponent({
5069
5202
  minVersion: "17.0.0",
5070
- version: "22.2.0",
5203
+ version: "22.2.3",
5071
5204
  type: SupportComponent,
5072
5205
  isStandalone: false,
5073
5206
  selector: "pw-support",
@@ -5170,7 +5303,7 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
5170
5303
  };
5171
5304
  i0.ɵɵngDeclareClassMetadata({
5172
5305
  minVersion: "12.0.0",
5173
- version: "22.2.0",
5306
+ version: "22.2.3",
5174
5307
  ngImport: i0,
5175
5308
  type: SupportComponent,
5176
5309
  decorators: [{
@@ -5184,7 +5317,7 @@ i0.ɵɵngDeclareClassMetadata({
5184
5317
  }],
5185
5318
  ctorParameters: () => [
5186
5319
  { type: i0.Injector },
5187
- { type: i3.CommonService },
5320
+ { type: i3$2.CommonService },
5188
5321
  { type: i0.ChangeDetectorRef }
5189
5322
  ]
5190
5323
  });
@@ -5263,13 +5396,13 @@ var SupportDetailsComponent = class SupportDetailsComponent extends AppBaseCompo
5263
5396
  static {
5264
5397
  this.ɵfac = i0.ɵɵngDeclareFactory({
5265
5398
  minVersion: "12.0.0",
5266
- version: "22.2.0",
5399
+ version: "22.2.3",
5267
5400
  ngImport: i0,
5268
5401
  type: SupportDetailsComponent,
5269
5402
  deps: [
5270
5403
  { token: i0.Injector },
5271
- { token: i3.CommonService },
5272
- { token: i3.AuthService },
5404
+ { token: i3$2.CommonService },
5405
+ { token: i3$2.AuthService },
5273
5406
  { token: i0.Renderer2 },
5274
5407
  { token: i0.ElementRef },
5275
5408
  { token: i0.ChangeDetectorRef }
@@ -5280,7 +5413,7 @@ var SupportDetailsComponent = class SupportDetailsComponent extends AppBaseCompo
5280
5413
  static {
5281
5414
  this.ɵcmp = i0.ɵɵngDeclareComponent({
5282
5415
  minVersion: "17.0.0",
5283
- version: "22.2.0",
5416
+ version: "22.2.3",
5284
5417
  type: SupportDetailsComponent,
5285
5418
  isStandalone: false,
5286
5419
  selector: "pw-support-details",
@@ -5459,7 +5592,7 @@ var SupportDetailsComponent = class SupportDetailsComponent extends AppBaseCompo
5459
5592
  __decorate([ValidateForm("form")], SupportDetailsComponent.prototype, "onSave", null);
5460
5593
  i0.ɵɵngDeclareClassMetadata({
5461
5594
  minVersion: "12.0.0",
5462
- version: "22.2.0",
5595
+ version: "22.2.3",
5463
5596
  ngImport: i0,
5464
5597
  type: SupportDetailsComponent,
5465
5598
  decorators: [{
@@ -5473,8 +5606,8 @@ i0.ɵɵngDeclareClassMetadata({
5473
5606
  }],
5474
5607
  ctorParameters: () => [
5475
5608
  { type: i0.Injector },
5476
- { type: i3.CommonService },
5477
- { type: i3.AuthService },
5609
+ { type: i3$2.CommonService },
5610
+ { type: i3$2.AuthService },
5478
5611
  { type: i0.Renderer2 },
5479
5612
  { type: i0.ElementRef },
5480
5613
  { type: i0.ChangeDetectorRef }
@@ -5557,12 +5690,12 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
5557
5690
  static {
5558
5691
  this.ɵfac = i0.ɵɵngDeclareFactory({
5559
5692
  minVersion: "12.0.0",
5560
- version: "22.2.0",
5693
+ version: "22.2.3",
5561
5694
  ngImport: i0,
5562
5695
  type: EditPortfoliosComponent,
5563
5696
  deps: [
5564
5697
  { token: i2$2.NgbModal },
5565
- { token: i3.ProfileService },
5698
+ { token: i3$2.ProfileService },
5566
5699
  { token: i0.ChangeDetectorRef }
5567
5700
  ],
5568
5701
  target: i0.ɵɵFactoryTarget.Component
@@ -5571,7 +5704,7 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
5571
5704
  static {
5572
5705
  this.ɵcmp = i0.ɵɵngDeclareComponent({
5573
5706
  minVersion: "17.0.0",
5574
- version: "22.2.0",
5707
+ version: "22.2.3",
5575
5708
  type: EditPortfoliosComponent,
5576
5709
  isStandalone: false,
5577
5710
  selector: "pw-edit-portfolios",
@@ -5671,7 +5804,7 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
5671
5804
  };
5672
5805
  i0.ɵɵngDeclareClassMetadata({
5673
5806
  minVersion: "12.0.0",
5674
- version: "22.2.0",
5807
+ version: "22.2.3",
5675
5808
  ngImport: i0,
5676
5809
  type: EditPortfoliosComponent,
5677
5810
  decorators: [{
@@ -5685,7 +5818,7 @@ i0.ɵɵngDeclareClassMetadata({
5685
5818
  }],
5686
5819
  ctorParameters: () => [
5687
5820
  { type: i2$2.NgbModal },
5688
- { type: i3.ProfileService },
5821
+ { type: i3$2.ProfileService },
5689
5822
  { type: i0.ChangeDetectorRef }
5690
5823
  ],
5691
5824
  propDecorators: {
@@ -5799,13 +5932,13 @@ var EditProjectModalComponent = class EditProjectModalComponent extends AppBaseC
5799
5932
  static {
5800
5933
  this.ɵfac = i0.ɵɵngDeclareFactory({
5801
5934
  minVersion: "12.0.0",
5802
- version: "22.2.0",
5935
+ version: "22.2.3",
5803
5936
  ngImport: i0,
5804
5937
  type: EditProjectModalComponent,
5805
5938
  deps: [
5806
5939
  { token: i2$2.NgbModal },
5807
5940
  { token: i1$1.UntypedFormBuilder },
5808
- { token: i3.ProfileService },
5941
+ { token: i3$2.ProfileService },
5809
5942
  { token: i0.Injector },
5810
5943
  { token: i0.ChangeDetectorRef }
5811
5944
  ],
@@ -5815,7 +5948,7 @@ var EditProjectModalComponent = class EditProjectModalComponent extends AppBaseC
5815
5948
  static {
5816
5949
  this.ɵcmp = i0.ɵɵngDeclareComponent({
5817
5950
  minVersion: "14.0.0",
5818
- version: "22.2.0",
5951
+ version: "22.2.3",
5819
5952
  type: EditProjectModalComponent,
5820
5953
  isStandalone: false,
5821
5954
  selector: "pw-edit-project-modal",
@@ -6007,7 +6140,7 @@ var EditProjectModalComponent = class EditProjectModalComponent extends AppBaseC
6007
6140
  __decorate([ValidateForm("form")], EditProjectModalComponent.prototype, "onSaveDetail", null);
6008
6141
  i0.ɵɵngDeclareClassMetadata({
6009
6142
  minVersion: "12.0.0",
6010
- version: "22.2.0",
6143
+ version: "22.2.3",
6011
6144
  ngImport: i0,
6012
6145
  type: EditProjectModalComponent,
6013
6146
  decorators: [{
@@ -6022,7 +6155,7 @@ i0.ɵɵngDeclareClassMetadata({
6022
6155
  ctorParameters: () => [
6023
6156
  { type: i2$2.NgbModal },
6024
6157
  { type: i1$1.UntypedFormBuilder },
6025
- { type: i3.ProfileService },
6158
+ { type: i3$2.ProfileService },
6026
6159
  { type: i0.Injector },
6027
6160
  { type: i0.ChangeDetectorRef }
6028
6161
  ],
@@ -6142,13 +6275,13 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
6142
6275
  static {
6143
6276
  this.ɵfac = i0.ɵɵngDeclareFactory({
6144
6277
  minVersion: "12.0.0",
6145
- version: "22.2.0",
6278
+ version: "22.2.3",
6146
6279
  ngImport: i0,
6147
6280
  type: EditQualificationsModalComponent,
6148
6281
  deps: [
6149
6282
  { token: i2$2.NgbModal },
6150
6283
  { token: i1$1.UntypedFormBuilder },
6151
- { token: i3.QualificationService },
6284
+ { token: i3$2.QualificationService },
6152
6285
  { token: i0.Injector },
6153
6286
  { token: i0.ChangeDetectorRef }
6154
6287
  ],
@@ -6158,7 +6291,7 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
6158
6291
  static {
6159
6292
  this.ɵcmp = i0.ɵɵngDeclareComponent({
6160
6293
  minVersion: "14.0.0",
6161
- version: "22.2.0",
6294
+ version: "22.2.3",
6162
6295
  type: EditQualificationsModalComponent,
6163
6296
  isStandalone: false,
6164
6297
  selector: "pw-edit-qualifications-modal",
@@ -6408,7 +6541,7 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
6408
6541
  __decorate([ValidateForm("form")], EditQualificationsModalComponent.prototype, "onSaveDetail", null);
6409
6542
  i0.ɵɵngDeclareClassMetadata({
6410
6543
  minVersion: "12.0.0",
6411
- version: "22.2.0",
6544
+ version: "22.2.3",
6412
6545
  ngImport: i0,
6413
6546
  type: EditQualificationsModalComponent,
6414
6547
  decorators: [{
@@ -6423,7 +6556,7 @@ i0.ɵɵngDeclareClassMetadata({
6423
6556
  ctorParameters: () => [
6424
6557
  { type: i2$2.NgbModal },
6425
6558
  { type: i1$1.UntypedFormBuilder },
6426
- { type: i3.QualificationService },
6559
+ { type: i3$2.QualificationService },
6427
6560
  { type: i0.Injector },
6428
6561
  { type: i0.ChangeDetectorRef }
6429
6562
  ],
@@ -6483,13 +6616,13 @@ var EditRecommendationModalComponent = class EditRecommendationModalComponent {
6483
6616
  static {
6484
6617
  this.ɵfac = i0.ɵɵngDeclareFactory({
6485
6618
  minVersion: "12.0.0",
6486
- version: "22.2.0",
6619
+ version: "22.2.3",
6487
6620
  ngImport: i0,
6488
6621
  type: EditRecommendationModalComponent,
6489
6622
  deps: [
6490
6623
  { token: i2$2.NgbModal },
6491
6624
  { token: i1$1.UntypedFormBuilder },
6492
- { token: i3.ProfileService },
6625
+ { token: i3$2.ProfileService },
6493
6626
  { token: i0.ChangeDetectorRef }
6494
6627
  ],
6495
6628
  target: i0.ɵɵFactoryTarget.Component
@@ -6498,7 +6631,7 @@ var EditRecommendationModalComponent = class EditRecommendationModalComponent {
6498
6631
  static {
6499
6632
  this.ɵcmp = i0.ɵɵngDeclareComponent({
6500
6633
  minVersion: "14.0.0",
6501
- version: "22.2.0",
6634
+ version: "22.2.3",
6502
6635
  type: EditRecommendationModalComponent,
6503
6636
  isStandalone: false,
6504
6637
  selector: "pw-edit-recommendation-modal",
@@ -6614,7 +6747,7 @@ var EditRecommendationModalComponent = class EditRecommendationModalComponent {
6614
6747
  __decorate([ValidateForm("form")], EditRecommendationModalComponent.prototype, "onSaveDetail", null);
6615
6748
  i0.ɵɵngDeclareClassMetadata({
6616
6749
  minVersion: "12.0.0",
6617
- version: "22.2.0",
6750
+ version: "22.2.3",
6618
6751
  ngImport: i0,
6619
6752
  type: EditRecommendationModalComponent,
6620
6753
  decorators: [{
@@ -6628,7 +6761,7 @@ i0.ɵɵngDeclareClassMetadata({
6628
6761
  ctorParameters: () => [
6629
6762
  { type: i2$2.NgbModal },
6630
6763
  { type: i1$1.UntypedFormBuilder },
6631
- { type: i3.ProfileService },
6764
+ { type: i3$2.ProfileService },
6632
6765
  { type: i0.ChangeDetectorRef }
6633
6766
  ],
6634
6767
  propDecorators: {
@@ -6715,12 +6848,12 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
6715
6848
  static {
6716
6849
  this.ɵfac = i0.ɵɵngDeclareFactory({
6717
6850
  minVersion: "12.0.0",
6718
- version: "22.2.0",
6851
+ version: "22.2.3",
6719
6852
  ngImport: i0,
6720
6853
  type: EditSkillsModalComponent,
6721
6854
  deps: [
6722
6855
  { token: i2$2.NgbModal },
6723
- { token: i3.TagService },
6856
+ { token: i3$2.TagService },
6724
6857
  { token: i0.Injector },
6725
6858
  { token: i0.ChangeDetectorRef }
6726
6859
  ],
@@ -6730,7 +6863,7 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
6730
6863
  static {
6731
6864
  this.ɵcmp = i0.ɵɵngDeclareComponent({
6732
6865
  minVersion: "14.0.0",
6733
- version: "22.2.0",
6866
+ version: "22.2.3",
6734
6867
  type: EditSkillsModalComponent,
6735
6868
  isStandalone: false,
6736
6869
  selector: "pw-edit-skills-modal",
@@ -6861,7 +6994,7 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
6861
6994
  };
6862
6995
  i0.ɵɵngDeclareClassMetadata({
6863
6996
  minVersion: "12.0.0",
6864
- version: "22.2.0",
6997
+ version: "22.2.3",
6865
6998
  ngImport: i0,
6866
6999
  type: EditSkillsModalComponent,
6867
7000
  decorators: [{
@@ -6874,7 +7007,7 @@ i0.ɵɵngDeclareClassMetadata({
6874
7007
  }],
6875
7008
  ctorParameters: () => [
6876
7009
  { type: i2$2.NgbModal },
6877
- { type: i3.TagService },
7010
+ { type: i3$2.TagService },
6878
7011
  { type: i0.Injector },
6879
7012
  { type: i0.ChangeDetectorRef }
6880
7013
  ],
@@ -6998,14 +7131,14 @@ var EditSocialLinksComponent = class EditSocialLinksComponent extends AppBaseCom
6998
7131
  static {
6999
7132
  this.ɵfac = i0.ɵɵngDeclareFactory({
7000
7133
  minVersion: "12.0.0",
7001
- version: "22.2.0",
7134
+ version: "22.2.3",
7002
7135
  ngImport: i0,
7003
7136
  type: EditSocialLinksComponent,
7004
7137
  deps: [
7005
7138
  { token: i0.Injector },
7006
7139
  { token: i2$2.NgbModal },
7007
7140
  { token: i1$1.UntypedFormBuilder },
7008
- { token: i3.ProfileService },
7141
+ { token: i3$2.ProfileService },
7009
7142
  { token: i0.ChangeDetectorRef }
7010
7143
  ],
7011
7144
  target: i0.ɵɵFactoryTarget.Component
@@ -7014,7 +7147,7 @@ var EditSocialLinksComponent = class EditSocialLinksComponent extends AppBaseCom
7014
7147
  static {
7015
7148
  this.ɵcmp = i0.ɵɵngDeclareComponent({
7016
7149
  minVersion: "17.0.0",
7017
- version: "22.2.0",
7150
+ version: "22.2.3",
7018
7151
  type: EditSocialLinksComponent,
7019
7152
  isStandalone: false,
7020
7153
  selector: "pw-edit-social-links",
@@ -7102,7 +7235,7 @@ var EditSocialLinksComponent = class EditSocialLinksComponent extends AppBaseCom
7102
7235
  __decorate([ValidateForm("form")], EditSocialLinksComponent.prototype, "onSaveDetail", null);
7103
7236
  i0.ɵɵngDeclareClassMetadata({
7104
7237
  minVersion: "12.0.0",
7105
- version: "22.2.0",
7238
+ version: "22.2.3",
7106
7239
  ngImport: i0,
7107
7240
  type: EditSocialLinksComponent,
7108
7241
  decorators: [{
@@ -7118,7 +7251,7 @@ i0.ɵɵngDeclareClassMetadata({
7118
7251
  { type: i0.Injector },
7119
7252
  { type: i2$2.NgbModal },
7120
7253
  { type: i1$1.UntypedFormBuilder },
7121
- { type: i3.ProfileService },
7254
+ { type: i3$2.ProfileService },
7122
7255
  { type: i0.ChangeDetectorRef }
7123
7256
  ],
7124
7257
  propDecorators: {
@@ -7230,14 +7363,14 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
7230
7363
  static {
7231
7364
  this.ɵfac = i0.ɵɵngDeclareFactory({
7232
7365
  minVersion: "12.0.0",
7233
- version: "22.2.0",
7366
+ version: "22.2.3",
7234
7367
  ngImport: i0,
7235
7368
  type: EditUserProfileModalComponent,
7236
7369
  deps: [
7237
7370
  { token: i2$2.NgbModal },
7238
7371
  { token: i1$1.UntypedFormBuilder },
7239
- { token: i3.ProfileService },
7240
- { token: i3.GeoService },
7372
+ { token: i3$2.ProfileService },
7373
+ { token: i3$2.GeoService },
7241
7374
  { token: i0.Injector },
7242
7375
  { token: i0.ChangeDetectorRef }
7243
7376
  ],
@@ -7247,7 +7380,7 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
7247
7380
  static {
7248
7381
  this.ɵcmp = i0.ɵɵngDeclareComponent({
7249
7382
  minVersion: "17.0.0",
7250
- version: "22.2.0",
7383
+ version: "22.2.3",
7251
7384
  type: EditUserProfileModalComponent,
7252
7385
  isStandalone: false,
7253
7386
  selector: "pw-edit-user-profile-modal",
@@ -7498,7 +7631,7 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
7498
7631
  __decorate([ValidateForm("form")], EditUserProfileModalComponent.prototype, "save", null);
7499
7632
  i0.ɵɵngDeclareClassMetadata({
7500
7633
  minVersion: "12.0.0",
7501
- version: "22.2.0",
7634
+ version: "22.2.3",
7502
7635
  ngImport: i0,
7503
7636
  type: EditUserProfileModalComponent,
7504
7637
  decorators: [{
@@ -7513,8 +7646,8 @@ i0.ɵɵngDeclareClassMetadata({
7513
7646
  ctorParameters: () => [
7514
7647
  { type: i2$2.NgbModal },
7515
7648
  { type: i1$1.UntypedFormBuilder },
7516
- { type: i3.ProfileService },
7517
- { type: i3.GeoService },
7649
+ { type: i3$2.ProfileService },
7650
+ { type: i3$2.GeoService },
7518
7651
  { type: i0.Injector },
7519
7652
  { type: i0.ChangeDetectorRef }
7520
7653
  ],
@@ -7631,13 +7764,13 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
7631
7764
  static {
7632
7765
  this.ɵfac = i0.ɵɵngDeclareFactory({
7633
7766
  minVersion: "12.0.0",
7634
- version: "22.2.0",
7767
+ version: "22.2.3",
7635
7768
  ngImport: i0,
7636
7769
  type: UserAboutComponent,
7637
7770
  deps: [
7638
- { token: i3.ProfileService },
7639
- { token: i3.QualificationService },
7640
- { token: i3.TagService },
7771
+ { token: i3$2.ProfileService },
7772
+ { token: i3$2.QualificationService },
7773
+ { token: i3$2.TagService },
7641
7774
  { token: i0.Injector },
7642
7775
  { token: i0.ChangeDetectorRef },
7643
7776
  { token: i2$3.ConfirmDialogService }
@@ -7648,7 +7781,7 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
7648
7781
  static {
7649
7782
  this.ɵcmp = i0.ɵɵngDeclareComponent({
7650
7783
  minVersion: "17.0.0",
7651
- version: "22.2.0",
7784
+ version: "22.2.3",
7652
7785
  type: UserAboutComponent,
7653
7786
  isStandalone: false,
7654
7787
  selector: "pw-user-about",
@@ -7755,7 +7888,7 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
7755
7888
  };
7756
7889
  i0.ɵɵngDeclareClassMetadata({
7757
7890
  minVersion: "12.0.0",
7758
- version: "22.2.0",
7891
+ version: "22.2.3",
7759
7892
  ngImport: i0,
7760
7893
  type: UserAboutComponent,
7761
7894
  decorators: [{
@@ -7768,9 +7901,9 @@ i0.ɵɵngDeclareClassMetadata({
7768
7901
  }]
7769
7902
  }],
7770
7903
  ctorParameters: () => [
7771
- { type: i3.ProfileService },
7772
- { type: i3.QualificationService },
7773
- { type: i3.TagService },
7904
+ { type: i3$2.ProfileService },
7905
+ { type: i3$2.QualificationService },
7906
+ { type: i3$2.TagService },
7774
7907
  { type: i0.Injector },
7775
7908
  { type: i0.ChangeDetectorRef },
7776
7909
  { type: i2$3.ConfirmDialogService }
@@ -7840,11 +7973,11 @@ var PortfoliosComponent = class PortfoliosComponent {
7840
7973
  static {
7841
7974
  this.ɵfac = i0.ɵɵngDeclareFactory({
7842
7975
  minVersion: "12.0.0",
7843
- version: "22.2.0",
7976
+ version: "22.2.3",
7844
7977
  ngImport: i0,
7845
7978
  type: PortfoliosComponent,
7846
7979
  deps: [
7847
- { token: i3.ProfileService },
7980
+ { token: i3$2.ProfileService },
7848
7981
  { token: i2$2.NgbModal },
7849
7982
  { token: i0.ChangeDetectorRef }
7850
7983
  ],
@@ -7854,7 +7987,7 @@ var PortfoliosComponent = class PortfoliosComponent {
7854
7987
  static {
7855
7988
  this.ɵcmp = i0.ɵɵngDeclareComponent({
7856
7989
  minVersion: "17.0.0",
7857
- version: "22.2.0",
7990
+ version: "22.2.3",
7858
7991
  type: PortfoliosComponent,
7859
7992
  isStandalone: false,
7860
7993
  selector: "pw-portfolios",
@@ -7901,7 +8034,7 @@ var PortfoliosComponent = class PortfoliosComponent {
7901
8034
  };
7902
8035
  i0.ɵɵngDeclareClassMetadata({
7903
8036
  minVersion: "12.0.0",
7904
- version: "22.2.0",
8037
+ version: "22.2.3",
7905
8038
  ngImport: i0,
7906
8039
  type: PortfoliosComponent,
7907
8040
  decorators: [{
@@ -7914,7 +8047,7 @@ i0.ɵɵngDeclareClassMetadata({
7914
8047
  }]
7915
8048
  }],
7916
8049
  ctorParameters: () => [
7917
- { type: i3.ProfileService },
8050
+ { type: i3$2.ProfileService },
7918
8051
  { type: i2$2.NgbModal },
7919
8052
  { type: i0.ChangeDetectorRef }
7920
8053
  ],
@@ -7989,11 +8122,11 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
7989
8122
  static {
7990
8123
  this.ɵfac = i0.ɵɵngDeclareFactory({
7991
8124
  minVersion: "12.0.0",
7992
- version: "22.2.0",
8125
+ version: "22.2.3",
7993
8126
  ngImport: i0,
7994
8127
  type: UserProjectsComponent,
7995
8128
  deps: [
7996
- { token: i3.ProfileService },
8129
+ { token: i3$2.ProfileService },
7997
8130
  { token: i0.Injector },
7998
8131
  { token: i0.ChangeDetectorRef },
7999
8132
  { token: i2$3.ConfirmDialogService }
@@ -8004,7 +8137,7 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
8004
8137
  static {
8005
8138
  this.ɵcmp = i0.ɵɵngDeclareComponent({
8006
8139
  minVersion: "17.0.0",
8007
- version: "22.2.0",
8140
+ version: "22.2.3",
8008
8141
  type: UserProjectsComponent,
8009
8142
  isStandalone: false,
8010
8143
  selector: "pw-user-projects",
@@ -8162,7 +8295,7 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
8162
8295
  };
8163
8296
  i0.ɵɵngDeclareClassMetadata({
8164
8297
  minVersion: "12.0.0",
8165
- version: "22.2.0",
8298
+ version: "22.2.3",
8166
8299
  ngImport: i0,
8167
8300
  type: UserProjectsComponent,
8168
8301
  decorators: [{
@@ -8175,7 +8308,7 @@ i0.ɵɵngDeclareClassMetadata({
8175
8308
  }]
8176
8309
  }],
8177
8310
  ctorParameters: () => [
8178
- { type: i3.ProfileService },
8311
+ { type: i3$2.ProfileService },
8179
8312
  { type: i0.Injector },
8180
8313
  { type: i0.ChangeDetectorRef },
8181
8314
  { type: i2$3.ConfirmDialogService }
@@ -8373,14 +8506,14 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
8373
8506
  static {
8374
8507
  this.ɵfac = i0.ɵɵngDeclareFactory({
8375
8508
  minVersion: "12.0.0",
8376
- version: "22.2.0",
8509
+ version: "22.2.3",
8377
8510
  ngImport: i0,
8378
8511
  type: UserProfilePageComponent,
8379
8512
  deps: [
8380
8513
  { token: i0.Injector },
8381
- { token: i3.ProfileService },
8514
+ { token: i3$2.ProfileService },
8382
8515
  { token: i2$2.NgbModal },
8383
- { token: i3.ScriptLoaderService },
8516
+ { token: i3$2.ScriptLoaderService },
8384
8517
  { token: i0.ChangeDetectorRef }
8385
8518
  ],
8386
8519
  target: i0.ɵɵFactoryTarget.Component
@@ -8389,7 +8522,7 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
8389
8522
  static {
8390
8523
  this.ɵcmp = i0.ɵɵngDeclareComponent({
8391
8524
  minVersion: "17.0.0",
8392
- version: "22.2.0",
8525
+ version: "22.2.3",
8393
8526
  type: UserProfilePageComponent,
8394
8527
  isStandalone: false,
8395
8528
  selector: "pw-user-profile-page",
@@ -8489,7 +8622,7 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
8489
8622
  };
8490
8623
  i0.ɵɵngDeclareClassMetadata({
8491
8624
  minVersion: "12.0.0",
8492
- version: "22.2.0",
8625
+ version: "22.2.3",
8493
8626
  ngImport: i0,
8494
8627
  type: UserProfilePageComponent,
8495
8628
  decorators: [{
@@ -8503,9 +8636,9 @@ i0.ɵɵngDeclareClassMetadata({
8503
8636
  }],
8504
8637
  ctorParameters: () => [
8505
8638
  { type: i0.Injector },
8506
- { type: i3.ProfileService },
8639
+ { type: i3$2.ProfileService },
8507
8640
  { type: i2$2.NgbModal },
8508
- { type: i3.ScriptLoaderService },
8641
+ { type: i3$2.ScriptLoaderService },
8509
8642
  { type: i0.ChangeDetectorRef }
8510
8643
  ]
8511
8644
  });
@@ -8525,7 +8658,7 @@ var UserModuleModule = class UserModuleModule {
8525
8658
  static {
8526
8659
  this.ɵfac = i0.ɵɵngDeclareFactory({
8527
8660
  minVersion: "12.0.0",
8528
- version: "22.2.0",
8661
+ version: "22.2.3",
8529
8662
  ngImport: i0,
8530
8663
  type: UserModuleModule,
8531
8664
  deps: [],
@@ -8535,7 +8668,7 @@ var UserModuleModule = class UserModuleModule {
8535
8668
  static {
8536
8669
  this.ɵmod = i0.ɵɵngDeclareNgModule({
8537
8670
  minVersion: "14.0.0",
8538
- version: "22.2.0",
8671
+ version: "22.2.3",
8539
8672
  ngImport: i0,
8540
8673
  type: UserModuleModule,
8541
8674
  declarations: [
@@ -8553,6 +8686,7 @@ var UserModuleModule = class UserModuleModule {
8553
8686
  UpgradeSubscriptionComponent,
8554
8687
  UserSubscriptionDetailsComponent,
8555
8688
  UserSubscriptionListComponent,
8689
+ SubscriptionRemovalComponent,
8556
8690
  UserInvoiceComponent,
8557
8691
  AiKnowledgeTabComponent,
8558
8692
  CommunicationTabComponent,
@@ -8639,7 +8773,7 @@ var UserModuleModule = class UserModuleModule {
8639
8773
  static {
8640
8774
  this.ɵinj = i0.ɵɵngDeclareInjector({
8641
8775
  minVersion: "12.0.0",
8642
- version: "22.2.0",
8776
+ version: "22.2.3",
8643
8777
  ngImport: i0,
8644
8778
  type: UserModuleModule,
8645
8779
  providers: [{
@@ -8674,7 +8808,7 @@ var UserModuleModule = class UserModuleModule {
8674
8808
  };
8675
8809
  i0.ɵɵngDeclareClassMetadata({
8676
8810
  minVersion: "12.0.0",
8677
- version: "22.2.0",
8811
+ version: "22.2.3",
8678
8812
  ngImport: i0,
8679
8813
  type: UserModuleModule,
8680
8814
  decorators: [{
@@ -8695,6 +8829,7 @@ i0.ɵɵngDeclareClassMetadata({
8695
8829
  UpgradeSubscriptionComponent,
8696
8830
  UserSubscriptionDetailsComponent,
8697
8831
  UserSubscriptionListComponent,
8832
+ SubscriptionRemovalComponent,
8698
8833
  UserInvoiceComponent,
8699
8834
  AiKnowledgeTabComponent,
8700
8835
  CommunicationTabComponent,