| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -54,10 +54,10 @@ interface JsExtensions { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /** | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * 实现文件下载,返回路径 | 
					 | 
					 | 
					 | 
					     * 实现16进制字符串转文件 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun downloadFile(content: String, url: String): String { | 
					 | 
					 | 
					 | 
					    fun downloadFile(content: String, url: String): String { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val type = AnalyzeUrl(url).type ?: return "type为空,未下载" | 
					 | 
					 | 
					 | 
					        val type = AnalyzeUrl(url).type ?: return "" | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val zipPath = FileUtils.getPath( | 
					 | 
					 | 
					 | 
					        val zipPath = FileUtils.getPath( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            FileUtils.createFolderIfNotExist(FileUtils.getCachePath()), | 
					 | 
					 | 
					 | 
					            FileUtils.createFolderIfNotExist(FileUtils.getCachePath()), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            "${MD5Utils.md5Encode16(url)}.${type}" | 
					 | 
					 | 
					 | 
					            "${MD5Utils.md5Encode16(url)}.${type}" | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -76,6 +76,7 @@ interface JsExtensions { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * js实现压缩文件解压 | 
					 | 
					 | 
					 | 
					     * js实现压缩文件解压 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun unzipFile(zipPath: String): String { | 
					 | 
					 | 
					 | 
					    fun unzipFile(zipPath: String): String { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (zipPath.isEmpty()) return "" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val unzipPath = FileUtils.getPath( | 
					 | 
					 | 
					 | 
					        val unzipPath = FileUtils.getPath( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            FileUtils.createFolderIfNotExist(FileUtils.getCachePath()), | 
					 | 
					 | 
					 | 
					            FileUtils.createFolderIfNotExist(FileUtils.getCachePath()), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            FileUtils.getNameExcludeExtension(zipPath) | 
					 | 
					 | 
					 | 
					            FileUtils.getNameExcludeExtension(zipPath) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -92,6 +93,7 @@ interface JsExtensions { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * js实现文件夹内所有文件读取 | 
					 | 
					 | 
					 | 
					     * js实现文件夹内所有文件读取 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun getTxtInFolder(unzipPath: String): String { | 
					 | 
					 | 
					 | 
					    fun getTxtInFolder(unzipPath: String): String { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (unzipPath.isEmpty()) return "" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val unzipFolder = FileUtils.createFolderIfNotExist(unzipPath) | 
					 | 
					 | 
					 | 
					        val unzipFolder = FileUtils.createFolderIfNotExist(unzipPath) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        val contents = StringBuilder() | 
					 | 
					 | 
					 | 
					        val contents = StringBuilder() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        unzipFolder.listFiles().let { | 
					 | 
					 | 
					 | 
					        unzipFolder.listFiles().let { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -109,7 +111,7 @@ interface JsExtensions { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /** | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * js实现重定向拦截,不能删 | 
					 | 
					 | 
					 | 
					     * js实现重定向拦截,网络访问get | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    fun get(urlStr: String, headers: Map<String, String>): Connection.Response { | 
					 | 
					 | 
					 | 
					    fun get(urlStr: String, headers: Map<String, String>): Connection.Response { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return Jsoup.connect(urlStr) | 
					 | 
					 | 
					 | 
					        return Jsoup.connect(urlStr) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -279,7 +281,7 @@ interface JsExtensions { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val oldCode = s.toInt() | 
					 | 
					 | 
					 | 
					            val oldCode = s.toInt() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (font1.InLimit(s)) { | 
					 | 
					 | 
					 | 
					            if (font1.InLimit(s)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val code = font2.GetCodeByGlyf(font1.GetGlyfByCode(oldCode)) | 
					 | 
					 | 
					 | 
					                val code = font2.GetCodeByGlyf(font1.GetGlyfByCode(oldCode)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if(code != 0) contentArray[index] = code.toChar() | 
					 | 
					 | 
					 | 
					                if (code != 0) contentArray[index] = code.toChar() | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return contentArray.joinToString("") | 
					 | 
					 | 
					 | 
					        return contentArray.joinToString("") | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |