PageSourceSearch

https://portalgorski.pl/media/jui/js/jquery.ui.core.js?275c86f6b2c014775d3adb098ca3ac1a

js portalgorski.pl collected 2026-09-24 20:53:09 UTC 45,111 bytes, 1,539 lines download raw bytes

vendor: 11,858 bytes, lines 1-433
1/*! jQuery UI - v1.9.2 - 2013-07-14
2* http://jqueryui.com
3* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js
4* Copyright 2013 jQuery Foundation and other contributors Licensed MIT
5*
6* Modified by Joomla: Mitigate possible XSS vulnerability, CVE-2021-41184, https://github.com/jquery/jquery-ui/commit/effa323f1505f2ce7a324e4f429fa9032c72f280
7*/
8
9(function( $, undefined ) {
10
11var uuid = 0,
12	runiqueId = /^ui-id-\d+$/;
13
14// prevent duplicate loading
15// this is only a problem because we proxy existing functions
16// and we don't want to double proxy them
17$.ui = $.ui || {};
18if ( $.ui.version ) {
19	return;
20}
21
22$.extend( $.ui, {
23	version: "1.9.2",
24
25	keyCode: {
26		BACKSPACE: 8,
27		COMMA: 188,
28		DELETE: 46,
29		DOWN: 40,
30		END: 35,
31		ENTER: 13,
32		ESCAPE: 27,
33		HOME: 36,
34		LEFT: 37,
35		NUMPAD_ADD: 107,
36		NUMPAD_DECIMAL: 110,
37		NUMPAD_DIVIDE: 111,
38		NUMPAD_ENTER: 108,
39		NUMPAD_MULTIPLY: 106,
40		NUMPAD_SUBTRACT: 109,
41		PAGE_DOWN: 34,
42		PAGE_UP: 33,
43		PERIOD: 190,
44		RIGHT: 39,
45		SPACE: 32,
46		TAB: 9,
47		UP: 38
48	}
49});
50
51// plugins
52$.fn.extend({
53	_focus: $.fn.focus,
54	focus: function( delay, fn ) {
55		return typeof delay === "number" ?
56			this.each(function() {
57				var elem = this;
58				setTimeout(function() {
59					$( elem ).focus();
60					if ( fn ) {
61						fn.call( elem );
62					}
63				}, delay );
64			}) :
65			this._focus.apply( this, arguments );
66	},
67
68	scrollParent: function() {
69		var scrollParent;
70		if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
71			scrollParent = this.parents().filter(function() {
72				return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
73			}).eq(0);
74		} else {
75			scrollParent = this.parents().filter(function() {
76				return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
77			}).eq(0);
78		}
79
80		return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
81	},
82
83	zIndex: function( zIndex ) {
84		if ( zIndex !== undefined ) {
85			return this.css( "zIndex", zIndex );
86		}
87
88		if ( this.length ) {
89			var elem = $( this[ 0 ] ), position, value;
90			while ( elem.length && elem[ 0 ] !== document ) {
91				// Ignore z-index if position is set to a value where z-index is ignored by the browser
92				// This makes behavior of this function consistent across browsers
93				// WebKit always returns auto if the element is positioned
94				position = elem.css( "position" );
95				if ( position === "absolute" || position === "relative" || position === "fixed" ) {
96					// IE returns 0 when zIndex is not specified
97					// other browsers return a string
98					// we ignore the case of nested elements with an explicit value of 0
99					// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
100					value = parseInt( elem.css( "zIndex" ), 10 );
101					if ( !isNaN( value ) && value !== 0 ) {
102						return value;
103					}
104				}
105				elem = elem.parent();
106			}
107		}
108
109		return 0;
110	},
111
112	uniqueId: function() {
113		return this.each(function() {
114			if ( !this.id ) {
115				this.id = "ui-id-" + (++uuid);
116			}
117		});
118	},
119
120	removeUniqueId: function() {
121		return this.each(function() {
122			if ( runiqueId.test( this.id ) ) {
123				$( this ).removeAttr( "id" );
124			}
125		});
126	}
127});
128
129// selectors
130function focusable( element, isTabIndexNotNaN ) {
131	var map, mapName, img,
132		nodeName = element.nodeName.toLowerCase();
133	if ( "area" === nodeName ) {
134		map = element.parentNode;
135		mapName = map.name;
136		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
137			return false;
138		}
139		img = $( "img[usemap=#" + mapName + "]" )[0];
140		return !!img && visible( img );
141	}
142	return ( /input|select|textarea|button|object/.test( nodeName ) ?
143		!element.disabled :
144		"a" === nodeName ?
145			element.href || isTabIndexNotNaN :
146			isTabIndexNotNaN) &&
147		// the element and all of its ancestors must be visible
148		visible( element );
149}
150
151function visible( element ) {
152	return $.expr.filters.visible( element ) &&
153		!$( element ).parents().andSelf().filter(function() {
154			return $.css( this, "visibility" ) === "hidden";
155		}).length;
156}
157
158$.extend( $.expr[ ":" ], {
159	data: $.expr.createPseudo ?
160		$.expr.createPseudo(function( dataName ) {
161			return function( elem ) {
162				return !!$.data( elem, dataName );
163			};
164		}) :
165		// support: jQuery <1.8
166		function( elem, i, match ) {
167			return !!$.data( elem, match[ 3 ] );
168		},
169
170	focusable: function( element ) {
171		return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
172	},
173
174	tabbable: function( element ) {
175		var tabIndex = $.attr( element, "tabindex" ),
176			isTabIndexNaN = isNaN( tabIndex );
177		return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
178	}
179});
180
181// support
182$(function() {
183	var body = document.body,
184		div = body.appendChild( div = document.createElement( "div" ) );
185
186	// access offsetHeight before setting the style to prevent a layout bug
187	// in IE 9 which causes the element to continue to take up space even
188	// after it is removed from the DOM (#8026)
189	div.offsetHeight;
190
191	$.extend( div.style, {
192		minHeight: "100px",
193		height: "auto",
194		padding: 0,
195		borderWidth: 0
196	});
197
198	$.support.minHeight = div.offsetHeight === 100;
199	$.support.selectstart = "onselectstart" in div;
200
201	// set display to none to avoid a layout bug in IE
202	// http://dev.jquery.com/ticket/4014
203	body.removeChild( div ).style.display = "none";
204});
205
206// support: jQuery <1.8
207if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
208	$.each( [ "Width", "Height" ], function( i, name ) {
209		var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
210			type = name.toLowerCase(),
211			orig = {
212				innerWidth: $.fn.innerWidth,
213				innerHeight: $.fn.innerHeight,
214				outerWidth: $.fn.outerWidth,
215				outerHeight: $.fn.outerHeight
216			};
217
218		function reduce( elem, size, border, margin ) {
219			$.each( side, function() {
220				size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
221				if ( border ) {
222					size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
223				}
224				if ( margin ) {
225					size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
226				}
227			});
228			return size;
229		}
230
231		$.fn[ "inner" + name ] = function( size ) {
232			if ( size === undefined ) {
233				return orig[ "inner" + name ].call( this );
234			}
235
236			return this.each(function() {
237				$( this ).css( type, reduce( this, size ) + "px" );
238			});
239		};
240
241		$.fn[ "outer" + name] = function( size, margin ) {
242			if ( typeof size !== "number" ) {
243				return orig[ "outer" + name ].call( this, size );
244			}
245
246			return this.each(function() {
247				$( this).css( type, reduce( this, size, true, margin ) + "px" );
248			});
249		};
250	});
251}
252
253// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
254if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
255	$.fn.removeData = (function( removeData ) {
256		return function( key ) {
257			if ( arguments.length ) {
258				return removeData.call( this, $.camelCase( key ) );
259			} else {
260				return removeData.call( this );
261			}
262		};
263	})( $.fn.removeData );
264}
265
266
267
268
269
270// deprecated
271
272(function() {
273	var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
274	$.ui.ie = uaMatch.length ? true : false;
275	$.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
276})();
277
278$.fn.extend({
279	disableSelection: function() {
280		return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
281			".ui-disableSelection", function( event ) {
282				event.preventDefault();
283			});
284	},
285
286	enableSelection: function() {
287		return this.unbind( ".ui-disableSelection" );
288	}
289});
290
291$.extend( $.ui, {
292	// $.ui.plugin is deprecated.  Use the proxy pattern instead.
293	plugin: {
294		add: function( module, option, set ) {
295			var i,
296				proto = $.ui[ module ].prototype;
297			for ( i in set ) {
298				proto.plugins[ i ] = proto.plugins[ i ] || [];
299				proto.plugins[ i ].push( [ option, set[ i ] ] );
300			}
301		},
302		call: function( instance, name, args ) {
303			var i,
304				set = instance.plugins[ name ];
305			if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
306				return;
307			}
308
309			for ( i = 0; i < set.length; i++ ) {
310				if ( instance.options[ set[ i ][ 0 ] ] ) {
311					set[ i ][ 1 ].apply( instance.element, args );
312				}
313			}
314		}
315	},
316
317	contains: $.contains,
318
319	// only used by resizable
320	hasScroll: function( el, a ) {
321
322		//If overflow is hidden, the element might have extra content, but the user wants to hide it
323		if ( $( el ).css( "overflow" ) === "hidden") {
324			return false;
325		}
326
327		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
328			has = false;
329
330		if ( el[ scroll ] > 0 ) {
331			return true;
332		}
333
334		// TODO: determine which cases actually cause this to happen
335		// if the element doesn't have the scroll set, see if it's possible to
336		// set the scroll
337		el[ scroll ] = 1;
338		has = ( el[ scroll ] > 0 );
339		el[ scroll ] = 0;
340		return has;
341	},
342
343	// these are odd functions, fix the API or move into individual plugins
344	isOverAxis: function( x, reference, size ) {
345		//Determines when x coordinate is over "b" element axis
346		return ( x > reference ) && ( x < ( reference + size ) );
347	},
348	isOver: function( y, x, top, left, height, width ) {
349		//Determines when x, y coordinates is over "b" element
350		return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
351	}
352});
353
354})( jQuery );
355(function( $, undefined ) {
356
357var uuid = 0,
358	slice = Array.prototype.slice,
359	_cleanData = $.cleanData;
360$.cleanData = function( elems ) {
361	for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
362		try {
363			$( elem ).triggerHandler( "remove" );
364		// http://bugs.jquery.com/ticket/8235
365		} catch( e ) {}
366	}
367	_cleanData( elems );
368};
369
370$.widget = function( name, base, prototype ) {
371	var fullName, existingConstructor, constructor, basePrototype,
372		namespace = name.split( "." )[ 0 ];
373
374	name = name.split( "." )[ 1 ];
375	fullName = namespace + "-" + name;
376
377	if ( !prototype ) {
378		prototype = base;
379		base = $.Widget;
380	}
381
382	// create selector for plugin
383	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
384		return !!$.data( elem, fullName );
385	};
386
387	$[ namespace ] = $[ namespace ] || {};
388	existingConstructor = $[ namespace ][ name ];
389	constructor = $[ namespace ][ name ] = function( options, element ) {
390		// allow instantiation without "new" keyword
391		if ( !this._createWidget ) {
392			return new constructor( options, element );
393		}
394
395		// allow instantiation without initializing for simple inheritance
396		// must use "new" keyword (the code above always passes args)
397		if ( arguments.length ) {
398			this._createWidget( options, element );
399		}
400	};
401	// extend with the existing constructor to carry over any static properties
402	$.extend( constructor, existingConstructor, {
403		version: prototype.version,
404		// copy the object used to create the prototype in case we need to
405		// redefine the widget later
406		_proto: $.extend( {}, prototype ),
407		// track widgets that inherit from this widget in case this widget is
408		// redefined after a widget inherits from it
409		_childConstructors: []
410	});
411
412	basePrototype = new base();
413	// we need to make the options hash a property directly on the new instance
414	// otherwise we'll modify the options hash on the prototype that we're
415	// inheriting from
416	basePrototype.options = $.widget.extend( {}, basePrototype.options );
417	$.each( prototype, function( prop, value ) {
418		if ( $.isFunction( value ) ) {
419			prototype[ prop ] = (function() {
420				var _super = function() {
421						return base.prototype[ prop ].apply( this, arguments );
422					},
423					_superApply = function( args ) {
424						return base.prototype[ prop ].apply( this, args );
425					};
426				return function() {
427					var __super = this._super,
428						__superApply = this._superApply,
429						returnValue;
430
431					this._super = _super;
432					this._superApply = _superApply;
433
vendor: 12,147 bytes, lines 434-851
434					returnValue = value.apply( this, arguments );
435
436					this._super = __super;
437					this._superApply = __superApply;
438
439					return returnValue;
440				};
441			})();
442		}
443	});
444	constructor.prototype = $.widget.extend( basePrototype, {
445		// TODO: remove support for widgetEventPrefix
446		// always use the name + a colon as the prefix, e.g., draggable:start
447		// don't prefix for widgets that aren't DOM-based
448		widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
449	}, prototype, {
450		constructor: constructor,
451		namespace: namespace,
452		widgetName: name,
453		// TODO remove widgetBaseClass, see #8155
454		widgetBaseClass: fullName,
455		widgetFullName: fullName
456	});
457
458	// If this widget is being redefined then we need to find all widgets that
459	// are inheriting from it and redefine all of them so that they inherit from
460	// the new version of this widget. We're essentially trying to replace one
461	// level in the prototype chain.
462	if ( existingConstructor ) {
463		$.each( existingConstructor._childConstructors, function( i, child ) {
464			var childPrototype = child.prototype;
465
466			// redefine the child widget using the same prototype that was
467			// originally used, but inherit from the new version of the base
468			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
469		});
470		// remove the list of existing child constructors from the old constructor
471		// so the old child constructors can be garbage collected
472		delete existingConstructor._childConstructors;
473	} else {
474		base._childConstructors.push( constructor );
475	}
476
477	$.widget.bridge( name, constructor );
478};
479
480$.widget.extend = function( target ) {
481	var input = slice.call( arguments, 1 ),
482		inputIndex = 0,
483		inputLength = input.length,
484		key,
485		value;
486	for ( ; inputIndex < inputLength; inputIndex++ ) {
487		for ( key in input[ inputIndex ] ) {
488			value = input[ inputIndex ][ key ];
489			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
490				// Clone objects
491				if ( $.isPlainObject( value ) ) {
492					target[ key ] = $.isPlainObject( target[ key ] ) ?
493						$.widget.extend( {}, target[ key ], value ) :
494						// Don't extend strings, arrays, etc. with objects
495						$.widget.extend( {}, value );
496				// Copy everything else by reference
497				} else {
498					target[ key ] = value;
499				}
500			}
501		}
502	}
503	return target;
504};
505
506$.widget.bridge = function( name, object ) {
507	var fullName = object.prototype.widgetFullName || name;
508	$.fn[ name ] = function( options ) {
509		var isMethodCall = typeof options === "string",
510			args = slice.call( arguments, 1 ),
511			returnValue = this;
512
513		// allow multiple hashes to be passed on init
514		options = !isMethodCall && args.length ?
515			$.widget.extend.apply( null, [ options ].concat(args) ) :
516			options;
517
518		if ( isMethodCall ) {
519			this.each(function() {
520				var methodValue,
521					instance = $.data( this, fullName );
522				if ( !instance ) {
523					return $.error( "cannot call methods on " + name + " prior to initialization; " +
524						"attempted to call method '" + options + "'" );
525				}
526				if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
527					return $.error( "no such method '" + options + "' for " + name + " widget instance" );
528				}
529				methodValue = instance[ options ].apply( instance, args );
530				if ( methodValue !== instance && methodValue !== undefined ) {
531					returnValue = methodValue && methodValue.jquery ?
532						returnValue.pushStack( methodValue.get() ) :
533						methodValue;
534					return false;
535				}
536			});
537		} else {
538			this.each(function() {
539				var instance = $.data( this, fullName );
540				if ( instance ) {
541					instance.option( options || {} )._init();
542				} else {
543					$.data( this, fullName, new object( options, this ) );
544				}
545			});
546		}
547
548		return returnValue;
549	};
550};
551
552$.Widget = function( /* options, element */ ) {};
553$.Widget._childConstructors = [];
554
555$.Widget.prototype = {
556	widgetName: "widget",
557	widgetEventPrefix: "",
558	defaultElement: "<div>",
559	options: {
560		disabled: false,
561
562		// callbacks
563		create: null
564	},
565	_createWidget: function( options, element ) {
566		element = $( element || this.defaultElement || this )[ 0 ];
567		this.element = $( element );
568		this.uuid = uuid++;
569		this.eventNamespace = "." + this.widgetName + this.uuid;
570		this.options = $.widget.extend( {},
571			this.options,
572			this._getCreateOptions(),
573			options );
574
575		this.bindings = $();
576		this.hoverable = $();
577		this.focusable = $();
578
579		if ( element !== this ) {
580			// 1.9 BC for #7810
581			// TODO remove dual storage
582			$.data( element, this.widgetName, this );
583			$.data( element, this.widgetFullName, this );
584			this._on( true, this.element, {
585				remove: function( event ) {
586					if ( event.target === element ) {
587						this.destroy();
588					}
589				}
590			});
591			this.document = $( element.style ?
592				// element within the document
593				element.ownerDocument :
594				// element is window or document
595				element.document || element );
596			this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
597		}
598
599		this._create();
600		this._trigger( "create", null, this._getCreateEventData() );
601		this._init();
602	},
603	_getCreateOptions: $.noop,
604	_getCreateEventData: $.noop,
605	_create: $.noop,
606	_init: $.noop,
607
608	destroy: function() {
609		this._destroy();
610		// we can probably remove the unbind calls in 2.0
611		// all event bindings should go through this._on()
612		this.element
613			.unbind( this.eventNamespace )
614			// 1.9 BC for #7810
615			// TODO remove dual storage
616			.removeData( this.widgetName )
617			.removeData( this.widgetFullName )
618			// support: jquery <1.6.3
619			// http://bugs.jquery.com/ticket/9413
620			.removeData( $.camelCase( this.widgetFullName ) );
621		this.widget()
622			.unbind( this.eventNamespace )
623			.removeAttr( "aria-disabled" )
624			.removeClass(
625				this.widgetFullName + "-disabled " +
626				"ui-state-disabled" );
627
628		// clean up events and states
629		this.bindings.unbind( this.eventNamespace );
630		this.hoverable.removeClass( "ui-state-hover" );
631		this.focusable.removeClass( "ui-state-focus" );
632	},
633	_destroy: $.noop,
634
635	widget: function() {
636		return this.element;
637	},
638
639	option: function( key, value ) {
640		var options = key,
641			parts,
642			curOption,
643			i;
644
645		if ( arguments.length === 0 ) {
646			// don't return a reference to the internal hash
647			return $.widget.extend( {}, this.options );
648		}
649
650		if ( typeof key === "string" ) {
651			// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
652			options = {};
653			parts = key.split( "." );
654			key = parts.shift();
655			if ( parts.length ) {
656				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
657				for ( i = 0; i < parts.length - 1; i++ ) {
658					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
659					curOption = curOption[ parts[ i ] ];
660				}
661				key = parts.pop();
662				if ( value === undefined ) {
663					return curOption[ key ] === undefined ? null : curOption[ key ];
664				}
665				curOption[ key ] = value;
666			} else {
667				if ( value === undefined ) {
668					return this.options[ key ] === undefined ? null : this.options[ key ];
669				}
670				options[ key ] = value;
671			}
672		}
673
674		this._setOptions( options );
675
676		return this;
677	},
678	_setOptions: function( options ) {
679		var key;
680
681		for ( key in options ) {
682			this._setOption( key, options[ key ] );
683		}
684
685		return this;
686	},
687	_setOption: function( key, value ) {
688		this.options[ key ] = value;
689
690		if ( key === "disabled" ) {
691			this.widget()
692				.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
693				.attr( "aria-disabled", value );
694			this.hoverable.removeClass( "ui-state-hover" );
695			this.focusable.removeClass( "ui-state-focus" );
696		}
697
698		return this;
699	},
700
701	enable: function() {
702		return this._setOption( "disabled", false );
703	},
704	disable: function() {
705		return this._setOption( "disabled", true );
706	},
707
708	_on: function( suppressDisabledCheck, element, handlers ) {
709		var delegateElement,
710			instance = this;
711
712		// no suppressDisabledCheck flag, shuffle arguments
713		if ( typeof suppressDisabledCheck !== "boolean" ) {
714			handlers = element;
715			element = suppressDisabledCheck;
716			suppressDisabledCheck = false;
717		}
718
719		// no element argument, shuffle and use this.element
720		if ( !handlers ) {
721			handlers = element;
722			element = this.element;
723			delegateElement = this.widget();
724		} else {
725			// accept selectors, DOM elements
726			element = delegateElement = $( element );
727			this.bindings = this.bindings.add( element );
728		}
729
730		$.each( handlers, function( event, handler ) {
731			function handlerProxy() {
732				// allow widgets to customize the disabled handling
733				// - disabled as an array instead of boolean
734				// - disabled class as method for disabling individual parts
735				if ( !suppressDisabledCheck &&
736						( instance.options.disabled === true ||
737							$( this ).hasClass( "ui-state-disabled" ) ) ) {
738					return;
739				}
740				return ( typeof handler === "string" ? instance[ handler ] : handler )
741					.apply( instance, arguments );
742			}
743
744			// copy the guid so direct unbinding works
745			if ( typeof handler !== "string" ) {
746				handlerProxy.guid = handler.guid =
747					handler.guid || handlerProxy.guid || $.guid++;
748			}
749
750			var match = event.match( /^(\w+)\s*(.*)$/ ),
751				eventName = match[1] + instance.eventNamespace,
752				selector = match[2];
753			if ( selector ) {
754				delegateElement.delegate( selector, eventName, handlerProxy );
755			} else {
756				element.bind( eventName, handlerProxy );
757			}
758		});
759	},
760
761	_off: function( element, eventName ) {
762		eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
763		element.unbind( eventName ).undelegate( eventName );
764	},
765
766	_delay: function( handler, delay ) {
767		function handlerProxy() {
768			return ( typeof handler === "string" ? instance[ handler ] : handler )
769				.apply( instance, arguments );
770		}
771		var instance = this;
772		return setTimeout( handlerProxy, delay || 0 );
773	},
774
775	_hoverable: function( element ) {
776		this.hoverable = this.hoverable.add( element );
777		this._on( element, {
778			mouseenter: function( event ) {
779				$( event.currentTarget ).addClass( "ui-state-hover" );
780			},
781			mouseleave: function( event ) {
782				$( event.currentTarget ).removeClass( "ui-state-hover" );
783			}
784		});
785	},
786
787	_focusable: function( element ) {
788		this.focusable = this.focusable.add( element );
789		this._on( element, {
790			focusin: function( event ) {
791				$( event.currentTarget ).addClass( "ui-state-focus" );
792			},
793			focusout: function( event ) {
794				$( event.currentTarget ).removeClass( "ui-state-focus" );
795			}
796		});
797	},
798
799	_trigger: function( type, event, data ) {
800		var prop, orig,
801			callback = this.options[ type ];
802
803		data = data || {};
804		event = $.Event( event );
805		event.type = ( type === this.widgetEventPrefix ?
806			type :
807			this.widgetEventPrefix + type ).toLowerCase();
808		// the original event may come from any element
809		// so we need to reset the target on the new event
810		event.target = this.element[ 0 ];
811
812		// copy original event properties over to the new event
813		orig = event.originalEvent;
814		if ( orig ) {
815			for ( prop in orig ) {
816				if ( !( prop in event ) ) {
817					event[ prop ] = orig[ prop ];
818				}
819			}
820		}
821
822		this.element.trigger( event, data );
823		return !( $.isFunction( callback ) &&
824			callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
825			event.isDefaultPrevented() );
826	}
827};
828
829$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
830	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
831		if ( typeof options === "string" ) {
832			options = { effect: options };
833		}
834		var hasOptions,
835			effectName = !options ?
836				method :
837				options === true || typeof options === "number" ?
838					defaultEffect :
839					options.effect || defaultEffect;
840		options = options || {};
841		if ( typeof options === "number" ) {
842			options = { duration: options };
843		}
844		hasOptions = !$.isEmptyObject( options );
845		options.complete = callback;
846		if ( options.delay ) {
847			element.delay( options.delay );
848		}
849		if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
850			element[ method ]( options );
851		} else if ( effectName !== method && element[ effectName ] ) {
vendor: 4,170 bytes, lines 852-1006
852			element[ effectName ]( options.duration, options.easing, callback );
853		} else {
854			element.queue(function( next ) {
855				$( this )[ method ]();
856				if ( callback ) {
857					callback.call( element[ 0 ] );
858				}
859				next();
860			});
861		}
862	};
863});
864
865// DEPRECATED
866if ( $.uiBackCompat !== false ) {
867	$.Widget.prototype._getCreateOptions = function() {
868		return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
869	};
870}
871
872})( jQuery );
873(function( $, undefined ) {
874
875var mouseHandled = false;
876$( document ).mouseup( function( e ) {
877	mouseHandled = false;
878});
879
880$.widget("ui.mouse", {
881	version: "1.9.2",
882	options: {
883		cancel: 'input,textarea,button,select,option',
884		distance: 1,
885		delay: 0
886	},
887	_mouseInit: function() {
888		var that = this;
889
890		this.element
891			.bind('mousedown.'+this.widgetName, function(event) {
892				return that._mouseDown(event);
893			})
894			.bind('click.'+this.widgetName, function(event) {
895				if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
896					$.removeData(event.target, that.widgetName + '.preventClickEvent');
897					event.stopImmediatePropagation();
898					return false;
899				}
900			});
901
902		this.started = false;
903	},
904
905	// TODO: make sure destroying one instance of mouse doesn't mess with
906	// other instances of mouse
907	_mouseDestroy: function() {
908		this.element.unbind('.'+this.widgetName);
909		if ( this._mouseMoveDelegate ) {
910			$(document)
911				.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
912				.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
913		}
914	},
915
916	_mouseDown: function(event) {
917		// don't let more than one widget handle mouseStart
918		if( mouseHandled ) { return; }
919
920		// we may have missed mouseup (out of window)
921		(this._mouseStarted && this._mouseUp(event));
922
923		this._mouseDownEvent = event;
924
925		var that = this,
926			btnIsLeft = (event.which === 1),
927			// event.target.nodeName works around a bug in IE 8 with
928			// disabled inputs (#7620)
929			elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
930		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
931			return true;
932		}
933
934		this.mouseDelayMet = !this.options.delay;
935		if (!this.mouseDelayMet) {
936			this._mouseDelayTimer = setTimeout(function() {
937				that.mouseDelayMet = true;
938			}, this.options.delay);
939		}
940
941		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
942			this._mouseStarted = (this._mouseStart(event) !== false);
943			if (!this._mouseStarted) {
944				event.preventDefault();
945				return true;
946			}
947		}
948
949		// Click event may never have fired (Gecko & Opera)
950		if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
951			$.removeData(event.target, this.widgetName + '.preventClickEvent');
952		}
953
954		// these delegates are required to keep context
955		this._mouseMoveDelegate = function(event) {
956			return that._mouseMove(event);
957		};
958		this._mouseUpDelegate = function(event) {
959			return that._mouseUp(event);
960		};
961		$(document)
962			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
963			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
964
965		event.preventDefault();
966
967		mouseHandled = true;
968		return true;
969	},
970
971	_mouseMove: function(event) {
972		// IE mouseup check - mouseup happened when mouse was out of window
973		if ($.ui.ie && !(document.documentMode >= 9) && !event.button) {
974			return this._mouseUp(event);
975		}
976
977		if (this._mouseStarted) {
978			this._mouseDrag(event);
979			return event.preventDefault();
980		}
981
982		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
983			this._mouseStarted =
984				(this._mouseStart(this._mouseDownEvent, event) !== false);
985			(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
986		}
987
988		return !this._mouseStarted;
989	},
990
991	_mouseUp: function(event) {
992		$(document)
993			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
994			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
995
996		if (this._mouseStarted) {
997			this._mouseStarted = false;
998
999			if (event.target === this._mouseDownEvent.target) {
1000				$.data(event.target, this.widgetName + '.preventClickEvent', true);
1001			}
1002
1003			this._mouseStop(event);
1004		}
1005
1006		return false;
1007	},
1008
1009	_mouseDistanceMet: function(event) {
1010		return (Math.max(
1011				Math.abs(this._mouseDownEvent.pageX - event.pageX),
1012				Math.abs(this._mouseDownEvent.pageY - event.pageY)
1013			) >= this.options.distance
1014		);
1015	},
1016
1017	_mouseDelayMet: function(event) {
1018		return this.mouseDelayMet;
1019	},
1020
1021	// These are placeholder methods, to be overriden by extending plugin
1022	_mouseStart: function(event) {},
1023	_mouseDrag: function(event) {},
1024	_mouseStop: function(event) {},
1025	_mouseCapture: function(event) { return true; }
1026});
1027
1028})(jQuery);
1029(function( $, undefined ) {
1030
1031$.ui = $.ui || {};
1032
1033var cachedScrollbarWidth,
1034	max = Math.max,
1035	abs = Math.abs,
1036	round = Math.round,
1037	rhorizontal = /left|center|right/,
1038	rvertical = /top|center|bottom/,
1039	roffset = /[\+\-]\d+%?/,
1040	rposition = /^\w+/,
1041	rpercent = /%$/,
1042	_position = $.fn.position;
1043
1044function getOffsets( offsets, width, height ) {
1045	return [
1046		parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
1047		parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
1048	];
1049}
1050function parseCss( element, property ) {
1051	return parseInt( $.css( element, property ), 10 ) || 0;
1052}
1053
1054$.position = {
1055	scrollbarWidth: function() {
1056		if ( cachedScrollbarWidth !== undefined ) {
1057			return cachedScrollbarWidth;
1058		}
1059		var w1, w2,
1060			div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
1061			innerDiv = div.children()[0];
1062
1063		$( "body" ).append( div );
1064		w1 = innerDiv.offsetWidth;
1065		div.css( "overflow", "scroll" );
1066
1067		w2 = innerDiv.offsetWidth;
1068
1069		if ( w1 === w2 ) {
1070			w2 = div[0].clientWidth;
1071		}
1072
1073		div.remove();
1074
1075		return (cachedScrollbarWidth = w1 - w2);
1076	},
1077	getScrollInfo: function( within ) {
1078		var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
1079			overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
1080			hasOverflowX = overflowX === "scroll" ||
1081				( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
1082			hasOverflowY = overflowY === "scroll" ||
1083				( overflowY === "auto" && within.height < within.element[0].scrollHeight );
1084		return {
1085			width: hasOverflowX ? $.position.scrollbarWidth() : 0,
1086			height: hasOverflowY ? $.position.scrollbarWidth() : 0
1087		};
1088	},
1089	getWithinInfo: function( element ) {
1090		var withinElement = $( element || window ),
1091			isWindow = $.isWindow( withinElement[0] );
1092		return {
1093			element: withinElement,
1094			isWindow: isWindow,
1095			offset: withinElement.offset() || { left: 0, top: 0 },
1096			scrollLeft: withinElement.scrollLeft(),
1097			scrollTop: withinElement.scrollTop(),
1098			width: isWindow ? withinElement.width() : withinElement.outerWidth(),
1099			height: isWindow ? withinElement.height() : withinElement.outerHeight()
1100		};
1101	}
1102};
1103
1104$.fn.position = function( options ) {
1105	if ( !options || !options.of ) {
1106		return _position.apply( this, arguments );
1107	}
1108
1109	// make a copy, we don't want to modify arguments
1110	options = $.extend( {}, options );
1111
1112	var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
1113
1114		// Backport for CVE-2021-41184 - Make sure string options are treated as CSS selectors
1115		target = typeof options.of === "string" ?
1116			$( document ).find( options.of ) :
1117			$( options.of ),
1118
1119		within = $.position.getWithinInfo( options.within ),
1120		scrollInfo = $.position.getScrollInfo( within ),
1121		targetElem = target[0],
1122		collision = ( options.collision || "flip" ).split( " " ),
1123		offsets = {};
1124
1125	if ( targetElem.nodeType === 9 ) {
1126		targetWidth = target.width();
1127		targetHeight = target.height();
1128		targetOffset = { top: 0, left: 0 };
1129	} else if ( $.isWindow( targetElem ) ) {
1130		targetWidth = target.width();
1131		targetHeight = target.height();
1132		targetOffset = { top: target.scrollTop(), left: target.scrollLeft() };
1133	} else if ( targetElem.preventDefault ) {
1134		// force left top to allow flipping
1135		options.at = "left top";
1136		targetWidth = targetHeight = 0;
1137		targetOffset = { top: targetElem.pageY, left: targetElem.pageX };
1138	} else {
1139		targetWidth = target.outerWidth();
1140		targetHeight = target.outerHeight();
1141		targetOffset = target.offset();
1142	}
1143	// clone to reuse original targetOffset later
1144	basePosition = $.extend( {}, targetOffset );
1145
1146	// force my and at to have valid horizontal and vertical positions
1147	// if a value is missing or invalid, it will be converted to center
1148	$.each( [ "my", "at" ], function() {
1149		var pos = ( options[ this ] || "" ).split( " " ),
1150			horizontalOffset,
1151			verticalOffset;
1152
1153		if ( pos.length === 1) {
1154			pos = rhorizontal.test( pos[ 0 ] ) ?
vendor: 12,406 bytes, lines 1155-1539
1155				pos.concat( [ "center" ] ) :
1156				rvertical.test( pos[ 0 ] ) ?
1157					[ "center" ].concat( pos ) :
1158					[ "center", "center" ];
1159		}
1160		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
1161		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
1162
1163		// calculate offsets
1164		horizontalOffset = roffset.exec( pos[ 0 ] );
1165		verticalOffset = roffset.exec( pos[ 1 ] );
1166		offsets[ this ] = [
1167			horizontalOffset ? horizontalOffset[ 0 ] : 0,
1168			verticalOffset ? verticalOffset[ 0 ] : 0
1169		];
1170
1171		// reduce to just the positions without the offsets
1172		options[ this ] = [
1173			rposition.exec( pos[ 0 ] )[ 0 ],
1174			rposition.exec( pos[ 1 ] )[ 0 ]
1175		];
1176	});
1177
1178	// normalize collision option
1179	if ( collision.length === 1 ) {
1180		collision[ 1 ] = collision[ 0 ];
1181	}
1182
1183	if ( options.at[ 0 ] === "right" ) {
1184		basePosition.left += targetWidth;
1185	} else if ( options.at[ 0 ] === "center" ) {
1186		basePosition.left += targetWidth / 2;
1187	}
1188
1189	if ( options.at[ 1 ] === "bottom" ) {
1190		basePosition.top += targetHeight;
1191	} else if ( options.at[ 1 ] === "center" ) {
1192		basePosition.top += targetHeight / 2;
1193	}
1194
1195	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
1196	basePosition.left += atOffset[ 0 ];
1197	basePosition.top += atOffset[ 1 ];
1198
1199	return this.each(function() {
1200		var collisionPosition, using,
1201			elem = $( this ),
1202			elemWidth = elem.outerWidth(),
1203			elemHeight = elem.outerHeight(),
1204			marginLeft = parseCss( this, "marginLeft" ),
1205			marginTop = parseCss( this, "marginTop" ),
1206			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
1207			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
1208			position = $.extend( {}, basePosition ),
1209			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
1210
1211		if ( options.my[ 0 ] === "right" ) {
1212			position.left -= elemWidth;
1213		} else if ( options.my[ 0 ] === "center" ) {
1214			position.left -= elemWidth / 2;
1215		}
1216
1217		if ( options.my[ 1 ] === "bottom" ) {
1218			position.top -= elemHeight;
1219		} else if ( options.my[ 1 ] === "center" ) {
1220			position.top -= elemHeight / 2;
1221		}
1222
1223		position.left += myOffset[ 0 ];
1224		position.top += myOffset[ 1 ];
1225
1226		// if the browser doesn't support fractions, then round for consistent results
1227		if ( !$.support.offsetFractions ) {
1228			position.left = round( position.left );
1229			position.top = round( position.top );
1230		}
1231
1232		collisionPosition = {
1233			marginLeft: marginLeft,
1234			marginTop: marginTop
1235		};
1236
1237		$.each( [ "left", "top" ], function( i, dir ) {
1238			if ( $.ui.position[ collision[ i ] ] ) {
1239				$.ui.position[ collision[ i ] ][ dir ]( position, {
1240					targetWidth: targetWidth,
1241					targetHeight: targetHeight,
1242					elemWidth: elemWidth,
1243					elemHeight: elemHeight,
1244					collisionPosition: collisionPosition,
1245					collisionWidth: collisionWidth,
1246					collisionHeight: collisionHeight,
1247					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
1248					my: options.my,
1249					at: options.at,
1250					within: within,
1251					elem : elem
1252				});
1253			}
1254		});
1255
1256		if ( $.fn.bgiframe ) {
1257			elem.bgiframe();
1258		}
1259
1260		if ( options.using ) {
1261			// adds feedback as second argument to using callback, if present
1262			using = function( props ) {
1263				var left = targetOffset.left - position.left,
1264					right = left + targetWidth - elemWidth,
1265					top = targetOffset.top - position.top,
1266					bottom = top + targetHeight - elemHeight,
1267					feedback = {
1268						target: {
1269							element: target,
1270							left: targetOffset.left,
1271							top: targetOffset.top,
1272							width: targetWidth,
1273							height: targetHeight
1274						},
1275						element: {
1276							element: elem,
1277							left: position.left,
1278							top: position.top,
1279							width: elemWidth,
1280							height: elemHeight
1281						},
1282						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1283						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1284					};
1285				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1286					feedback.horizontal = "center";
1287				}
1288				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1289					feedback.vertical = "middle";
1290				}
1291				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1292					feedback.important = "horizontal";
1293				} else {
1294					feedback.important = "vertical";
1295				}
1296				options.using.call( this, props, feedback );
1297			};
1298		}
1299
1300		elem.offset( $.extend( position, { using: using } ) );
1301	});
1302};
1303
1304$.ui.position = {
1305	fit: {
1306		left: function( position, data ) {
1307			var within = data.within,
1308				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1309				outerWidth = within.width,
1310				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1311				overLeft = withinOffset - collisionPosLeft,
1312				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1313				newOverRight;
1314
1315			// element is wider than within
1316			if ( data.collisionWidth > outerWidth ) {
1317				// element is initially over the left side of within
1318				if ( overLeft > 0 && overRight <= 0 ) {
1319					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
1320					position.left += overLeft - newOverRight;
1321				// element is initially over right side of within
1322				} else if ( overRight > 0 && overLeft <= 0 ) {
1323					position.left = withinOffset;
1324				// element is initially over both left and right sides of within
1325				} else {
1326					if ( overLeft > overRight ) {
1327						position.left = withinOffset + outerWidth - data.collisionWidth;
1328					} else {
1329						position.left = withinOffset;
1330					}
1331				}
1332			// too far left -> align with left edge
1333			} else if ( overLeft > 0 ) {
1334				position.left += overLeft;
1335			// too far right -> align with right edge
1336			} else if ( overRight > 0 ) {
1337				position.left -= overRight;
1338			// adjust based on position and margin
1339			} else {
1340				position.left = max( position.left - collisionPosLeft, position.left );
1341			}
1342		},
1343		top: function( position, data ) {
1344			var within = data.within,
1345				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1346				outerHeight = data.within.height,
1347				collisionPosTop = position.top - data.collisionPosition.marginTop,
1348				overTop = withinOffset - collisionPosTop,
1349				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1350				newOverBottom;
1351
1352			// element is taller than within
1353			if ( data.collisionHeight > outerHeight ) {
1354				// element is initially over the top of within
1355				if ( overTop > 0 && overBottom <= 0 ) {
1356					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
1357					position.top += overTop - newOverBottom;
1358				// element is initially over bottom of within
1359				} else if ( overBottom > 0 && overTop <= 0 ) {
1360					position.top = withinOffset;
1361				// element is initially over both top and bottom of within
1362				} else {
1363					if ( overTop > overBottom ) {
1364						position.top = withinOffset + outerHeight - data.collisionHeight;
1365					} else {
1366						position.top = withinOffset;
1367					}
1368				}
1369			// too far up -> align with top
1370			} else if ( overTop > 0 ) {
1371				position.top += overTop;
1372			// too far down -> align with bottom edge
1373			} else if ( overBottom > 0 ) {
1374				position.top -= overBottom;
1375			// adjust based on position and margin
1376			} else {
1377				position.top = max( position.top - collisionPosTop, position.top );
1378			}
1379		}
1380	},
1381	flip: {
1382		left: function( position, data ) {
1383			var within = data.within,
1384				withinOffset = within.offset.left + within.scrollLeft,
1385				outerWidth = within.width,
1386				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1387				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1388				overLeft = collisionPosLeft - offsetLeft,
1389				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1390				myOffset = data.my[ 0 ] === "left" ?
1391					-data.elemWidth :
1392					data.my[ 0 ] === "right" ?
1393						data.elemWidth :
1394						0,
1395				atOffset = data.at[ 0 ] === "left" ?
1396					data.targetWidth :
1397					data.at[ 0 ] === "right" ?
1398						-data.targetWidth :
1399						0,
1400				offset = -2 * data.offset[ 0 ],
1401				newOverRight,
1402				newOverLeft;
1403
1404			if ( overLeft < 0 ) {
1405				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
1406				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1407					position.left += myOffset + atOffset + offset;
1408				}
1409			}
1410			else if ( overRight > 0 ) {
1411				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
1412				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1413					position.left += myOffset + atOffset + offset;
1414				}
1415			}
1416		},
1417		top: function( position, data ) {
1418			var within = data.within,
1419				withinOffset = within.offset.top + within.scrollTop,
1420				outerHeight = within.height,
1421				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1422				collisionPosTop = position.top - data.collisionPosition.marginTop,
1423				overTop = collisionPosTop - offsetTop,
1424				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1425				top = data.my[ 1 ] === "top",
1426				myOffset = top ?
1427					-data.elemHeight :
1428					data.my[ 1 ] === "bottom" ?
1429						data.elemHeight :
1430						0,
1431				atOffset = data.at[ 1 ] === "top" ?
1432					data.targetHeight :
1433					data.at[ 1 ] === "bottom" ?
1434						-data.targetHeight :
1435						0,
1436				offset = -2 * data.offset[ 1 ],
1437				newOverTop,
1438				newOverBottom;
1439			if ( overTop < 0 ) {
1440				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
1441				if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
1442					position.top += myOffset + atOffset + offset;
1443				}
1444			}
1445			else if ( overBottom > 0 ) {
1446				newOverTop = position.top -  data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
1447				if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
1448					position.top += myOffset + atOffset + offset;
1449				}
1450			}
1451		}
1452	},
1453	flipfit: {
1454		left: function() {
1455			$.ui.position.flip.left.apply( this, arguments );
1456			$.ui.position.fit.left.apply( this, arguments );
1457		},
1458		top: function() {
1459			$.ui.position.flip.top.apply( this, arguments );
1460			$.ui.position.fit.top.apply( this, arguments );
1461		}
1462	}
1463};
1464
1465// fraction support test
1466(function () {
1467	var testElement, testElementParent, testElementStyle, offsetLeft, i,
1468		body = document.getElementsByTagName( "body" )[ 0 ],
1469		div = document.createElement( "div" );
1470
1471	//Create a "fake body" for testing based on method used in jQuery.support
1472	testElement = document.createElement( body ? "div" : "body" );
1473	testElementStyle = {
1474		visibility: "hidden",
1475		width: 0,
1476		height: 0,
1477		border: 0,
1478		margin: 0,
1479		background: "none"
1480	};
1481	if ( body ) {
1482		$.extend( testElementStyle, {
1483			position: "absolute",
1484			left: "-1000px",
1485			top: "-1000px"
1486		});
1487	}
1488	for ( i in testElementStyle ) {
1489		testElement.style[ i ] = testElementStyle[ i ];
1490	}
1491	testElement.appendChild( div );
1492	testElementParent = body || document.documentElement;
1493	testElementParent.insertBefore( testElement, testElementParent.firstChild );
1494
1495	div.style.cssText = "position: absolute; left: 10.7432222px;";
1496
1497	offsetLeft = $( div ).offset().left;
1498	$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
1499
1500	testElement.innerHTML = "";
1501	testElementParent.removeChild( testElement );
1502})();
1503
1504// DEPRECATED
1505if ( $.uiBackCompat !== false ) {
1506	// offset option
1507	(function( $ ) {
1508		var _position = $.fn.position;
1509		$.fn.position = function( options ) {
1510			if ( !options || !options.offset ) {
1511				return _position.call( this, options );
1512			}
1513			var offset = options.offset.split( " " ),
1514				at = options.at.split( " " );
1515			if ( offset.length === 1 ) {
1516				offset[ 1 ] = offset[ 0 ];
1517			}
1518			if ( /^\d/.test( offset[ 0 ] ) ) {
1519				offset[ 0 ] = "+" + offset[ 0 ];
1520			}
1521			if ( /^\d/.test( offset[ 1 ] ) ) {
1522				offset[ 1 ] = "+" + offset[ 1 ];
1523			}
1524			if ( at.length === 1 ) {
1525				if ( /left|center|right/.test( at[ 0 ] ) ) {
1526					at[ 1 ] = "center";
1527				} else {
1528					at[ 1 ] = at[ 0 ];
1529					at[ 0 ] = "center";
1530				}
1531			}
1532			return _position.call( this, $.extend( options, {
1533				at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
1534				offset: undefined
1535			} ) );
1536		};
1537	}( jQuery ) );
1538}
1539}( jQuery ) );

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.