<commit_before>/**
 * API
 * 
 * MessageBox.alert({type:"message",txt:"该卡暂时不支持，请用其他卡"});
 * MessageBox.alert({type:"common",txt:"请输入正确的身份证号"});
 * 
 */
var MessageBox = MessageBox || (function($, undefined){
	var $el = $("#container"),
		$masker = $el.find("#masker"),
		$common_masker = $el.find("#common_masker"),
		$message_masker = $el.find("#message_masker"),
		$confirmBtn = $el.find("#confirmBtn");
	
	
	function depatch(options){
		switch(options.type){
			case "common":
				setCommonErrorTxt(options);
				break;
			case "message":
				setMessageErrorTxt(options);
				break;
		}
	}
	
	function setCommonErrorTxt(options){
		var time = !!options.time ? options.time : 2000;
		$common_masker.show().find("p").text(options.txt);
		var timeout = setTimeout(function(){
			$common_masker.hide();
		}, time);
	}
	
	function setMessageErrorTxt(options){
		$masker.trigger("masker:show");
		$message_masker.show().find("p").html(options.txt);

		setTimeout(function(){
			var width = $message_masker.width();
		
			$message_masker.attr("style",'display:block;top:20%;position:absolute;left:50%;margin-left:'+-width/2+"px"+'');
			if(!!options.cls){
				$message_masker.find('.message-box').addClass("m-icon");
			}
			if($.isFunction(options.fn)){
				options.fn();
			}
		}, 200)
		
	}
	
	function addEvents(){
		$masker.on("masker:hide", function(){
			$masker.hide();
		})<commit_msg>update masker<commit_after>/**
 * API
 * 
 * MessageBox.alert({type:"message",txt:"该卡暂时不支持，请用其他卡"});
 * MessageBox.alert({type:"common",txt:"请输入正确的身份证号"});
 * 
 */
var MessageBox = MessageBox || (function($, undefined){
	var $el = $("#container"),
		$masker = $el.find("#masker"),
		$common_masker = $el.find("#common_masker"),
		$message_masker = $el.find("#message_masker"),
		$confirmBtn = $el.find("#confirmBtn");
	
	
	function depatch(options){
		switch(options.type){
			case "common":
				setCommonErrorTxt(options);
				break;
			case "message":
				setMessageErrorTxt(options);
				break;
		}
	}
	
	function setCommonErrorTxt(options){
		var time = !!options.time ? options.time : 2000;
		$common_masker.show().find("p").text(options.txt);
		var timeout = setTimeout(function(){
			$common_masker.hide();
		}, time);
	}
	
	function setMessageErrorTxt(options){
		$masker.show();
		$message_masker.show().find("p").html(options.txt);

		setTimeout(function(){
			var width = $message_masker.width();
		
			$message_masker.attr("style",'display:block;top:20%;position:absolute;left:50%;margin-left:'+-width/2+"px"+'');
			if(!!options.cls){
				$message_masker.find('.message-box').addClass("m-icon");
			}
			if($.isFunction(options.fn)){
				options.fn();
			}
		}, 200)
		
	}
	
	function addEvents(){
		$masker.on("masker:hide", function(){
			$masker.hide();
		})
{'fraction_non_alphanumeric': 0.20586107091172215, 'fraction_numerical': 0.008683068017366137, 'mean_word_length': 4.619918699186992, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4922698', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1005, 'n_words': 127}