@ -999,6 +999,7 @@ import { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  DEFAULT_PUSH_SERVER ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  IMAGE_TYPE_PROFILE ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  NotificationIface ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  USE_DEXIE_DB ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					}  from  "../constants/app" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  db ,  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1012,6 +1013,7 @@ import { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  DEFAULT_PASSKEY_EXPIRATION_MINUTES ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  MASTER_SETTINGS_KEY ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					}  from  "../db/tables/settings" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  *  as  databaseUtil  from  "../db/databaseUtil" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  clearPasskeyToken ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  EndorserRateLimits ,  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1030,6 +1032,7 @@ import { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					}  from  "../libs/util" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  {  UserProfile  }  from  "@/libs/partnerServer" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  {  logger  }  from  "../utils/logger" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  {  PlatformServiceFactory  }  from  "@/services/PlatformServiceFactory" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					const  inputImportFileNameRef  =  ref < Blob > ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1145,9 +1148,14 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          if  ( error . status  ===  404 )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            / /   t h i s   i s   o k :   t h e   p r o f i l e   i s   n o t   y e t   c r e a t e d  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          }  else  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            logConsoleAndDb (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            databaseUtil . logConsoleAndDb (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              "Error loading profile: "  +  errorStringForLog ( error ) ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              logConsoleAndDb (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                "Error loading profile: "  +  errorStringForLog ( error ) ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            this . $notify (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                group :  "alert" ,  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1224,8 +1232,12 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   *  Initializes  component  state  with  values  from  the  database  or  defaults .  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   * /  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  initializeState ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    const  settings  =  await  retrieveSettingsForActiveAccount ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    let  settings  =  await  databaseUtil . retrieveSettingsForActiveAccount ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      settings  =  await  retrieveSettingsForActiveAccount ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    console . log ( "activeDid" ,  settings . activeDid ,  "settings" ,  settings ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . activeDid  =  settings . activeDid  ||  "" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . apiServer  =  settings . apiServer  ||  "" ;  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1268,42 +1280,67 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  toggleShowContactAmounts ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . showContactGives  =  ! this . showContactGives ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      showContactGivesInline :  this . showContactGives ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        showContactGivesInline :  this . showContactGives ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  toggleShowGeneralAdvanced ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . showGeneralAdvanced  =  ! this . showGeneralAdvanced ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      showGeneralAdvanced :  this . showGeneralAdvanced ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        showGeneralAdvanced :  this . showGeneralAdvanced ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  toggleProdWarning ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . warnIfProdServer  =  ! this . warnIfProdServer ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      warnIfProdServer :  this . warnIfProdServer ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        warnIfProdServer :  this . warnIfProdServer ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  toggleTestWarning ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . warnIfTestServer  =  ! this . warnIfTestServer ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      warnIfTestServer :  this . warnIfTestServer ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        warnIfTestServer :  this . warnIfTestServer ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  toggleShowShortcutBvc ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . showShortcutBvc  =  ! this . showShortcutBvc ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      showShortcutBvc :  this . showShortcutBvc ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        showShortcutBvc :  this . showShortcutBvc ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  readableDate ( timeStr :  string )  {  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1314,9 +1351,18 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   *  Processes  the  identity  and  updates  the  component ' s  state .  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   * /  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  processIdentity ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    const  account :  Account  |  undefined  =  await  retrieveAccountMetadata (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      this . activeDid ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    const  platformService  =  PlatformServiceFactory . getInstance ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    const  dbAccount  =  await  platformService . dbQuery ( "SELECT * FROM accounts WHERE did = ?" ,  [ this . activeDid ] ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    console . log ( "activeDid" ,  this . activeDid ,  "dbAccount" ,  dbAccount ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    let  account :  Account  |  undefined  =  undefined ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( dbAccount )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      account  =  databaseUtil . mapColumnsToValues ( dbAccount . columns ,  dbAccount . values ) [ 0 ]  as  Account ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      account  =  await  retrieveAccountMetadata (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        this . activeDid ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( account ? . identity )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      const  identity  =  JSON . parse ( account . identity  as  string )  as  IIdentifier ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      this . publicHex  =  identity . keys [ 0 ] . publicKeyHex ;  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1359,9 +1405,14 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        this . $refs . pushNotificationPermission  as  PushNotificationPermission  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      ) . open ( DAILY_CHECK_TITLE ,  async  ( success :  boolean ,  timeText :  string )  =>  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        if  ( success )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          await  db . settings . update ( MASTER_SETTINGS_KEY ,   {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          await  databaseUtil . updateDefaultSettings (  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            notifyingNewActivityTime :  timeText ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              notifyingNewActivityTime :  timeText ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          this . notifyingNewActivity  =  true ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          this . notifyingNewActivityTime  =  timeText ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        }  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1375,9 +1426,14 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          text :  "" ,  / /   u n u s e d ,   o n l y   h e r e   t o   s a t i s f y   t y p e   c h e c k  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          callback :  async  ( success )  =>  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            if  ( success )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  db . settings . update ( MASTER_SETTINGS_KEY ,   {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  databaseUtil . updateDefaultSettings (  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                notifyingNewActivityTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                  notifyingNewActivityTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              this . notifyingNewActivity  =  false ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              this . notifyingNewActivityTime  =  "" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            }  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1419,10 +1475,16 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        DIRECT_PUSH_TITLE ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        async  ( success :  boolean ,  timeText :  string ,  message ? :  string )  =>  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          if  ( success )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            await  db . settings . update ( MASTER_SETTINGS_KEY ,   {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            await  databaseUtil . updateDefaultSettings (  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              notifyingReminderMessage :  message ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              notifyingReminderTime :  timeText ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                notifyingReminderMessage :  message ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                notifyingReminderTime :  timeText ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            this . notifyingReminder  =  true ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            this . notifyingReminderMessage  =  message  ||  "" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            this . notifyingReminderTime  =  timeText ;  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1438,10 +1500,16 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          text :  "" ,  / /   u n u s e d ,   o n l y   h e r e   t o   s a t i s f y   t y p e   c h e c k  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          callback :  async  ( success )  =>  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            if  ( success )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  db . settings . update ( MASTER_SETTINGS_KEY ,   {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  databaseUtil . updateDefaultSettings (  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                notifyingReminderMessage :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                notifyingReminderTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                  notifyingReminderMessage :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                  notifyingReminderTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              this . notifyingReminder  =  false ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              this . notifyingReminderMessage  =  "" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              this . notifyingReminderTime  =  "" ;  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1455,30 +1523,47 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  public  async  toggleHideRegisterPromptOnNewContact ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    const  newSetting  =  ! this . hideRegisterPromptOnNewContact ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      hideRegisterPromptOnNewContact :  newSetting ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        hideRegisterPromptOnNewContact :  newSetting ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . hideRegisterPromptOnNewContact  =  newSetting ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  public  async  updatePasskeyExpiration ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      passkeyExpirationMinutes :  this . passkeyExpirationMinutes ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        passkeyExpirationMinutes :  this . passkeyExpirationMinutes ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    clearPasskeyToken ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . passkeyExpirationDescription  =  tokenExpiryTimeDescription ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  public  async  turnOffNotifyingFlags ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    / /   s h o u l d   t e l l   t h e   p u s h   s e r v e r   a s   w e l l  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      notifyingNewActivityTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      notifyingReminderMessage :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      notifyingReminderTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        notifyingNewActivityTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        notifyingReminderMessage :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        notifyingReminderTime :  "" ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . notifyingNewActivity  =  false ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . notifyingNewActivityTime  =  "" ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . notifyingReminder  =  false ;  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1518,7 +1603,10 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   *  @ returns  { Promise < Blob > }  The  generated  blob  object .  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   * /  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  private  async  generateDatabaseBlob ( ) :  Promise < Blob >  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    return  await  db . export ( {  prettyJson :  true  } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      return  await  db . export ( {  prettyJson :  true  } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    throw  new  Error ( "Not implemented" ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  / * *  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1539,7 +1627,7 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  private  downloadDatabaseBackup ( url :  string )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    const  downloadAnchor  =  this . $refs . downloadLink  as  HTMLAnchorElement ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    downloadAnchor . href  =  url ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    downloadAnchor . download  =  ` ${ db . name } -backup.json ` ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    downloadAnchor . download  =  ` ${ AppString . APP_NAME_NO_SPACES } -backup.json ` ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    downloadAnchor . click ( ) ;  / /   d o e s n ' t   w o r k   f o r   s o m e   b r o w s e r s ,   e g .   D u c k D u c k G o  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1620,7 +1708,8 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					   * /  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  submitImportFile ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( inputImportFileNameRef . value  !=  null )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      if  ( USE_DEXIE_DB )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  db  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        . delete ( )  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        . then ( async  ( )  =>  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          / /   B u l k E r r o r :   s e t t i n g s . b u l k A d d ( ) :   1   o f   2 1   o p e r a t i o n s   f a i l e d .   E r r o r s :   C o n s t r a i n t E r r o r :   K e y   a l r e a d y   e x i s t s   i n   t h e   o b j e c t   s t o r e .  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1640,6 +1729,9 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            - 1 ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  else  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        throw  new  Error ( "Not implemented" ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1727,7 +1819,13 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        if  ( ! this . isRegistered )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          / /   t h e   u s e r   w a s   n o t   k n o w n   t o   b e   r e g i s t e r e d ,   b u t   n o w   t h e y   a r e   ( b e c a u s e   w e   g o t   n o   e r r o r )   s o   l e t ' s   r e c o r d   i t  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          try  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            await  updateAccountSettings ( did ,  {  isRegistered :  true  } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            await  databaseUtil . updateAccountSettings ( did ,  {  isRegistered :  true  } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                isRegistered :  true ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					              } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            this . isRegistered  =  true ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          }  catch  ( err )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            logger . error ( "Got an error updating settings:" ,  err ) ;  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1787,26 +1885,41 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  onClickSaveApiServer ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      apiServer :  this . apiServerInput ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        apiServer :  this . apiServerInput ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . apiServer  =  this . apiServerInput ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  onClickSavePartnerServer ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      partnerApiServer :  this . partnerApiServerInput ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        partnerApiServer :  this . partnerApiServerInput ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . partnerApiServer  =  this . partnerApiServerInput ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  async  onClickSavePushServer ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      webPushServer :  this . webPushServerInput ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        webPushServer :  this . webPushServerInput ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . webPushServer  =  this . webPushServerInput ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    this . $notify (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      {  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -1822,10 +1935,15 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					  openImageDialog ( )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    ( this . $refs . imageMethodDialog  as  ImageMethodDialog ) . open (  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      async  ( imgUrl )  =>  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          profileImageUrl :  imgUrl ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            profileImageUrl :  imgUrl ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        this . profileImageUrl  =  imgUrl ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        / / c o n s o l e . l o g ( " G o t   i m a g e   U R L : " ,   i m g U r l ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ,  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1886,10 +2004,15 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        / /   k e e p   t h e   i m a g e U r l   i n   l o c a l S t o r a g e   s o   t h e   u s e r   c a n   t r y   a g a i n   i f   t h e y   w a n t  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      await  databaseUtil . updateDefaultSettings ( {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        profileImageUrl :  undefined ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  db . open ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        await  db . settings . update ( MASTER_SETTINGS_KEY ,  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					          profileImageUrl :  undefined ,  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        } ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      this . profileImageUrl  =  undefined ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  catch  ( error )  {  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -1978,7 +2101,10 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        throw  Error ( "Profile not saved" ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  catch  ( error )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      logConsoleAndDb ( "Error saving profile: "  +  errorStringForLog ( error ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      databaseUtil . logConsoleAndDb ( "Error saving profile: "  +  errorStringForLog ( error ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        logConsoleAndDb ( "Error saving profile: "  +  errorStringForLog ( error ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      const  errorMessage :  string  =  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        error . response ? . data ? . error ? . message  ||  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        error . response ? . data ? . error  ||  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -2068,7 +2194,10 @@ export default class AccountViewView extends Vue { 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        throw  Error ( "Profile not deleted" ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					    }  catch  ( error )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      logConsoleAndDb ( "Error deleting profile: "  +  errorStringForLog ( error ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      databaseUtil . logConsoleAndDb ( "Error deleting profile: "  +  errorStringForLog ( error ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      if  ( USE_DEXIE_DB )  {   
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        logConsoleAndDb ( "Error deleting profile: "  +  errorStringForLog ( error ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					      const  errorMessage :  string  =  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        error . response ? . data ? . error ? . message  ||  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					        error . response ? . data ? . error  ||