<commit_before>/*jslint nomen: true, vars: true */
/*global red,esprima,able,uid,console */

(function (red) {
	"use strict";
	var cjs = red.cjs,
		_ = red._;

	var Env = function (options) {
		// Undo stack
		this._command_stack = red.create("command_stack");

		var root, root_pointer;
		if (options && _.has(options, "root")) {
			root = options.root;
			root_pointer = red.create("pointer", {stack: [root]});
		} else {
			root = red.create("dict", {has_protos: false, direct_attachments: [red.create("paper_attachment")]});

			root_pointer = red.create("pointer", {stack: [root]});
			if(!options || options.create_builtins !== false) {
				this.initialize_props(root_pointer);
			}
		}

		//Context tracking
		this.pointer = root_pointer;
		this.print_on_return = false;

		if(!options || options.create_builtins !== false) {
			root.set("on", red.on_event);
			/*
			root.set("emit", red.emit);
			root.set("find", function (find_root) {
				if (arguments.length === 0) {
					find_root = new red.ContextualObject({pointer: root_pointer});
				}
				return new red.Query({value: find_root});
			});
			*/
		}
	};

	(function (my) {
		var proto = my.prototype;

		proto.initialize_props = function (root_pointer) {
			var root_dict = root_pointer.points_at();

			var screen = red.create("dict", {has_protos: false});
			root_dict.set("screen", screen);

			root_dict.set("width", red.create("cell", {str: "500"}));
			root_dict.set("height", red.create("cell", {str: "500"}));

			var shape = red.create("dict", {has_protos: false});
			root_dict.set("shape", shape);

			var circle = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "circle",
																									constructor_params: [0, 0, 0]
																								}
																						})]
																					});
			shape.set("circle", circle);
			circle.set("show", red.create("cell", {str: "true"}));
			circle.set("clip_rect", red.create("cell", {str: "null"}));
			circle.set("cursor", red.create("cell", {str: "'default'"}));
			circle.set("cx", red.create("cell", {str: "30"}));
			circle.set("cy", red.create("cell", {str: "50"}));
			circle.set("fill", red.create("cell", {str: "'none'"}));
			circle.set("fill_opacity", red.create("cell", {str: "1.0"}));
			circle.set("opacity", red.create("cell", {str: "1.0"}));
			circle.set("r", red.create("cell", {str: "50"}));
			circle.set("stroke", red.create("cell", {str: "'black'"}));
			circle.set("stroke_dasharray", red.create("cell", {str: "''"}));
			circle.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			circle.set("stroke_width", red.create("cell", {str: "1"}));
			circle.set("transform", red.create("cell", {str: "''"}));


			var ellipse = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "ellipse",
																									constructor_params: [0, 0, 0, 0]
																								}
																						})]
																					});
			shape.set("ellipse", ellipse);
			ellipse.set("show", red.create("cell", {str: "true"}));
			ellipse.set("clip_rect", red.create("cell", {str: "null"}));
			ellipse.set("cursor", red.create("cell", {str: "'default'"}));
			ellipse.set("cx", red.create("cell", {str: "30"}));
			ellipse.set("cy", red.create("cell", {str: "50"}));
			ellipse.set("fill", red.create("cell", {str: "'none'"}));
			ellipse.set("fill_opacity", red.create("cell", {str: "1.0"}));
			ellipse.set("opacity", red.create("cell", {str: "1.0"}));
			ellipse.set("rx", red.create("cell", {str: "50"}));
			ellipse.set("ry", red.create("cell", {str: "20"}));
			ellipse.set("stroke", red.create("cell", {str: "'black'"}));
			ellipse.set("stroke_dasharray", red.create("cell", {str: "''"}));
			ellipse.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			ellipse.set("stroke_width", red.create("cell", {str: "1"}));
			ellipse.set("transform", red.create("cell", {str: "''"}));
			
			var image = red.create("dict", {has_protos: false});
			shape.set("image", image);

			var rect = red.create("dict", {has_protos: false});
			shape.set("rect", rect);
			
			var text = red.create("dict", {has_protos: false});
			shape.set("text", rect);
			/*

			var dom = red.create("dict", {has_protos: false, direct_attachments: [red.create("dom_attachment")]});
			dom.set("tag", red.create("cell", {str: "'div'"}));
		//	dom.set("text", red.create("cell", {str: "undefined"}));
			//dom.set("children", red.create("dict", {has_protos: false}));
		//	dom.set("attr", red.create("dict", {has_protos: false}));
		//	dom.set("css", red.create("dict", {has_protos: false}));
			root_dict.set("dom", dom);

			var raphael = red.create("dict", {has_protos: false, direct_attachments: [red.create("raphael_attachment")]});
			root_dict.set("raphael", raphael);

			var three = red.create("dict", {has_protos: false});

			var point_light = red.create("dict", {has_protos: false, direct_attachments: [red.create("point_light_attachment")]});
			three.set("point_light", point_light);

			var scene = red.create("dict", {has_protos: false, direct_attachments: [red.create("three_scene_attachment")]});
			three.set("scene", scene);<commit_msg>Added rest of raphael shapes<commit_after>/*jslint nomen: true, vars: true */
/*global red,esprima,able,uid,console */

(function (red) {
	"use strict";
	var cjs = red.cjs,
		_ = red._;

	var Env = function (options) {
		// Undo stack
		this._command_stack = red.create("command_stack");

		var root, root_pointer;
		if (options && _.has(options, "root")) {
			root = options.root;
			root_pointer = red.create("pointer", {stack: [root]});
		} else {
			root = red.create("dict", {has_protos: false, direct_attachments: [red.create("paper_attachment")]});

			root_pointer = red.create("pointer", {stack: [root]});
			if(!options || options.create_builtins !== false) {
				this.initialize_props(root_pointer);
			}
		}

		//Context tracking
		this.pointer = root_pointer;
		this.print_on_return = false;

		if(!options || options.create_builtins !== false) {
			root.set("on", red.on_event);
			/*
			root.set("emit", red.emit);
			root.set("find", function (find_root) {
				if (arguments.length === 0) {
					find_root = new red.ContextualObject({pointer: root_pointer});
				}
				return new red.Query({value: find_root});
			});
			*/
		}
	};

	(function (my) {
		var proto = my.prototype;

		proto.initialize_props = function (root_pointer) {
			var root_dict = root_pointer.points_at();

			var screen = red.create("dict", {has_protos: false});
			root_dict.set("screen", screen);

			root_dict.set("width", red.create("cell", {str: "500"}));
			root_dict.set("height", red.create("cell", {str: "500"}));

			var shape = red.create("dict", {has_protos: false});
			root_dict.set("shape", shape);

			var circle = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "circle",
																									constructor_params: [0, 0, 0]
																								}
																						})]
																					});
			shape.set("circle", circle);
			circle.set("show", red.create("cell", {str: "true"}));
			circle.set("clip_rect", red.create("cell", {str: "null"}));
			circle.set("cursor", red.create("cell", {str: "'default'"}));
			circle.set("cx", red.create("cell", {str: "30"}));
			circle.set("cy", red.create("cell", {str: "50"}));
			circle.set("fill", red.create("cell", {str: "'none'"}));
			circle.set("fill_opacity", red.create("cell", {str: "1.0"}));
			circle.set("opacity", red.create("cell", {str: "1.0"}));
			circle.set("r", red.create("cell", {str: "50"}));
			circle.set("stroke", red.create("cell", {str: "'black'"}));
			circle.set("stroke_dasharray", red.create("cell", {str: "''"}));
			circle.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			circle.set("stroke_width", red.create("cell", {str: "1"}));
			circle.set("transform", red.create("cell", {str: "''"}));


			var ellipse = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "ellipse",
																									constructor_params: [0, 0, 0, 0]
																								}
																						})]
																					});
			shape.set("ellipse", ellipse);
			ellipse.set("show", red.create("cell", {str: "true"}));
			ellipse.set("clip_rect", red.create("cell", {str: "null"}));
			ellipse.set("cursor", red.create("cell", {str: "'default'"}));
			ellipse.set("cx", red.create("cell", {str: "30"}));
			ellipse.set("cy", red.create("cell", {str: "50"}));
			ellipse.set("fill", red.create("cell", {str: "'none'"}));
			ellipse.set("fill_opacity", red.create("cell", {str: "1.0"}));
			ellipse.set("opacity", red.create("cell", {str: "1.0"}));
			ellipse.set("rx", red.create("cell", {str: "50"}));
			ellipse.set("ry", red.create("cell", {str: "20"}));
			ellipse.set("stroke", red.create("cell", {str: "'black'"}));
			ellipse.set("stroke_dasharray", red.create("cell", {str: "''"}));
			ellipse.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			ellipse.set("stroke_width", red.create("cell", {str: "1"}));
			ellipse.set("transform", red.create("cell", {str: "''"}));
			
			var image = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "image",
																									constructor_params: ["", 0, 0, 0, 0]
																								}
																						})]
																					});
			shape.set("image", image);
			image.set("show", red.create("cell", {str: "true"}));
			image.set("clip_rect", red.create("cell", {str: "null"}));
			image.set("cursor", red.create("cell", {str: "'default'"}));
			image.set("opacity", red.create("cell", {str: "1.0"}));
			image.set("src", red.create("cell", {str: "'http://from.so/smile.png'"}));
			image.set("transform", red.create("cell", {str: "''"}));
			image.set("x", red.create("cell", {str: "20"}));
			image.set("y", red.create("cell", {str: "20"}));
			image.set("width", red.create("cell", {str: "300"}));
			image.set("height", red.create("cell", {str: "300"}));


			var rect = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "rect",
																									constructor_params: [20, 30, 40, 50]
																								}
																						})]
																					});
			shape.set("rect", rect);
			rect.set("show", red.create("cell", {str: "true"}));
			rect.set("clip_rect", red.create("cell", {str: "null"}));
			rect.set("cursor", red.create("cell", {str: "'default'"}));
			rect.set("x", red.create("cell", {str: "20"}));
			rect.set("y", red.create("cell", {str: "30"}));
			rect.set("fill", red.create("cell", {str: "'red'"}));
			rect.set("fill_opacity", red.create("cell", {str: "1.0"}));
			rect.set("opacity", red.create("cell", {str: "1.0"}));
			rect.set("r", red.create("cell", {str: "0"}));
			rect.set("stroke", red.create("cell", {str: "'black'"}));
			rect.set("stroke_dasharray", red.create("cell", {str: "''"}));
			rect.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			rect.set("stroke_width", red.create("cell", {str: "1"}));
			rect.set("transform", red.create("cell", {str: "''"}));
			rect.set("width", red.create("cell", {str: "40"}));
			rect.set("height", red.create("cell", {str: "50"}));
			
			var text = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "rect",
																									constructor_params: [20, 30, 40, 50]
																								}
																						})]
																					});
			shape.set("text", rect);
			text.set("show", red.create("cell", {str: "true"}));
			text.set("clip_rect", red.create("cell", {str: "null"}));
			text.set("cursor", red.create("cell", {str: "'default'"}));
			text.set("x", red.create("cell", {str: "20"}));
			text.set("y", red.create("cell", {str: "30"}));
			text.set("fill", red.create("cell", {str: "'red'"}));
			text.set("fill_opacity", red.create("cell", {str: "1.0"}));
			text.set("opacity", red.create("cell", {str: "1.0"}));
			text.set("r", red.create("cell", {str: "0"}));
			text.set("stroke", red.create("cell", {str: "'black'"}));
			text.set("stroke_dasharray", red.create("cell", {str: "''"}));
			text.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			text.set("stroke_width", red.create("cell", {str: "1"}));
			text.set("transform", red.create("cell", {str: "''"}));
			text.set("text", red.create("cell", {str: "'hello world'"}));
			text.set("text_anchor", red.create("cell", {str: "'middle'"}));
			text.set("width", red.create("cell", {str: "40"}));
			text.set("height", red.create("cell", {str: "50"}));

			var path = red.create("dict", {has_protos: false, direct_attachments: [red.create("shape_attachment", {
																								instance_options: {
																									shape_type: "path",
																									constructor_params: ["M0,0"]
																								}
																						})]
																					});
			shape.set("path", path);
			path.set("show", red.create("cell", {str: "true"}));
			path.set("clip_rect", red.create("cell", {str: "null"}));
			path.set("cursor", red.create("cell", {str: "'default'"}));
			path.set("fill", red.create("cell", {str: "'red'"}));
			path.set("fill_opacity", red.create("cell", {str: "1.0"}));
			path.set("opacity", red.create("cell", {str: "1.0"}));
			path.set("stroke", red.create("cell", {str: "'black'"}));
			path.set("stroke_dasharray", red.create("cell", {str: "''"}));
			path.set("stroke_opacity", red.create("cell", {str: "1.0"}));
			path.set("stroke_miterlimit", red.create("cell", {str: ""}));
			path.set("stroke_width", red.create("cell", {str: "1"}));
			path.set("path", red.create("cell", {str: "'M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'"}));
			path.set("transform", red.create("cell", {str: "''"}));
			/*

			var dom = red.create("dict", {has_protos: false, direct_attachments: [red.create("dom_attachment")]});
			dom.set("tag", red.create("cell", {str: "'div'"}));
		//	dom.set("text", red.create("cell", {str: "undefined"}));
			//dom.set("children", red.create("dict", {has_protos: false}));
		//	dom.set("attr", red.create("dict", {has_protos: false}));
		//	dom.set("css", red.create("dict", {has_protos: false}));
			root_dict.set("dom", dom);

			var raphael = red.create("dict", {has_protos: false, direct_attachments: [red.create("raphael_attachment")]});
			root_dict.set("raphael", raphael);

			var three = red.create("dict", {has_protos: false});

			var point_light = red.create("dict", {has_protos: false, direct_attachments: [red.create("point_light_attachment")]});
			three.set("point_light", point_light);

			var scene = red.create("dict", {has_protos: false, direct_attachments: [red.create("three_scene_attachment")]});
			three.set("scene", scene);
{'fraction_non_alphanumeric': 0.23569675836239184, 'fraction_numerical': 0.01904946403202893, 'mean_word_length': 3.409738041002278, 'pattern_counts': {'":': 0, '<': 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': '3739728', 'n_tokens_mistral': 5979, 'n_tokens_neox': 5329, 'n_words': 944}