PageSourceSearch

https://www.swissotel.com.tr/frhi/inc/js/libs/jquery-ui-tooltip.min.js

js swissotel.com.tr collected 2026-09-26 11:03:30 UTC 49,973 bytes, 1,813 lines download raw bytes

1/*! jQuery UI - v1.12.1 - 2018-05-10
2* http://jqueryui.com
3* Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/tooltip
vendor: 8,818 bytes, lines 3-330
3.js
4* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6(function( factory ) {
7	if ( typeof define === "function" && define.amd ) {
8
9		// AMD. Register as an anonymous module.
10		define([ "jquery" ], factory );
11	} else {
12
13		// Browser globals
14		factory( jQuery );
15	}
16}(function( $ ) {
17
18$.ui = $.ui || {};
19
20var version = $.ui.version = "1.12.1";
21
22
23/*!
24 * jQuery UI Widget 1.12.1
25 * http://jqueryui.com
26 *
27 * Copyright jQuery Foundation and other contributors
28 * Released under the MIT license.
29 * http://jquery.org/license
30 */
31
32//>>label: Widget
33//>>group: Core
34//>>description: Provides a factory for creating stateful widgets with a common API.
35//>>docs: http://api.jqueryui.com/jQuery.widget/
36//>>demos: http://jqueryui.com/widget/
37
38
39
40var widgetUuid = 0;
41var widgetSlice = Array.prototype.slice;
42
43$.cleanData = ( function( orig ) {
44	return function( elems ) {
45		var events, elem, i;
46		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
47			try {
48
49				// Only trigger remove when necessary to save time
50				events = $._data( elem, "events" );
51				if ( events && events.remove ) {
52					$( elem ).triggerHandler( "remove" );
53				}
54
55			// Http://bugs.jquery.com/ticket/8235
56			} catch ( e ) {}
57		}
58		orig( elems );
59	};
60} )( $.cleanData );
61
62$.widget = function( name, base, prototype ) {
63	var existingConstructor, constructor, basePrototype;
64
65	// ProxiedPrototype allows the provided prototype to remain unmodified
66	// so that it can be used as a mixin for multiple widgets (#8876)
67	var proxiedPrototype = {};
68
69	var namespace = name.split( "." )[ 0 ];
70	name = name.split( "." )[ 1 ];
71	var fullName = namespace + "-" + name;
72
73	if ( !prototype ) {
74		prototype = base;
75		base = $.Widget;
76	}
77
78	if ( $.isArray( prototype ) ) {
79		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
80	}
81
82	// Create selector for plugin
83	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
84		return !!$.data( elem, fullName );
85	};
86
87	$[ namespace ] = $[ namespace ] || {};
88	existingConstructor = $[ namespace ][ name ];
89	constructor = $[ namespace ][ name ] = function( options, element ) {
90
91		// Allow instantiation without "new" keyword
92		if ( !this._createWidget ) {
93			return new constructor( options, element );
94		}
95
96		// Allow instantiation without initializing for simple inheritance
97		// must use "new" keyword (the code above always passes args)
98		if ( arguments.length ) {
99			this._createWidget( options, element );
100		}
101	};
102
103	// Extend with the existing constructor to carry over any static properties
104	$.extend( constructor, existingConstructor, {
105		version: prototype.version,
106
107		// Copy the object used to create the prototype in case we need to
108		// redefine the widget later
109		_proto: $.extend( {}, prototype ),
110
111		// Track widgets that inherit from this widget in case this widget is
112		// redefined after a widget inherits from it
113		_childConstructors: []
114	} );
115
116	basePrototype = new base();
117
118	// We need to make the options hash a property directly on the new instance
119	// otherwise we'll modify the options hash on the prototype that we're
120	// inheriting from
121	basePrototype.options = $.widget.extend( {}, basePrototype.options );
122	$.each( prototype, function( prop, value ) {
123		if ( !$.isFunction( value ) ) {
124			proxiedPrototype[ prop ] = value;
125			return;
126		}
127		proxiedPrototype[ prop ] = ( function() {
128			function _super() {
129				return base.prototype[ prop ].apply( this, arguments );
130			}
131
132			function _superApply( args ) {
133				return base.prototype[ prop ].apply( this, args );
134			}
135
136			return function() {
137				var __super = this._super;
138				var __superApply = this._superApply;
139				var returnValue;
140
141				this._super = _super;
142				this._superApply = _superApply;
143
144				returnValue = value.apply( this, arguments );
145
146				this._super = __super;
147				this._superApply = __superApply;
148
149				return returnValue;
150			};
151		} )();
152	} );
153	constructor.prototype = $.widget.extend( basePrototype, {
154
155		// TODO: remove support for widgetEventPrefix
156		// always use the name + a colon as the prefix, e.g., draggable:start
157		// don't prefix for widgets that aren't DOM-based
158		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
159	}, proxiedPrototype, {
160		constructor: constructor,
161		namespace: namespace,
162		widgetName: name,
163		widgetFullName: fullName
164	} );
165
166	// If this widget is being redefined then we need to find all widgets that
167	// are inheriting from it and redefine all of them so that they inherit from
168	// the new version of this widget. We're essentially trying to replace one
169	// level in the prototype chain.
170	if ( existingConstructor ) {
171		$.each( existingConstructor._childConstructors, function( i, child ) {
172			var childPrototype = child.prototype;
173
174			// Redefine the child widget using the same prototype that was
175			// originally used, but inherit from the new version of the base
176			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
177				child._proto );
178		} );
179
180		// Remove the list of existing child constructors from the old constructor
181		// so the old child constructors can be garbage collected
182		delete existingConstructor._childConstructors;
183	} else {
184		base._childConstructors.push( constructor );
185	}
186
187	$.widget.bridge( name, constructor );
188
189	return constructor;
190};
191
192$.widget.extend = function( target ) {
193	var input = widgetSlice.call( arguments, 1 );
194	var inputIndex = 0;
195	var inputLength = input.length;
196	var key;
197	var value;
198
199	for ( ; inputIndex < inputLength; inputIndex++ ) {
200		for ( key in input[ inputIndex ] ) {
201			value = input[ inputIndex ][ key ];
202			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
203
204				// Clone objects
205				if ( $.isPlainObject( value ) ) {
206					target[ key ] = $.isPlainObject( target[ key ] ) ?
207						$.widget.extend( {}, target[ key ], value ) :
208
209						// Don't extend strings, arrays, etc. with objects
210						$.widget.extend( {}, value );
211
212				// Copy everything else by reference
213				} else {
214					target[ key ] = value;
215				}
216			}
217		}
218	}
219	return target;
220};
221
222$.widget.bridge = function( name, object ) {
223	var fullName = object.prototype.widgetFullName || name;
224	$.fn[ name ] = function( options ) {
225		var isMethodCall = typeof options === "string";
226		var args = widgetSlice.call( arguments, 1 );
227		var returnValue = this;
228
229		if ( isMethodCall ) {
230
231			// If this is an empty collection, we need to have the instance method
232			// return undefined instead of the jQuery instance
233			if ( !this.length && options === "instance" ) {
234				returnValue = undefined;
235			} else {
236				this.each( function() {
237					var methodValue;
238					var instance = $.data( this, fullName );
239
240					if ( options === "instance" ) {
241						returnValue = instance;
242						return false;
243					}
244
245					if ( !instance ) {
246						return $.error( "cannot call methods on " + name +
247							" prior to initialization; " +
248							"attempted to call method '" + options + "'" );
249					}
250
251					if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
252						return $.error( "no such method '" + options + "' for " + name +
253							" widget instance" );
254					}
255
256					methodValue = instance[ options ].apply( instance, args );
257
258					if ( methodValue !== instance && methodValue !== undefined ) {
259						returnValue = methodValue && methodValue.jquery ?
260							returnValue.pushStack( methodValue.get() ) :
261							methodValue;
262						return false;
263					}
264				} );
265			}
266		} else {
267
268			// Allow multiple hashes to be passed on init
269			if ( args.length ) {
270				options = $.widget.extend.apply( null, [ options ].concat( args ) );
271			}
272
273			this.each( function() {
274				var instance = $.data( this, fullName );
275				if ( instance ) {
276					instance.option( options || {} );
277					if ( instance._init ) {
278						instance._init();
279					}
280				} else {
281					$.data( this, fullName, new object( options, this ) );
282				}
283			} );
284		}
285
286		return returnValue;
287	};
288};
289
290$.Widget = function( /* options, element */ ) {};
291$.Widget._childConstructors = [];
292
293$.Widget.prototype = {
294	widgetName: "widget",
295	widgetEventPrefix: "",
296	defaultElement: "<div>",
297
298	options: {
299		classes: {},
300		disabled: false,
301
302		// Callbacks
303		create: null
304	},
305
306	_createWidget: function( options, element ) {
307		element = $( element || this.defaultElement || this )[ 0 ];
308		this.element = $( element );
309		this.uuid = widgetUuid++;
310		this.eventNamespace = "." + this.widgetName + this.uuid;
311
312		this.bindings = $();
313		this.hoverable = $();
314		this.focusable = $();
315		this.classesElementLookup = {};
316
317		if ( element !== this ) {
318			$.data( element, this.widgetFullName, this );
319			this._on( true, this.element, {
320				remove: function( event ) {
321					if ( event.target === element ) {
322						this.destroy();
323					}
324				}
325			} );
326			this.document = $( element.style ?
327
328				// Element within the document
329				element.ownerDocument :
330
vendor: 25,704 bytes, lines 331-1235
331				// Element is window or document
332				element.document || element );
333			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
334		}
335
336		this.options = $.widget.extend( {},
337			this.options,
338			this._getCreateOptions(),
339			options );
340
341		this._create();
342
343		if ( this.options.disabled ) {
344			this._setOptionDisabled( this.options.disabled );
345		}
346
347		this._trigger( "create", null, this._getCreateEventData() );
348		this._init();
349	},
350
351	_getCreateOptions: function() {
352		return {};
353	},
354
355	_getCreateEventData: $.noop,
356
357	_create: $.noop,
358
359	_init: $.noop,
360
361	destroy: function() {
362		var that = this;
363
364		this._destroy();
365		$.each( this.classesElementLookup, function( key, value ) {
366			that._removeClass( value, key );
367		} );
368
369		// We can probably remove the unbind calls in 2.0
370		// all event bindings should go through this._on()
371		this.element
372			.off( this.eventNamespace )
373			.removeData( this.widgetFullName );
374		this.widget()
375			.off( this.eventNamespace )
376			.removeAttr( "aria-disabled" );
377
378		// Clean up events and states
379		this.bindings.off( this.eventNamespace );
380	},
381
382	_destroy: $.noop,
383
384	widget: function() {
385		return this.element;
386	},
387
388	option: function( key, value ) {
389		var options = key;
390		var parts;
391		var curOption;
392		var i;
393
394		if ( arguments.length === 0 ) {
395
396			// Don't return a reference to the internal hash
397			return $.widget.extend( {}, this.options );
398		}
399
400		if ( typeof key === "string" ) {
401
402			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
403			options = {};
404			parts = key.split( "." );
405			key = parts.shift();
406			if ( parts.length ) {
407				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
408				for ( i = 0; i < parts.length - 1; i++ ) {
409					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
410					curOption = curOption[ parts[ i ] ];
411				}
412				key = parts.pop();
413				if ( arguments.length === 1 ) {
414					return curOption[ key ] === undefined ? null : curOption[ key ];
415				}
416				curOption[ key ] = value;
417			} else {
418				if ( arguments.length === 1 ) {
419					return this.options[ key ] === undefined ? null : this.options[ key ];
420				}
421				options[ key ] = value;
422			}
423		}
424
425		this._setOptions( options );
426
427		return this;
428	},
429
430	_setOptions: function( options ) {
431		var key;
432
433		for ( key in options ) {
434			this._setOption( key, options[ key ] );
435		}
436
437		return this;
438	},
439
440	_setOption: function( key, value ) {
441		if ( key === "classes" ) {
442			this._setOptionClasses( value );
443		}
444
445		this.options[ key ] = value;
446
447		if ( key === "disabled" ) {
448			this._setOptionDisabled( value );
449		}
450
451		return this;
452	},
453
454	_setOptionClasses: function( value ) {
455		var classKey, elements, currentElements;
456
457		for ( classKey in value ) {
458			currentElements = this.classesElementLookup[ classKey ];
459			if ( value[ classKey ] === this.options.classes[ classKey ] ||
460					!currentElements ||
461					!currentElements.length ) {
462				continue;
463			}
464
465			// We are doing this to create a new jQuery object because the _removeClass() call
466			// on the next line is going to destroy the reference to the current elements being
467			// tracked. We need to save a copy of this collection so that we can add the new classes
468			// below.
469			elements = $( currentElements.get() );
470			this._removeClass( currentElements, classKey );
471
472			// We don't use _addClass() here, because that uses this.options.classes
473			// for generating the string of classes. We want to use the value passed in from
474			// _setOption(), this is the new value of the classes option which was passed to
475			// _setOption(). We pass this value directly to _classes().
476			elements.addClass( this._classes( {
477				element: elements,
478				keys: classKey,
479				classes: value,
480				add: true
481			} ) );
482		}
483	},
484
485	_setOptionDisabled: function( value ) {
486		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
487
488		// If the widget is becoming disabled, then nothing is interactive
489		if ( value ) {
490			this._removeClass( this.hoverable, null, "ui-state-hover" );
491			this._removeClass( this.focusable, null, "ui-state-focus" );
492		}
493	},
494
495	enable: function() {
496		return this._setOptions( { disabled: false } );
497	},
498
499	disable: function() {
500		return this._setOptions( { disabled: true } );
501	},
502
503	_classes: function( options ) {
504		var full = [];
505		var that = this;
506
507		options = $.extend( {
508			element: this.element,
509			classes: this.options.classes || {}
510		}, options );
511
512		function processClassString( classes, checkOption ) {
513			var current, i;
514			for ( i = 0; i < classes.length; i++ ) {
515				current = that.classesElementLookup[ classes[ i ] ] || $();
516				if ( options.add ) {
517					current = $( $.unique( current.get().concat( options.element.get() ) ) );
518				} else {
519					current = $( current.not( options.element ).get() );
520				}
521				that.classesElementLookup[ classes[ i ] ] = current;
522				full.push( classes[ i ] );
523				if ( checkOption && options.classes[ classes[ i ] ] ) {
524					full.push( options.classes[ classes[ i ] ] );
525				}
526			}
527		}
528
529		this._on( options.element, {
530			"remove": "_untrackClassesElement"
531		} );
532
533		if ( options.keys ) {
534			processClassString( options.keys.match( /\S+/g ) || [], true );
535		}
536		if ( options.extra ) {
537			processClassString( options.extra.match( /\S+/g ) || [] );
538		}
539
540		return full.join( " " );
541	},
542
543	_untrackClassesElement: function( event ) {
544		var that = this;
545		$.each( that.classesElementLookup, function( key, value ) {
546			if ( $.inArray( event.target, value ) !== -1 ) {
547				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
548			}
549		} );
550	},
551
552	_removeClass: function( element, keys, extra ) {
553		return this._toggleClass( element, keys, extra, false );
554	},
555
556	_addClass: function( element, keys, extra ) {
557		return this._toggleClass( element, keys, extra, true );
558	},
559
560	_toggleClass: function( element, keys, extra, add ) {
561		add = ( typeof add === "boolean" ) ? add : extra;
562		var shift = ( typeof element === "string" || element === null ),
563			options = {
564				extra: shift ? keys : extra,
565				keys: shift ? element : keys,
566				element: shift ? this.element : element,
567				add: add
568			};
569		options.element.toggleClass( this._classes( options ), add );
570		return this;
571	},
572
573	_on: function( suppressDisabledCheck, element, handlers ) {
574		var delegateElement;
575		var instance = this;
576
577		// No suppressDisabledCheck flag, shuffle arguments
578		if ( typeof suppressDisabledCheck !== "boolean" ) {
579			handlers = element;
580			element = suppressDisabledCheck;
581			suppressDisabledCheck = false;
582		}
583
584		// No element argument, shuffle and use this.element
585		if ( !handlers ) {
586			handlers = element;
587			element = this.element;
588			delegateElement = this.widget();
589		} else {
590			element = delegateElement = $( element );
591			this.bindings = this.bindings.add( element );
592		}
593
594		$.each( handlers, function( event, handler ) {
595			function handlerProxy() {
596
597				// Allow widgets to customize the disabled handling
598				// - disabled as an array instead of boolean
599				// - disabled class as method for disabling individual parts
600				if ( !suppressDisabledCheck &&
601						( instance.options.disabled === true ||
602						$( this ).hasClass( "ui-state-disabled" ) ) ) {
603					return;
604				}
605				return ( typeof handler === "string" ? instance[ handler ] : handler )
606					.apply( instance, arguments );
607			}
608
609			// Copy the guid so direct unbinding works
610			if ( typeof handler !== "string" ) {
611				handlerProxy.guid = handler.guid =
612					handler.guid || handlerProxy.guid || $.guid++;
613			}
614
615			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
616			var eventName = match[ 1 ] + instance.eventNamespace;
617			var selector = match[ 2 ];
618
619			if ( selector ) {
620				delegateElement.on( eventName, selector, handlerProxy );
621			} else {
622				element.on( eventName, handlerProxy );
623			}
624		} );
625	},
626
627	_off: function( element, eventName ) {
628		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
629			this.eventNamespace;
630		element.off( eventName ).off( eventName );
631
632		// Clear the stack to avoid memory leaks (#10056)
633		this.bindings = $( this.bindings.not( element ).get() );
634		this.focusable = $( this.focusable.not( element ).get() );
635		this.hoverable = $( this.hoverable.not( element ).get() );
636	},
637
638	_delay: function( handler, delay ) {
639		function handlerProxy() {
640			return ( typeof handler === "string" ? instance[ handler ] : handler )
641				.apply( instance, arguments );
642		}
643		var instance = this;
644		return setTimeout( handlerProxy, delay || 0 );
645	},
646
647	_hoverable: function( element ) {
648		this.hoverable = this.hoverable.add( element );
649		this._on( element, {
650			mouseenter: function( event ) {
651				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
652			},
653			mouseleave: function( event ) {
654				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
655			}
656		} );
657	},
658
659	_focusable: function( element ) {
660		this.focusable = this.focusable.add( element );
661		this._on( element, {
662			focusin: function( event ) {
663				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
664			},
665			focusout: function( event ) {
666				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
667			}
668		} );
669	},
670
671	_trigger: function( type, event, data ) {
672		var prop, orig;
673		var callback = this.options[ type ];
674
675		data = data || {};
676		event = $.Event( event );
677		event.type = ( type === this.widgetEventPrefix ?
678			type :
679			this.widgetEventPrefix + type ).toLowerCase();
680
681		// The original event may come from any element
682		// so we need to reset the target on the new event
683		event.target = this.element[ 0 ];
684
685		// Copy original event properties over to the new event
686		orig = event.originalEvent;
687		if ( orig ) {
688			for ( prop in orig ) {
689				if ( !( prop in event ) ) {
690					event[ prop ] = orig[ prop ];
691				}
692			}
693		}
694
695		this.element.trigger( event, data );
696		return !( $.isFunction( callback ) &&
697			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
698			event.isDefaultPrevented() );
699	}
700};
701
702$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
703	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
704		if ( typeof options === "string" ) {
705			options = { effect: options };
706		}
707
708		var hasOptions;
709		var effectName = !options ?
710			method :
711			options === true || typeof options === "number" ?
712				defaultEffect :
713				options.effect || defaultEffect;
714
715		options = options || {};
716		if ( typeof options === "number" ) {
717			options = { duration: options };
718		}
719
720		hasOptions = !$.isEmptyObject( options );
721		options.complete = callback;
722
723		if ( options.delay ) {
724			element.delay( options.delay );
725		}
726
727		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
728			element[ method ]( options );
729		} else if ( effectName !== method && element[ effectName ] ) {
730			element[ effectName ]( options.duration, options.easing, callback );
731		} else {
732			element.queue( function( next ) {
733				$( this )[ method ]();
734				if ( callback ) {
735					callback.call( element[ 0 ] );
736				}
737				next();
738			} );
739		}
740	};
741} );
742
743var widget = $.widget;
744
745
746/*!
747 * jQuery UI Position 1.12.1
748 * http://jqueryui.com
749 *
750 * Copyright jQuery Foundation and other contributors
751 * Released under the MIT license.
752 * http://jquery.org/license
753 *
754 * http://api.jqueryui.com/position/
755 */
756
757//>>label: Position
758//>>group: Core
759//>>description: Positions elements relative to other elements.
760//>>docs: http://api.jqueryui.com/position/
761//>>demos: http://jqueryui.com/position/
762
763
764( function() {
765var cachedScrollbarWidth,
766	max = Math.max,
767	abs = Math.abs,
768	rhorizontal = /left|center|right/,
769	rvertical = /top|center|bottom/,
770	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
771	rposition = /^\w+/,
772	rpercent = /%$/,
773	_position = $.fn.position;
774
775function getOffsets( offsets, width, height ) {
776	return [
777		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
778		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
779	];
780}
781
782function parseCss( element, property ) {
783	return parseInt( $.css( element, property ), 10 ) || 0;
784}
785
786function getDimensions( elem ) {
787	var raw = elem[ 0 ];
788	if ( raw.nodeType === 9 ) {
789		return {
790			width: elem.width(),
791			height: elem.height(),
792			offset: { top: 0, left: 0 }
793		};
794	}
795	if ( $.isWindow( raw ) ) {
796		return {
797			width: elem.width(),
798			height: elem.height(),
799			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
800		};
801	}
802	if ( raw.preventDefault ) {
803		return {
804			width: 0,
805			height: 0,
806			offset: { top: raw.pageY, left: raw.pageX }
807		};
808	}
809	return {
810		width: elem.outerWidth(),
811		height: elem.outerHeight(),
812		offset: elem.offset()
813	};
814}
815
816$.position = {
817	scrollbarWidth: function() {
818		if ( cachedScrollbarWidth !== undefined ) {
819			return cachedScrollbarWidth;
820		}
821		var w1, w2,
822			div = $( "<div " +
823				"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
824				"<div style='height:100px;width:auto;'></div></div>" ),
825			innerDiv = div.children()[ 0 ];
826
827		$( "body" ).append( div );
828		w1 = innerDiv.offsetWidth;
829		div.css( "overflow", "scroll" );
830
831		w2 = innerDiv.offsetWidth;
832
833		if ( w1 === w2 ) {
834			w2 = div[ 0 ].clientWidth;
835		}
836
837		div.remove();
838
839		return ( cachedScrollbarWidth = w1 - w2 );
840	},
841	getScrollInfo: function( within ) {
842		var overflowX = within.isWindow || within.isDocument ? "" :
843				within.element.css( "overflow-x" ),
844			overflowY = within.isWindow || within.isDocument ? "" :
845				within.element.css( "overflow-y" ),
846			hasOverflowX = overflowX === "scroll" ||
847				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
848			hasOverflowY = overflowY === "scroll" ||
849				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
850		return {
851			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
852			height: hasOverflowX ? $.position.scrollbarWidth() : 0
853		};
854	},
855	getWithinInfo: function( element ) {
856		var withinElement = $( element || window ),
857			isWindow = $.isWindow( withinElement[ 0 ] ),
858			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
859			hasOffset = !isWindow && !isDocument;
860		return {
861			element: withinElement,
862			isWindow: isWindow,
863			isDocument: isDocument,
864			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
865			scrollLeft: withinElement.scrollLeft(),
866			scrollTop: withinElement.scrollTop(),
867			width: withinElement.outerWidth(),
868			height: withinElement.outerHeight()
869		};
870	}
871};
872
873$.fn.position = function( options ) {
874	if ( !options || !options.of ) {
875		return _position.apply( this, arguments );
876	}
877
878	// Make a copy, we don't want to modify arguments
879	options = $.extend( {}, options );
880
881	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
882		target = $( options.of ),
883		within = $.position.getWithinInfo( options.within ),
884		scrollInfo = $.position.getScrollInfo( within ),
885		collision = ( options.collision || "flip" ).split( " " ),
886		offsets = {};
887
888	dimensions = getDimensions( target );
889	if ( target[ 0 ].preventDefault ) {
890
891		// Force left top to allow flipping
892		options.at = "left top";
893	}
894	targetWidth = dimensions.width;
895	targetHeight = dimensions.height;
896	targetOffset = dimensions.offset;
897
898	// Clone to reuse original targetOffset later
899	basePosition = $.extend( {}, targetOffset );
900
901	// Force my and at to have valid horizontal and vertical positions
902	// if a value is missing or invalid, it will be converted to center
903	$.each( [ "my", "at" ], function() {
904		var pos = ( options[ this ] || "" ).split( " " ),
905			horizontalOffset,
906			verticalOffset;
907
908		if ( pos.length === 1 ) {
909			pos = rhorizontal.test( pos[ 0 ] ) ?
910				pos.concat( [ "center" ] ) :
911				rvertical.test( pos[ 0 ] ) ?
912					[ "center" ].concat( pos ) :
913					[ "center", "center" ];
914		}
915		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
916		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
917
918		// Calculate offsets
919		horizontalOffset = roffset.exec( pos[ 0 ] );
920		verticalOffset = roffset.exec( pos[ 1 ] );
921		offsets[ this ] = [
922			horizontalOffset ? horizontalOffset[ 0 ] : 0,
923			verticalOffset ? verticalOffset[ 0 ] : 0
924		];
925
926		// Reduce to just the positions without the offsets
927		options[ this ] = [
928			rposition.exec( pos[ 0 ] )[ 0 ],
929			rposition.exec( pos[ 1 ] )[ 0 ]
930		];
931	} );
932
933	// Normalize collision option
934	if ( collision.length === 1 ) {
935		collision[ 1 ] = collision[ 0 ];
936	}
937
938	if ( options.at[ 0 ] === "right" ) {
939		basePosition.left += targetWidth;
940	} else if ( options.at[ 0 ] === "center" ) {
941		basePosition.left += targetWidth / 2;
942	}
943
944	if ( options.at[ 1 ] === "bottom" ) {
945		basePosition.top += targetHeight;
946	} else if ( options.at[ 1 ] === "center" ) {
947		basePosition.top += targetHeight / 2;
948	}
949
950	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
951	basePosition.left += atOffset[ 0 ];
952	basePosition.top += atOffset[ 1 ];
953
954	return this.each( function() {
955		var collisionPosition, using,
956			elem = $( this ),
957			elemWidth = elem.outerWidth(),
958			elemHeight = elem.outerHeight(),
959			marginLeft = parseCss( this, "marginLeft" ),
960			marginTop = parseCss( this, "marginTop" ),
961			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
962				scrollInfo.width,
963			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
964				scrollInfo.height,
965			position = $.extend( {}, basePosition ),
966			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
967
968		if ( options.my[ 0 ] === "right" ) {
969			position.left -= elemWidth;
970		} else if ( options.my[ 0 ] === "center" ) {
971			position.left -= elemWidth / 2;
972		}
973
974		if ( options.my[ 1 ] === "bottom" ) {
975			position.top -= elemHeight;
976		} else if ( options.my[ 1 ] === "center" ) {
977			position.top -= elemHeight / 2;
978		}
979
980		position.left += myOffset[ 0 ];
981		position.top += myOffset[ 1 ];
982
983		collisionPosition = {
984			marginLeft: marginLeft,
985			marginTop: marginTop
986		};
987
988		$.each( [ "left", "top" ], function( i, dir ) {
989			if ( $.ui.position[ collision[ i ] ] ) {
990				$.ui.position[ collision[ i ] ][ dir ]( position, {
991					targetWidth: targetWidth,
992					targetHeight: targetHeight,
993					elemWidth: elemWidth,
994					elemHeight: elemHeight,
995					collisionPosition: collisionPosition,
996					collisionWidth: collisionWidth,
997					collisionHeight: collisionHeight,
998					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
999					my: options.my,
1000					at: options.at,
1001					within: within,
1002					elem: elem
1003				} );
1004			}
1005		} );
1006
1007		if ( options.using ) {
1008
1009			// Adds feedback as second argument to using callback, if present
1010			using = function( props ) {
1011				var left = targetOffset.left - position.left,
1012					right = left + targetWidth - elemWidth,
1013					top = targetOffset.top - position.top,
1014					bottom = top + targetHeight - elemHeight,
1015					feedback = {
1016						target: {
1017							element: target,
1018							left: targetOffset.left,
1019							top: targetOffset.top,
1020							width: targetWidth,
1021							height: targetHeight
1022						},
1023						element: {
1024							element: elem,
1025							left: position.left,
1026							top: position.top,
1027							width: elemWidth,
1028							height: elemHeight
1029						},
1030						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1031						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1032					};
1033				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1034					feedback.horizontal = "center";
1035				}
1036				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1037					feedback.vertical = "middle";
1038				}
1039				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1040					feedback.important = "horizontal";
1041				} else {
1042					feedback.important = "vertical";
1043				}
1044				options.using.call( this, props, feedback );
1045			};
1046		}
1047
1048		elem.offset( $.extend( position, { using: using } ) );
1049	} );
1050};
1051
1052$.ui.position = {
1053	fit: {
1054		left: function( position, data ) {
1055			var within = data.within,
1056				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1057				outerWidth = within.width,
1058				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1059				overLeft = withinOffset - collisionPosLeft,
1060				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1061				newOverRight;
1062
1063			// Element is wider than within
1064			if ( data.collisionWidth > outerWidth ) {
1065
1066				// Element is initially over the left side of within
1067				if ( overLeft > 0 && overRight <= 0 ) {
1068					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
1069						withinOffset;
1070					position.left += overLeft - newOverRight;
1071
1072				// Element is initially over right side of within
1073				} else if ( overRight > 0 && overLeft <= 0 ) {
1074					position.left = withinOffset;
1075
1076				// Element is initially over both left and right sides of within
1077				} else {
1078					if ( overLeft > overRight ) {
1079						position.left = withinOffset + outerWidth - data.collisionWidth;
1080					} else {
1081						position.left = withinOffset;
1082					}
1083				}
1084
1085			// Too far left -> align with left edge
1086			} else if ( overLeft > 0 ) {
1087				position.left += overLeft;
1088
1089			// Too far right -> align with right edge
1090			} else if ( overRight > 0 ) {
1091				position.left -= overRight;
1092
1093			// Adjust based on position and margin
1094			} else {
1095				position.left = max( position.left - collisionPosLeft, position.left );
1096			}
1097		},
1098		top: function( position, data ) {
1099			var within = data.within,
1100				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1101				outerHeight = data.within.height,
1102				collisionPosTop = position.top - data.collisionPosition.marginTop,
1103				overTop = withinOffset - collisionPosTop,
1104				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1105				newOverBottom;
1106
1107			// Element is taller than within
1108			if ( data.collisionHeight > outerHeight ) {
1109
1110				// Element is initially over the top of within
1111				if ( overTop > 0 && overBottom <= 0 ) {
1112					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
1113						withinOffset;
1114					position.top += overTop - newOverBottom;
1115
1116				// Element is initially over bottom of within
1117				} else if ( overBottom > 0 && overTop <= 0 ) {
1118					position.top = withinOffset;
1119
1120				// Element is initially over both top and bottom of within
1121				} else {
1122					if ( overTop > overBottom ) {
1123						position.top = withinOffset + outerHeight - data.collisionHeight;
1124					} else {
1125						position.top = withinOffset;
1126					}
1127				}
1128
1129			// Too far up -> align with top
1130			} else if ( overTop > 0 ) {
1131				position.top += overTop;
1132
1133			// Too far down -> align with bottom edge
1134			} else if ( overBottom > 0 ) {
1135				position.top -= overBottom;
1136
1137			// Adjust based on position and margin
1138			} else {
1139				position.top = max( position.top - collisionPosTop, position.top );
1140			}
1141		}
1142	},
1143	flip: {
1144		left: function( position, data ) {
1145			var within = data.within,
1146				withinOffset = within.offset.left + within.scrollLeft,
1147				outerWidth = within.width,
1148				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1149				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1150				overLeft = collisionPosLeft - offsetLeft,
1151				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1152				myOffset = data.my[ 0 ] === "left" ?
1153					-data.elemWidth :
1154					data.my[ 0 ] === "right" ?
1155						data.elemWidth :
1156						0,
1157				atOffset = data.at[ 0 ] === "left" ?
1158					data.targetWidth :
1159					data.at[ 0 ] === "right" ?
1160						-data.targetWidth :
1161						0,
1162				offset = -2 * data.offset[ 0 ],
1163				newOverRight,
1164				newOverLeft;
1165
1166			if ( overLeft < 0 ) {
1167				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
1168					outerWidth - withinOffset;
1169				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1170					position.left += myOffset + atOffset + offset;
1171				}
1172			} else if ( overRight > 0 ) {
1173				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
1174					atOffset + offset - offsetLeft;
1175				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1176					position.left += myOffset + atOffset + offset;
1177				}
1178			}
1179		},
1180		top: function( position, data ) {
1181			var within = data.within,
1182				withinOffset = within.offset.top + within.scrollTop,
1183				outerHeight = within.height,
1184				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1185				collisionPosTop = position.top - data.collisionPosition.marginTop,
1186				overTop = collisionPosTop - offsetTop,
1187				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1188				top = data.my[ 1 ] === "top",
1189				myOffset = top ?
1190					-data.elemHeight :
1191					data.my[ 1 ] === "bottom" ?
1192						data.elemHeight :
1193						0,
1194				atOffset = data.at[ 1 ] === "top" ?
1195					data.targetHeight :
1196					data.at[ 1 ] === "bottom" ?
1197						-data.targetHeight :
1198						0,
1199				offset = -2 * data.offset[ 1 ],
1200				newOverTop,
1201				newOverBottom;
1202			if ( overTop < 0 ) {
1203				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
1204					outerHeight - withinOffset;
1205				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
1206					position.top += myOffset + atOffset + offset;
1207				}
1208			} else if ( overBottom > 0 ) {
1209				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
1210					offset - offsetTop;
1211				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
1212					position.top += myOffset + atOffset + offset;
1213				}
1214			}
1215		}
1216	},
1217	flipfit: {
1218		left: function() {
1219			$.ui.position.flip.left.apply( this, arguments );
1220			$.ui.position.fit.left.apply( this, arguments );
1221		},
1222		top: function() {
1223			$.ui.position.flip.top.apply( this, arguments );
1224			$.ui.position.fit.top.apply( this, arguments );
1225		}
1226	}
1227};
1228
1229} )();
1230
1231var position = $.ui.position;
1232
1233
1234/*!
1235 * jQuery UI 
vendor: 1,231 bytes, lines 1235-1305
1235Keycode 1.12.1
1236 * http://jqueryui.com
1237 *
1238 * Copyright jQuery Foundation and other contributors
1239 * Released under the MIT license.
1240 * http://jquery.org/license
1241 */
1242
1243//>>label: Keycode
1244//>>group: Core
1245//>>description: Provide keycodes as keynames
1246//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
1247
1248
1249var keycode = $.ui.keyCode = {
1250	BACKSPACE: 8,
1251	COMMA: 188,
1252	DELETE: 46,
1253	DOWN: 40,
1254	END: 35,
1255	ENTER: 13,
1256	ESCAPE: 27,
1257	HOME: 36,
1258	LEFT: 37,
1259	PAGE_DOWN: 34,
1260	PAGE_UP: 33,
1261	PERIOD: 190,
1262	RIGHT: 39,
1263	SPACE: 32,
1264	TAB: 9,
1265	UP: 38
1266};
1267
1268
1269/*!
1270 * jQuery UI Unique ID 1.12.1
1271 * http://jqueryui.com
1272 *
1273 * Copyright jQuery Foundation and other contributors
1274 * Released under the MIT license.
1275 * http://jquery.org/license
1276 */
1277
1278//>>label: uniqueId
1279//>>group: Core
1280//>>description: Functions to generate and remove uniqueId's
1281//>>docs: http://api.jqueryui.com/uniqueId/
1282
1283
1284
1285var uniqueId = $.fn.extend( {
1286	uniqueId: ( function() {
1287		var uuid = 0;
1288
1289		return function() {
1290			return this.each( function() {
1291				if ( !this.id ) {
1292					this.id = "ui-id-" + ( ++uuid );
1293				}
1294			} );
1295		};
1296	} )(),
1297
1298	removeUniqueId: function() {
1299		return this.each( function() {
1300			if ( /^ui-id-\d+$/.test( this.id ) ) {
1301				$( this ).removeAttr( "id" );
1302			}
1303		} );
1304	}
1305} )
vendor: 11,918 bytes, lines 1305-1724
1305;
1306
1307
1308/*!
1309 * jQuery UI Tooltip 1.12.1
1310 * http://jqueryui.com
1311 *
1312 * Copyright jQuery Foundation and other contributors
1313 * Released under the MIT license.
1314 * http://jquery.org/license
1315 */
1316
1317//>>label: Tooltip
1318//>>group: Widgets
1319//>>description: Shows additional information for any element on hover or focus.
1320//>>docs: http://api.jqueryui.com/tooltip/
1321//>>demos: http://jqueryui.com/tooltip/
1322//>>css.structure: ../../themes/base/core.css
1323//>>css.structure: ../../themes/base/tooltip.css
1324//>>css.theme: ../../themes/base/theme.css
1325
1326
1327
1328$.widget( "ui.tooltip", {
1329	version: "1.12.1",
1330	options: {
1331		classes: {
1332			"ui-tooltip": "ui-corner-all ui-widget-shadow"
1333		},
1334		content: function() {
1335
1336			// support: IE<9, Opera in jQuery <1.7
1337			// .text() can't accept undefined, so coerce to a string
1338			var title = $( this ).attr( "title" ) || "";
1339
1340			// Escape title, since we're going from an attribute to raw HTML
1341			return $( "<a>" ).text( title ).html();
1342		},
1343		hide: true,
1344
1345		// Disabled elements have inconsistent behavior across browsers (#8661)
1346		items: "[title]:not([disabled])",
1347		position: {
1348			my: "left top+15",
1349			at: "left bottom",
1350			collision: "flipfit flip"
1351		},
1352		show: true,
1353		track: false,
1354
1355		// Callbacks
1356		close: null,
1357		open: null
1358	},
1359
1360	_addDescribedBy: function( elem, id ) {
1361		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
1362		describedby.push( id );
1363		elem
1364			.data( "ui-tooltip-id", id )
1365			.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
1366	},
1367
1368	_removeDescribedBy: function( elem ) {
1369		var id = elem.data( "ui-tooltip-id" ),
1370			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
1371			index = $.inArray( id, describedby );
1372
1373		if ( index !== -1 ) {
1374			describedby.splice( index, 1 );
1375		}
1376
1377		elem.removeData( "ui-tooltip-id" );
1378		describedby = $.trim( describedby.join( " " ) );
1379		if ( describedby ) {
1380			elem.attr( "aria-describedby", describedby );
1381		} else {
1382			elem.removeAttr( "aria-describedby" );
1383		}
1384	},
1385
1386	_create: function() {
1387		this._on( {
1388			mouseover: "open",
1389			focusin: "open"
1390		} );
1391
1392		// IDs of generated tooltips, needed for destroy
1393		this.tooltips = {};
1394
1395		// IDs of parent tooltips where we removed the title attribute
1396		this.parents = {};
1397
1398		// Append the aria-live region so tooltips announce correctly
1399		this.liveRegion = $( "<div>" )
1400			.attr( {
1401				role: "log",
1402				"aria-live": "assertive",
1403				"aria-relevant": "additions"
1404			} )
1405			.appendTo( this.document[ 0 ].body );
1406		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
1407
1408		this.disabledTitles = $( [] );
1409	},
1410
1411	_setOption: function( key, value ) {
1412		var that = this;
1413
1414		this._super( key, value );
1415
1416		if ( key === "content" ) {
1417			$.each( this.tooltips, function( id, tooltipData ) {
1418				that._updateContent( tooltipData.element );
1419			} );
1420		}
1421	},
1422
1423	_setOptionDisabled: function( value ) {
1424		this[ value ? "_disable" : "_enable" ]();
1425	},
1426
1427	_disable: function() {
1428		var that = this;
1429
1430		// Close open tooltips
1431		$.each( this.tooltips, function( id, tooltipData ) {
1432			var event = $.Event( "blur" );
1433			event.target = event.currentTarget = tooltipData.element[ 0 ];
1434			that.close( event, true );
1435		} );
1436
1437		// Remove title attributes to prevent native tooltips
1438		this.disabledTitles = this.disabledTitles.add(
1439			this.element.find( this.options.items ).addBack()
1440				.filter( function() {
1441					var element = $( this );
1442					if ( element.is( "[title]" ) ) {
1443						return element
1444							.data( "ui-tooltip-title", element.attr( "title" ) )
1445							.removeAttr( "title" );
1446					}
1447				} )
1448		);
1449	},
1450
1451	_enable: function() {
1452
1453		// restore title attributes
1454		this.disabledTitles.each( function() {
1455			var element = $( this );
1456			if ( element.data( "ui-tooltip-title" ) ) {
1457				element.attr( "title", element.data( "ui-tooltip-title" ) );
1458			}
1459		} );
1460		this.disabledTitles = $( [] );
1461	},
1462
1463	open: function( event ) {
1464		var that = this,
1465			target = $( event ? event.target : this.element )
1466
1467				// we need closest here due to mouseover bubbling,
1468				// but always pointing at the same event target
1469				.closest( this.options.items );
1470
1471		// No element to show a tooltip for or the tooltip is already open
1472		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
1473			return;
1474		}
1475
1476		if ( target.attr( "title" ) ) {
1477			target.data( "ui-tooltip-title", target.attr( "title" ) );
1478		}
1479
1480		target.data( "ui-tooltip-open", true );
1481
1482		// Kill parent tooltips, custom or native, for hover
1483		if ( event && event.type === "mouseover" ) {
1484			target.parents().each( function() {
1485				var parent = $( this ),
1486					blurEvent;
1487				if ( parent.data( "ui-tooltip-open" ) ) {
1488					blurEvent = $.Event( "blur" );
1489					blurEvent.target = blurEvent.currentTarget = this;
1490					that.close( blurEvent, true );
1491				}
1492				if ( parent.attr( "title" ) ) {
1493					parent.uniqueId();
1494					that.parents[ this.id ] = {
1495						element: this,
1496						title: parent.attr( "title" )
1497					};
1498					parent.attr( "title", "" );
1499				}
1500			} );
1501		}
1502
1503		this._registerCloseHandlers( event, target );
1504		this._updateContent( target, event );
1505	},
1506
1507	_updateContent: function( target, event ) {
1508		var content,
1509			contentOption = this.options.content,
1510			that = this,
1511			eventType = event ? event.type : null;
1512
1513		if ( typeof contentOption === "string" || contentOption.nodeType ||
1514				contentOption.jquery ) {
1515			return this._open( event, target, contentOption );
1516		}
1517
1518		content = contentOption.call( target[ 0 ], function( response ) {
1519
1520			// IE may instantly serve a cached response for ajax requests
1521			// delay this call to _open so the other call to _open runs first
1522			that._delay( function() {
1523
1524				// Ignore async response if tooltip was closed already
1525				if ( !target.data( "ui-tooltip-open" ) ) {
1526					return;
1527				}
1528
1529				// JQuery creates a special event for focusin when it doesn't
1530				// exist natively. To improve performance, the native event
1531				// object is reused and the type is changed. Therefore, we can't
1532				// rely on the type being correct after the event finished
1533				// bubbling, so we set it back to the previous value. (#8740)
1534				if ( event ) {
1535					event.type = eventType;
1536				}
1537				this._open( event, target, response );
1538			} );
1539		} );
1540		if ( content ) {
1541			this._open( event, target, content );
1542		}
1543	},
1544
1545	_open: function( event, target, content ) {
1546		var tooltipData, tooltip, delayedShow, a11yContent,
1547			positionOption = $.extend( {}, this.options.position );
1548
1549		if ( !content ) {
1550			return;
1551		}
1552
1553		// Content can be updated multiple times. If the tooltip already
1554		// exists, then just update the content and bail.
1555		tooltipData = this._find( target );
1556		if ( tooltipData ) {
1557			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
1558			return;
1559		}
1560
1561		// If we have a title, clear it to prevent the native tooltip
1562		// we have to check first to avoid defining a title if none exists
1563		// (we don't want to cause an element to start matching [title])
1564		//
1565		// We use removeAttr only for key events, to allow IE to export the correct
1566		// accessible attributes. For mouse events, set to empty string to avoid
1567		// native tooltip showing up (happens only when removing inside mouseover).
1568		if ( target.is( "[title]" ) ) {
1569			if ( event && event.type === "mouseover" ) {
1570				target.attr( "title", "" );
1571			} else {
1572				target.removeAttr( "title" );
1573			}
1574		}
1575
1576		tooltipData = this._tooltip( target );
1577		tooltip = tooltipData.tooltip;
1578		this._addDescribedBy( target, tooltip.attr( "id" ) );
1579		tooltip.find( ".ui-tooltip-content" ).html( content );
1580
1581		// Support: Voiceover on OS X, JAWS on IE <= 9
1582		// JAWS announces deletions even when aria-relevant="additions"
1583		// Voiceover will sometimes re-read the entire log region's contents from the beginning
1584		this.liveRegion.children().hide();
1585		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
1586		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
1587		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
1588		a11yContent.appendTo( this.liveRegion );
1589
1590		function position( event ) {
1591			positionOption.of = event;
1592			if ( tooltip.is( ":hidden" ) ) {
1593				return;
1594			}
1595			tooltip.position( positionOption );
1596		}
1597		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
1598			this._on( this.document, {
1599				mousemove: position
1600			} );
1601
1602			// trigger once to override element-relative positioning
1603			position( event );
1604		} else {
1605			tooltip.position( $.extend( {
1606				of: target
1607			}, this.options.position ) );
1608		}
1609
1610		tooltip.hide();
1611
1612		this._show( tooltip, this.options.show );
1613
1614		// Handle tracking tooltips that are shown with a delay (#8644). As soon
1615		// as the tooltip is visible, position the tooltip using the most recent
1616		// event.
1617		// Adds the check to add the timers only when both delay and track options are set (#14682)
1618		if ( this.options.track && this.options.show && this.options.show.delay ) {
1619			delayedShow = this.delayedShow = setInterval( function() {
1620				if ( tooltip.is( ":visible" ) ) {
1621					position( positionOption.of );
1622					clearInterval( delayedShow );
1623				}
1624			}, $.fx.interval );
1625		}
1626
1627		this._trigger( "open", event, { tooltip: tooltip } );
1628	},
1629
1630	_registerCloseHandlers: function( event, target ) {
1631		var events = {
1632			keyup: function( event ) {
1633				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
1634					var fakeEvent = $.Event( event );
1635					fakeEvent.currentTarget = target[ 0 ];
1636					this.close( fakeEvent, true );
1637				}
1638			}
1639		};
1640
1641		// Only bind remove handler for delegated targets. Non-delegated
1642		// tooltips will handle this in destroy.
1643		if ( target[ 0 ] !== this.element[ 0 ] ) {
1644			events.remove = function() {
1645				this._removeTooltip( this._find( target ).tooltip );
1646			};
1647		}
1648
1649		if ( !event || event.type === "mouseover" ) {
1650			events.mouseleave = "close";
1651		}
1652		if ( !event || event.type === "focusin" ) {
1653			events.focusout = "close";
1654		}
1655		this._on( true, target, events );
1656	},
1657
1658	close: function( event ) {
1659		var tooltip,
1660			that = this,
1661			target = $( event ? event.currentTarget : this.element ),
1662			tooltipData = this._find( target );
1663
1664		// The tooltip may already be closed
1665		if ( !tooltipData ) {
1666
1667			// We set ui-tooltip-open immediately upon open (in open()), but only set the
1668			// additional data once there's actually content to show (in _open()). So even if the
1669			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
1670			// the period between open() and _open().
1671			target.removeData( "ui-tooltip-open" );
1672			return;
1673		}
1674
1675		tooltip = tooltipData.tooltip;
1676
1677		// Disabling closes the tooltip, so we need to track when we're closing
1678		// to avoid an infinite loop in case the tooltip becomes disabled on close
1679		if ( tooltipData.closing ) {
1680			return;
1681		}
1682
1683		// Clear the interval for delayed tracking tooltips
1684		clearInterval( this.delayedShow );
1685
1686		// Only set title if we had one before (see comment in _open())
1687		// If the title attribute has changed since open(), don't restore
1688		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
1689			target.attr( "title", target.data( "ui-tooltip-title" ) );
1690		}
1691
1692		this._removeDescribedBy( target );
1693
1694		tooltipData.hiding = true;
1695		tooltip.stop( true );
1696		this._hide( tooltip, this.options.hide, function() {
1697			that._removeTooltip( $( this ) );
1698		} );
1699
1700		target.removeData( "ui-tooltip-open" );
1701		this._off( target, "mouseleave focusout keyup" );
1702
1703		// Remove 'remove' binding only on delegated targets
1704		if ( target[ 0 ] !== this.element[ 0 ] ) {
1705			this._off( target, "remove" );
1706		}
1707		this._off( this.document, "mousemove" );
1708
1709		if ( event && event.type === "mouseleave" ) {
1710			$.each( this.parents, function( id, parent ) {
1711				$( parent.element ).attr( "title", parent.title );
1712				delete that.parents[ id ];
1713			} );
1714		}
1715
1716		tooltipData.closing = true;
1717		this._trigger( "close", event, { tooltip: tooltip } );
1718		if ( !tooltipData.hiding ) {
1719			tooltipData.closing = false;
1720		}
1721	},
1722
1723	_tooltip: function( element ) {
1724	
vendor: 2,166 bytes, lines 1724-1813
1724    var tooltip = $( "<div>" ).attr( "role", "tooltip" ).attr("aria-hidden", "false"),
1725			content = $( "<div>" ).appendTo( tooltip ),
1726			id = tooltip.uniqueId().attr( "id" );
1727
1728		this._addClass( content, "ui-tooltip-content" );
1729		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
1730
1731		tooltip.appendTo( this._appendTo( element ) );
1732
1733		return this.tooltips[ id ] = {
1734			element: element,
1735			tooltip: tooltip
1736		};
1737	},
1738
1739	_find: function( target ) {
1740		var id = target.data( "ui-tooltip-id" );
1741		return id ? this.tooltips[ id ] : null;
1742	},
1743
1744	_removeTooltip: function( tooltip ) {
1745		tooltip.remove();
1746		delete this.tooltips[ tooltip.attr( "id" ) ];
1747	},
1748
1749	_appendTo: function( target ) {
1750		var element = target.closest( ".ui-front, dialog" );
1751
1752		if ( !element.length ) {
1753			element = this.document[ 0 ].body;
1754		}
1755
1756		return element;
1757	},
1758
1759	_destroy: function() {
1760		var that = this;
1761
1762		// Close open tooltips
1763		$.each( this.tooltips, function( id, tooltipData ) {
1764
1765			// Delegate to close method to handle common cleanup
1766			var event = $.Event( "blur" ),
1767				element = tooltipData.element;
1768			event.target = event.currentTarget = element[ 0 ];
1769			that.close( event, true );
1770
1771			// Remove immediately; destroying an open tooltip doesn't use the
1772			// hide animation
1773			$( "#" + id ).remove();
1774
1775			// Restore the title
1776			if ( element.data( "ui-tooltip-title" ) ) {
1777
1778				// If the title attribute has changed since open(), don't restore
1779				if ( !element.attr( "title" ) ) {
1780					element.attr( "title", element.data( "ui-tooltip-title" ) );
1781				}
1782				element.removeData( "ui-tooltip-title" );
1783			}
1784		} );
1785		this.liveRegion.remove();
1786	}
1787} );
1788
1789// DEPRECATED
1790// TODO: Switch return back to widget declaration at top of file when this is removed
1791if ( $.uiBackCompat !== false ) {
1792
1793	// Backcompat for tooltipClass option
1794	$.widget( "ui.tooltip", $.ui.tooltip, {
1795		options: {
1796			tooltipClass: null
1797		},
1798		_tooltip: function() {
1799			var tooltipData = this._superApply( arguments );
1800			if ( this.options.tooltipClass ) {
1801				tooltipData.tooltip.addClass( this.options.tooltipClass );
1802			}
1803			return tooltipData;
1804		}
1805	} );
1806}
1807
1808var widgetsTooltip = $.ui.tooltip;
1809
1810
1811
1812
1813}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.