| 
						
						
							
								
							
						
						
					 | 
					@ -21,7 +21,8 @@ import { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  Component, | 
					 | 
					 | 
					  Component, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  Inject, | 
					 | 
					 | 
					  Inject, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  OnDestroy, | 
					 | 
					 | 
					  OnDestroy, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  OnInit | 
					 | 
					 | 
					  OnInit, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  signal | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} from '@angular/core'; | 
					 | 
					 | 
					} from '@angular/core'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { FormBuilder, FormControl, Validators } from '@angular/forms'; | 
					 | 
					 | 
					import { FormBuilder, FormControl, Validators } from '@angular/forms'; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | 
					 | 
					 | 
					import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -64,7 +65,14 @@ export class AssetProfileDialog implements OnDestroy, OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      csvString: '' | 
					 | 
					 | 
					      csvString: '' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }), | 
					 | 
					 | 
					    }), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    name: ['', Validators.required], | 
					 | 
					 | 
					    name: ['', Validators.required], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    scraperConfiguration: '', | 
					 | 
					 | 
					    scraperConfiguration: this.formBuilder.group({ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      defaultMarketPrice: null, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      headers: JSON.stringify({}), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      locale: '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      mode: '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      selector: '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      url: '' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    }), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    sectors: '', | 
					 | 
					 | 
					    sectors: '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    symbolMapping: '', | 
					 | 
					 | 
					    symbolMapping: '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    url: '' | 
					 | 
					 | 
					    url: '' | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -79,6 +87,11 @@ export class AssetProfileDialog implements OnDestroy, OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public historicalDataItems: LineChartItem[]; | 
					 | 
					 | 
					  public historicalDataItems: LineChartItem[]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public isBenchmark = false; | 
					 | 
					 | 
					  public isBenchmark = false; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public marketDataItems: MarketData[] = []; | 
					 | 
					 | 
					  public marketDataItems: MarketData[] = []; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  public modeValues = [ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    { value: 'lazy', viewValue: $localize`Lazy` }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    { value: 'instant', viewValue: $localize`Instant` } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  ]; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  public scraperConfiguationIsExpanded = signal(false); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public sectors: { | 
					 | 
					 | 
					  public sectors: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    [name: string]: { name: string; value: number }; | 
					 | 
					 | 
					    [name: string]: { name: string; value: number }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  }; | 
					 | 
					 | 
					  }; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -181,9 +194,18 @@ export class AssetProfileDialog implements OnDestroy, OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            csvString: AssetProfileDialog.HISTORICAL_DATA_TEMPLATE | 
					 | 
					 | 
					            csvString: AssetProfileDialog.HISTORICAL_DATA_TEMPLATE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          }, | 
					 | 
					 | 
					          }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          name: this.assetProfile.name ?? this.assetProfile.symbol, | 
					 | 
					 | 
					          name: this.assetProfile.name ?? this.assetProfile.symbol, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					          scraperConfiguration: JSON.stringify( | 
					 | 
					 | 
					          scraperConfiguration: { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            this.assetProfile?.scraperConfiguration ?? {} | 
					 | 
					 | 
					            defaultMarketPrice: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					          ), | 
					 | 
					 | 
					              this.assetProfile?.scraperConfiguration?.defaultMarketPrice ?? | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              null, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            headers: JSON.stringify( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              this.assetProfile?.scraperConfiguration?.headers ?? {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            locale: this.assetProfile?.scraperConfiguration?.locale ?? '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            mode: this.assetProfile?.scraperConfiguration?.mode ?? 'lazy', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            selector: this.assetProfile?.scraperConfiguration?.selector ?? '', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            url: this.assetProfile?.scraperConfiguration?.url ?? '' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          sectors: JSON.stringify(this.assetProfile?.sectors ?? []), | 
					 | 
					 | 
					          sectors: JSON.stringify(this.assetProfile?.sectors ?? []), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          symbolMapping: JSON.stringify(this.assetProfile?.symbolMapping ?? {}), | 
					 | 
					 | 
					          symbolMapping: JSON.stringify(this.assetProfile?.symbolMapping ?? {}), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          url: this.assetProfile?.url ?? '' | 
					 | 
					 | 
					          url: this.assetProfile?.url ?? '' | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -252,9 +274,31 @@ export class AssetProfileDialog implements OnDestroy, OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } catch {} | 
					 | 
					 | 
					    } catch {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    try { | 
					 | 
					 | 
					    try { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      scraperConfiguration = JSON.parse( | 
					 | 
					 | 
					      scraperConfiguration = { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        this.assetProfileForm.get('scraperConfiguration').value | 
					 | 
					 | 
					        defaultMarketPrice: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					      ); | 
					 | 
					 | 
					          this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            'defaultMarketPrice' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        headers: JSON.parse( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            'headers' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ].value | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        locale: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            'locale' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        mode: this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          'mode' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        selector: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            'selector' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        url: this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          'url' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ].value | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } catch {} | 
					 | 
					 | 
					    } catch {} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    try { | 
					 | 
					 | 
					    try { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -306,8 +350,31 @@ export class AssetProfileDialog implements OnDestroy, OnInit { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.adminService | 
					 | 
					 | 
					    this.adminService | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      .testMarketData({ | 
					 | 
					 | 
					      .testMarketData({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        dataSource: this.data.dataSource, | 
					 | 
					 | 
					        dataSource: this.data.dataSource, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        scraperConfiguration: this.assetProfileForm.get('scraperConfiguration') | 
					 | 
					 | 
					        scraperConfiguration: JSON.stringify({ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					          .value, | 
					 | 
					 | 
					          defaultMarketPrice: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              'defaultMarketPrice' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          headers: JSON.parse( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              'headers' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ].value | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          locale: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              'locale' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          mode: this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            'mode' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          selector: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					              'selector' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ].value, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          url: this.assetProfileForm.controls['scraperConfiguration'].controls[ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            'url' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          ].value | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        }), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        symbol: this.data.symbol | 
					 | 
					 | 
					        symbol: this.data.symbol | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      }) | 
					 | 
					 | 
					      }) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      .pipe( | 
					 | 
					 | 
					      .pipe( | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |