2021-09-09 00:05:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  { Utils }  from  "../Utils" ;  
						 
					
						
							
								
									
										
										
										
											2021-01-02 16:04:16 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  default  class  Constants  {  
						 
					
						
							
								
									
										
										
										
											2021-09-09 00:05:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-05 12:18:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  vNumber  =  "0.10.1-rc5" ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-26 17:36:39 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  ImgurApiKey  =  '7070e7167f0a25a' 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-29 23:56:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  readonly  mapillary_client_token_v3  =  'TXhLaWthQ1d4RUg0czVxaTVoRjFJZzowNDczNjUzNmIyNTQyYzI2' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    public  static  readonly  mapillary_client_token_v4  =  "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-29 16:55:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    public  static  defaultOverpassUrls  =  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // The official instance, 10000 queries per day per project allowed
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        "https://overpass-api.de/api/interpreter" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // 'Fair usage'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        "https://overpass.kumi.systems/api/interpreter" , 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-03 02:11:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Offline: "https://overpass.nchc.org.tw/api/interpreter",
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-29 16:55:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        "https://overpass.openstreetmap.ru/cgi/interpreter" , 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-03 02:11:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Doesn't support nwr "https://overpass.openstreetmap.fr/api/interpreter"
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-29 16:55:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ] 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-02 16:04:16 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-29 23:56:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-02 16:04:16 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    // The user journey states thresholds when a new feature gets unlocked
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    public  static  userJourney  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-16 19:35:19 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        moreScreenUnlock : 1 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 18:06:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        personalLayoutUnlock : 5 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        historyLinkVisible : 10 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-01 02:26:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        deletePointsOfOthersUnlock : 20 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-17 14:35:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        tagsVisibleAt : 25 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-16 19:35:19 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        tagsVisibleAndWikiLinked : 30 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-09 00:05:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 18:06:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        mapCompleteHelpUnlock : 50 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-24 01:25:57 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        themeGeneratorReadOnlyUnlock : 50 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-02 16:04:16 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        themeGeneratorFullUnlock : 500 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        addNewPointWithUnreadMessagesUnlock : 500 , 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-21 01:26:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        minZoomLevelToAddNewPoints :  ( Constants . isRetina ( )  ?  18  : 19 ) , 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-09 00:05:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-02 16:04:16 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    } ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-20 22:18:42 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Used  by  'PendingChangesUploader' ,  which  waits  this  amount  of  seconds  to  upload  changes . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  ( Note  that  pendingChanges  might  upload  sooner  if  the  popup  is  closed  or  similar ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    static  updateTimeoutSec : number  =  30 ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-06 02:21:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    private  static  isRetina ( ) :  boolean  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( Utils . runningFromConsole )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // The cause for this line of code: https://github.com/pietervdvn/MapComplete/issues/115
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // See https://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  ( ( window . matchMedia  &&  ( window . matchMedia ( 'only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)' ) . matches  ||  window . matchMedia ( 'only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)' ) . matches ) )  ||  ( window . devicePixelRatio  &&  window . devicePixelRatio  >=  2 ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-09 00:05:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-03-31 11:39:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}