<commit_before>/**
 * View
 * @class View
 * @since 0.0.1
 * @author <NAME>, <NAME>
 */
define(function(require, exports, module) {

	var viewCtrl = require('./ctrl');
	var UIContainer = require('UI/Container/Container');
	var Layout = require('UI/Layout/Layout');
	var Toolbar = require('UI/Toolbar/Toolbar');
	var Binding = require('UI/Component/Binding');
	var Container = require('./Container');
	//var ctrl = require('./ctrl');
	var Dragging = require('./Dragging');
	var Limit = require('./Limit');
	var Loader = require('./Loader');
	var Scroll = require('./Scroll');
	var LayoutView = require('./Layout');
	//var Scrolling = require('./Scrolling');
	var Zoom = require('./Zoom');

	var _log = __debug('view').defineLevel();

	var View = new Class({

		Implements: [
			Events,
			Options,
			Binding,
			Toolbar,

			Container,
			//ctrl,
			Dragging,
			Limit,
			Loader,
			Scroll,
			LayoutView,
			//Scrolling,
			Zoom
		],

		options: {
			lib: 'ui',
			base: 'view',
			clss: 'view',

			content: true,

			friction: 5,
			tag: 'div',
			node: {
				name: 'container'
			},
			axis: {
				x: true,
				y: true
			},

			range: [10, 52],

			fx: {
				transition: Fx.Transitions.Quart.easeOut,
				duration: 240,
				wait: false
			},
			scrollbar: null,
			scroll: 'scrollbar',
			dragging: null,
			scroller: null,
			scroller_opts: {
				area: 160,
				velocity: 0.5
			},
			autoScrollOptions: {
				wait: false,
				duration: 200,
				offset: {
					'x': 0,
					'y': -50
				},
				transition: Fx.Transitions.Quad.easeInOut
			},
			controller: {
				_list: []
			}
		},


		/**
		 * Initialize
		 * @param {Object} options
		 * @return {Object}
		 */
		initialize: function(options) {
			_log.debug('initialize', options);

			options = options || {};

			if (options.setCaller) {
				this.setCaller = options.setCaller.bind(null, this);
				options.setCaller = true;
			}

			if (options.getRange) {
				this.getRange = options.getRange.bind(null, this);
				options.getRange = true;
			}

			if (options.fetchFunction) {
				this.fetchFunction = options.fetchFunction;
				options.fetchFunction = true;
			}

			if (options.templateFunction) {
				this.templateFunction = options.templateFunction;
				options.templateFunction = true;
			}

			if (options.sandbox) {
				this.sandbox = options.sandbox;
				options.sandbox = true;
			}

			if (options.connector) {
				this.connector = options.connector;
				options.connector = true;
			}

			if (options.collection) {
				this.collection = options.collection;
				options.collection = true;
			}

			if (options.onSettings) {
				this.onSettings = options.onSettings;
				options.onSettings = true;
			}

			this.setOptions(options);
			this.opts = this.options;

			this.container = options.container;

			this._init();
			this._initBinding();<commit_msg>fix double bindings in core view<commit_after>/**
 * View
 * @class View
 * @since 0.0.1
 * @author <NAME>, <NAME>
 */
define(function(require, exports, module) {

	var viewCtrl = require('./ctrl');
	var UIContainer = require('UI/Container/Container');
	var Layout = require('UI/Layout/Layout');
	var Toolbar = require('UI/Toolbar/Toolbar');
	var Binding = require('UI/Component/Binding');
	var Container = require('./Container');
	//var ctrl = require('./ctrl');
	var Dragging = require('./Dragging');
	var Limit = require('./Limit');
	var Loader = require('./Loader');
	var Scroll = require('./Scroll');
	var LayoutView = require('./Layout');
	//var Scrolling = require('./Scrolling');
	var Zoom = require('./Zoom');

	var _log = __debug('view').defineLevel();

	var View = new Class({

		Implements: [
			Events,
			Options,
			Binding,
			Toolbar,

			Container,
			//ctrl,
			Dragging,
			Limit,
			Loader,
			Scroll,
			LayoutView,
			//Scrolling,
			Zoom
		],

		options: {
			lib: 'ui',
			base: 'view',
			clss: 'view',

			content: true,

			friction: 5,
			tag: 'div',
			node: {
				name: 'container'
			},
			axis: {
				x: true,
				y: true
			},

			range: [10, 52],

			fx: {
				transition: Fx.Transitions.Quart.easeOut,
				duration: 240,
				wait: false
			},
			scrollbar: null,
			scroll: 'scrollbar',
			dragging: null,
			scroller: null,
			scroller_opts: {
				area: 160,
				velocity: 0.5
			},
			autoScrollOptions: {
				wait: false,
				duration: 200,
				offset: {
					'x': 0,
					'y': -50
				},
				transition: Fx.Transitions.Quad.easeInOut
			},
			controller: {
				_list: []
			}
		},


		/**
		 * Initialize
		 * @param {Object} options
		 * @return {Object}
		 */
		initialize: function(options) {
			_log.debug('initialize', options);

			options = options || {};

			if (options.setCaller) {
				this.setCaller = options.setCaller.bind(null, this);
				options.setCaller = true;
			}

			if (options.getRange) {
				this.getRange = options.getRange.bind(null, this);
				options.getRange = true;
			}

			if (options.fetchFunction) {
				this.fetchFunction = options.fetchFunction;
				options.fetchFunction = true;
			}

			if (options.templateFunction) {
				this.templateFunction = options.templateFunction;
				options.templateFunction = true;
			}

			if (options.sandbox) {
				this.sandbox = options.sandbox;
				options.sandbox = true;
			}

			if (options.connector) {
				this.connector = options.connector;
				options.connector = true;
			}

			if (options.collection) {
				this.collection = options.collection;
				options.collection = true;
			}

			if (options.onSettings) {
				this.onSettings = options.onSettings;
				options.onSettings = true;
			}

			this.setOptions(options);
			this.opts = this.options;

			this.container = options.container;

			this._init();
			//this._initBinding();
{'fraction_non_alphanumeric': 0.1531420524555536, 'fraction_numerical': 0.007745115296602711, 'mean_word_length': 2.7480211081794197, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2053068', 'n_tokens_mistral': 2406, 'n_tokens_neox': 1858, 'n_words': 408}