<commit_before>$.widget( 'boom.pageEditor', {
	elements : {},

	options : {
		editable : false
	},

	_create : function() {
		var self = this;

		this.page = new boomPage(this.options.page_id);
		$.boom.page = this.page;

		this.document = $(top.document);

		this.page.toolbar = this.toolbar = this.document
			.find('#b-page-topbar')
			.pageToolbar({
				page : this.page
			})
			.data('boomPageToolbar');

		$.boom.log('Page init');

		top.$(function(){

			$.boom.loader.show();

			self.editors = [];

			$.boom.log('Page registered for editing: ' + self.options.page_id);

			self.loadPageEditor()
				.done( function(){
					self.init();
				});
		});
	},

	/** @function */
	init : function(){

		var self = this;

		this.config = $.boom.config.editor;

		this.config.pageScripts = [ this.config.stylesheetURL, '/media/boom/css/boom.page.css' ];

		this.elements.page_body = this.document;

		this.load()
			.done( function(){
				if (self.options.editable) {
					self.createChunks();
				}
			});

		return this;
	},

	/** @function */
	load : function(){
		var promise = new $.Deferred();

		$.boom.loader.show();

		this.loadScripts(this.config.pageScripts)
			.done(function(){

				$.boom.loader.hide();

				$.boom.log('Scripts loaded into iFrame');

				promise.resolve();
			});

		return promise;
	},

	/** @function */
	loadPageEditor : function(){

		$.boom.loader.hide();

		var self = this;

		return $( 'body' ).editor().editor( 'load' );
	},

	createChunks : function() {
		var self = this;

		 this.elements.page_body.contents()
			.find('[data-boom-chunk]')
			.each(function(){
				var $this = $(this);

				var type = $this.attr('data-boom-chunk');
				var widgetName = 'chunk' + type.ucfirst();

				$this[widgetName]({
					type : type,
					name : $this.attr('data-boom-slot-name'),
					template : $this.attr('data-boom-template'),<commit_msg>Removed redundant variable declaration and whitespace<commit_after>$.widget( 'boom.pageEditor', {
	elements : {},

	options : {
		editable : false
	},

	_create : function() {
		var self = this;

		this.page = new boomPage(this.options.page_id);
		$.boom.page = this.page;

		this.document = $(top.document);

		this.page.toolbar = this.toolbar = this.document
			.find('#b-page-topbar')
			.pageToolbar({
				page : this.page
			})
			.data('boomPageToolbar');

		$.boom.log('Page init');

		top.$(function(){

			$.boom.loader.show();

			self.editors = [];

			$.boom.log('Page registered for editing: ' + self.options.page_id);

			self.loadPageEditor()
				.done( function(){
					self.init();
				});
		});
	},

	/** @function */
	init : function(){

		var self = this;

		this.config = $.boom.config.editor;

		this.config.pageScripts = [ this.config.stylesheetURL, '/media/boom/css/boom.page.css' ];

		this.elements.page_body = this.document;

		this.load()
			.done( function(){
				if (self.options.editable) {
					self.createChunks();
				}
			});

		return this;
	},

	/** @function */
	load : function(){
		var promise = new $.Deferred();

		$.boom.loader.show();

		this.loadScripts(this.config.pageScripts)
			.done(function(){

				$.boom.loader.hide();

				$.boom.log('Scripts loaded into iFrame');

				promise.resolve();
			});

		return promise;
	},

	/** @function */
	loadPageEditor : function(){
		$.boom.loader.hide();

		return $('body').editor().editor('load');
	},

	createChunks : function() {
		var self = this;

		 this.elements.page_body.contents()
			.find('[data-boom-chunk]')
			.each(function(){
				var $this = $(this);

				var type = $this.attr('data-boom-chunk');
				var widgetName = 'chunk' + type.ucfirst();

				$this[widgetName]({
					type : type,
					name : $this.attr('data-boom-slot-name'),
					template : $this.attr('data-boom-template'),
{'fraction_non_alphanumeric': 0.19368532767312285, 'fraction_numerical': 0.0, 'mean_word_length': 2.9107883817427385, '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': '1665842', 'n_tokens_mistral': 1581, 'n_tokens_neox': 1300, 'n_words': 229}