taxtank-core 0.27.7 → 0.28.2
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.
- package/bundles/taxtank-core.umd.js +412 -245
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/income-source.collection.js +4 -1
- package/esm2015/lib/collections/index.js +2 -1
- package/esm2015/lib/collections/sole/index.js +2 -0
- package/esm2015/lib/collections/sole/sole-invoice.collection.js +13 -0
- package/esm2015/lib/collections/vehicle/vehicle-logbook.collection.js +2 -2
- package/esm2015/lib/db/Models/sole/sole-business-loss.js +1 -1
- package/esm2015/lib/db/Models/sole/sole-business.js +1 -1
- package/esm2015/lib/forms/sole/sole-business.form.js +32 -2
- package/esm2015/lib/forms/sole/sole-details.form.js +3 -2
- package/esm2015/lib/interceptors/basiq-client-id.interceptor.js +31 -0
- package/esm2015/lib/interceptors/basiq-token.interceptor.js +35 -0
- package/esm2015/lib/interceptors/interceptors.module.js +15 -4
- package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
- package/esm2015/lib/models/event/app-event-type.enum.js +23 -20
- package/esm2015/lib/models/sole/sole-business.js +5 -1
- package/esm2015/lib/models/sole/sole-invoice.js +7 -1
- package/esm2015/lib/models/vehicle/vehicle-logbook.js +4 -4
- package/esm2015/lib/services/http/income-source/income-source.service.js +12 -1
- package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +10 -1
- package/esm2015/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.js +12 -1
- package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +10 -4
- package/esm2015/lib/services/http/user/user.service.js +12 -1
- package/esm2015/lib/validators/required-length.validator.js +12 -0
- package/fesm2015/taxtank-core.js +372 -226
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/income-source.collection.d.ts +1 -0
- package/lib/collections/index.d.ts +1 -0
- package/lib/collections/sole/index.d.ts +1 -0
- package/lib/collections/sole/sole-invoice.collection.d.ts +7 -0
- package/lib/db/Models/sole/sole-business-loss.d.ts +2 -3
- package/lib/db/Models/sole/sole-business.d.ts +2 -0
- package/lib/forms/sole/sole-business.form.d.ts +3 -0
- package/lib/interceptors/basiq-client-id.interceptor.d.ts +15 -0
- package/lib/interceptors/{basiq.interceptor.d.ts → basiq-token.interceptor.d.ts} +3 -3
- package/lib/models/event/app-event-type.enum.d.ts +22 -19
- package/lib/models/sole/sole-business.d.ts +2 -0
- package/lib/models/sole/sole-invoice.d.ts +2 -0
- package/lib/models/vehicle/vehicle-logbook.d.ts +2 -2
- package/lib/services/http/income-source/income-source.service.d.ts +7 -1
- package/lib/services/http/sole/sole-business/sole-business.service.d.ts +2 -0
- package/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.d.ts +4 -1
- package/lib/services/http/sole/sole-details/sole-details.service.d.ts +3 -1
- package/lib/services/http/user/user.service.d.ts +4 -0
- package/lib/validators/required-length.validator.d.ts +5 -0
- package/package.json +1 -1
- package/esm2015/lib/interceptors/basiq.interceptor.js +0 -35
|
@@ -14,6 +14,7 @@ export declare class IncomeSourceCollection extends Collection<IncomeSource> {
|
|
|
14
14
|
*/
|
|
15
15
|
filterByTypes(types: IncomeSourceTypeEnum[]): IncomeSource[];
|
|
16
16
|
getSalary(): IncomeSource[];
|
|
17
|
+
getOther(): IncomeSource[];
|
|
17
18
|
/**
|
|
18
19
|
* Get income sources list of forecasts
|
|
19
20
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sole-invoice.collection';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SoleBusiness } from './sole-business';
|
|
2
2
|
import { AbstractModel } from '../abstract-model';
|
|
3
3
|
export declare class SoleBusinessLoss extends AbstractModel {
|
|
4
|
-
|
|
5
|
-
amount?: number;
|
|
4
|
+
openBalance?: number;
|
|
6
5
|
id?: number;
|
|
7
|
-
|
|
6
|
+
financialYear?: number;
|
|
8
7
|
business?: SoleBusiness;
|
|
9
8
|
}
|
|
@@ -9,6 +9,7 @@ import { Depreciation } from '../depreciation/depreciation';
|
|
|
9
9
|
import { AbstractModel } from '../abstract-model';
|
|
10
10
|
import { VehicleLogbook } from '../vehicle/vehicle-logbook';
|
|
11
11
|
import { SoleBusinessActivity } from './sole-business-activity';
|
|
12
|
+
import { IncomeSource } from '../incomeSource/income-source';
|
|
12
13
|
export declare class SoleBusiness extends AbstractModel {
|
|
13
14
|
name?: string;
|
|
14
15
|
description?: string;
|
|
@@ -22,6 +23,7 @@ export declare class SoleBusiness extends AbstractModel {
|
|
|
22
23
|
losses?: SoleBusinessLoss[];
|
|
23
24
|
invoices?: SoleInvoice[];
|
|
24
25
|
invoiceTemplates?: SoleInvoiceTemplate[];
|
|
26
|
+
incomeSource?: IncomeSource;
|
|
25
27
|
vehicleClaims?: VehicleClaim[];
|
|
26
28
|
vehicleLogbooks?: VehicleLogbook[];
|
|
27
29
|
transactions?: Transaction[];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AbstractForm } from '../abstract.form';
|
|
2
2
|
import { SoleBusiness } from '../../models';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
3
4
|
export declare class SoleBusinessForm extends AbstractForm<SoleBusiness> {
|
|
4
5
|
constructor(business?: SoleBusiness);
|
|
6
|
+
get forecastFormGroup(): FormGroup;
|
|
7
|
+
get lossFormGroup(): FormGroup;
|
|
5
8
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { UserService } from '../services/http/user/user.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Interceptor which check if client's basiq id exist and request it if not
|
|
7
|
+
*/
|
|
8
|
+
export declare class BasiqClientIdInterceptor implements HttpInterceptor {
|
|
9
|
+
private userService;
|
|
10
|
+
constructor(userService: UserService);
|
|
11
|
+
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
12
|
+
private addId;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasiqClientIdInterceptor, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BasiqClientIdInterceptor>;
|
|
15
|
+
}
|
|
@@ -5,11 +5,11 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
/**
|
|
6
6
|
* Interceptor which adds user's basiq token to any http request to basiq api
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class BasiqTokenInterceptor implements HttpInterceptor {
|
|
9
9
|
private basiqTokenService;
|
|
10
10
|
constructor(basiqTokenService: BasiqTokenService);
|
|
11
11
|
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
12
12
|
private addToken;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasiqTokenInterceptor, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BasiqTokenInterceptor>;
|
|
15
15
|
}
|
|
@@ -40,23 +40,26 @@ export declare enum AppEventTypeEnum {
|
|
|
40
40
|
PROPERTY_SUBSCRIPTION_DELETED = 38,
|
|
41
41
|
PROPERTY_VALUATION_DOCUMENT_CREATED = 39,
|
|
42
42
|
SERVICE_SUBSCRIPTION_UPDATED = 40,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
43
|
+
SOLE_BUSINESS_CREATED = 41,
|
|
44
|
+
SOLE_DEPRECIATION_METHOD_UPDATED = 42,
|
|
45
|
+
SOLE_DETAILS_CREATED = 43,
|
|
46
|
+
SOLE_DETAILS_UPDATED = 44,
|
|
47
|
+
TAX_REVIEW_UPDATED = 45,
|
|
48
|
+
TRANSACTION_CREATED = 46,
|
|
49
|
+
TRANSACTION_DELETED = 47,
|
|
50
|
+
TRANSACTION_UPDATED = 48,
|
|
51
|
+
TRANSACTION_UPDATED_WITH_RECEIPT = 49,
|
|
52
|
+
TRANSACTION_UPDATED_WITH_DELETED_RECEIPT = 50,
|
|
53
|
+
TRANSACTION_RECEIPT_CREATED = 51,
|
|
54
|
+
TRANSACTION_RECEIPT_DELETED = 52,
|
|
55
|
+
TRANSACTIONS_CREATED = 53,
|
|
56
|
+
USER_UPDATED = 54,
|
|
57
|
+
VEHICLE_CLAIM_UPDATED = 55,
|
|
58
|
+
VEHICLE_CLAIM_CREATED = 56,
|
|
59
|
+
VEHICLE_CLAIM_DETAILS_UPDATED = 57,
|
|
60
|
+
VEHICLE_CLAIM_DETAILS_CREATED = 58,
|
|
61
|
+
VEHICLE_LOGBOOK_CREATED = 59,
|
|
62
|
+
VEHICLE_LOGBOOK_UPDATED = 60,
|
|
63
|
+
VEHICLE_LOGBOOK_DELETED = 61,
|
|
64
|
+
VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED = 62
|
|
62
65
|
}
|
|
@@ -9,6 +9,7 @@ import { Depreciation } from '../depreciation/depreciation';
|
|
|
9
9
|
import { Transaction } from '../transaction/transaction';
|
|
10
10
|
import { Photoable } from '../../interfaces/photoable';
|
|
11
11
|
import { SoleBusinessActivity } from '../../db/Models/sole/sole-business-activity';
|
|
12
|
+
import { IncomeSource } from '../income-source/income-source';
|
|
12
13
|
export declare class SoleBusiness extends SoleBusinessBase implements Photoable {
|
|
13
14
|
/**
|
|
14
15
|
* Maximum number of businesses that a person can have, according to the ATO
|
|
@@ -23,6 +24,7 @@ export declare class SoleBusiness extends SoleBusinessBase implements Photoable
|
|
|
23
24
|
transactions: Transaction[];
|
|
24
25
|
depreciations: Depreciation[];
|
|
25
26
|
activity: SoleBusinessActivity;
|
|
27
|
+
incomeSource: IncomeSource;
|
|
26
28
|
getPhotoPlaceholder(): string;
|
|
27
29
|
getPhoto(): string;
|
|
28
30
|
}
|
|
@@ -4,10 +4,10 @@ import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
|
|
|
4
4
|
import { DateRange } from 'moment-range';
|
|
5
5
|
export declare class VehicleLogbook extends VehicleLogbookBase {
|
|
6
6
|
/**
|
|
7
|
-
* Logbook period duration in
|
|
7
|
+
* Logbook period duration in milliseconds.
|
|
8
8
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
9
9
|
*/
|
|
10
|
-
static
|
|
10
|
+
static bestPeriodDuration: number;
|
|
11
11
|
date: Date;
|
|
12
12
|
business: SoleBusiness;
|
|
13
13
|
get kilometers(): number;
|
|
@@ -5,15 +5,17 @@ import { IncomeSourceType } from '../../../models/income-source/income-source-ty
|
|
|
5
5
|
import { SalaryForecast } from '../../../models/income-source/salary-forecast';
|
|
6
6
|
import { IncomeSourceTypeEnum } from '../../../db/Enums/income-source-type.enum';
|
|
7
7
|
import { IncomeSource } from '../../../models/income-source/income-source';
|
|
8
|
+
import { IEventListener } from '../../../interfaces/event-listener.interface';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Service to work with income sources
|
|
11
12
|
*/
|
|
12
|
-
export declare class IncomeSourceService extends RestService<IncomeSourceBase, IncomeSource> {
|
|
13
|
+
export declare class IncomeSourceService extends RestService<IncomeSourceBase, IncomeSource> implements IEventListener {
|
|
13
14
|
url: string;
|
|
14
15
|
modelClass: typeof IncomeSource;
|
|
15
16
|
incomeSourceTypes: IncomeSourceType[];
|
|
16
17
|
incomeSourceTypeSubject: ReplaySubject<IncomeSourceType[]>;
|
|
18
|
+
listenEvents(): void;
|
|
17
19
|
/**
|
|
18
20
|
* Get income sources tax calculation
|
|
19
21
|
* @param salaryForecast for which tax should be calculated
|
|
@@ -37,6 +39,10 @@ export declare class IncomeSourceService extends RestService<IncomeSourceBase, I
|
|
|
37
39
|
* Get other incomes types
|
|
38
40
|
*/
|
|
39
41
|
getIncomeSourceTypes(): Observable<IncomeSourceType[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Sole businesses create together with income source
|
|
44
|
+
*/
|
|
45
|
+
private listenSoleBusinessCreated;
|
|
40
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<IncomeSourceService, never>;
|
|
41
47
|
static ɵprov: i0.ɵɵInjectableDeclaration<IncomeSourceService>;
|
|
42
48
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { RestService } from '../../rest/rest.service';
|
|
2
2
|
import { SoleBusiness as SoleBusinessBase } from '../../../../db/Models/sole/sole-business';
|
|
3
3
|
import { SoleBusiness } from '../../../../models';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class SoleBusinessService extends RestService<SoleBusinessBase, SoleBusiness> {
|
|
6
7
|
modelClass: typeof SoleBusiness;
|
|
7
8
|
url: string;
|
|
8
9
|
isHydra: boolean;
|
|
10
|
+
add(soleBusiness: SoleBusiness): Observable<SoleBusiness>;
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessService, never>;
|
|
10
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessService>;
|
|
11
13
|
}
|
package/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.d.ts
CHANGED
|
@@ -3,11 +3,12 @@ import { SoleDepreciationMethod } from '../../../../models';
|
|
|
3
3
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
4
4
|
import { EventDispatcherService } from '../../../event/event-dispatcher.service';
|
|
5
5
|
import { ToastService } from '../../../toast/toast.service';
|
|
6
|
+
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* @TODO Alex: extend rest service when refactored
|
|
9
10
|
*/
|
|
10
|
-
export declare class SoleDepreciationMethodService {
|
|
11
|
+
export declare class SoleDepreciationMethodService implements IEventListener {
|
|
11
12
|
private http;
|
|
12
13
|
private environment;
|
|
13
14
|
private eventDispatcherService;
|
|
@@ -16,8 +17,10 @@ export declare class SoleDepreciationMethodService {
|
|
|
16
17
|
cacheSubject: ReplaySubject<SoleDepreciationMethod>;
|
|
17
18
|
url: string;
|
|
18
19
|
constructor(http: HttpClient, environment: any, eventDispatcherService: EventDispatcherService, toastService: ToastService);
|
|
20
|
+
listenEvents(): void;
|
|
19
21
|
get(): Observable<SoleDepreciationMethod>;
|
|
20
22
|
update(soleDepreciationMethod: SoleDepreciationMethod): Observable<SoleDepreciationMethod>;
|
|
23
|
+
private listenSoleDetailsChanges;
|
|
21
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<SoleDepreciationMethodService, never>;
|
|
22
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<SoleDepreciationMethodService>;
|
|
23
26
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SoleDetails } from '../../../../models';
|
|
2
2
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import { EventDispatcherService } from '../../../event/event-dispatcher.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* @TODO TT-1777 Alex: extend from rest service when it refactored
|
|
@@ -8,9 +9,10 @@ import * as i0 from "@angular/core";
|
|
|
8
9
|
export declare class SoleDetailsService {
|
|
9
10
|
private http;
|
|
10
11
|
protected environment: any;
|
|
12
|
+
private eventDispatcherService;
|
|
11
13
|
cache: SoleDetails;
|
|
12
14
|
cacheSubject: ReplaySubject<SoleDetails>;
|
|
13
|
-
constructor(http: HttpClient, environment: any);
|
|
15
|
+
constructor(http: HttpClient, environment: any, eventDispatcherService: EventDispatcherService);
|
|
14
16
|
get(): Observable<SoleDetails>;
|
|
15
17
|
add(soleDetails: SoleDetails): Observable<SoleDetails>;
|
|
16
18
|
update(soleDetails: SoleDetails): Observable<SoleDetails>;
|
|
@@ -66,6 +66,10 @@ export declare class UserService implements IEventListener {
|
|
|
66
66
|
* clear service cache
|
|
67
67
|
*/
|
|
68
68
|
resetCache(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Create basiq (if not exist yet) to provide access to basiq api
|
|
71
|
+
*/
|
|
72
|
+
createBasiq(): Observable<string>;
|
|
69
73
|
/**
|
|
70
74
|
* Update cache when user's service subscription is updated
|
|
71
75
|
*/
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { BasiqService } from '../services/http/bank/basiq/basiq.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../services/http/bank/basiq/basiq-token.service";
|
|
6
|
-
/**
|
|
7
|
-
* Interceptor which adds user's basiq token to any http request to basiq api
|
|
8
|
-
*/
|
|
9
|
-
export class BasiqInterceptor {
|
|
10
|
-
constructor(basiqTokenService) {
|
|
11
|
-
this.basiqTokenService = basiqTokenService;
|
|
12
|
-
}
|
|
13
|
-
intercept(request, next) {
|
|
14
|
-
// skip non-basiq requests
|
|
15
|
-
if (!request.url.includes(BasiqService.basiqApiUrl)) {
|
|
16
|
-
return next.handle(request);
|
|
17
|
-
}
|
|
18
|
-
return this.basiqTokenService.get().pipe(mergeMap((token) => {
|
|
19
|
-
return next.handle(this.addToken(request, token));
|
|
20
|
-
}));
|
|
21
|
-
}
|
|
22
|
-
addToken(request, token) {
|
|
23
|
-
return request.clone({
|
|
24
|
-
setHeaders: {
|
|
25
|
-
Authorization: 'Bearer ' + token.value
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
BasiqInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BasiqInterceptor, deps: [{ token: i1.BasiqTokenService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
-
BasiqInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BasiqInterceptor });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: BasiqInterceptor, decorators: [{
|
|
33
|
-
type: Injectable
|
|
34
|
-
}], ctorParameters: function () { return [{ type: i1.BasiqTokenService }]; } });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzaXEuaW50ZXJjZXB0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvaW50ZXJjZXB0b3JzL2Jhc2lxLmludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHM0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRzFDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQ0FBMkMsQ0FBQzs7O0FBRXpFOztHQUVHO0FBRUgsTUFBTSxPQUFPLGdCQUFnQjtJQUUzQixZQUNVLGlCQUFvQztRQUFwQyxzQkFBaUIsR0FBakIsaUJBQWlCLENBQW1CO0lBRTlDLENBQUM7SUFFRCxTQUFTLENBQUMsT0FBNkIsRUFBRSxJQUFpQjtRQUN4RCwwQkFBMEI7UUFDMUIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLFlBQVksQ0FBQyxXQUFXL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