<commit_before><commit_msg>add geojson2svg.min.js<commit_after>!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.geojson2svg=e()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module){!function(){function explode(g){return multies.indexOf(g.type)>-1?g.coordinates.map(function(part){var single={};return single.type=g.type.replace("Multi",""),single.coordinates=part,g.crs&&(single.crs=g.crs),single}):!1}function implode(gs){var sameType=gs.every(function(g){return singles.indexOf(g.type)>-1}),crs=gs[0].crs||0,sameCrs=gs.every(function(g){var gcrs=g.crs||0;return gcrs==crs});if(sameType&&sameCrs){var multi={};return multi.type="Multi"+gs[0].type,multi.coordinates=[],0!=crs&&(multi.crs=crs),gs.forEach(function(g){multi.coordinates.push(g.coordinates)}),multi}return!1}var singles=["Point","LineString","Polygon"],multies=["MultiPoint","MultiLineString","MultiPolygon"],multigeojson={explode:explode,implode:implode};"undefined"!=typeof module&&module.exports?module.exports=multigeojson:window&&(window.multigeojson=multigeojson)}()},{}],2:[function(require,module){function extend(){for(var target={},i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)source.hasOwnProperty(key)&&(target[key]=source[key])}return target}module.exports=extend},{}],3:[function(require,module){function getCoordString(coords,res,origin){var coordStr=coords.map(function(coord){return(coord[0]-origin.x)/res+","+(origin.y-coord[1])/res});return coordStr.join(" ")}function point(geom,res,origin,opt){var r=opt&&opt.r?opt.r:1,path="M"+getCoordString([geom.coordinates],res,origin)+" m"+-r+",0 a"+r+","+r+" 0 1,1 "+2*r+",0 a"+r+","+r+" 0 1,1 "+-2*r+",0";return[path]}function multiPoint(geom,res,origin,opt){var explode=opt&&opt.hasOwnProperty("explode")?opt.explode:!1,paths=multi.explode(geom).map(function(single){return point(single,res,origin,opt)[0]});return explode?paths:[paths.join(" ")]}function lineString(geom,res,origin){var coords=getCoordString(geom.coordinates,res,origin),path="M"+coords;return[path]}function multiLineString(geom,res,origin,opt){var explode=opt&&opt.hasOwnProperty("explode")?opt.explode:!1,paths=multi.explode(geom).map(function(single){return lineString(single,res,origin,opt)[0]});return explode?paths:[paths.join(" ")]}function polygon(geom,res,origin){var mainStr,holes;mainStr=getCoordString(geom.coordinates[0],res,origin),geom.coordinates.length>1&&(holes=geom.coordinates.slice(1,geom.coordinates.length));var path="M"+mainStr;if(holes)for(var i=0;i<holes.length;i++)path+=" M"+getCoordString(holes[i],res,origin);return path+="Z",[path]}function multiPolygon(geom,res,origin,opt){var explode=opt.hasOwnProperty("explode")?opt.explode:!1,paths=multi.explode(geom).map(function(single){return polygon(single,res,origin,opt)[0]});return explode?paths:[paths.join(" ").replace(/Z/g,"")+"Z"]}var multi=require("multigeojson");module.exports={Point:point,MultiPoint:multiPoint,LineString:lineString,MultiLineString:multiLineString,Polygon:polygon,MultiPolygon:multiPolygon}},{multigeojson:1}],4:[function(require,module){var extend=require("xtend"),converter=require("./converter.js"),g2svg=function(viewportSize,options){viewportSize&&(this.viewportSize=viewportSize,this.options=options||{},this.mapExtent=this.options.mapExtent||{left:-20037508.342789244,right:20037508.342789244,bottom:-20037508.342789244,top:20037508.342789244},this.res=this.calResolution(this.mapExtent,this.viewportSize))};g2svg.prototype.calResolution=function(extent,size){var xres=(extent.right-extent.left)/size.width,yres=(extent.top-extent.bottom)/size.height;return Math.max(xres,yres)},g2svg.prototype.convert=function(geojson,options){var opt=extend(extend({},this.options),options||{}),svgElements=[];if("FeatureCollection"==geojson.type)for(var i=0;i<geojson.features.length;i++)svgElements=svgElements.concat(this.convertFeature(geojson.features[i],opt));else if("Feature"==geojson.type)svgElements=this.convertFeature(geojson,opt);else if("GeomtryCollection"==geojson.type)for(var i=0;i<geojson.geometries.length;i++)svgElements=svgElements.concat(this.convertGeometry(geojson.geometries[i],opt));else{if(!converter[geojson.type])return;svgElements=this.convertGeometry(geojson,opt)}return opt.callback&&opt.callback.call(this,svgElements),svgElements},g2svg.prototype.convertFeature=function(feature,options){if(feature||feature.geometry){var opt=extend(extend({},this.options),options||{});return opt.attributes=opt.attributes||{},opt.attributes.id=opt.attributes.id||feature.id||null,this.convertGeometry(feature.geometry,opt)}},g2svg.prototype.convertGeometry=function(geom,options){if(converter[geom.type]){var svgJsons,svgEles,opt=extend(extend({},this.options),options||{}),output=opt.output||"svg",paths=converter[geom.type].call(this,geom,this.res,{x:this.mapExtent.left,y:this.mapExtent.top},opt);return"svg"==output.toLowerCase()?(svgJsons=paths.map(function(path){return pathToSvgJson(path,geom.type,opt.attributes,opt)}),svgEles=svgJsons.map(function(json){return jsonToSvgElement(json,geom.type)})):paths}};var pathToSvgJson=function(path,type,attributes,opt){var svg={},forcePath=opt&&opt.hasOwnProperty("forcePath")?opt.forcePath:!0;"Point"!=type&&"MultiPoint"!=type||forcePath?(svg={d:path},("Polygon"==type||"MultiPolygon"==type)&&"evenodd"==svg["fill-rule"]):(svg.cx=path.split(",")[0],svg.cy=path.split(",")[1],svg.r=opt&&opt.r?opt.r:"1");for(var key in attributes)svg[key]=attributes[key];return svg},jsonToSvgElement=function(json,type,opt){var forcePath=opt&&opt.hasOwnProperty("forcePath")?opt.forcePath:!0,ele="<path";"Point"!=type&&"MultiPoint"!=type||forcePath||(ele="<circle");for(var key in json)ele+=" "+key+'="'+json[key]+'"';return ele+="/>"};module.exports=g2svg},{"./converter.js":3,xtend:2}],5:[function(require,module){var g2svg=require("./instance.js"),geojson2svg=function(viewportSize,options){return viewportSize?new g2svg(viewportSize,options):void 0};module.exports=geojson2svg},{"./instance.js":4}]},{},[5])(5)});
{'fraction_non_alphanumeric': 0.22488326555204097, 'fraction_numerical': 0.02078626299141437, 'mean_word_length': 20.28205128205128, 'pattern_counts': {'":': 2, '<': 10, '<?xml version=': 0, '>': 7, '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': '6410829', 'n_tokens_mistral': 2419, 'n_tokens_neox': 2363, 'n_words': 119}