<commit_before>regionConstructors['polygon'] = function(map, name, region)
{
	if(!region.min || !region.max)
		return;
	if(region.max.y > 64)
		region.max.y = 64;
	if(regionCfg.use3dregions)
	{
		regionPolygons[name+'_bottom'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
			paths: [
			map.getProjection().fromWorldToLatLng(region.min.x,region.min.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.min.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.min.y,region.max.z),
			map.getProjection().fromWorldToLatLng(region.min.x,region.min.y,region.max.z)
			],
			map: map
			}));
		regionPolygons[name+'_top'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
			paths: [
			map.getProjection().fromWorldToLatLng(region.min.x,region.max.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.max.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.max.y,region.max.z),
			map.getProjection().fromWorldToLatLng(region.min.x,region.max.y,region.max.z)<commit_msg>Fix WorldGuard regions support to include WG5 polygon support<commit_after>regionConstructors['polygon'] = function(map, name, region)
{
    if(region.points) {
    	var i;
		if(regionCfg.use3dregions) {
			var toppts = [];
			var botpts = [];
    		for(i = 0; i < region.points.length; i++) {
    			toppts.push(map.getProjection().fromWorldToLatLng(region.points[i].x,
    				region['max-y'], region.points[i].z));
    			botpts.push(map.getProjection().fromWorldToLatLng(region.points[i].x,
    				region['min-y'], region.points[i].z));    				
    		}
    		for(i = 0; i < region.points.length; i++) {
				regionPolygons[name+'_side'+i] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
					paths: [
						toppts[i], botpts[i], botpts[(i+1)%region.points.length], toppts[(i+1)%region.points.length]
					], map: map }));
				google.maps.event.addListener(regionPolygons[name+'_side'+i] , 'click', function(event) {
					regionInfo(event, name, region);
				});
			}
			regionPolygons[name+'_bottom'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
				paths: botpts, map: map }));
			google.maps.event.addListener(regionPolygons[name+'_bottom'] , 'click', function(event) {
				regionInfo(event, name, region);
			});
			regionPolygons[name+'_top'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
				paths: toppts, map: map }));
			google.maps.event.addListener(regionPolygons[name+'_top'] , 'click', function(event) {
				regionInfo(event, name, region);
			});
    	}
    	else {
 	   		var pts = [];
    		var yy = (region['min-y']+region['max-y'])/2;
    		for(i = 0; i < region.points.length; i++) {
    			pts.push(map.getProjection().fromWorldToLatLng(region.points[i].x,
    				yy, region.points[i].z));
    		}
			regionPolygons[name+'_bottom'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
				paths: pts, map: map }));
			google.maps.event.addListener(regionPolygons[name+'_bottom'] , 'click', function(event) {
				regionInfo(event, name, region);
			});
		}
		return;
    }
	if(!region.min || !region.max)
		return;
    if(region.max.y <= region.min.y)
        region.min.y = region.max.y - 1;
	if(regionCfg.use3dregions)
	{
		regionPolygons[name+'_bottom'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
			paths: [
			map.getProjection().fromWorldToLatLng(region.min.x,region.min.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.min.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.min.y,region.max.z),
			map.getProjection().fromWorldToLatLng(region.min.x,region.min.y,region.max.z)
			],
			map: map
			}));
		regionPolygons[name+'_top'] = new google.maps.Polygon($.extend(regionCfg.regionstyle, {
			paths: [
			map.getProjection().fromWorldToLatLng(region.min.x,region.max.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.max.y,region.min.z),
			map.getProjection().fromWorldToLatLng(region.max.x,region.max.y,region.max.z),
			map.getProjection().fromWorldToLatLng(region.min.x,region.max.y,region.max.z)
{'fraction_non_alphanumeric': 0.18044572250179727, 'fraction_numerical': 0.0035945363048166786, 'mean_word_length': 4.2175, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, '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': '5975130', 'n_tokens_mistral': 1734, 'n_tokens_neox': 1584, 'n_words': 162}