jquery-ui.js 3
jquery-ui.js 3
js
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
/*!
* jQuery UI Core 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
$.extend( $.ui, {
version: "1.11.1",
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
}
});
// plugins
$.fn.extend({
scrollParent: function( includeHidden ) {
var position = this.css( "position" ),
excludeStaticParent = position === "absolute",
overflowRegex = includeHidden ? /(auto|scroll|hidden)/ :
/(auto|scroll)/,
scrollParent = this.parents().filter( function() {
var parent = $( this );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 1/257
8/2/25, 1:46 PM jquery-ui.js
if ( excludeStaticParent && parent.css( "position" ) ===
"static" ) {
return false;
}
return overflowRegex.test( parent.css( "overflow" ) +
parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
}).eq( 0 );
uniqueId: (function() {
var uuid = 0;
return function() {
return this.each(function() {
if ( !this.id ) {
this.id = "ui-id-" + ( ++uuid );
}
});
};
})(),
removeUniqueId: function() {
return this.each(function() {
if ( /^ui-id-\d+$/.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
});
}
});
// selectors
function focusable( element, isTabIndexNotNaN ) {
var map, mapName, img,
nodeName = element.nodeName.toLowerCase();
if ( "area" === nodeName ) {
map = element.parentNode;
mapName = map.name;
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" )
{
return false;
}
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
return !!img && visible( img );
}
return ( /input|select|textarea|button|object/.test( nodeName ) ?
!element.disabled :
"a" === nodeName ?
element.href || isTabIndexNotNaN :
isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
visible( element );
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 2/257
8/2/25, 1:46 PM jquery-ui.js
}) :
// support: jQuery <1.8
function( elem, i, match ) {
return !!$.data( elem, match[ 3 ] );
},
return this.each(function() {
$( this ).css( type, reduce( this, size ) + "px" );
});
};
return this.each(function() {
$( this).css( type, reduce( this, size, true, margin ) +
"px" );
});
};
});
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 3/257
8/2/25, 1:46 PM jquery-ui.js
// support: jQuery <1.8
if ( !$.fn.addBack ) {
$.fn.addBack = function( selector ) {
return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
};
}
// deprecated
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
$.fn.extend({
focus: (function( orig ) {
return function( delay, fn ) {
return typeof delay === "number" ?
this.each(function() {
var elem = this;
setTimeout(function() {
$( elem ).focus();
if ( fn ) {
fn.call( elem );
}
}, delay );
}) :
orig.apply( this, arguments );
};
})( $.fn.focus ),
disableSelection: (function() {
var eventType = "onselectstart" in document.createElement( "div" ) ?
"selectstart" :
"mousedown";
return function() {
return this.bind( eventType + ".ui-disableSelection", function(
event ) {
event.preventDefault();
});
};
})(),
enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
},
if ( this.length ) {
var elem = $( this[ 0 ] ), position, value;
while ( elem.length && elem[ 0 ] !== document ) {
// Ignore z-index if position is set to a value where z-
index is ignored by the browser
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 4/257
8/2/25, 1:46 PM jquery-ui.js
// This makes behavior of this function consistent across
browsers
// WebKit always returns auto if the element is
positioned
position = elem.css( "position" );
if ( position === "absolute" || position === "relative"
|| position === "fixed" ) {
// IE returns 0 when zIndex is not specified
// other browsers return a string
// we ignore the case of nested elements with an
explicit value of 0
// <div style="z-index: -10;"><div style="z-
index: 0;"></div></div>
value = parseInt( elem.css( "zIndex" ), 10 );
if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
elem = elem.parent();
}
}
return 0;
}
});
if ( !set ) {
return;
}
/*!
* jQuery UI Widget 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 5/257
8/2/25, 1:46 PM jquery-ui.js
var widget_uuid = 0,
widget_slice = Array.prototype.slice;
// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
}
orig( elems );
};
})( $.cleanData );
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 6/257
8/2/25, 1:46 PM jquery-ui.js
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( !$.isFunction( value ) ) {
proxiedPrototype[ prop ] = value;
return;
}
proxiedPrototype[ prop ] = (function() {
var _super = function() {
return base.prototype[ prop ].apply( this,
arguments );
},
_superApply = function( args ) {
return base.prototype[ prop ].apply( this, args
);
};
return function() {
var __super = this._super,
__superApply = this._superApply,
returnValue;
this._super = _super;
this._superApply = _superApply;
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
})();
});
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix
|| name) : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
});
// If this widget is being redefined then we need to find all widgets that
// are inheriting from it and redefine all of them so that they inherit from
// the new version of this widget. We're essentially trying to replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." +
childPrototype.widgetName, constructor, child._proto );
});
// remove the list of existing child constructors from the old
constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 7/257
8/2/25, 1:46 PM jquery-ui.js
$.widget.bridge( name, constructor );
return constructor;
};
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
if ( options === "instance" ) {
returnValue = instance;
return false;
}
if ( !instance ) {
return $.error( "cannot call methods on " + name
+ " prior to initialization; " +
"attempted to call method '" + options +
"'" );
}
if ( !$.isFunction( instance[options] ) ||
options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "'
for " + name + " widget instance" );
}
methodValue = instance[ options ].apply( instance, args
);
if ( methodValue !== instance && methodValue !==
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 8/257
8/2/25, 1:46 PM jquery-ui.js
undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get()
) :
methodValue;
return false;
}
});
} else {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} );
if ( instance._init ) {
instance._init();
}
} else {
$.data( this, fullName, new object( options, this
) );
}
});
}
return returnValue;
};
};
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
// callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this.bindings = $();
this.hoverable = $();
this.focusable = $();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 9/257
8/2/25, 1:46 PM jquery-ui.js
this.document[0].parentWindow );
}
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );
widget: function() {
return this.element;
},
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 10/257
8/2/25, 1:46 PM jquery-ui.js
curOption[ key ] = value;
} else {
if ( arguments.length === 1 ) {
return this.options[ key ] === undefined ? null :
this.options[ key ];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
return this;
},
enable: function() {
return this._setOptions({ disabled: false });
},
disable: function() {
return this._setOptions({ disabled: true });
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 11/257
8/2/25, 1:46 PM jquery-ui.js
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 12/257
8/2/25, 1:46 PM jquery-ui.js
},
focusout: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-focus" );
}
});
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 13/257
8/2/25, 1:46 PM jquery-ui.js
next();
});
}
};
});
/*!
* jQuery UI Mouse 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/mouse/
*/
this.element
.bind("mousedown." + this.widgetName, function(event) {
return that._mouseDown(event);
})
.bind("click." + this.widgetName, function(event) {
if (true === $.data(event.target, that.widgetName +
".preventClickEvent")) {
$.removeData(event.target, that.widgetName +
".preventClickEvent");
event.stopImmediatePropagation();
return false;
}
});
this.started = false;
},
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind("." + this.widgetName);
if ( this._mouseMoveDelegate ) {
this.document
.unbind("mousemove." + this.widgetName,
this._mouseMoveDelegate)
.unbind("mouseup." + this.widgetName,
this._mouseUpDelegate);
}
},
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
if ( mouseHandled ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 14/257
8/2/25, 1:46 PM jquery-ui.js
return;
}
this._mouseDownEvent = event;
this.mouseDelayMet = !this.options.delay;
if (!this.mouseDelayMet) {
this._mouseDelayTimer = setTimeout(function() {
that.mouseDelayMet = true;
}, this.options.delay);
}
this.document
.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
event.preventDefault();
mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
!event.button) {
return this._mouseUp(event);
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 15/257
8/2/25, 1:46 PM jquery-ui.js
if (this._mouseStarted) {
this._mouseDrag(event);
return event.preventDefault();
}
return !this._mouseStarted;
},
_mouseUp: function(event) {
this.document
.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate
)
.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
if (this._mouseStarted) {
this._mouseStarted = false;
this._mouseStop(event);
}
mouseHandled = false;
return false;
},
_mouseDistanceMet: function(event) {
return (Math.max(
Math.abs(this._mouseDownEvent.pageX - event.pageX),
Math.abs(this._mouseDownEvent.pageY - event.pageY)
) >= this.options.distance
);
},
/*!
* jQuery UI Position 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/position/
*/
(function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 16/257
8/2/25, 1:46 PM jquery-ui.js
$.position = {
scrollbarWidth: function() {
if ( cachedScrollbarWidth !== undefined ) {
return cachedScrollbarWidth;
}
var w1, w2,
div = $( "<div
style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div
style='height:100px;width:auto;'></div></div>" ),
innerDiv = div.children()[0];
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 17/257
8/2/25, 1:46 PM jquery-ui.js
w1 = innerDiv.offsetWidth;
div.css( "overflow", "scroll" );
w2 = innerDiv.offsetWidth;
if ( w1 === w2 ) {
w2 = div[0].clientWidth;
}
div.remove();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 18/257
8/2/25, 1:46 PM jquery-ui.js
if ( target[0].preventDefault ) {
// force left top to allow flipping
options.at = "left top";
}
targetWidth = dimensions.width;
targetHeight = dimensions.height;
targetOffset = dimensions.offset;
// clone to reuse original targetOffset later
basePosition = $.extend( {}, targetOffset );
if ( pos.length === 1) {
pos = rhorizontal.test( pos[ 0 ] ) ?
pos.concat( [ "center" ] ) :
rvertical.test( pos[ 0 ] ) ?
[ "center" ].concat( pos ) :
[ "center", "center" ];
}
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
// calculate offsets
horizontalOffset = roffset.exec( pos[ 0 ] );
verticalOffset = roffset.exec( pos[ 1 ] );
offsets[ this ] = [
horizontalOffset ? horizontalOffset[ 0 ] : 0,
verticalOffset ? verticalOffset[ 0 ] : 0
];
return this.each(function() {
var collisionPosition, using,
elem = $( this ),
elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(),
marginLeft = parseCss( this, "marginLeft" ),
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 19/257
8/2/25, 1:46 PM jquery-ui.js
marginTop = parseCss( this, "marginTop" ),
collisionWidth = elemWidth + marginLeft + parseCss( this,
"marginRight" ) + scrollInfo.width,
collisionHeight = elemHeight + marginTop + parseCss( this,
"marginBottom" ) + scrollInfo.height,
position = $.extend( {}, basePosition ),
myOffset = getOffsets( offsets.my, elem.outerWidth(),
elem.outerHeight() );
position.left += myOffset[ 0 ];
position.top += myOffset[ 1 ];
collisionPosition = {
marginLeft: marginLeft,
marginTop: marginTop
};
if ( options.using ) {
// adds feedback as second argument to using callback, if present
using = function( props ) {
var left = targetOffset.left - position.left,
right = left + targetWidth - elemWidth,
top = targetOffset.top - position.top,
bottom = top + targetHeight - elemHeight,
feedback = {
target: {
element: target,
left: targetOffset.left,
top: targetOffset.top,
width: targetWidth,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 20/257
8/2/25, 1:46 PM jquery-ui.js
height: targetHeight
},
element: {
element: elem,
left: position.left,
top: position.top,
width: elemWidth,
height: elemHeight
},
horizontal: right < 0 ? "left" : left > 0
? "right" : "center",
vertical: bottom < 0 ? "top" : top > 0 ?
"bottom" : "middle"
};
if ( targetWidth < elemWidth && abs( left + right ) <
targetWidth ) {
feedback.horizontal = "center";
}
if ( targetHeight < elemHeight && abs( top + bottom ) <
targetHeight ) {
feedback.vertical = "middle";
}
if ( max( abs( left ), abs( right ) ) > max( abs( top ),
abs( bottom ) ) ) {
feedback.important = "horizontal";
} else {
feedback.important = "vertical";
}
options.using.call( this, props, feedback );
};
}
$.ui.position = {
fit: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft :
within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left -
data.collisionPosition.marginLeft,
overLeft = withinOffset - collisionPosLeft,
overRight = collisionPosLeft + data.collisionWidth -
outerWidth - withinOffset,
newOverRight;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 21/257
8/2/25, 1:46 PM jquery-ui.js
}
// too far left -> align with left edge
} else if ( overLeft > 0 ) {
position.left += overLeft;
// too far right -> align with right edge
} else if ( overRight > 0 ) {
position.left -= overRight;
// adjust based on position and margin
} else {
position.left = max( position.left - collisionPosLeft,
position.left );
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop :
within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top -
data.collisionPosition.marginTop,
overTop = withinOffset - collisionPosTop,
overBottom = collisionPosTop + data.collisionHeight -
outerHeight - withinOffset,
newOverBottom;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 22/257
8/2/25, 1:46 PM jquery-ui.js
outerWidth - offsetLeft,
myOffset = data.my[ 0 ] === "left" ?
-data.elemWidth :
data.my[ 0 ] === "right" ?
data.elemWidth :
0,
atOffset = data.at[ 0 ] === "left" ?
data.targetWidth :
data.at[ 0 ] === "right" ?
-data.targetWidth :
0,
offset = -2 * data.offset[ 0 ],
newOverRight,
newOverLeft;
if ( overLeft < 0 ) {
newOverRight = position.left + myOffset + atOffset +
offset + data.collisionWidth - outerWidth - withinOffset;
if ( newOverRight < 0 || newOverRight < abs( overLeft ) )
{
position.left += myOffset + atOffset + offset;
}
} else if ( overRight > 0 ) {
newOverLeft = position.left -
data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight )
{
position.left += myOffset + atOffset + offset;
}
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
offsetTop = within.isWindow ? within.scrollTop :
within.offset.top,
collisionPosTop = position.top -
data.collisionPosition.marginTop,
overTop = collisionPosTop - offsetTop,
overBottom = collisionPosTop + data.collisionHeight -
outerHeight - offsetTop,
top = data.my[ 1 ] === "top",
myOffset = top ?
-data.elemHeight :
data.my[ 1 ] === "bottom" ?
data.elemHeight :
0,
atOffset = data.at[ 1 ] === "top" ?
data.targetHeight :
data.at[ 1 ] === "bottom" ?
-data.targetHeight :
0,
offset = -2 * data.offset[ 1 ],
newOverTop,
newOverBottom;
if ( overTop < 0 ) {
newOverBottom = position.top + myOffset + atOffset +
offset + data.collisionHeight - outerHeight - withinOffset;
if ( ( position.top + myOffset + atOffset + offset) >
overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
position.top += myOffset + atOffset + offset;
}
} else if ( overBottom > 0 ) {
newOverTop = position.top -
data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
if ( ( position.top + myOffset + atOffset + offset) >
overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
position.top += myOffset + atOffset + offset;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 23/257
8/2/25, 1:46 PM jquery-ui.js
}
}
}
},
flipfit: {
left: function() {
$.ui.position.flip.left.apply( this, arguments );
$.ui.position.fit.left.apply( this, arguments );
},
top: function() {
$.ui.position.flip.top.apply( this, arguments );
$.ui.position.fit.top.apply( this, arguments );
}
}
};
testElement.innerHTML = "";
testElementParent.removeChild( testElement );
})();
})();
/*!
* jQuery UI Accordion 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/accordion/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 24/257
8/2/25, 1:46 PM jquery-ui.js
*/
// callbacks
activate: null,
beforeActivate: null
},
hideProps: {
borderTopWidth: "hide",
borderBottomWidth: "hide",
paddingTop: "hide",
paddingBottom: "hide",
height: "hide"
},
showProps: {
borderTopWidth: "show",
borderBottomWidth: "show",
paddingTop: "show",
paddingBottom: "show",
height: "show"
},
_create: function() {
var options = this.options;
this.prevShow = this.prevHide = $();
this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
// ARIA
.attr( "role", "tablist" );
this._processPanels();
// handle negative values
if ( options.active < 0 ) {
options.active += this.headers.length;
}
this._refresh();
},
_getCreateEventData: function() {
return {
header: this.active,
panel: !this.active.length ? $() : this.active.next()
};
},
_createIcons: function() {
var icons = this.options.icons;
if ( icons ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 25/257
8/2/25, 1:46 PM jquery-ui.js
$( "<span>" )
.addClass( "ui-accordion-header-icon ui-icon " +
icons.header )
.prependTo( this.headers );
this.active.children( ".ui-accordion-header-icon" )
.removeClass( icons.header )
.addClass( icons.activeHeader );
this.headers.addClass( "ui-accordion-icons" );
}
},
_destroyIcons: function() {
this.headers
.removeClass( "ui-accordion-icons" )
.children( ".ui-accordion-header-icon" )
.remove();
},
_destroy: function() {
var contents;
// clean up headers
this.headers
.removeClass( "ui-accordion-header ui-accordion-header-active ui-
state-default " +
"ui-corner-all ui-state-active ui-state-disabled ui-
corner-top" )
.removeAttr( "role" )
.removeAttr( "aria-expanded" )
.removeAttr( "aria-selected" )
.removeAttr( "aria-controls" )
.removeAttr( "tabIndex" )
.removeUniqueId();
this._destroyIcons();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 26/257
8/2/25, 1:46 PM jquery-ui.js
this._setupEvents( value );
}
switch ( event.keyCode ) {
case keyCode.RIGHT:
case keyCode.DOWN:
toFocus = this.headers[ ( currentIndex + 1 ) % length ];
break;
case keyCode.LEFT:
case keyCode.UP:
toFocus = this.headers[ ( currentIndex - 1 + length ) %
length ];
break;
case keyCode.SPACE:
case keyCode.ENTER:
this._eventHandler( event );
break;
case keyCode.HOME:
toFocus = this.headers[ 0 ];
break;
case keyCode.END:
toFocus = this.headers[ length - 1 ];
break;
}
if ( toFocus ) {
$( event.target ).attr( "tabIndex", -1 );
$( toFocus ).attr( "tabIndex", 0 );
toFocus.focus();
event.preventDefault();
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 27/257
8/2/25, 1:46 PM jquery-ui.js
if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
$( event.currentTarget ).prev().focus();
}
},
refresh: function() {
var options = this.options;
this._processPanels();
this._destroyIcons();
this._refresh();
},
_processPanels: function() {
this.headers = this.element.find( this.options.header )
.addClass( "ui-accordion-header ui-state-default ui-corner-all"
);
this.headers.next()
.addClass( "ui-accordion-content ui-helper-reset ui-widget-
content ui-corner-bottom" )
.filter( ":not(.ui-accordion-content-active)" )
.hide();
},
_refresh: function() {
var maxHeight,
options = this.options,
heightStyle = options.heightStyle,
parent = this.element.parent();
this.headers
.attr( "role", "tab" )
.each(function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 28/257
8/2/25, 1:46 PM jquery-ui.js
var header = $( this ),
headerId = header.uniqueId().attr( "id" ),
panel = header.next(),
panelId = panel.uniqueId().attr( "id" );
header.attr( "aria-controls", panelId );
panel.attr( "aria-labelledby", headerId );
})
.next()
.attr( "role", "tabpanel" );
this.headers
.not( this.active )
.attr({
"aria-selected": "false",
"aria-expanded": "false",
tabIndex: -1
})
.next()
.attr({
"aria-hidden": "true"
})
.hide();
this._createIcons();
this._setupEvents( options.event );
this.headers.each(function() {
maxHeight -= $( this ).outerHeight( true );
});
this.headers.next()
.each(function() {
$( this ).height( Math.max( 0, maxHeight -
$( this ).innerHeight() + $( this
).height() ) );
})
.css( "overflow", "auto" );
} else if ( heightStyle === "auto" ) {
maxHeight = 0;
this.headers.next()
.each(function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 29/257
8/2/25, 1:46 PM jquery-ui.js
maxHeight = Math.max( maxHeight, $( this ).css(
"height", "" ).height() );
})
.height( maxHeight );
}
},
this._eventHandler({
target: active,
currentTarget: active,
preventDefault: $.noop
});
},
event.preventDefault();
if (
// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||
// allow canceling activation
( this._trigger( "beforeActivate", event, eventData ) ===
false ) ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 30/257
8/2/25, 1:46 PM jquery-ui.js
return;
}
// switch classes
// corner classes on the previously active header stay after the
animation
active.removeClass( "ui-accordion-header-active ui-state-active" );
if ( options.icons ) {
active.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.activeHeader )
.addClass( options.icons.header );
}
if ( !clickedIsActive ) {
clicked
.removeClass( "ui-corner-all" )
.addClass( "ui-accordion-header-active ui-state-active
ui-corner-top" );
if ( options.icons ) {
clicked.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.header )
.addClass( options.icons.activeHeader );
}
clicked
.next()
.addClass( "ui-accordion-content-active" );
}
},
if ( this.options.animate ) {
this._animate( toShow, toHide, data );
} else {
toHide.hide();
toShow.show();
this._toggleComplete( data );
}
toHide.attr({
"aria-hidden": "true"
});
toHide.prev().attr( "aria-selected", "false" );
// if we're switching panels, remove the old header from the tab order
// if we're opening from collapsed state, remove the previous header from
the tab order
// if we're collapsing, then keep the collapsing header in the tab order
if ( toShow.length && toHide.length ) {
toHide.prev().attr({
"tabIndex": -1,
"aria-expanded": "false"
});
} else if ( toShow.length ) {
this.headers.filter(function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 31/257
8/2/25, 1:46 PM jquery-ui.js
return $( this ).attr( "tabIndex" ) === 0;
})
.attr( "tabIndex", -1 );
}
toShow
.attr( "aria-hidden", "false" )
.prev()
.attr({
"aria-selected": "true",
tabIndex: 0,
"aria-expanded": "true"
});
},
if ( !toHide.length ) {
return toShow.animate( this.showProps, duration, easing, complete
);
}
if ( !toShow.length ) {
return toHide.animate( this.hideProps, duration, easing, complete
);
}
total = toShow.show().outerHeight();
toHide.animate( this.hideProps, {
duration: duration,
easing: easing,
step: function( now, fx ) {
fx.now = Math.round( now );
}
});
toShow
.hide()
.animate( this.showProps, {
duration: duration,
easing: easing,
complete: complete,
step: function( now, fx ) {
fx.now = Math.round( now );
if ( fx.prop !== "height" ) {
adjust += fx.now;
} else if ( that.options.heightStyle !==
"content" ) {
fx.now = Math.round( total -
toHide.outerHeight() - adjust );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 32/257
8/2/25, 1:46 PM jquery-ui.js
adjust = 0;
}
}
});
},
toHide
.removeClass( "ui-accordion-content-active" )
.prev()
.removeClass( "ui-corner-top" )
.addClass( "ui-corner-all" );
/*!
* jQuery UI Menu 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/menu/
*/
// callbacks
blur: null,
focus: null,
select: null
},
_create: function() {
this.activeMenu = this.element;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 33/257
8/2/25, 1:46 PM jquery-ui.js
.attr({
role: this.options.role,
tabIndex: 0
});
if ( this.options.disabled ) {
this.element
.addClass( "ui-state-disabled" )
.attr( "aria-disabled", "true" );
}
this._on({
// Prevent focus from sticking to links inside menu after
clicking
// them (focus should always stay on UL during navigation).
"mousedown .ui-menu-item": function( event ) {
event.preventDefault();
},
"click .ui-menu-item": function( event ) {
var target = $( event.target );
if ( !this.mouseHandled && target.not( ".ui-state-
disabled" ).length ) {
this.select( event );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 34/257
8/2/25, 1:46 PM jquery-ui.js
if ( !keepActiveItem ) {
this.focus( event, item );
}
},
blur: function( event ) {
this._delay(function() {
if ( !$.contains( this.element[0],
this.document[0].activeElement ) ) {
this.collapseAll( event );
}
});
},
keydown: "_keydown"
});
this.refresh();
_destroy: function() {
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).addBack()
.removeClass( "ui-menu ui-widget ui-widget-content ui-
menu-icons ui-front" )
.removeAttr( "role" )
.removeAttr( "tabIndex" )
.removeAttr( "aria-labelledby" )
.removeAttr( "aria-expanded" )
.removeAttr( "aria-hidden" )
.removeAttr( "aria-disabled" )
.removeUniqueId()
.show();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 35/257
8/2/25, 1:46 PM jquery-ui.js
var match, prev, character, skip, regex,
preventDefault = true;
switch ( event.keyCode ) {
case $.ui.keyCode.PAGE_UP:
this.previousPage( event );
break;
case $.ui.keyCode.PAGE_DOWN:
this.nextPage( event );
break;
case $.ui.keyCode.HOME:
this._move( "first", "first", event );
break;
case $.ui.keyCode.END:
this._move( "last", "last", event );
break;
case $.ui.keyCode.UP:
this.previous( event );
break;
case $.ui.keyCode.DOWN:
this.next( event );
break;
case $.ui.keyCode.LEFT:
this.collapse( event );
break;
case $.ui.keyCode.RIGHT:
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
this.expand( event );
}
break;
case $.ui.keyCode.ENTER:
case $.ui.keyCode.SPACE:
this._activate( event );
break;
case $.ui.keyCode.ESCAPE:
this.collapse( event );
break;
default:
preventDefault = false;
prev = this.previousFilter || "";
character = String.fromCharCode( event.keyCode );
skip = false;
clearTimeout( this.filterTimer );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 36/257
8/2/25, 1:46 PM jquery-ui.js
character = String.fromCharCode( event.keyCode );
regex = new RegExp( "^" + escape( character ), "i" );
match = this.activeMenu.find( this.options.items
).filter(function() {
return regex.test( $( this ).text() );
});
}
if ( match.length ) {
this.focus( event, match );
if ( match.length > 1 ) {
this.previousFilter = character;
this.filterTimer = this._delay(function() {
delete this.previousFilter;
}, 1000 );
} else {
delete this.previousFilter;
}
} else {
delete this.previousFilter;
}
}
if ( preventDefault ) {
event.preventDefault();
}
},
refresh: function() {
var menus, items,
that = this,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
item
.attr( "aria-haspopup", "true" )
.prepend( submenuCarat );
menu.attr( "aria-labelledby", item.attr( "id" ) );
});
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 37/257
8/2/25, 1:46 PM jquery-ui.js
_itemRole: function() {
return {
menu: "menuitem",
listbox: "option"
}[ this.options.role ];
},
this._scrollIntoView( item );
this.active = item.first();
focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-
state-active" );
// Only update aria-activedescendant if there's a role
// otherwise we assume focus is managed elsewhere
if ( this.options.role ) {
this.element.attr( "aria-activedescendant", focused.attr( "id" )
);
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 38/257
8/2/25, 1:46 PM jquery-ui.js
this.active
.parent()
.closest( ".ui-menu-item" )
.addClass( "ui-state-active" );
if ( offset < 0 ) {
this.activeMenu.scrollTop( scroll + offset );
} else if ( offset + itemHeight > elementHeight ) {
this.activeMenu.scrollTop( scroll + offset -
elementHeight + itemHeight );
}
}
},
if ( !this.active ) {
return;
}
this.active.removeClass( "ui-state-focus" );
this.active = null;
// Don't open if already open fixes a Firefox bug that caused a .5 pixel
// shift in the submenu position when mousing over the carat icon
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
return;
}
this.timer = this._delay(function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 39/257
8/2/25, 1:46 PM jquery-ui.js
this._close();
this._open( submenu );
}, this.delay );
},
clearTimeout( this.timer );
this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
.hide()
.attr( "aria-hidden", "true" );
submenu
.show()
.removeAttr( "aria-hidden" )
.attr( "aria-expanded", "true" )
.position( position );
},
this._close( currentMenu );
this.blur( event );
this.activeMenu = currentMenu;
}, this.delay );
},
startMenu
.find( ".ui-menu" )
.hide()
.attr( "aria-hidden", "true" )
.attr( "aria-expanded", "false" )
.end()
.find( ".ui-state-active" ).not( ".ui-state-focus" )
.removeClass( "ui-state-active" );
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 40/257
8/2/25, 1:46 PM jquery-ui.js
},
isFirstItem: function() {
return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
},
isLastItem: function() {
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 41/257
8/2/25, 1:46 PM jquery-ui.js
if ( !this.active ) {
this.next( event );
return;
}
if ( this.isLastItem() ) {
return;
}
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.nextAll( ".ui-menu-item" ).each(function() {
item = $( this );
return item.offset().top - base - height < 0;
});
_hasScroll: function() {
return this.element.outerHeight() < this.element.prop( "scrollHeight" );
},
/*!
* jQuery UI Autocomplete 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 42/257
8/2/25, 1:46 PM jquery-ui.js
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/autocomplete/
*/
$.widget( "ui.autocomplete", {
version: "1.11.1",
defaultElement: "<input>",
options: {
appendTo: null,
autoFocus: false,
delay: 300,
minLength: 1,
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
source: null,
// callbacks
change: null,
close: null,
focus: null,
open: null,
response: null,
search: null,
select: null
},
requestIndex: 0,
pending: 0,
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
// Unfortunately the code for & in keypress is the same as the up arrow,
// so we use the suppressKeyPressRepeat flag to avoid handling keypress
// events when we know the keydown event was used to modify the
// search term. #7799
var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
nodeName = this.element[ 0 ].nodeName.toLowerCase(),
isTextarea = nodeName === "textarea",
isInput = nodeName === "input";
this.isMultiLine =
// Textareas are always multi-line
isTextarea ? true :
// Inputs are always single-line, even if inside a
contentEditable element
// IE also treats inputs as contentEditable
isInput ? false :
// All other element types are determined by whether or not
they're contentEditable
this.element.prop( "isContentEditable" );
this.element
.addClass( "ui-autocomplete-input" )
.attr( "autocomplete", "off" );
this._on( this.element, {
keydown: function( event ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 43/257
8/2/25, 1:46 PM jquery-ui.js
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
suppressInput = true;
suppressKeyPressRepeat = true;
return;
}
suppressKeyPress = false;
suppressInput = false;
suppressKeyPressRepeat = false;
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
suppressKeyPress = true;
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
suppressKeyPress = true;
this._move( "nextPage", event );
break;
case keyCode.UP:
suppressKeyPress = true;
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
suppressKeyPress = true;
this._keyEvent( "next", event );
break;
case keyCode.ENTER:
// when menu is open and has focus
if ( this.menu.active ) {
// #6055 - Opera still allows the
keypress to occur
// which causes forms to submit
suppressKeyPress = true;
event.preventDefault();
this.menu.select( event );
}
break;
case keyCode.TAB:
if ( this.menu.active ) {
this.menu.select( event );
}
break;
case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.close( event );
// Different browsers have different
default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the
whole form
event.preventDefault();
}
break;
default:
suppressKeyPressRepeat = true;
// search timeout should be triggered before the
input value is changed
this._searchTimeout( event );
break;
}
},
keypress: function( event ) {
if ( suppressKeyPress ) {
suppressKeyPress = false;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 44/257
8/2/25, 1:46 PM jquery-ui.js
if ( !this.isMultiLine || this.menu.element.is(
":visible" ) ) {
event.preventDefault();
}
return;
}
if ( suppressKeyPressRepeat ) {
return;
}
clearTimeout( this.searching );
this.close( event );
this._change( event );
}
});
this._initSource();
this.menu = $( "<ul>" )
.addClass( "ui-autocomplete ui-front" )
.appendTo( this._appendTo() )
.menu({
// disable ARIA support, the live region takes care of
that
role: null
})
.hide()
.menu( "instance" );
this._on( this.menu.element, {
mousedown: function( event ) {
// prevent moving focus out of the text field
event.preventDefault();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 45/257
8/2/25, 1:46 PM jquery-ui.js
// IE doesn't prevent moving focus even with
event.preventDefault()
// so we set a flag to know when we should ignore the
blur event
this.cancelBlur = true;
this._delay(function() {
delete this.cancelBlur;
});
this.document.one( "mousemove",
function() {
$( event.target ).trigger(
event.originalEvent );
});
return;
}
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 46/257
8/2/25, 1:46 PM jquery-ui.js
if ( label && $.trim( label ).length ) {
this.liveRegion.children().hide();
$( "<div>" ).text( label ).appendTo(
this.liveRegion );
}
},
menuselect: function( event, ui ) {
var item = ui.item.data( "ui-autocomplete-item" ),
previous = this.previous;
this.close( event );
this.selectedItem = item;
}
});
this.liveRegion = $( "<span>", {
role: "status",
"aria-live": "assertive",
"aria-relevant": "additions"
})
.addClass( "ui-helper-hidden-accessible" )
.appendTo( this.document[ 0 ].body );
_destroy: function() {
clearTimeout( this.searching );
this.element
.removeClass( "ui-autocomplete-input" )
.removeAttr( "autocomplete" );
this.menu.element.remove();
this.liveRegion.remove();
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 47/257
8/2/25, 1:46 PM jquery-ui.js
this._initSource();
}
if ( key === "appendTo" ) {
this.menu.element.appendTo( this._appendTo() );
}
if ( key === "disabled" && value && this.xhr ) {
this.xhr.abort();
}
},
_appendTo: function() {
var element = this.options.appendTo;
if ( element ) {
element = element.jquery || element.nodeType ?
$( element ) :
this.document.find( element ).eq( 0 );
}
if ( !element || !element[ 0 ] ) {
element = this.element.closest( ".ui-front" );
}
if ( !element.length ) {
element = this.document[ 0 ].body;
}
return element;
},
_initSource: function() {
var array, url,
that = this;
if ( $.isArray( this.options.source ) ) {
array = this.options.source;
this.source = function( request, response ) {
response( $.ui.autocomplete.filter( array, request.term )
);
};
} else if ( typeof this.options.source === "string" ) {
url = this.options.source;
this.source = function( request, response ) {
if ( that.xhr ) {
that.xhr.abort();
}
that.xhr = $.ajax({
url: url,
data: request,
dataType: "json",
success: function( data ) {
response( data );
},
error: function() {
response([]);
}
});
};
} else {
this.source = this.options.source;
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 48/257
8/2/25, 1:46 PM jquery-ui.js
menuVisible = this.menu.element.is( ":visible" ),
modifierKey = event.altKey || event.ctrlKey ||
event.metaKey || event.shiftKey;
// always save the actual value, not the one passed as an argument
this.term = this._value();
_response: function() {
var index = ++this.requestIndex;
this.pending--;
if ( !this.pending ) {
this.element.removeClass( "ui-autocomplete-loading" );
}
}, this );
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 49/257
8/2/25, 1:46 PM jquery-ui.js
this.cancelSearch = true;
this._close( event );
},
if ( this.options.autoFocus ) {
this.menu.next();
}
},
_resizeMenu: function() {
var ul = this.menu.element;
ul.outerWidth( Math.max(
// Firefox wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping (#7513)
ul.width( "" ).outerWidth() + 1,
this.element.outerWidth()
) );
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 50/257
8/2/25, 1:46 PM jquery-ui.js
that._renderItemData( ul, item );
});
},
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.menu.blur();
return;
}
this.menu[ direction ]( event );
},
widget: function() {
return this.menu.element;
},
_value: function() {
return this.valueMethod.apply( this.element, arguments );
},
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
},
filter: function( array, term ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
return $.grep( array, function( value ) {
return matcher.test( value.label || value.value || value );
});
}
});
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 51/257
8/2/25, 1:46 PM jquery-ui.js
return amount + ( amount > 1 ? " results are" : " result
is" ) +
" available, use up and down arrow keys to
navigate.";
}
}
},
/*!
* jQuery UI Button 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/button/
*/
var lastActive,
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-
button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
formResetHandler = function() {
var form = $( this );
setTimeout(function() {
form.find( ":ui-button" ).button( "refresh" );
}, 1 );
},
radioGroup = function( radio ) {
var name = radio.name,
form = radio.form,
radios = $( [] );
if ( name ) {
name = name.replace( /'/g, "\\'" );
if ( form ) {
radios = $( form ).find( "[name='" + name + "']
[type=radio]" );
} else {
radios = $( "[name='" + name + "'][type=radio]",
radio.ownerDocument )
.filter(function() {
return !this.form;
});
}
}
return radios;
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 52/257
8/2/25, 1:46 PM jquery-ui.js
$.widget( "ui.button", {
version: "1.11.1",
defaultElement: "<button>",
options: {
disabled: null,
text: true,
label: null,
icons: {
primary: null,
secondary: null
}
},
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
this._determineButtonType();
this.hasTitle = !!this.buttonElement.attr( "title" );
this._hoverable( this.buttonElement );
this.buttonElement
.addClass( baseClasses )
.attr( "role", "button" )
.bind( "mouseenter" + this.eventNamespace, function() {
if ( options.disabled ) {
return;
}
if ( this === lastActive ) {
$( this ).addClass( "ui-state-active" );
}
})
.bind( "mouseleave" + this.eventNamespace, function() {
if ( options.disabled ) {
return;
}
$( this ).removeClass( activeClass );
})
.bind( "click" + this.eventNamespace, function( event ) {
if ( options.disabled ) {
event.preventDefault();
event.stopImmediatePropagation();
}
});
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 53/257
8/2/25, 1:46 PM jquery-ui.js
this.buttonElement.removeClass( "ui-state-focus" );
}
});
if ( toggleButton ) {
this.element.bind( "change" + this.eventNamespace, function() {
that.refresh();
});
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 54/257
8/2/25, 1:46 PM jquery-ui.js
});
if ( this.buttonElement.is("a") ) {
this.buttonElement.keyup(function(event) {
if ( event.keyCode === $.ui.keyCode.SPACE ) {
// TODO pass through original event
correctly (just as 2nd argument doesn't work)
$( this ).click();
}
});
}
}
_determineButtonType: function() {
var ancestor, labelSelector, checked;
if ( this.element.is("[type=checkbox]") ) {
this.type = "checkbox";
} else if ( this.element.is("[type=radio]") ) {
this.type = "radio";
} else if ( this.element.is("input") ) {
this.type = "input";
} else {
this.type = "button";
}
widget: function() {
return this.buttonElement;
},
_destroy: function() {
this.element
.removeClass( "ui-helper-hidden-accessible" );
this.buttonElement
.removeClass( baseClasses + " ui-state-active " + typeClasses )
.removeAttr( "role" )
.removeAttr( "aria-pressed" )
.html( this.buttonElement.find(".ui-button-text").html() );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 55/257
8/2/25, 1:46 PM jquery-ui.js
if ( !this.hasTitle ) {
this.buttonElement.removeAttr( "title" );
}
},
refresh: function() {
//See #8237 & #8828
var isDisabled = this.element.is( "input, button" ) ? this.element.is(
":disabled" ) : this.element.hasClass( "ui-button-disabled" );
_resetButton: function() {
if ( this.type === "input" ) {
if ( this.options.label ) {
this.element.val( this.options.label );
}
return;
}
var buttonElement = this.buttonElement.removeClass( typeClasses ),
buttonText = $( "<span></span>", this.document[0] )
.addClass( "ui-button-text" )
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 56/257
8/2/25, 1:46 PM jquery-ui.js
.html( this.options.label )
.appendTo( buttonElement.empty() )
.text(),
icons = this.options.icons,
multipleIcons = icons.primary && icons.secondary,
buttonClasses = [];
if ( icons.primary || icons.secondary ) {
if ( this.options.text ) {
buttonClasses.push( "ui-button-text-icon" + (
multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
}
if ( icons.primary ) {
buttonElement.prepend( "<span class='ui-button-icon-
primary ui-icon " + icons.primary + "'></span>" );
}
if ( icons.secondary ) {
buttonElement.append( "<span class='ui-button-icon-
secondary ui-icon " + icons.secondary + "'></span>" );
}
if ( !this.options.text ) {
buttonClasses.push( multipleIcons ? "ui-button-icons-
only" : "ui-button-icon-only" );
if ( !this.hasTitle ) {
buttonElement.attr( "title", $.trim( buttonText )
);
}
}
} else {
buttonClasses.push( "ui-button-text-only" );
}
buttonElement.addClass( buttonClasses.join( " " ) );
}
});
$.widget( "ui.buttonset", {
version: "1.11.1",
options: {
items: "button, input[type=button], input[type=submit],
input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
},
_create: function() {
this.element.addClass( "ui-buttonset" );
},
_init: function() {
this.refresh();
},
refresh: function() {
var rtl = this.element.css( "direction" ) === "rtl",
allButtons = this.element.find( this.options.items ),
existingButtons = allButtons.filter( ":ui-button" );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 57/257
8/2/25, 1:46 PM jquery-ui.js
this.buttons = allButtons
.map(function() {
return $( this ).button( "widget" )[ 0 ];
})
.removeClass( "ui-corner-all ui-corner-left ui-corner-
right" )
.filter( ":first" )
.addClass( rtl ? "ui-corner-right" : "ui-corner-
left" )
.end()
.filter( ":last" )
.addClass( rtl ? "ui-corner-left" : "ui-corner-
right" )
.end()
.end();
},
_destroy: function() {
this.element.removeClass( "ui-buttonset" );
this.buttons
.map(function() {
return $( this ).button( "widget" )[ 0 ];
})
.removeClass( "ui-corner-left ui-corner-right" )
.end()
.button( "destroy" );
}
});
/*!
* jQuery UI Datepicker 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/datepicker/
*/
var datepicker_instActive;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 58/257
8/2/25, 1:46 PM jquery-ui.js
if ( !isNaN( value ) && value !== 0 ) {
return value;
}
}
elem = elem.parent();
}
return 0;
}
/* Date picker manager.
Use the singleton instance of this class, $.datepicker, to interact with the date
picker.
Settings for (groups of) date pickers are maintained in an instance object,
allowing multiple different settings on the same page. */
function Datepicker() {
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
this._datepickerShowing = false; // True if the popup picker is showing , false
if not
this._inDialog = false; // True if showing within a "dialog", false if not
this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker
class
this._appendClass = "ui-datepicker-append"; // The name of the append marker
class
this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker
class
this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker
class
this._disableClass = "ui-datepicker-disabled"; // The name of the disabled
covering marker class
this._unselectableClass = "ui-datepicker-unselectable"; // The name of the
unselectable cell marker class
this._currentClass = "ui-datepicker-current-day"; // The name of the current day
marker class
this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover
marker class
this.regional = []; // Available regional settings, indexed by language code
this.regional[""] = { // Default regional settings
closeText: "Done", // Display text for close link
prevText: "Prev", // Display text for previous month link
nextText: "Next", // Display text for next month link
currentText: "Today", // Display text for current month link
monthNames: ["January","February","March","April","May","June",
"July","August","September","October","November","December"], //
Names of months for drop-down and formatting
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"], // For formatting
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday"], // For formatting
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For
formatting
dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for
days starting at Sunday
weekHeader: "Wk", // Column header for week of the year
dateFormat: "mm/dd/yy", // See format options on parseDate
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
isRTL: false, // True if right-to-left language, false if left-to-right
showMonthAfterYear: false, // True if the year select precedes month,
false for month then year
yearSuffix: "" // Additional text to append to the year in the month
headers
};
this._defaults = { // Global defaults for all the date picker instances
showOn: "focus", // "focus" for popup on focus,
// "button" for trigger button, or "both" for either
showAnim: "fadeIn", // Name of jQuery animation for popup
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 59/257
8/2/25, 1:46 PM jquery-ui.js
showOptions: {}, // Options for enhanced animations
defaultDate: null, // Used when field is blank: actual date,
// +/-number for offset from today, null for today
appendText: "", // Display text following the input box, e.g. showing the
format
buttonText: "...", // Text for trigger button
buttonImage: "", // URL for trigger button image
buttonImageOnly: false, // True if the image appears alone, false if it
appears on a button
hideIfNoPrevNext: false, // True to hide next/previous month links
// if not applicable, false to just disable them
navigationAsDateFormat: false, // True if date formatting applied to
prev/today/next links
gotoCurrent: false, // True if today link goes back to current selection
instead
changeMonth: false, // True if month can be selected directly, false if
only prev/next
changeYear: false, // True if year can be selected directly, false if
only prev/next
yearRange: "c-10:c+10", // Range of years to display in drop-down,
// either relative to today's year (-nn:+nn), relative to
currently displayed year
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the
above (nnnn:-n)
showOtherMonths: false, // True to show dates in other months, false to
leave blank
selectOtherMonths: false, // True to allow selection of dates in other
months, false for unselectable
showWeek: false, // True to show week of the year, false to not show it
calculateWeek: this.iso8601Week, // How to calculate the week of the
year,
// takes a Date and returns the number of the week for it
shortYearCutoff: "+10", // Short year values < this are in the current
century,
// > this are in the previous century,
// string value starting with "+" for current year + value
minDate: null, // The earliest selectable date, or null for no limit
maxDate: null, // The latest selectable date, or null for no limit
duration: "fast", // Duration of display/closure
beforeShowDay: null, // Function that takes a date and returns an array
with
// [0] = true if selectable, false if not, [1] = custom CSS class
name(s) or "",
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
beforeShow: null, // Function that takes an input field and
// returns a set of custom settings for the date picker
onSelect: null, // Define a callback function when a date is selected
onChangeMonthYear: null, // Define a callback function when the month or
year is changed
onClose: null, // Define a callback function when the datepicker is
closed
numberOfMonths: 1, // Number of months to show at a time
showCurrentAtPos: 0, // The position in multipe months at which to show
the current month (starting at 0)
stepMonths: 1, // Number of months to step back/forward
stepBigMonths: 12, // Number of months to step back/forward for the big
links
altField: "", // Selector for an alternate field to store selected dates
into
altFormat: "", // The date format to use for the alternate field
constrainInput: true, // The input is constrained by the current date
format
showButtonPanel: false, // True to show button panel, false to not show
it
autoSize: false, // True to size the input for the date format, false to
leave as is
disabled: false // The initial disabled state
};
$.extend(this._defaults, this.regional[""]);
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 60/257
8/2/25, 1:46 PM jquery-ui.js
this.regional.en = $.extend( true, {}, this.regional[ "" ]);
this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-
datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
}
$.extend(Datepicker.prototype, {
/* Class name added to elements to indicate already configured with a date
picker. */
markerClassName: "hasDatepicker",
/* Override the default settings for all instances of the date picker.
* @param settings object - the new settings to use as defaults (anonymous
object)
* @return the manager object
*/
setDefaults: function(settings) {
datepicker_extendRemove(this._defaults, settings || {});
return this;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 61/257
8/2/25, 1:46 PM jquery-ui.js
inst.trigger = $([]);
if (input.hasClass(this.markerClassName)) {
return;
}
this._attachments(input, inst);
input.addClass(this.markerClassName).keydown(this._doKeyDown).
keypress(this._doKeyPress).keyup(this._doKeyUp);
this._autoSize(inst);
$.data(target, "datepicker", inst);
//If disabled option is true, disable the datepicker once it has been
attached to the input (see ticket #5665)
if( inst.settings.disabled ) {
this._disableDatepicker( target );
}
},
if (inst.append) {
inst.append.remove();
}
if (appendText) {
inst.append = $("<span class='" + this._appendClass + "'>" +
appendText + "</span>");
input[isRTL ? "before" : "after"](inst.append);
}
input.unbind("focus", this._showDatepicker);
if (inst.trigger) {
inst.trigger.remove();
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 62/257
8/2/25, 1:46 PM jquery-ui.js
});
}
},
if (dateFormat.match(/[DM]/)) {
findMax = function(names) {
max = 0;
maxI = 0;
for (i = 0; i < names.length; i++) {
if (names[i].length > max) {
max = names[i].length;
maxI = i;
}
}
return maxI;
};
date.setMonth(findMax(this._get(inst,
(dateFormat.match(/MM/) ?
"monthNames" : "monthNamesShort"))));
date.setDate(findMax(this._get(inst,
(dateFormat.match(/DD/) ?
"dayNames" : "dayNamesShort"))) + 20 -
date.getDay());
}
inst.input.attr("size", this._formatDate(inst, date).length);
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 63/257
8/2/25, 1:46 PM jquery-ui.js
* @return the manager object
*/
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
var id, browserWidth, browserHeight, scrollX, scrollY,
inst = this._dialogInst; // internal instance
if (!inst) {
this.uuid += 1;
id = "dp" + this.uuid;
this._dialogInput = $("<input type='text' id='" + id +
"' style='position: absolute; top: -100px; width:
0px;'/>");
this._dialogInput.keydown(this._doKeyDown);
$("body").append(this._dialogInput);
inst = this._dialogInst = this._newInst(this._dialogInput,
false);
inst.settings = {};
$.data(this._dialogInput[0], "datepicker", inst);
}
datepicker_extendRemove(inst.settings, settings || {});
date = (date && date.constructor === Date ? this._formatDate(inst, date)
: date);
this._dialogInput.val(date);
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
$.removeData(target, "datepicker");
if (nodeName === "input") {
inst.append.remove();
inst.trigger.remove();
$target.removeClass(this.markerClassName).
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 64/257
8/2/25, 1:46 PM jquery-ui.js
unbind("focus", this._showDatepicker).
unbind("keydown", this._doKeyDown).
unbind("keypress", this._doKeyPress).
unbind("keyup", this._doKeyUp);
} else if (nodeName === "div" || nodeName === "span") {
$target.removeClass(this.markerClassName).empty();
}
},
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
if (nodeName === "input") {
target.disabled = false;
inst.trigger.filter("button").
each(function() { this.disabled = false; }).end().
filter("img").css({opacity: "1.0", cursor: ""});
} else if (nodeName === "div" || nodeName === "span") {
inline = $target.children("." + this._inlineClass);
inline.children().removeClass("ui-state-disabled");
inline.find("select.ui-datepicker-month, select.ui-datepicker-
year").
prop("disabled", false);
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value === target ? null : value); });
// delete entry
},
if (!$target.hasClass(this.markerClassName)) {
return;
}
nodeName = target.nodeName.toLowerCase();
if (nodeName === "input") {
target.disabled = true;
inst.trigger.filter("button").
each(function() { this.disabled = true; }).end().
filter("img").css({opacity: "0.5", cursor: "default"});
} else if (nodeName === "div" || nodeName === "span") {
inline = $target.children("." + this._inlineClass);
inline.children().addClass("ui-state-disabled");
inline.find("select.ui-datepicker-month, select.ui-datepicker-
year").
prop("disabled", true);
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value === target ? null : value); });
// delete entry
this._disabledInputs[this._disabledInputs.length] = target;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 65/257
8/2/25, 1:46 PM jquery-ui.js
/* Update or retrieve the settings for a date picker attached to an input field
or division.
* @param target element - the target input field or division or span
* @param name object - the new settings to update or
* string - the name of the setting to change or
retrieve,
* when retrieving also "all" for all instance
settings or
* "defaults" for all global defaults
* @param value any - the new value for the setting
* (omit if above is an object or to retrieve a
value)
*/
_optionDatepicker: function(target, name, value) {
var settings, date, minDate, maxDate,
inst = this._getInst(target);
if (inst) {
if (this._curInst === inst) {
this._hideDatepicker();
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 66/257
8/2/25, 1:46 PM jquery-ui.js
datepicker_extendRemove(inst.settings, settings);
// reformat the old minDate/maxDate values if dateFormat changes
and a new minDate/maxDate isn't provided
if (minDate !== null && settings.dateFormat !== undefined &&
settings.minDate === undefined) {
inst.settings.minDate = this._formatDate(inst, minDate);
}
if (maxDate !== null && settings.dateFormat !== undefined &&
settings.maxDate === undefined) {
inst.settings.maxDate = this._formatDate(inst, maxDate);
}
if ( "disabled" in settings ) {
if ( settings.disabled ) {
this._disableDatepicker(target);
} else {
this._enableDatepicker(target);
}
}
this._attachments($(target), inst);
this._autoSize(inst);
this._setDate(inst, date);
this._updateAlternate(inst);
this._updateDatepicker(inst);
}
},
/* Handle keystrokes. */
_doKeyDown: function(event) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 67/257
8/2/25, 1:46 PM jquery-ui.js
var onSelect, dateStr, sel,
inst = $.datepicker._getInst(event.target),
handled = true,
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
inst._keyEvent = true;
if ($.datepicker._datepickerShowing) {
switch (event.keyCode) {
case 9: $.datepicker._hideDatepicker();
handled = false;
break; // hide on tab out
case 13: sel = $("td." + $.datepicker._dayOverClass +
":not(." +
onSelect = $.datepicker._get(inst,
"onSelect");
if (onSelect) {
dateStr =
$.datepicker._formatDate(inst);
$.datepicker._clearDate(event.target);
}
handled = event.ctrlKey || event.metaKey;
break; // clear on ctrl or command +end
case 36: if (event.ctrlKey || event.metaKey) {
$.datepicker._gotoToday(event.target);
}
handled = event.ctrlKey || event.metaKey;
break; // current on ctrl or command
+home
case 37: if (event.ctrlKey || event.metaKey) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 68/257
8/2/25, 1:46 PM jquery-ui.js
handled = event.ctrlKey || event.metaKey;
// -1 day on ctrl or command +left
if (event.originalEvent.altKey) {
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
-$.datepicker._get(inst,
"stepBigMonths") :
-$.datepicker._get(inst,
"stepMonths")), "M");
}
// next month/year on alt +left on Mac
break;
case 38: if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+$.datepicker._get(inst,
"stepBigMonths") :
+$.datepicker._get(inst,
"stepMonths")), "M");
}
// next month/year on alt +right
break;
case 40: if (event.ctrlKey || event.metaKey) {
if (handled) {
event.preventDefault();
event.stopPropagation();
}
},
if ($.datepicker._get(inst, "constrainInput")) {
chars = $.datepicker._possibleChars($.datepicker._get(inst,
"dateFormat"));
chr = String.fromCharCode(event.charCode == null ? event.keyCode
: event.charCode);
return event.ctrlKey || event.metaKey || (chr < " " || !chars ||
chars.indexOf(chr) > -1);
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 69/257
8/2/25, 1:46 PM jquery-ui.js
},
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput
=== input) { // already here
return;
}
inst = $.datepicker._getInst(input);
if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
$.datepicker._curInst.dpDiv.stop(true, true);
if ( inst && $.datepicker._datepickerShowing ) {
$.datepicker._hideDatepicker(
$.datepicker._curInst.input[0] );
}
}
inst.lastVal = null;
$.datepicker._lastInput = input;
$.datepicker._setDateFromField(inst);
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 70/257
8/2/25, 1:46 PM jquery-ui.js
}
if (!$.datepicker._pos) { // position below input
$.datepicker._pos = $.datepicker._findPos(input);
$.datepicker._pos[1] += input.offsetHeight; // add the height
}
isFixed = false;
$(input).parents().each(function() {
isFixed |= $(this).css("position") === "fixed";
return !isFixed;
});
if (!inst.inline) {
showAnim = $.datepicker._get(inst, "showAnim");
duration = $.datepicker._get(inst, "duration");
inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1
);
$.datepicker._datepickerShowing = true;
if ( $.datepicker._shouldFocusInput( inst ) ) {
inst.input.focus();
}
$.datepicker._curInst = inst;
}
},
var origyearshtml,
numMonths = this._getNumberOfMonths(inst),
cols = numMonths[1],
width = 17,
activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
if ( activeCell.length > 0 ) {
datepicker_handleMouseover.apply( activeCell.get( 0 ) );
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 71/257
8/2/25, 1:46 PM jquery-ui.js
if (cols > 1) {
inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width",
(width * cols) + "em");
}
inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove")
+
"Class"]("ui-datepicker-multi");
inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
"Class"]("ui-datepicker-rtl");
return offset;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 72/257
8/2/25, 1:46 PM jquery-ui.js
inst = this._getInst(obj),
isRTL = this._get(inst, "isRTL");
position = $(obj).offset();
return [position.left, position.top];
},
if (this._datepickerShowing) {
showAnim = this._get(inst, "showAnim");
duration = this._get(inst, "duration");
postProcess = function() {
$.datepicker._tidyDialog(inst);
};
if (!showAnim) {
postProcess();
}
this._datepickerShowing = false;
this._lastInput = null;
if (this._inDialog) {
this._dialogInput.css({ position: "absolute", left: "0",
top: "-100px" });
if ($.blockUI) {
$.unblockUI();
$("body").append(this.dpDiv);
}
}
this._inDialog = false;
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 73/257
8/2/25, 1:46 PM jquery-ui.js
calendar");
},
if (this._isDisabledDatepicker(target[0])) {
return;
}
this._adjustInstDate(inst, offset +
(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), //
undo positioning
period);
this._updateDatepicker(inst);
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 74/257
8/2/25, 1:46 PM jquery-ui.js
this._notifyChange(inst);
this._adjustDate(target);
},
if ($(td).hasClass(this._unselectableClass) ||
this._isDisabledDatepicker(target[0])) {
return;
}
inst = this._getInst(target[0]);
inst.selectedDay = inst.currentDay = $("a", td).html();
inst.selectedMonth = inst.currentMonth = month;
inst.selectedYear = inst.currentYear = year;
this._selectDate(id, this._formatDate(inst,
inst.currentDay, inst.currentMonth, inst.currentYear));
},
if (inst.inline){
this._updateDatepicker(inst);
} else {
this._hideDatepicker();
this._lastInput = inst.input[0];
if (typeof(inst.input[0]) !== "object") {
inst.input.focus(); // restore focus
}
this._lastInput = null;
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 75/257
8/2/25, 1:46 PM jquery-ui.js
date = this._getDate(inst);
dateStr = this.formatDate(altFormat, date,
this._getFormatConfig(inst));
$(altField).each(function() { $(this).val(dateStr); });
}
},
/* Set as calculateWeek to determine the week of the year based on the ISO 8601
definition.
* @param date Date - the date to get the week for
* @return number - the number of the week within the year that contains this
date
*/
iso8601Week: function(date) {
var time,
checkDate = new Date(date.getTime());
time = checkDate.getTime();
checkDate.setMonth(0); // Compare with Jan 1
checkDate.setDate(1);
return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 76/257
8/2/25, 1:46 PM jquery-ui.js
new Date().getFullYear() % 100 +
parseInt(shortYearCutoffTemp, 10)),
dayNamesShort = (settings ? settings.dayNamesShort : null) ||
this._defaults.dayNamesShort,
dayNames = (settings ? settings.dayNames : null) ||
this._defaults.dayNames,
monthNamesShort = (settings ? settings.monthNamesShort : null) ||
this._defaults.monthNamesShort,
monthNames = (settings ? settings.monthNames : null) ||
this._defaults.monthNames,
year = -1,
month = -1,
day = -1,
doy = -1,
literal = false,
date,
// Check whether a format character is doubled
lookAhead = function(match) {
var matches = (iFormat + 1 < format.length &&
format.charAt(iFormat + 1) === match);
if (matches) {
iFormat++;
}
return matches;
},
// Extract a number from the string value
getNumber = function(match) {
var isDoubled = lookAhead(match),
size = (match === "@" ? 14 : (match === "!" ? 20
:
(match === "y" && isDoubled ? 4 : (match === "o"
? 3 : 2)))),
minSize = (match === "y" ? size : 1),
digits = new RegExp("^\\d{" + minSize + "," +
size + "}"),
num = value.substring(iValue).match(digits);
if (!num) {
throw "Missing number at position " + iValue;
}
iValue += num[0].length;
return parseInt(num[0], 10);
},
// Extract a name from the string value and convert to an index
getName = function(match, shortNames, longNames) {
var index = -1,
names = $.map(lookAhead(match) ? longNames :
shortNames, function (v, k) {
return [ [k, v] ];
}).sort(function (a, b) {
return -(a[1].length - b[1].length);
});
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 77/257
8/2/25, 1:46 PM jquery-ui.js
if (value.charAt(iValue) !== format.charAt(iFormat)) {
throw "Unexpected literal at position " + iValue;
}
iValue++;
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 78/257
8/2/25, 1:46 PM jquery-ui.js
year = new Date().getFullYear();
} else if (year < 100) {
year += new Date().getFullYear() - new Date().getFullYear() % 100
+
(year <= shortYearCutoff ? 0 : -100);
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 79/257
8/2/25, 1:46 PM jquery-ui.js
names of the days from Sunday (optional)
* dayNames string[7] - names
of the days from Sunday (optional)
* monthNamesShort string[12] - abbreviated
names of the months (optional)
* monthNames string[12] -
names of the months (optional)
* @return string - the date in the above format
*/
formatDate: function (format, date, settings) {
if (!date) {
return "";
}
var iFormat,
dayNamesShort = (settings ? settings.dayNamesShort : null) ||
this._defaults.dayNamesShort,
dayNames = (settings ? settings.dayNames : null) ||
this._defaults.dayNames,
monthNamesShort = (settings ? settings.monthNamesShort : null) ||
this._defaults.monthNamesShort,
monthNames = (settings ? settings.monthNames : null) ||
this._defaults.monthNames,
// Check whether a format character is doubled
lookAhead = function(match) {
var matches = (iFormat + 1 < format.length &&
format.charAt(iFormat + 1) === match);
if (matches) {
iFormat++;
}
return matches;
},
// Format a number, with leading zero if necessary
formatNumber = function(match, value, len) {
var num = "" + value;
if (lookAhead(match)) {
while (num.length < len) {
num = "0" + num;
}
}
return num;
},
// Format a name, short or long as requested
formatName = function(match, value, shortNames, longNames) {
return (lookAhead(match) ? longNames[value] :
shortNames[value]);
},
output = "",
literal = false;
if (date) {
for (iFormat = 0; iFormat < format.length; iFormat++) {
if (literal) {
if (format.charAt(iFormat) === "'" &&
!lookAhead("'")) {
literal = false;
} else {
output += format.charAt(iFormat);
}
} else {
switch (format.charAt(iFormat)) {
case "d":
output += formatNumber("d",
date.getDate(), 2);
break;
case "D":
output += formatName("D",
date.getDay(), dayNamesShort, dayNames);
break;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 80/257
8/2/25, 1:46 PM jquery-ui.js
case "o":
output += formatNumber("o",
Math.round((new
Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new
Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
break;
case "m":
output += formatNumber("m",
date.getMonth() + 1, 2);
break;
case "M":
output += formatName("M",
date.getMonth(), monthNamesShort, monthNames);
break;
case "y":
output += (lookAhead("y") ?
date.getFullYear() :
(date.getYear() % 100 <
10 ? "0" : "") + date.getYear() % 100);
break;
case "@":
output += date.getTime();
break;
case "!":
output += date.getTime() * 10000
+ this._ticksTo1970;
break;
case "'":
if (lookAhead("'")) {
output += "'";
} else {
literal = true;
}
break;
default:
output += format.charAt(iFormat);
}
}
}
}
return output;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 81/257
8/2/25, 1:46 PM jquery-ui.js
break;
case "D": case "M":
return null; // Accept anything
case "'":
if (lookAhead("'")) {
chars += "'";
} else {
literal = true;
}
break;
default:
chars += format.charAt(iFormat);
}
}
}
return chars;
},
try {
date = this.parseDate(dateFormat, dates, settings) ||
defaultDate;
} catch (event) {
dates = (noDefault ? "" : dates);
}
inst.selectedDay = date.getDate();
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
inst.currentDay = (dates ? date.getDate() : 0);
inst.currentMonth = (dates ? date.getMonth() : 0);
inst.currentYear = (dates ? date.getFullYear() : 0);
this._adjustInstDate(inst);
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 82/257
8/2/25, 1:46 PM jquery-ui.js
offset,
$.datepicker._getFormatConfig(inst));
}
catch (e) {
// Ignore
}
while (matches) {
switch (matches[2] || "d") {
case "d" : case "D" :
day += parseInt(matches[1],10);
break;
case "w" : case "W" :
day += parseInt(matches[1],10) *
7; break;
case "m" : case "M" :
month += parseInt(matches[1],10);
day = Math.min(day,
$.datepicker._getDaysInMonth(year, month));
break;
case "y": case "Y" :
year += parseInt(matches[1],10);
day = Math.min(day,
$.datepicker._getDaysInMonth(year, month));
break;
}
matches = pattern.exec(offset);
}
return new Date(year, month, day);
},
newDate = (date == null || date === "" ? defaultDate : (typeof
date === "string" ? offsetString(date) :
(typeof date === "number" ? (isNaN(date) ? defaultDate :
offsetNumeric(date)) : new Date(date.getTime()))));
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 83/257
8/2/25, 1:46 PM jquery-ui.js
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 84/257
8/2/25, 1:46 PM jquery-ui.js
});
},
/* Generate the HTML for the current state of the date picker. */
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col,
selectedDate,
cornerClass, calender, thead, day, daysInMonth, leadDays,
curRows, numRows,
printDate, dRow, tbody, daySettings, otherMonth, unselectable,
tempDate = new Date(),
today = this._daylightSavingAdjust(
new Date(tempDate.getFullYear(), tempDate.getMonth(),
tempDate.getDate())), // clear time
isRTL = this._get(inst, "isRTL"),
showButtonPanel = this._get(inst, "showButtonPanel"),
hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
navigationAsDateFormat = this._get(inst,
"navigationAsDateFormat"),
numMonths = this._getNumberOfMonths(inst),
showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
stepMonths = this._get(inst, "stepMonths"),
isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
currentDate = this._daylightSavingAdjust((!inst.currentDay ? new
Date(9999, 9, 9) :
new Date(inst.currentYear, inst.currentMonth,
inst.currentDay))),
minDate = this._getMinMaxDate(inst, "min"),
maxDate = this._getMinMaxDate(inst, "max"),
drawMonth = inst.drawMonth - showCurrentAtPos,
drawYear = inst.drawYear;
if (drawMonth < 0) {
drawMonth += 12;
drawYear--;
}
if (maxDate) {
maxDraw = this._daylightSavingAdjust(new
Date(maxDate.getFullYear(),
maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1,
maxDate.getDate()));
maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
while (this._daylightSavingAdjust(new Date(drawYear, drawMonth,
1)) > maxDraw) {
drawMonth--;
if (drawMonth < 0) {
drawMonth = 11;
drawYear--;
}
}
}
inst.drawMonth = drawMonth;
inst.drawYear = drawYear;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 85/257
8/2/25, 1:46 PM jquery-ui.js
(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-
all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-
triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 86/257
8/2/25, 1:46 PM jquery-ui.js
corner-" + (isRTL ? "right" : "left"); break;
case numMonths[1]-1: calender +=
" ui-datepicker-group-last";
cornerClass = " ui-
corner-" + (isRTL ? "left" : "right"); break;
default: calender += " ui-
datepicker-group-middle"; cornerClass = ""; break;
}
}
calender += "'>";
}
calender += "<div class='ui-datepicker-header ui-widget-
header ui-helper-clearfix" + cornerClass + "'>" +
(/all|left/.test(cornerClass) && row === 0 ?
(isRTL ? next : prev) : "") +
(/all|right/.test(cornerClass) && row === 0 ?
(isRTL ? prev : next) : "") +
this._generateMonthYearHeader(inst, drawMonth,
drawYear, minDate, maxDate,
row > 0 || col > 0, monthNames, monthNamesShort)
+ // draw month headers
"</div><table class='ui-datepicker-calendar'>
<thead>" +
"<tr>";
thead = (showWeek ? "<th class='ui-datepicker-week-col'>"
+ this._get(inst, "weekHeader") + "</th>" : "");
for (dow = 0; dow < 7; dow++) { // days of the week
day = (dow + firstDay) % 7;
thead += "<th scope='col'" + ((dow + firstDay +
6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
"<span title='" + dayNames[day] + "'>" +
dayNamesMin[day] + "</span></th>";
}
calender += thead + "</tr></thead><tbody>";
daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
if (drawYear === inst.selectedYear && drawMonth ===
inst.selectedMonth) {
inst.selectedDay = Math.min(inst.selectedDay,
daysInMonth);
}
leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth)
- firstDay + 7) % 7;
curRows = Math.ceil((leadDays + daysInMonth) / 7); //
calculate the number of rows to generate
numRows = (isMultiMonth ? this.maxRows > curRows ?
this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows
(see #7043)
this.maxRows = numRows;
printDate = this._daylightSavingAdjust(new Date(drawYear,
drawMonth, 1 - leadDays));
for (dRow = 0; dRow < numRows; dRow++) { // create date
picker rows
calender += "<tr>";
tbody = (!showWeek ? "" : "<td class='ui-
datepicker-week-col'>" +
this._get(inst, "calculateWeek")
(printDate) + "</td>");
for (dow = 0; dow < 7; dow++) { // create date
picker days
daySettings = (beforeShowDay ?
beforeShowDay.apply((inst.input ?
inst.input[0] : null), [printDate]) : [true, ""]);
otherMonth = (printDate.getMonth() !==
drawMonth);
unselectable = (otherMonth &&
!selectOtherMonths) || !daySettings[0] ||
(minDate && printDate < minDate)
|| (maxDate && printDate > maxDate);
tbody += "<td class='" +
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 87/257
8/2/25, 1:46 PM jquery-ui.js
((dow + firstDay + 6) % 7 >= 5 ?
" ui-datepicker-week-end" : "") + // highlight weekends
(otherMonth ? " ui-datepicker-
other-month" : "") + // highlight days from other months
((printDate.getTime() ===
selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user
pressed key
(defaultDate.getTime() ===
printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
// or defaultDate is current
printedDate and defaultDate is selectedDate
" " + this._dayOverClass : "") +
// highlight selected day
(unselectable ? " " +
this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
(otherMonth && !showOtherMonths ?
"" : " " + daySettings[1] + // highlight custom dates
(printDate.getTime() ===
currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
(printDate.getTime() ===
today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
((!otherMonth || showOtherMonths)
&& daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + //
cell title
(unselectable ? "" : " data-
handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-
year='" + printDate.getFullYear() + "'") + ">" + // actions
(otherMonth && !showOtherMonths ?
" " : // display for other months
(unselectable ? "<span class='ui-
state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
(printDate.getTime() ===
today.getTime() ? " ui-state-highlight" : "") +
(printDate.getTime() ===
currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
(otherMonth ? " ui-priority-
secondary" : "") + // distinguish dates from other months
"' href='#'>" +
printDate.getDate() + "</a>")) + "</td>"; // display selectable date
printDate.setDate(printDate.getDate() +
1);
printDate =
this._daylightSavingAdjust(printDate);
}
calender += tbody + "</tr>";
}
drawMonth++;
if (drawMonth > 11) {
drawMonth = 0;
drawYear++;
}
calender += "</tbody></table>" + (isMultiMonth ? "</div>"
+
((numMonths[0] > 0 && col ===
numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
group += calender;
}
html += group;
}
html += buttonPanel;
inst._keyEvent = false;
return html;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 88/257
8/2/25, 1:46 PM jquery-ui.js
endYear,
changeMonth = this._get(inst, "changeMonth"),
changeYear = this._get(inst, "changeYear"),
showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
html = "<div class='ui-datepicker-title'>",
monthHtml = "";
// month selection
if (secondary || !changeMonth) {
monthHtml += "<span class='ui-datepicker-month'>" +
monthNames[drawMonth] + "</span>";
} else {
inMinYear = (minDate && minDate.getFullYear() === drawYear);
inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
monthHtml += "<select class='ui-datepicker-month' data-
handler='selectMonth' data-event='change'>";
for ( month = 0; month < 12; month++) {
if ((!inMinYear || month >= minDate.getMonth()) &&
(!inMaxYear || month <= maxDate.getMonth())) {
monthHtml += "<option value='" + month + "'" +
(month === drawMonth ? "
selected='selected'" : "") +
">" + monthNamesShort[month] + "
</option>";
}
}
monthHtml += "</select>";
}
if (!showMonthAfterYear) {
html += monthHtml + (secondary || !(changeMonth && changeYear) ?
" " : "");
}
// year selection
if ( !inst.yearshtml ) {
inst.yearshtml = "";
if (secondary || !changeYear) {
html += "<span class='ui-datepicker-year'>" + drawYear +
"</span>";
} else {
// determine range of years to display
years = this._get(inst, "yearRange").split(":");
thisYear = new Date().getFullYear();
determineYear = function(value) {
var year = (value.match(/c[+\-].*/) ? drawYear +
parseInt(value.substring(1), 10) :
(value.match(/[+\-].*/) ? thisYear +
parseInt(value, 10) :
parseInt(value, 10)));
return (isNaN(year) ? thisYear : year);
};
year = determineYear(years[0]);
endYear = Math.max(year, determineYear(years[1] || ""));
year = (minDate ? Math.max(year, minDate.getFullYear()) :
year);
endYear = (maxDate ? Math.min(endYear,
maxDate.getFullYear()) : endYear);
inst.yearshtml += "<select class='ui-datepicker-year'
data-handler='selectYear' data-event='change'>";
for (; year <= endYear; year++) {
inst.yearshtml += "<option value='" + year + "'"
+
(year === drawYear ? "
selected='selected'" : "") +
">" + year + "</option>";
}
inst.yearshtml += "</select>";
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 89/257
8/2/25, 1:46 PM jquery-ui.js
html += inst.yearshtml;
inst.yearshtml = null;
}
}
inst.selectedDay = date.getDate();
inst.drawMonth = inst.selectedMonth = date.getMonth();
inst.drawYear = inst.selectedYear = date.getFullYear();
if (period === "M" || period === "Y") {
this._notifyChange(inst);
}
},
/* Determine the current maximum date - ensure no time components are set. */
_getMinMaxDate: function(inst, minMax) {
return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 90/257
8/2/25, 1:46 PM jquery-ui.js
},
if (offset < 0) {
date.setDate(this._getDaysInMonth(date.getFullYear(),
date.getMonth()));
}
return this._isInRange(inst, date);
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 91/257
8/2/25, 1:46 PM jquery-ui.js
}
});
/*
* Bind hover events for datepicker elements.
* Done via delegate so the binding only occurs once in the lifetime of the parent div.
* Global datepicker_instActive, set by _updateDatepicker allows the handlers to find
their way back to the active picker.
*/
function datepicker_bindHover(dpDiv) {
var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-
calendar td a";
return dpDiv.delegate(selector, "mouseout", function() {
$(this).removeClass("ui-state-hover");
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
$(this).removeClass("ui-datepicker-prev-hover");
}
if (this.className.indexOf("ui-datepicker-next") !== -1) {
$(this).removeClass("ui-datepicker-next-hover");
}
})
.delegate( selector, "mouseover", datepicker_handleMouseover );
}
function datepicker_handleMouseover() {
if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline?
datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {
$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-
state-hover");
$(this).addClass("ui-state-hover");
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
$(this).addClass("ui-datepicker-prev-hover");
}
if (this.className.indexOf("ui-datepicker-next") !== -1) {
$(this).addClass("ui-datepicker-next-hover");
}
}
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 92/257
8/2/25, 1:46 PM jquery-ui.js
if ($("#"+$.datepicker._mainDivId).length === 0) {
$("body").append($.datepicker.dpDiv);
}
/*!
* jQuery UI Draggable 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/draggable/
*/
$.widget("ui.draggable", $.ui.mouse, {
version: "1.11.1",
widgetEventPrefix: "drag",
options: {
addClasses: true,
appendTo: "parent",
axis: false,
connectToSortable: false,
containment: false,
cursor: "auto",
cursorAt: false,
grid: false,
handle: false,
helper: "original",
iframeFix: false,
opacity: false,
refreshPositions: false,
revert: false,
revertDuration: 500,
scope: "default",
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
snap: false,
snapMode: "both",
snapTolerance: 20,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 93/257
8/2/25, 1:46 PM jquery-ui.js
stack: false,
zIndex: false,
// callbacks
drag: null,
start: null,
stop: null
},
_create: function() {
this._mouseInit();
},
_destroy: function() {
if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
this.destroyOnClear = true;
return;
}
this.element.removeClass( "ui-draggable ui-draggable-dragging ui-
draggable-disabled" );
this._removeHandleClassName();
this._mouseDestroy();
},
_mouseCapture: function(event) {
// support: IE9
// IE9 throws an "Unspecified error" accessing document.activeElement
from an <iframe>
try {
// Support: IE9+
// If the <body> is blurred, IE will switch windows, see #9520
if ( document.activeElement &&
document.activeElement.nodeName.toLowerCase() !== "body" ) {
// Blur any element that currently has focus, see #4261
$( document.activeElement ).blur();
}
} catch ( error ) {}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 94/257
8/2/25, 1:46 PM jquery-ui.js
this.handle = this._getHandle(event);
if (!this.handle) {
return false;
}
return true;
},
_mouseStart: function(event) {
var o = this.options;
this.helper.addClass("ui-draggable-dragging");
/*
* - Position generation -
* This block generates everything position related - it's the core of
draggables.
*/
$.extend(this.offset, {
click: { //Where the click happened, relative to the element
left: event.pageX - this.offset.left,
top: event.pageY - this.offset.top
},
parent: this._getParentOffset(),
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 95/257
8/2/25, 1:46 PM jquery-ui.js
relative: this._getRelativeOffset() //This is a relative to
absolute position minus the actual position calculation - only used for relative
positioned helper
});
//If the ddmanager is used for droppables, inform the manager that
dragging has started (see #5003)
if ( $.ui.ddmanager ) {
$.ui.ddmanager.dragStart(this, event);
}
return true;
},
//Call plugins and callbacks and use the resulting position if something
is returned
if (!noPropagation) {
var ui = this._uiHash();
if (this._trigger("drag", event, ui) === false) {
this._mouseUp({});
return false;
}
this.position = ui.position;
}
if ($.ui.ddmanager) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 96/257
8/2/25, 1:46 PM jquery-ui.js
$.ui.ddmanager.drag(this, event);
}
return false;
},
_mouseStop: function(event) {
//If we are using droppables, inform the manager about the drop
var that = this,
dropped = false;
if ($.ui.ddmanager && !this.options.dropBehaviour) {
dropped = $.ui.ddmanager.drop(this, event);
}
return false;
},
_mouseUp: function(event) {
//Remove frame helpers
$("div.ui-draggable-iframeFix").each(function() {
this.parentNode.removeChild(this);
});
//If the ddmanager is used for droppables, inform the manager that
dragging has stopped (see #5003)
if ( $.ui.ddmanager ) {
$.ui.ddmanager.dragStop(this, event);
}
cancel: function() {
if (this.helper.is(".ui-draggable-dragging")) {
this._mouseUp({});
} else {
this._clear();
}
return this;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 97/257
8/2/25, 1:46 PM jquery-ui.js
_getHandle: function(event) {
return this.options.handle ?
!!$( event.target ).closest( this.element.find(
this.options.handle ) ).length :
true;
},
_setHandleClassName: function() {
this.handleElement = this.options.handle ?
this.element.find( this.options.handle ) : this.element;
this.handleElement.addClass( "ui-draggable-handle" );
},
_removeHandleClassName: function() {
this.handleElement.removeClass( "ui-draggable-handle" );
},
_createHelper: function(event) {
var o = this.options,
helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[
0 ], [ event ])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") :
this.element);
if (!helper.parents("body").length) {
helper.appendTo((o.appendTo === "parent" ?
this.element[0].parentNode : o.appendTo));
}
return helper;
},
_adjustOffsetFromHelper: function(obj) {
if (typeof obj === "string") {
obj = obj.split(" ");
}
if ($.isArray(obj)) {
obj = { left: +obj[0], top: +obj[1] || 0 };
}
if ("left" in obj) {
this.offset.click.left = obj.left + this.margins.left;
}
if ("right" in obj) {
this.offset.click.left = this.helperProportions.width - obj.right
+ this.margins.left;
}
if ("top" in obj) {
this.offset.click.top = obj.top + this.margins.top;
}
if ("bottom" in obj) {
this.offset.click.top = this.helperProportions.height -
obj.bottom + this.margins.top;
}
},
_getParentOffset: function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 98/257
8/2/25, 1:46 PM jquery-ui.js
//Get the offsetParent and cache its position
var po = this.offsetParent.offset(),
document = this.document[ 0 ];
if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
po = { top: 0, left: 0 };
}
return {
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),
10) || 0),
left: po.left +
(parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
};
},
_getRelativeOffset: function() {
if ( this.cssPosition !== "relative" ) {
return { top: 0, left: 0 };
}
var p = this.element.position(),
scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
return {
top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + (
!scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) +
( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
};
},
_cacheMargins: function() {
this.margins = {
left: (parseInt(this.element.css("marginLeft"), 10) || 0),
top: (parseInt(this.element.css("marginTop"), 10) || 0),
right: (parseInt(this.element.css("marginRight"), 10) || 0),
bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
};
},
_cacheHelperProportions: function() {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
};
},
_setContainment: function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 99/257
8/2/25, 1:46 PM jquery-ui.js
this.relativeContainer = null;
if ( !o.containment ) {
this.containment = null;
return;
}
c = $( o.containment );
ce = c[ 0 ];
if ( !ce ) {
return;
}
this.containment = [
( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt(
c.css( "paddingLeft" ), 10 ) || 0 ),
( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt(
c.css( "paddingTop" ), 10 ) || 0 ),
( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) :
ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt(
c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left -
this.margins.right,
( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) :
ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt(
c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top
- this.margins.bottom
];
this.relativeContainer = c;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 100/257
8/2/25, 1:46 PM jquery-ui.js
},
if (!pos) {
pos = this.position;
}
return {
top: (
pos.top +
// The absolute mouse position
this.offset.relative.top * mod +
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.top * mod -
// The offsetParent's offset without borders (offset + border)
( ( this.cssPosition === "fixed" ? -
this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod)
),
left: (
pos.left +
// The absolute mouse position
this.offset.relative.left * mod +
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.left * mod -
// The offsetParent's offset without borders (offset + border)
( ( this.cssPosition === "fixed" ? -
this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)
)
};
},
/*
* - Position constraining -
* Constrain the position to a mix of grid, containment.
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 101/257
8/2/25, 1:46 PM jquery-ui.js
containment = this.containment;
}
if (o.grid) {
//Check for grid elements set to 0 to prevent divide by 0
error causing invalid argument errors in IE (see ticket #6950)
top = o.grid[1] ? this.originalPageY + Math.round((pageY
- this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
pageY = containment ? ((top - this.offset.click.top >=
containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top -
this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
return {
top: (
pageY -
// The absolute mouse position
this.offset.click.top -
// Click offset (relative to the element)
this.offset.relative.top -
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.top +
// The offsetParent's offset without borders (offset + border)
( this.cssPosition === "fixed" ? -this.offset.scroll.top
: ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
),
left: (
pageX -
// The absolute mouse position
this.offset.click.left -
// Click offset (relative to the element)
this.offset.relative.left -
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.left +
// The offsetParent's offset without borders (offset + border)
( this.cssPosition === "fixed" ? -this.offset.scroll.left
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 102/257
8/2/25, 1:46 PM jquery-ui.js
: ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
)
};
},
_clear: function() {
this.helper.removeClass("ui-draggable-dragging");
if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
this.helper.remove();
}
this.helper = null;
this.cancelHelperRemoval = false;
if ( this.destroyOnClear ) {
this.destroy();
}
},
plugins: {},
_uiHash: function() {
return {
helper: this.helper,
position: this.position,
originalPosition: this.originalPosition,
offset: this.positionAbs
};
}
});
$.ui.plugin.add("draggable", "connectToSortable", {
start: function( event, ui, inst ) {
var o = inst.options,
uiSortable = $.extend({}, ui, { item: inst.element });
inst.sortables = [];
$(o.connectToSortable).each(function() {
var sortable = $( this ).sortable( "instance" );
if (sortable && !sortable.options.disabled) {
inst.sortables.push({
instance: sortable,
shouldRevert: sortable.options.revert
});
sortable.refreshPositions(); // Call the sortable's
refreshPositions at drag start to refresh the containerCache since the sortable container
cache is used in drag and needs to be up to date (this will ensure it's initialised as
well as being kept in step with any changes that might have happened on the page).
sortable._trigger("activate", event, uiSortable);
}
});
},
stop: function( event, ui, inst ) {
//If we are still over the sortable, we fake the stop event of the
sortable, but also remove helper
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 103/257
8/2/25, 1:46 PM jquery-ui.js
var uiSortable = $.extend( {}, ui, {
item: inst.element
});
$.each(inst.sortables, function() {
if (this.instance.isOver) {
this.instance.isOver = 0;
this.instance.options.helper =
this.instance.options._helper;
} else {
this.instance.cancelHelperRemoval = false; //Remove the
helper in the sortable instance
this.instance._trigger("deactivate", event, uiSortable);
}
});
},
drag: function( event, ui, inst ) {
$.each(inst.sortables, function() {
if (this.instance._intersectsWith(this.instance.containerCache))
{
innermostIntersecting = true;
$.each(inst.sortables, function() {
this.instance.positionAbs = inst.positionAbs;
this.instance.helperProportions =
inst.helperProportions;
this.instance.offset.click = inst.offset.click;
if (this !== thisSortable &&
this.instance._intersectsWith(this.instance.containerCache) &&
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 104/257
8/2/25, 1:46 PM jquery-ui.js
$.contains(thisSortable.instance.element[0], this.instance.element[0])
) {
innermostIntersecting = false;
}
return innermostIntersecting;
});
}
if (innermostIntersecting) {
//If it intersects, we use a little isOver variable and
set it once, so our move-in stuff gets fired only once
if (!this.instance.isOver) {
this.instance.isOver = 1;
//Now we fake the start of dragging for the
sortable instance,
//by cloning the list group item, appending it to
the sortable and using it as inst.currentItem
//We can then fire the start event of the
sortable with our passed browser event, and our own helper (so it doesn't create a new
one)
this.instance.currentItem =
$(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",
true);
this.instance.options._helper =
this.instance.options.helper; //Store helper option to later restore it
this.instance.options.helper = function() {
return ui.helper[0]; };
event.target = this.instance.currentItem[0];
this.instance._mouseCapture(event, true);
this.instance._mouseStart(event, true, true);
inst._trigger("toSortable", event);
inst.dropped = this.instance.element; //draggable
revert needs that
//hack so receive/update callbacks work (mostly)
inst.currentItem = inst.element;
this.instance.fromOutside = inst;
} else {
this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 105/257
8/2/25, 1:46 PM jquery-ui.js
this.instance._mouseStop(event, true);
this.instance.options.helper =
this.instance.options._helper;
inst._trigger("fromSortable", event);
inst.dropped = false; //draggable revert needs
that
}
});
}
});
$.ui.plugin.add("draggable", "cursor", {
start: function( event, ui, instance ) {
var t = $( "body" ),
o = instance.options;
if (t.css("cursor")) {
o._cursor = t.css("cursor");
}
t.css("cursor", o.cursor);
},
stop: function( event, ui, instance ) {
var o = instance.options;
if (o._cursor) {
$("body").css("cursor", o._cursor);
}
}
});
$.ui.plugin.add("draggable", "opacity", {
start: function( event, ui, instance ) {
var t = $( ui.helper ),
o = instance.options;
if (t.css("opacity")) {
o._opacity = t.css("opacity");
}
t.css("opacity", o.opacity);
},
stop: function( event, ui, instance ) {
var o = instance.options;
if (o._opacity) {
$(ui.helper).css("opacity", o._opacity);
}
}
});
$.ui.plugin.add("draggable", "scroll", {
start: function( event, ui, i ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 106/257
8/2/25, 1:46 PM jquery-ui.js
if ( !i.scrollParentNotHidden ) {
i.scrollParentNotHidden = i.helper.scrollParent( false );
}
var o = i.options,
scrolled = false,
scrollParent = i.scrollParentNotHidden[ 0 ],
document = i.document[ 0 ];
} else {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 107/257
8/2/25, 1:46 PM jquery-ui.js
if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
$.ui.ddmanager.prepareOffsets(i, event);
}
}
});
$.ui.plugin.add("draggable", "snap", {
start: function( event, ui, i ) {
var o = i.options;
i.snapElements = [];
},
drag: function( event, ui, inst ) {
l = inst.snapElements[i].left;
r = l + inst.snapElements[i].width;
t = inst.snapElements[i].top;
b = t + inst.snapElements[i].height;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 108/257
8/2/25, 1:46 PM jquery-ui.js
ui.position.left =
inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width
}).left - inst.margins.left;
}
if (rs) {
ui.position.left =
inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
}
}
}
});
$.ui.plugin.add("draggable", "stack", {
start: function( event, ui, instance ) {
var min,
o = instance.options,
group = $.makeArray($(o.stack)).sort(function(a, b) {
return (parseInt($(a).css("zIndex"), 10) || 0) -
(parseInt($(b).css("zIndex"), 10) || 0);
});
if (!group.length) { return; }
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 109/257
8/2/25, 1:46 PM jquery-ui.js
$.ui.plugin.add("draggable", "zIndex", {
start: function( event, ui, instance ) {
var t = $( ui.helper ),
o = instance.options;
if (t.css("zIndex")) {
o._zIndex = t.css("zIndex");
}
t.css("zIndex", o.zIndex);
},
stop: function( event, ui, instance ) {
var o = instance.options;
if (o._zIndex) {
$(ui.helper).css("zIndex", o._zIndex);
}
}
});
/*!
* jQuery UI Resizable 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/resizable/
*/
$.widget("ui.resizable", $.ui.mouse, {
version: "1.11.1",
widgetEventPrefix: "resize",
options: {
alsoResize: false,
animate: false,
animateDuration: "slow",
animateEasing: "swing",
aspectRatio: false,
autoHide: false,
containment: false,
ghost: false,
grid: false,
handles: "e,s,se",
helper: false,
maxHeight: null,
maxWidth: null,
minHeight: 10,
minWidth: 10,
// See #7960
zIndex: 90,
// callbacks
resize: null,
start: null,
stop: null
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 110/257
8/2/25, 1:46 PM jquery-ui.js
_create: function() {
$.extend(this, {
_aspectRatio: !!(o.aspectRatio),
aspectRatio: o.aspectRatio,
originalElement: this.element,
_proportionallyResizeElements: [],
_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-
resizable-helper" : null
});
this.element.wrap(
$("<div class='ui-wrapper' style='overflow: hidden;'>
</div>").css({
position: this.element.css("position"),
width: this.element.outerWidth(),
height: this.element.outerHeight(),
top: this.element.css("top"),
left: this.element.css("left")
})
);
this.element = this.element.parent().data(
"ui-resizable", this.element.resizable( "instance" )
);
this.elementIsWrapper = true;
this.element.css({
marginLeft: this.originalElement.css("marginLeft"),
marginTop: this.originalElement.css("marginTop"),
marginRight: this.originalElement.css("marginRight"),
marginBottom: this.originalElement.css("marginBottom")
});
this.originalElement.css({
marginLeft: 0,
marginTop: 0,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 111/257
8/2/25, 1:46 PM jquery-ui.js
marginRight: 0,
marginBottom: 0
});
// support: Safari
// Prevent Safari textarea resize
this.originalResizeStyle = this.originalElement.css("resize");
this.originalElement.css("resize", "none");
this._proportionallyResizeElements.push(
this.originalElement.css({
position: "static",
zoom: 1,
display: "block"
}) );
// support: IE9
// avoid IE jump (hard set the margin)
this.originalElement.css({ margin:
this.originalElement.css("margin") });
this._proportionallyResize();
}
this.handles = o.handles ||
( !$(".ui-resizable-handle", this.element).length ?
"e,s,se" : {
n: ".ui-resizable-n",
e: ".ui-resizable-e",
s: ".ui-resizable-s",
w: ".ui-resizable-w",
se: ".ui-resizable-se",
sw: ".ui-resizable-sw",
ne: ".ui-resizable-ne",
nw: ".ui-resizable-nw"
} );
n = this.handles.split(",");
this.handles = {};
handle = $.trim(n[i]);
hname = "ui-resizable-" + handle;
axis = $("<div class='ui-resizable-handle " + hname + "'>
</div>");
this._renderAxis = function(target) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 112/257
8/2/25, 1:46 PM jquery-ui.js
for (i in this.handles) {
if (this.elementIsWrapper &&
this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
padWrapper = /sw|ne|nw|se|n|s/.test(i) ?
axis.outerHeight() : axis.outerWidth();
padPos = [ "padding",
/ne|nw|n/.test(i) ? "Top" :
/se|sw|s/.test(i) ? "Bottom" :
/^e$/.test(i) ? "Right" : "Left"
].join("");
target.css(padPos, padWrapper);
this._proportionallyResize();
this._handles.mouseover(function() {
if (!that.resizing) {
if (this.className) {
axis = this.className.match(/ui-resizable-
(se|sw|ne|nw|n|e|s|w)/i);
}
that.axis = axis && axis[1] ? axis[1] : "se";
}
});
if (o.autoHide) {
this._handles.hide();
$(this.element)
.addClass("ui-resizable-autohide")
.mouseenter(function() {
if (o.disabled) {
return;
}
$(this).removeClass("ui-resizable-autohide");
that._handles.show();
})
.mouseleave(function() {
if (o.disabled) {
return;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 113/257
8/2/25, 1:46 PM jquery-ui.js
if (!that.resizing) {
$(this).addClass("ui-resizable-
autohide");
that._handles.hide();
}
});
}
this._mouseInit();
},
_destroy: function() {
this._mouseDestroy();
var wrapper,
_destroy = function(exp) {
$(exp)
.removeClass("ui-resizable ui-resizable-disabled
ui-resizable-resizing")
.removeData("resizable")
.removeData("ui-resizable")
.unbind(".resizable")
.find(".ui-resizable-handle")
.remove();
};
this.originalElement.css("resize", this.originalResizeStyle);
_destroy(this.originalElement);
return this;
},
_mouseCapture: function(event) {
var i, handle,
capture = false;
for (i in this.handles) {
handle = $(this.handles[i])[0];
if (handle === event.target || $.contains(handle, event.target))
{
capture = true;
}
}
_mouseStart: function(event) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 114/257
8/2/25, 1:46 PM jquery-ui.js
this.resizing = true;
this._renderProxy();
curleft = this._num(this.helper.css("left"));
curtop = this._num(this.helper.css("top"));
if (o.containment) {
curleft += $(o.containment).scrollLeft() || 0;
curtop += $(o.containment).scrollTop() || 0;
}
this.offset = this.helper.offset();
this.position = { left: curleft, top: curtop };
this.size = this._helper ? {
width: this.helper.width(),
height: this.helper.height()
} : {
width: el.width(),
height: el.height()
};
this.originalSize = this._helper ? {
width: el.outerWidth(),
height: el.outerHeight()
} : {
width: el.width(),
height: el.height()
};
this.sizeDiff = {
width: el.outerWidth() - el.width(),
height: el.outerHeight() - el.height()
};
el.addClass("ui-resizable-resizing");
this._propagate("start", event);
return true;
},
_mouseDrag: function(event) {
this._updatePrevProperties();
if (!trigger) {
return false;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 115/257
8/2/25, 1:46 PM jquery-ui.js
this._updateVirtualBoundaries(event.shiftKey);
if (this._aspectRatio || event.shiftKey) {
data = this._updateRatio(data, event);
}
this._updateCache(data);
this._propagate("resize", event);
props = this._applyChanges();
if ( !$.isEmptyObject( props ) ) {
this._updatePrevProperties();
this._trigger( "resize", event, this.ui() );
this._applyChanges();
}
return false;
},
_mouseStop: function(event) {
this.resizing = false;
var pr, ista, soffseth, soffsetw, s, left, top,
o = this.options, that = this;
if (this._helper) {
pr = this._proportionallyResizeElements;
ista = pr.length && (/textarea/i).test(pr[0].nodeName);
soffseth = ista && this._hasScroll(pr[0], "left") ? 0 :
that.sizeDiff.height;
soffsetw = ista ? 0 : that.sizeDiff.width;
s = {
width: (that.helper.width() - soffsetw),
height: (that.helper.height() - soffseth)
};
left = (parseInt(that.element.css("left"), 10) +
(that.position.left - that.originalPosition.left)) ||
null;
top = (parseInt(that.element.css("top"), 10) +
(that.position.top - that.originalPosition.top)) || null;
if (!o.animate) {
this.element.css($.extend(s, { top: top, left: left }));
}
that.helper.height(that.size.height);
that.helper.width(that.size.width);
$("body").css("cursor", "auto");
this.element.removeClass("ui-resizable-resizing");
this._propagate("stop", event);
if (this._helper) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 116/257
8/2/25, 1:46 PM jquery-ui.js
this.helper.remove();
}
return false;
},
_updatePrevProperties: function() {
this.prevPosition = {
top: this.position.top,
left: this.position.left
};
this.prevSize = {
width: this.size.width,
height: this.size.height
};
},
_applyChanges: function() {
var props = {};
this.helper.css( props );
return props;
},
_updateVirtualBoundaries: function(forceAspectRatio) {
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
o = this.options;
b = {
minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,
minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity
};
if (this._aspectRatio || forceAspectRatio) {
pMinWidth = b.minHeight * this.aspectRatio;
pMinHeight = b.minWidth / this.aspectRatio;
pMaxWidth = b.maxHeight * this.aspectRatio;
pMaxHeight = b.maxWidth / this.aspectRatio;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 117/257
8/2/25, 1:46 PM jquery-ui.js
this._vBoundaries = b;
},
_updateCache: function(data) {
this.offset = this.helper.offset();
if (this._isNumber(data.left)) {
this.position.left = data.left;
}
if (this._isNumber(data.top)) {
this.position.top = data.top;
}
if (this._isNumber(data.height)) {
this.size.height = data.height;
}
if (this._isNumber(data.width)) {
this.size.width = data.width;
}
},
if (this._isNumber(data.height)) {
data.width = (data.height * this.aspectRatio);
} else if (this._isNumber(data.width)) {
data.height = (data.width / this.aspectRatio);
}
if (a === "sw") {
data.left = cpos.left + (csize.width - data.width);
data.top = null;
}
if (a === "nw") {
data.top = cpos.top + (csize.height - data.height);
data.left = cpos.left + (csize.width - data.width);
}
return data;
},
var o = this._vBoundaries,
a = this.axis,
ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth
< data.width),
ismaxh = this._isNumber(data.height) && o.maxHeight &&
(o.maxHeight < data.height),
isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth
> data.width),
isminh = this._isNumber(data.height) && o.minHeight &&
(o.minHeight > data.height),
dw = this.originalPosition.left + this.originalSize.width,
dh = this.position.top + this.size.height,
cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
if (isminw) {
data.width = o.minWidth;
}
if (isminh) {
data.height = o.minHeight;
}
if (ismaxw) {
data.width = o.maxWidth;
}
if (ismaxh) {
data.height = o.maxHeight;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 118/257
8/2/25, 1:46 PM jquery-ui.js
}
return data;
},
return {
height: widths[ 0 ] + widths[ 2 ],
width: widths[ 1 ] + widths[ 3 ]
};
},
_proportionallyResize: function() {
if (!this._proportionallyResizeElements.length) {
return;
}
var prel,
i = 0,
element = this.helper || this.element;
prel = this._proportionallyResizeElements[i];
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 119/257
8/2/25, 1:46 PM jquery-ui.js
this.outerDimensions =
this._getPaddingPlusBorderDimensions( prel );
}
prel.css({
height: (element.height() - this.outerDimensions.height)
|| 0,
width: (element.width() - this.outerDimensions.width) ||
0
});
},
_renderProxy: function() {
if (this._helper) {
this.helper.addClass(this._helper).css({
width: this.element.outerWidth() - 1,
height: this.element.outerHeight() - 1,
position: "absolute",
left: this.elementOffset.left + "px",
top: this.elementOffset.top + "px",
zIndex: ++o.zIndex //TODO: Don't modify option
});
this.helper
.appendTo("body")
.disableSelection();
} else {
this.helper = this.element;
}
},
_change: {
e: function(event, dx) {
return { width: this.originalSize.width + dx };
},
w: function(event, dx) {
var cs = this.originalSize, sp = this.originalPosition;
return { left: sp.left + dx, width: cs.width - dx };
},
n: function(event, dx, dy) {
var cs = this.originalSize, sp = this.originalPosition;
return { top: sp.top + dy, height: cs.height - dy };
},
s: function(event, dx, dy) {
return { height: this.originalSize.height + dy };
},
se: function(event, dx, dy) {
return $.extend(this._change.s.apply(this, arguments),
this._change.e.apply(this, [ event, dx, dy ]));
},
sw: function(event, dx, dy) {
return $.extend(this._change.s.apply(this, arguments),
this._change.w.apply(this, [ event, dx, dy ]));
},
ne: function(event, dx, dy) {
return $.extend(this._change.n.apply(this, arguments),
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 120/257
8/2/25, 1:46 PM jquery-ui.js
this._change.e.apply(this, [ event, dx, dy ]));
},
nw: function(event, dx, dy) {
return $.extend(this._change.n.apply(this, arguments),
this._change.w.apply(this, [ event, dx, dy ]));
}
},
plugins: {},
ui: function() {
return {
originalElement: this.originalElement,
element: this.element,
helper: this.helper,
position: this.position,
size: this.size,
originalSize: this.originalSize,
originalPosition: this.originalPosition
};
}
});
/*
* Resizable Extensions
*/
$.ui.plugin.add("resizable", "animate", {
that.element.animate(
$.extend(style, top && left ? { top: top, left: left } : {}), {
duration: o.animateDuration,
easing: o.animateEasing,
step: function() {
var data = {
width:
parseInt(that.element.css("width"), 10),
height:
parseInt(that.element.css("height"), 10),
top: parseInt(that.element.css("top"),
10),
left: parseInt(that.element.css("left"),
10)
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 121/257
8/2/25, 1:46 PM jquery-ui.js
$(pr[0]).css({ width: data.width, height:
data.height });
}
}
}
);
}
});
start: function() {
var element, p, co, ch, cw, width, height,
that = $( this ).resizable( "instance" ),
o = that.options,
el = that.element,
oc = o.containment,
ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) )
? el.parent().get( 0 ) : oc;
if ( !ce ) {
return;
}
that.containerElement = $( ce );
that.parentData = {
element: $( document ),
left: 0,
top: 0,
width: $( document ).width(),
height: $( document ).height() ||
document.body.parentNode.scrollHeight
};
} else {
element = $( ce );
p = [];
$([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name )
{
p[ i ] = that._num( element.css( "padding" + name ) );
});
that.containerOffset = element.offset();
that.containerPosition = element.position();
that.containerSize = {
height: ( element.innerHeight() - p[ 3 ] ),
width: ( element.innerWidth() - p[ 1 ] )
};
co = that.containerOffset;
ch = that.containerSize.height;
cw = that.containerSize.width;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 122/257
8/2/25, 1:46 PM jquery-ui.js
width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
that.parentData = {
element: ce,
left: co.left,
top: co.top,
width: width,
height: height
};
}
},
if ( pRatio ) {
that.size.height = that.size.width / that.aspectRatio;
continueResize = false;
}
that.position.left = o.helper ? co.left : 0;
}
if ( pRatio ) {
that.size.width = that.size.height * that.aspectRatio;
continueResize = false;
}
that.position.top = that._helper ? co.top : 0;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 123/257
8/2/25, 1:46 PM jquery-ui.js
}
if ( !continueResize ){
that.position.left = that.prevPosition.left;
that.position.top = that.prevPosition.top;
that.size.width = that.prevSize.width;
that.size.height = that.prevSize.height;
}
},
stop: function() {
var that = $( this ).resizable( "instance" ),
o = that.options,
co = that.containerOffset,
cop = that.containerPosition,
ce = that.containerElement,
helper = $( that.helper ),
ho = helper.offset(),
w = helper.outerWidth() - that.sizeDiff.width,
h = helper.outerHeight() - that.sizeDiff.height;
$.ui.plugin.add("resizable", "alsoResize", {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 124/257
8/2/25, 1:46 PM jquery-ui.js
start: function() {
var that = $(this).resizable( "instance" ),
o = that.options,
_store = function(exp) {
$(exp).each(function() {
var el = $(this);
el.data("ui-resizable-alsoresize", {
width: parseInt(el.width(), 10), height:
parseInt(el.height(), 10),
left: parseInt(el.css("left"), 10), top:
parseInt(el.css("top"), 10)
});
});
};
_alsoResize = function(exp, c) {
$(exp).each(function() {
var el = $(this), start = $(this).data("ui-
resizable-alsoresize"), style = {},
css = c && c.length ?
c :
el.parents(ui.originalElement[0]).length ?
[ "width", "height" ] :
[ "width", "height",
"top", "left" ];
el.css(style);
});
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 125/257
8/2/25, 1:46 PM jquery-ui.js
} else {
_alsoResize(o.alsoResize);
}
},
stop: function() {
$(this).removeData("resizable-alsoresize");
}
});
$.ui.plugin.add("resizable", "ghost", {
start: function() {
that.ghost = that.originalElement.clone();
that.ghost
.css({
opacity: 0.25,
display: "block",
position: "relative",
height: cs.height,
width: cs.width,
margin: 0,
left: 0,
top: 0
})
.addClass("ui-resizable-ghost")
.addClass(typeof o.ghost === "string" ? o.ghost : "");
that.ghost.appendTo(that.helper);
},
resize: function() {
var that = $(this).resizable( "instance" );
if (that.ghost) {
that.ghost.css({
position: "relative",
height: that.size.height,
width: that.size.width
});
}
},
stop: function() {
var that = $(this).resizable( "instance" );
if (that.ghost && that.helper) {
that.helper.get(0).removeChild(that.ghost.get(0));
}
}
});
$.ui.plugin.add("resizable", "grid", {
resize: function() {
var outerDimensions,
that = $(this).resizable( "instance" ),
o = that.options,
cs = that.size,
os = that.originalSize,
op = that.originalPosition,
a = that.axis,
grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
gridX = (grid[0] || 1),
gridY = (grid[1] || 1),
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 126/257
8/2/25, 1:46 PM jquery-ui.js
ox = Math.round((cs.width - os.width) / gridX) * gridX,
oy = Math.round((cs.height - os.height) / gridY) * gridY,
newWidth = os.width + ox,
newHeight = os.height + oy,
isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
isMinWidth = o.minWidth && (o.minWidth > newWidth),
isMinHeight = o.minHeight && (o.minHeight > newHeight);
o.grid = grid;
if (isMinWidth) {
newWidth += gridX;
}
if (isMinHeight) {
newHeight += gridY;
}
if (isMaxWidth) {
newWidth -= gridX;
}
if (isMaxHeight) {
newHeight -= gridY;
}
if (/^(se|s|e)$/.test(a)) {
that.size.width = newWidth;
that.size.height = newHeight;
} else if (/^(ne)$/.test(a)) {
that.size.width = newWidth;
that.size.height = newHeight;
that.position.top = op.top - oy;
} else if (/^(sw)$/.test(a)) {
that.size.width = newWidth;
that.size.height = newHeight;
that.position.left = op.left - ox;
} else {
if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) {
outerDimensions = that._getPaddingPlusBorderDimensions(
this );
}
});
/*!
* jQuery UI Dialog 1.11.1
* http://jqueryui.com
*
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 127/257
8/2/25, 1:46 PM jquery-ui.js
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/dialog/
*/
// callbacks
beforeClose: null,
close: null,
drag: null,
dragStart: null,
dragStop: null,
focus: null,
open: null,
resize: null,
resizeStart: null,
resizeStop: null
},
sizeRelatedOptions: {
buttons: true,
height: true,
maxHeight: true,
maxWidth: true,
minHeight: true,
minWidth: true,
width: true
},
resizableRelatedOptions: {
maxHeight: true,
maxWidth: true,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 128/257
8/2/25, 1:46 PM jquery-ui.js
minHeight: true,
minWidth: true
},
_create: function() {
this.originalCss = {
display: this.element[ 0 ].style.display,
width: this.element[ 0 ].style.width,
minHeight: this.element[ 0 ].style.minHeight,
maxHeight: this.element[ 0 ].style.maxHeight,
height: this.element[ 0 ].style.height
};
this.originalPosition = {
parent: this.element.parent(),
index: this.element.parent().children().index( this.element )
};
this.originalTitle = this.element.attr( "title" );
this.options.title = this.options.title || this.originalTitle;
this._createWrapper();
this.element
.show()
.removeAttr( "title" )
.addClass( "ui-dialog-content ui-widget-content" )
.appendTo( this.uiDialog );
this._createTitlebar();
this._createButtonPane();
this._isOpen = false;
this._trackFocus();
},
_init: function() {
if ( this.options.autoOpen ) {
this.open();
}
},
_appendTo: function() {
var element = this.options.appendTo;
if ( element && (element.jquery || element.nodeType) ) {
return $( element );
}
return this.document.find( element || "body" ).eq( 0 );
},
_destroy: function() {
var next,
originalPosition = this.originalPosition;
this._destroyOverlay();
this.element
.removeUniqueId()
.removeClass( "ui-dialog-content ui-widget-content" )
.css( this.originalCss )
// Without detaching first, the following becomes really slow
.detach();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 129/257
8/2/25, 1:46 PM jquery-ui.js
this.uiDialog.stop( true, true ).remove();
if ( this.originalTitle ) {
this.element.attr( "title", this.originalTitle );
}
widget: function() {
return this.uiDialog;
},
disable: $.noop,
enable: $.noop,
this._isOpen = false;
this._focusedElement = null;
this._destroyOverlay();
this._untrackInstance();
// support: IE9
// IE9 throws an "Unspecified error" accessing
document.activeElement from an <iframe>
try {
activeElement = this.document[ 0 ].activeElement;
isOpen: function() {
return this._isOpen;
},
moveToTop: function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 130/257
8/2/25, 1:46 PM jquery-ui.js
this._moveToTop();
},
open: function() {
var that = this;
if ( this._isOpen ) {
if ( this._moveToTop() ) {
this._focusTabbable();
}
return;
}
this._isOpen = true;
this.opener = $( this.document[ 0 ].activeElement );
this._size();
this._position();
this._createOverlay();
this._moveToTop( null, true );
// Ensure the overlay is moved to the top with the dialog, but only when
// opening. The overlay shouldn't move after the dialog is open so that
// modeless dialogs opened after the modal dialog stack properly.
if ( this.overlay ) {
this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1
);
}
this._trigger( "open" );
},
_focusTabbable: function() {
// Set focus to the first match:
// 1. An element that was focused previously
// 2. First element inside the dialog matching [autofocus]
// 3. Tabbable element inside the content element
// 4. Tabbable element inside the buttonpane
// 5. The close button
// 6. The dialog itself
var hasFocus = this._focusedElement;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 131/257
8/2/25, 1:46 PM jquery-ui.js
if ( !hasFocus ) {
hasFocus = this.element.find( "[autofocus]" );
}
if ( !hasFocus.length ) {
hasFocus = this.element.find( ":tabbable" );
}
if ( !hasFocus.length ) {
hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
}
if ( !hasFocus.length ) {
hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
}
if ( !hasFocus.length ) {
hasFocus = this.uiDialog;
}
hasFocus.eq( 0 ).focus();
},
_createWrapper: function() {
this.uiDialog = $("<div>")
.addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all
ui-front " +
this.options.dialogClass )
.hide()
.attr({
// Setting tabIndex makes the div focusable
tabIndex: -1,
role: "dialog"
})
.appendTo( this._appendTo() );
this._on( this.uiDialog, {
keydown: function( event ) {
if ( this.options.closeOnEscape &&
!event.isDefaultPrevented() && event.keyCode &&
event.keyCode === $.ui.keyCode.ESCAPE ) {
event.preventDefault();
this.close( event );
return;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 132/257
8/2/25, 1:46 PM jquery-ui.js
this._delay(function() {
first.focus();
});
event.preventDefault();
} else if ( ( event.target === first[0] || event.target
=== this.uiDialog[0] ) && event.shiftKey ) {
this._delay(function() {
last.focus();
});
event.preventDefault();
}
},
mousedown: function( event ) {
if ( this._moveToTop( event ) ) {
this._focusTabbable();
}
}
});
_createTitlebar: function() {
var uiDialogTitle;
this.uiDialogTitlebar = $( "<div>" )
.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-
helper-clearfix" )
.prependTo( this.uiDialog );
this._on( this.uiDialogTitlebar, {
mousedown: function( event ) {
// Don't prevent click on close button (#8838)
// Focusing a dialog that is partially scrolled out of
view
// causes the browser to scroll it into view, preventing
the click event
if ( !$( event.target ).closest( ".ui-dialog-titlebar-
close" ) ) {
// Dialog isn't getting focus when dragging
(#8063)
this.uiDialog.focus();
}
}
});
// support: IE
// Use type="button" to prevent enter keypresses in textboxes from
closing the
// dialog in IE (#9312)
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
.button({
label: this.options.closeText,
icons: {
primary: "ui-icon-closethick"
},
text: false
})
.addClass( "ui-dialog-titlebar-close" )
.appendTo( this.uiDialogTitlebar );
this._on( this.uiDialogTitlebarClose, {
click: function( event ) {
event.preventDefault();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 133/257
8/2/25, 1:46 PM jquery-ui.js
this.close( event );
}
});
uiDialogTitle = $( "<span>" )
.uniqueId()
.addClass( "ui-dialog-title" )
.prependTo( this.uiDialogTitlebar );
this._title( uiDialogTitle );
this.uiDialog.attr({
"aria-labelledby": uiDialogTitle.attr( "id" )
});
},
_createButtonPane: function() {
this.uiDialogButtonPane = $( "<div>" )
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-
clearfix" );
this.uiButtonSet = $( "<div>" )
.addClass( "ui-dialog-buttonset" )
.appendTo( this.uiDialogButtonPane );
this._createButtons();
},
_createButtons: function() {
var that = this,
buttons = this.options.buttons;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 134/257
8/2/25, 1:46 PM jquery-ui.js
.appendTo( that.uiButtonSet );
});
this.uiDialog.addClass( "ui-dialog-buttons" );
this.uiDialogButtonPane.appendTo( this.uiDialog );
},
_makeDraggable: function() {
var that = this,
options = this.options;
function filteredUi( ui ) {
return {
position: ui.position,
offset: ui.offset
};
}
this.uiDialog.draggable({
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
handle: ".ui-dialog-titlebar",
containment: "document",
start: function( event, ui ) {
$( this ).addClass( "ui-dialog-dragging" );
that._blockFrames();
that._trigger( "dragStart", event, filteredUi( ui ) );
},
drag: function( event, ui ) {
that._trigger( "drag", event, filteredUi( ui ) );
},
stop: function( event, ui ) {
var left = ui.offset.left - that.document.scrollLeft(),
top = ui.offset.top - that.document.scrollTop();
options.position = {
my: "left top",
at: "left" + (left >= 0 ? "+" : "") + left + " "
+
"top" + (top >= 0 ? "+" : "") + top,
of: that.window
};
$( this ).removeClass( "ui-dialog-dragging" );
that._unblockFrames();
that._trigger( "dragStop", event, filteredUi( ui ) );
}
});
},
_makeResizable: function() {
var that = this,
options = this.options,
handles = options.resizable,
// .ui-resizable has position: relative defined in the stylesheet
// but dialogs have to use absolute or fixed positioning
position = this.uiDialog.css("position"),
resizeHandles = typeof handles === "string" ?
handles :
"n,e,s,w,se,sw,ne,nw";
function filteredUi( ui ) {
return {
originalPosition: ui.originalPosition,
originalSize: ui.originalSize,
position: ui.position,
size: ui.size
};
}
this.uiDialog.resizable({
cancel: ".ui-dialog-content",
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 135/257
8/2/25, 1:46 PM jquery-ui.js
containment: "document",
alsoResize: this.element,
maxWidth: options.maxWidth,
maxHeight: options.maxHeight,
minWidth: options.minWidth,
minHeight: this._minHeight(),
handles: resizeHandles,
start: function( event, ui ) {
$( this ).addClass( "ui-dialog-resizing" );
that._blockFrames();
that._trigger( "resizeStart", event, filteredUi( ui ) );
},
resize: function( event, ui ) {
that._trigger( "resize", event, filteredUi( ui ) );
},
stop: function( event, ui ) {
var offset = that.uiDialog.offset(),
left = offset.left - that.document.scrollLeft(),
top = offset.top - that.document.scrollTop();
options.height = that.uiDialog.height();
options.width = that.uiDialog.width();
options.position = {
my: "left top",
at: "left" + (left >= 0 ? "+" : "") + left + " "
+
"top" + (top >= 0 ? "+" : "") + top,
of: that.window
};
$( this ).removeClass( "ui-dialog-resizing" );
that._unblockFrames();
that._trigger( "resizeStop", event, filteredUi( ui ) );
}
})
.css( "position", position );
},
_trackFocus: function() {
this._on( this.widget(), {
focusin: function( event ) {
this._makeFocusTarget();
this._focusedElement = $( event.target );
}
});
},
_makeFocusTarget: function() {
this._untrackInstance();
this._trackingInstances().unshift( this );
},
_untrackInstance: function() {
var instances = this._trackingInstances(),
exists = $.inArray( this, instances );
if ( exists !== -1 ) {
instances.splice( exists, 1 );
}
},
_trackingInstances: function() {
var instances = this.document.data( "ui-dialog-instances" );
if ( !instances ) {
instances = [];
this.document.data( "ui-dialog-instances", instances );
}
return instances;
},
_minHeight: function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 136/257
8/2/25, 1:46 PM jquery-ui.js
var options = this.options;
_position: function() {
// Need to show the dialog to get the actual offset in the position
plugin
var isVisible = this.uiDialog.is( ":visible" );
if ( !isVisible ) {
this.uiDialog.show();
}
this.uiDialog.position( this.options.position );
if ( !isVisible ) {
this.uiDialog.hide();
}
},
if ( key in that.sizeRelatedOptions ) {
resize = true;
}
if ( key in that.resizableRelatedOptions ) {
resizableOptions[ key ] = value;
}
});
if ( resize ) {
this._size();
this._position();
}
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
this.uiDialog.resizable( "option", resizableOptions );
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 137/257
8/2/25, 1:46 PM jquery-ui.js
if ( key === "closeText" ) {
this.uiDialogTitlebarClose.button({
// Ensure that we always pass a string
label: "" + value
});
}
_size: function() {
// If the user has resized the dialog, the .ui-dialog and .ui-dialog-
content
// divs will both have width and height set, so we need to reset them
var nonContentHeight, minContentHeight, maxContentHeight,
options = this.options;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 138/257
8/2/25, 1:46 PM jquery-ui.js
})
.outerHeight();
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
maxContentHeight = typeof options.maxHeight === "number" ?
Math.max( 0, options.maxHeight - nonContentHeight ) :
"none";
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
this.uiDialog.resizable( "option", "minHeight", this._minHeight()
);
}
},
_blockFrames: function() {
this.iframeBlocks = this.document.find( "iframe" ).map(function() {
var iframe = $( this );
return $( "<div>" )
.css({
position: "absolute",
width: iframe.outerWidth(),
height: iframe.outerHeight()
})
.appendTo( iframe.parent() )
.offset( iframe.offset() )[0];
});
},
_unblockFrames: function() {
if ( this.iframeBlocks ) {
this.iframeBlocks.remove();
delete this.iframeBlocks;
}
},
_createOverlay: function() {
if ( !this.options.modal ) {
return;
}
if ( !this.document.data( "ui-dialog-overlays" ) ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 139/257
8/2/25, 1:46 PM jquery-ui.js
if ( !this._allowInteraction( event ) ) {
event.preventDefault();
this._trackingInstances()[ 0
]._focusTabbable();
}
}
});
}
this.overlay = $( "<div>" )
.addClass( "ui-widget-overlay ui-front" )
.appendTo( this._appendTo() );
this._on( this.overlay, {
mousedown: "_keepFocus"
});
this.document.data( "ui-dialog-overlays",
(this.document.data( "ui-dialog-overlays" ) || 0) + 1 );
},
_destroyOverlay: function() {
if ( !this.options.modal ) {
return;
}
if ( this.overlay ) {
var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
if ( !overlays ) {
this.document
.unbind( "focusin" )
.removeData( "ui-dialog-overlays" );
} else {
this.document.data( "ui-dialog-overlays", overlays );
}
this.overlay.remove();
this.overlay = null;
}
}
});
/*!
* jQuery UI Droppable 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/droppable/
*/
$.widget( "ui.droppable", {
version: "1.11.1",
widgetEventPrefix: "drop",
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 140/257
8/2/25, 1:46 PM jquery-ui.js
options: {
accept: "*",
activeClass: false,
addClasses: true,
greedy: false,
hoverClass: false,
scope: "default",
tolerance: "intersect",
// callbacks
activate: null,
deactivate: null,
drop: null,
out: null,
over: null
},
_create: function() {
var proportions,
o = this.options,
accept = o.accept;
this.isover = false;
this.isout = true;
this._addToManager( o.scope );
},
_destroy: function() {
var drop = $.ui.ddmanager.droppables[ this.options.scope ];
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 141/257
8/2/25, 1:46 PM jquery-ui.js
this._splice( drop );
this._splice( drop );
this._addToManager( value );
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 142/257
8/2/25, 1:46 PM jquery-ui.js
}
},
return false;
},
ui: function( c ) {
return {
draggable: ( c.currentItem || c.element ),
helper: c.helper,
position: c.position,
offset: c.positionAbs
};
}
});
$.ui.intersect = (function() {
function isOverAxis( x, reference, size ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 143/257
8/2/25, 1:46 PM jquery-ui.js
return ( x >= reference ) && ( x < ( reference + size ) );
}
if ( !droppable.offset ) {
return false;
}
switch ( toleranceMode ) {
case "fit":
return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
case "intersect":
return ( l < x1 + ( draggable.helperProportions.width / 2 ) && //
Right Half
x2 - ( draggable.helperProportions.width / 2 ) < r && //
Left Half
t < y1 + ( draggable.helperProportions.height / 2 ) && //
Bottom Half
y2 - ( draggable.helperProportions.height / 2 ) < b ); //
Top Half
case "pointer":
return isOverAxis( event.pageY, t, droppable.proportions().height
) && isOverAxis( event.pageX, l, droppable.proportions().width );
case "touch":
return (
( y1 >= t && y1 <= b ) || // Top edge touching
( y2 >= t && y2 <= b ) || // Bottom edge touching
( y1 < t && y2 > b ) // Surrounded vertically
) && (
( x1 >= l && x1 <= r ) || // Left edge touching
( x2 >= l && x2 <= r ) || // Right edge touching
( x1 < l && x2 > r ) // Surrounded horizontally
);
default:
return false;
}
};
})();
/*
This manager tracks offsets of draggables and droppables
*/
$.ui.ddmanager = {
current: null,
droppables: { "default": [] },
prepareOffsets: function( t, event ) {
var i, j,
m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
type = event ? event.type : null, // workaround for #2317
list = ( t.currentItem || t.element ).find( ":data(ui-droppable)"
).addBack();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 144/257
8/2/25, 1:46 PM jquery-ui.js
continue;
}
m[ i ].offset = m[ i ].element.offset();
m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth,
height: m[ i ].element[ 0 ].offsetHeight });
},
drop: function( draggable, event ) {
if ( !this.options ) {
return;
}
if ( !this.options.disabled && this.visible && $.ui.intersect(
draggable, this, this.options.tolerance, event ) ) {
dropped = this._drop.call( this, event ) || dropped;
}
});
return dropped;
},
dragStart: function( draggable, event ) {
// Listen for scrolling so that if the dragging causes scrolling the
position of the droppables can be recalculated (see #5003)
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable",
function() {
if ( !draggable.options.refreshPositions ) {
$.ui.ddmanager.prepareOffsets( draggable, event );
}
});
},
drag: function( draggable, event ) {
// If you have a highly dynamic page, you might try this option. It
renders positions every time you move the mouse.
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 145/257
8/2/25, 1:46 PM jquery-ui.js
if ( draggable.options.refreshPositions ) {
$.ui.ddmanager.prepareOffsets( draggable, event );
}
// Run through all droppables and check their positions based on specific
tolerance options
$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [],
function() {
if ( this.options.greedy ) {
// find droppable parents with same scope
scope = this.options.scope;
parent = this.element.parents( ":data(ui-droppable)"
).filter(function() {
return $( this ).droppable( "instance"
).options.scope === scope;
});
if ( parent.length ) {
parentInstance = $( parent[ 0 ] ).droppable(
"instance" );
parentInstance.greedyChild = ( c === "isover" );
}
}
this[ c ] = true;
this[c === "isout" ? "isover" : "isout"] = false;
this[c === "isover" ? "_over" : "_out"].call( this, event );
},
dragStop: function( draggable, event ) {
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
// Call prepareOffsets one final time since IE does not fire return
scroll events when overflow was caused by drag (see #5003)
if ( !draggable.options.refreshPositions ) {
$.ui.ddmanager.prepareOffsets( draggable, event );
}
}
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 146/257
8/2/25, 1:46 PM jquery-ui.js
var droppable = $.ui.droppable;
/*!
* jQuery UI Effects 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/effects-core/
*/
$.effects = {
effect: {}
};
/*!
* jQuery Color Animations v2.1.2
* https://github.com/jquery/jquery-color
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* Date: Wed Jan 16 08:47:09 2013 -0600
*/
(function( jQuery, undefined ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 147/257
8/2/25, 1:46 PM jquery-ui.js
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
parse: function( execResult ) {
return [
parseInt( execResult[ 1 ], 16 ),
parseInt( execResult[ 2 ], 16 ),
parseInt( execResult[ 3 ], 16 )
];
}
}, {
// this regex ignores A-F because it's compared against an
already lowercased string
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
parse: function( execResult ) {
return [
parseInt( execResult[ 1 ] + execResult[ 1 ], 16
),
parseInt( execResult[ 2 ] + execResult[ 2 ], 16
),
parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
];
}
}, {
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+
(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
space: "hsla",
parse: function( execResult ) {
return [
execResult[ 1 ],
execResult[ 2 ] / 100,
execResult[ 3 ] / 100,
execResult[ 4 ]
];
}
} ],
// jQuery.Color( )
color = jQuery.Color = function( color, green, blue, alpha ) {
return new jQuery.Color.fn.parse( color, green, blue, alpha );
},
spaces = {
rgba: {
props: {
red: {
idx: 0,
type: "byte"
},
green: {
idx: 1,
type: "byte"
},
blue: {
idx: 2,
type: "byte"
}
}
},
hsla: {
props: {
hue: {
idx: 0,
type: "degrees"
},
saturation: {
idx: 1,
type: "percent"
},
lightness: {
idx: 2,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 148/257
8/2/25, 1:46 PM jquery-ui.js
type: "percent"
}
}
}
},
propTypes = {
"byte": {
floor: true,
max: 255
},
"percent": {
max: 1
},
"degrees": {
mod: 360,
floor: true
}
},
support = color.support = {},
// colors = jQuery.Color.names
colors,
if ( value == null ) {
return (allowEmpty || !prop.def) ? null : prop.def;
}
if ( type.mod ) {
// we add mod before modding to make sure that negatives values
// get converted properly: -10 -> 350
return (value + type.mod) % type.mod;
}
// for now all property types without mod have min and max
return 0 > value ? 0 : type.max < value ? type.max : value;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 149/257
8/2/25, 1:46 PM jquery-ui.js
string = string.toLowerCase();
if ( values ) {
parsed = inst[ spaceName ]( values );
// named colors
return colors[ string ];
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 150/257
8/2/25, 1:46 PM jquery-ui.js
rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
});
return this;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 151/257
8/2/25, 1:46 PM jquery-ui.js
same = ( isCache[ prop.idx ] ===
localCache[ prop.idx ] );
return same;
}
});
}
return same;
});
return same;
},
_space: function() {
var used = [],
inst = this;
each( spaces, function( spaceName, space ) {
if ( inst[ space.cache ] ) {
used.push( spaceName );
}
});
return used.pop();
},
transition: function( other, distance ) {
var end = color( other ),
spaceName = end._space(),
space = spaces[ spaceName ],
startColor = this.alpha() === 0 ? color( "transparent" ) : this,
start = startColor[ space.cache ] || space.to( startColor._rgba
),
result = start.slice();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 152/257
8/2/25, 1:46 PM jquery-ui.js
return ( 1 - a ) * blend[ i ] + a * v;
}));
},
toRgbaString: function() {
var prefix = "rgba(",
rgba = jQuery.map( this._rgba, function( v, i ) {
return v == null ? ( i > 2 ? 1 : 0 ) : v;
});
if ( rgba[ 3 ] === 1 ) {
rgba.pop();
prefix = "rgb(";
}
// catch 1 and 2
if ( i && i < 3 ) {
v = Math.round( v * 100 ) + "%";
}
return v;
});
if ( hsla[ 3 ] === 1 ) {
hsla.pop();
prefix = "hsl(";
}
return prefix + hsla.join() + ")";
},
toHexString: function( includeAlpha ) {
var rgba = this._rgba.slice(),
alpha = rgba.pop();
if ( includeAlpha ) {
rgba.push( ~~( alpha * 255 ) );
}
function hue2rgb( p, q, h ) {
h = ( h + 1 ) % 1;
if ( h * 6 < 1 ) {
return p + ( q - p ) * h * 6;
}
if ( h * 2 < 1) {
return q;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 153/257
8/2/25, 1:46 PM jquery-ui.js
}
if ( h * 3 < 2 ) {
return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
}
return p;
}
return [
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
Math.round( hue2rgb( p, q, h ) * 255 ),
Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
a
];
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 154/257
8/2/25, 1:46 PM jquery-ui.js
var ret,
type = jQuery.type( value ),
arr = ( type === "array" || type === "object" ) ? value :
arguments,
local = this[ cache ].slice();
if ( from ) {
ret = color( from( local ) );
ret[ cache ] = local;
return ret;
} else {
return color( local );
}
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 155/257
8/2/25, 1:46 PM jquery-ui.js
};
});
});
value = value.toRgbaString();
}
try {
elem.style[ hook ] = value;
} catch( e ) {
// wrapped to prevent IE from throwing errors on
"invalid" values like 'auto' or 'inherit'
}
}
};
jQuery.fx.step[ hook ] = function( fx ) {
if ( !fx.colorInit ) {
fx.start = color( fx.elem, hook );
fx.end = color( fx.end );
fx.colorInit = true;
}
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition(
fx.end, fx.pos ) );
};
});
};
color.hook( stepHooks );
jQuery.cssHooks.borderColor = {
expand: function( value ) {
var expanded = {};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 156/257
8/2/25, 1:46 PM jquery-ui.js
each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
expanded[ "border" + part + "Color" ] = value;
});
return expanded;
}
};
_default: "#ffffff"
};
})( jQuery );
/******************************************************************************/
/****************************** CLASS ANIMATIONS ******************************/
/******************************************************************************/
(function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 157/257
8/2/25, 1:46 PM jquery-ui.js
elem.currentStyle,
styles = {};
return styles;
}
return diff;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 158/257
8/2/25, 1:46 PM jquery-ui.js
// map all animated objects again - calculate new styles and diff
allAnimations = allAnimations.map(function() {
this.end = getElementStyles( this.el[ 0 ] );
this.diff = styleDifference( this.start, this.end );
return this;
});
$.fn.extend({
addClass: (function( orig ) {
return function( classNames, speed, easing, callback ) {
return speed ?
$.effects.animateClass.call( this,
{ add: classNames }, speed, easing, callback ) :
orig.apply( this, arguments );
};
})( $.fn.addClass ),
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 159/257
8/2/25, 1:46 PM jquery-ui.js
return function( classNames, speed, easing, callback ) {
return arguments.length > 1 ?
$.effects.animateClass.call( this,
{ remove: classNames }, speed, easing, callback )
:
orig.apply( this, arguments );
};
})( $.fn.removeClass ),
})();
/******************************************************************************/
/*********************************** EFFECTS **********************************/
/******************************************************************************/
(function() {
$.extend( $.effects, {
version: "1.11.1",
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 160/257
8/2/25, 1:46 PM jquery-ui.js
just assume
// empty string since it's likely to be a more common
value...
if ( val === undefined ) {
val = "";
}
element.css( set[ i ], val );
}
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 161/257
8/2/25, 1:46 PM jquery-ui.js
active = document.activeElement;
// support: Firefox
// Firefox incorrectly exposes anonymous content
// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
try {
active.id;
} catch( e ) {
active = document.body;
}
element.wrap( wrapper );
if ( element.parent().is( ".ui-effects-wrapper" ) ) {
element.parent().replaceWith( element );
return element;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 162/257
8/2/25, 1:46 PM jquery-ui.js
if ( unit[ 0 ] > 0 ) {
value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
}
});
return value;
}
});
// convert to an object
effect = { effect: effect };
return effect;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 163/257
8/2/25, 1:46 PM jquery-ui.js
return true;
}
// Complete callback
if ( $.isFunction( option ) ) {
return true;
}
$.fn.extend({
effect: function( /* effect, options, speed, callback */ ) {
var args = _normalizeArguments.apply( this, arguments ),
mode = args.mode,
queue = args.queue,
effectMethod = $.effects.effect[ args.effect ];
if ( $.fx.off || !effectMethod ) {
// delegate to the original method (e.g., .show()) if possible
if ( mode ) {
return this[ mode ]( args.duration, args.complete );
} else {
return this.each( function() {
if ( args.complete ) {
args.complete.call( this );
}
});
}
}
function done() {
if ( $.isFunction( complete ) ) {
complete.call( elem[0] );
}
if ( $.isFunction( next ) ) {
next();
}
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 164/257
8/2/25, 1:46 PM jquery-ui.js
if ( standardAnimationOption( option ) ) {
return orig.apply( this, arguments );
} else {
var args = _normalizeArguments.apply( this, arguments );
args.mode = "show";
return this.effect.call( this, args );
}
};
})( $.fn.show ),
// helper functions
cssUnit: function(key) {
var style = this.css( key ),
val = [];
})();
/******************************************************************************/
/*********************************** EASING ***********************************/
/******************************************************************************/
(function() {
$.extend( baseEasings, {
Sine: function( p ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 165/257
8/2/25, 1:46 PM jquery-ui.js
return 1 - Math.cos( p * Math.PI / 2 );
},
Circ: function( p ) {
return 1 - Math.sqrt( 1 - p * p );
},
Elastic: function( p ) {
return p === 0 || p === 1 ? p :
-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) *
Math.PI / 15 );
},
Back: function( p ) {
return p * p * ( 3 * p - 2 );
},
Bounce: function( p ) {
var pow2,
bounce = 4;
})();
/*!
* jQuery UI Effects Blind 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/blind-effect/
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 166/257
8/2/25, 1:46 PM jquery-ui.js
// if already wrapped, the wrapper's properties are my property. #6245
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
$.effects.save( el.parent(), props );
} else {
$.effects.save( el, props );
}
el.show();
wrapper = $.effects.createWrapper( el ).css({
overflow: "hidden"
});
// Animate
wrapper.animate( animation, {
duration: o.duration,
easing: o.easing,
queue: false,
complete: function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
};
/*!
* jQuery UI Effects Bounce 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/bounce-effect/
*/
// defaults:
mode = $.effects.setMode( el, o.mode || "effect" ),
hide = mode === "hide",
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 167/257
8/2/25, 1:46 PM jquery-ui.js
show = mode === "show",
direction = o.direction || "up",
distance = o.distance,
times = o.times || 5,
// utility:
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
motion = ( direction === "up" || direction === "left" ),
i,
upAnim,
downAnim,
if ( show ) {
downAnim = { opacity: 1 };
downAnim[ ref ] = 0;
downAnim = {};
downAnim[ ref ] = 0;
// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
for ( i = 0; i < times; i++ ) {
upAnim = {};
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 168/257
8/2/25, 1:46 PM jquery-ui.js
el.animate( upAnim, speed, easing );
}
el.queue(function() {
if ( hide ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
});
};
/*!
* jQuery UI Effects Clip 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/clip-effect/
*/
// Create Wrapper
wrapper = $.effects.createWrapper( el ).css({
overflow: "hidden"
});
animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
distance = animate[ size ]();
// Shift
if ( show ) {
animate.css( size, 0 );
animate.css( position, distance / 2 );
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 169/257
8/2/25, 1:46 PM jquery-ui.js
// Animate
animate.animate( animation, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( !show ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
};
/*!
* jQuery UI Effects Drop 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/drop-effect/
*/
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "opacity",
"height", "width" ],
mode = $.effects.setMode( el, o.mode || "hide" ),
show = mode === "show",
direction = o.direction || "left",
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
animation = {
opacity: show ? 1 : 0
},
distance;
// Adjust
$.effects.save( el, props );
el.show();
$.effects.createWrapper( el );
if ( show ) {
el
.css( "opacity", 0 )
.css( ref, motion === "pos" ? -distance : distance );
}
// Animation
animation[ ref ] = ( show ?
( motion === "pos" ? "+=" : "-=" ) :
( motion === "pos" ? "-=" : "+=" ) ) +
distance;
// Animate
el.animate( animation, {
queue: false,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 170/257
8/2/25, 1:46 PM jquery-ui.js
duration: o.duration,
easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
};
/*!
* jQuery UI Effects Explode 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/explode-effect/
*/
// loop
i, j, left, top, mx, my;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 171/257
8/2/25, 1:46 PM jquery-ui.js
.wrap( "<div></div>" )
.css({
position: "absolute",
visibility: "visible",
left: -j * width,
top: -i * height
})
function animComplete() {
el.css({
visibility: "visible"
});
$( pieces ).remove();
if ( !show ) {
el.hide();
}
done();
}
};
/*!
* jQuery UI Effects Fade 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/fade-effect/
*/
el.animate({
opacity: mode
}, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: done
});
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 172/257
8/2/25, 1:46 PM jquery-ui.js
/*!
* jQuery UI Effects Fold 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/fold-effect/
*/
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width"
],
mode = $.effects.setMode( el, o.mode || "hide" ),
show = mode === "show",
hide = mode === "hide",
size = o.size || 15,
percent = /([0-9]+)%/.exec( size ),
horizFirst = !!o.horizFirst,
widthFirst = show !== horizFirst,
ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
duration = o.duration / 2,
wrapper, distance,
animation1 = {},
animation2 = {};
// Create Wrapper
wrapper = $.effects.createWrapper( el ).css({
overflow: "hidden"
});
distance = widthFirst ?
[ wrapper.width(), wrapper.height() ] :
[ wrapper.height(), wrapper.width() ];
if ( percent ) {
size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
}
if ( show ) {
wrapper.css( horizFirst ? {
height: 0,
width: size
} : {
height: size,
width: 0
});
}
// Animation
animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
// Animate
wrapper
.animate( animation1, duration, o.easing )
.animate( animation2, duration, o.easing, function() {
if ( hide ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 173/257
8/2/25, 1:46 PM jquery-ui.js
done();
});
};
/*!
* jQuery UI Effects Highlight 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/highlight-effect/
*/
elem
.show()
.css({
backgroundImage: "none",
backgroundColor: o.color || "#ffff99"
})
.animate( animation, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
elem.hide();
}
$.effects.restore( elem, props );
done();
}
});
};
/*!
* jQuery UI Effects Size 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/size-effect/
*/
// Create element
var original, baseline, factor,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 174/257
8/2/25, 1:46 PM jquery-ui.js
el = $( this ),
props0 = [ "position", "top", "bottom", "left", "right", "width",
"height", "overflow", "opacity" ],
// Always restore
props1 = [ "position", "top", "bottom", "left", "right", "overflow",
"opacity" ],
// Set options
mode = $.effects.setMode( el, o.mode || "effect" ),
restore = o.restore || mode !== "effect",
scale = o.scale || "both",
origin = o.origin || [ "middle", "center" ],
position = el.css( "position" ),
props = restore ? props0 : props1,
zero = {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 175/257
8/2/25, 1:46 PM jquery-ui.js
);
}
// Adjust
if (origin) { // Calculate baseline shifts
baseline = $.effects.getBaseline( origin, original );
el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
}
el.css( el.from ); // set top & left
// Animate
if ( scale === "content" || scale === "both" ) { // Scale the children
// Add margins/font-size
vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
hProps = hProps.concat([ "marginLeft", "marginRight" ]);
props2 = props0.concat(vProps).concat(hProps);
child.from = {
height: c_original.height * factor.from.y,
width: c_original.width * factor.from.x,
outerHeight: c_original.outerHeight * factor.from.y,
outerWidth: c_original.outerWidth * factor.from.x
};
child.to = {
height: c_original.height * factor.to.y,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 176/257
8/2/25, 1:46 PM jquery-ui.js
width: c_original.width * factor.to.x,
outerHeight: c_original.height * factor.to.y,
outerWidth: c_original.width * factor.to.x
};
// Animate children
child.css( child.from );
child.animate( child.to, o.duration, o.easing, function() {
// Restore children
if ( restore ) {
$.effects.restore( child, props2 );
}
});
});
}
// Animate
el.animate( el.to, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( el.to.opacity === 0 ) {
el.css( "opacity", el.from.opacity );
}
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
if ( !restore ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 177/257
8/2/25, 1:46 PM jquery-ui.js
return val + toRef + "px";
});
});
}
}
$.effects.removeWrapper( el );
done();
}
});
};
/*!
* jQuery UI Effects Scale 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/scale-effect/
*/
// Create element
var el = $( this ),
options = $.extend( true, {}, o ),
mode = $.effects.setMode( el, o.mode || "effect" ),
percent = parseInt( o.percent, 10 ) ||
( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 :
100 ) ),
direction = o.direction || "both",
origin = o.origin,
original = {
height: el.height(),
width: el.width(),
outerHeight: el.outerHeight(),
outerWidth: el.outerWidth()
},
factor = {
y: direction !== "horizontal" ? (percent / 100) : 1,
x: direction !== "vertical" ? (percent / 100) : 1
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 178/257
8/2/25, 1:46 PM jquery-ui.js
outerWidth: original.outerWidth * factor.x
};
// Animate
el.effect( options );
};
/*!
* jQuery UI Effects Puff 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/puff-effect/
*/
$.extend( o, {
effect: "scale",
queue: false,
fade: true,
mode: mode,
complete: done,
percent: hide ? percent : 100,
from: hide ?
original :
{
height: original.height * factor,
width: original.width * factor,
outerHeight: original.outerHeight * factor,
outerWidth: original.outerWidth * factor
}
});
elem.effect( o );
};
/*!
* jQuery UI Effects Pulsate 1.11.1
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 179/257
8/2/25, 1:46 PM jquery-ui.js
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/pulsate-effect/
*/
if ( show || !elem.is(":visible")) {
elem.css( "opacity", 0 ).show();
animateTo = 1;
}
elem.animate({
opacity: animateTo
}, duration, o.easing);
elem.queue(function() {
if ( hide ) {
elem.hide();
}
done();
});
// We just queued up "anims" animations, we need to put them next in the queue
if ( queuelen > 1 ) {
queue.splice.apply( queue,
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
}
elem.dequeue();
};
/*!
* jQuery UI Effects Shake 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/shake-effect/
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 180/257
8/2/25, 1:46 PM jquery-ui.js
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width"
],
mode = $.effects.setMode( el, o.mode || "effect" ),
direction = o.direction || "left",
distance = o.distance || 20,
times = o.times || 3,
anims = times * 2 + 1,
speed = Math.round( o.duration / anims ),
ref = (direction === "up" || direction === "down") ? "top" : "left",
positiveMotion = (direction === "up" || direction === "left"),
animation = {},
animation1 = {},
animation2 = {},
i,
// Animation
animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
// Animate
el.animate( animation, speed, o.easing );
// Shakes
for ( i = 1; i < times; i++ ) {
el.animate( animation1, speed, o.easing ).animate( animation2, speed,
o.easing );
}
el
.animate( animation1, speed, o.easing )
.animate( animation, speed / 2, o.easing )
.queue(function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
});
};
/*!
* jQuery UI Effects Slide 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 181/257
8/2/25, 1:46 PM jquery-ui.js
* http://jquery.org/license
*
* http://api.jqueryui.com/slide-effect/
*/
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "width", "height"
],
mode = $.effects.setMode( el, o.mode || "show" ),
show = mode === "show",
direction = o.direction || "left",
ref = (direction === "up" || direction === "down") ? "top" : "left",
positiveMotion = (direction === "up" || direction === "left"),
distance,
animation = {};
// Adjust
$.effects.save( el, props );
el.show();
distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true
);
$.effects.createWrapper( el ).css({
overflow: "hidden"
});
if ( show ) {
el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -
distance) : distance );
}
// Animation
animation[ ref ] = ( show ?
( positiveMotion ? "+=" : "-=") :
( positiveMotion ? "-=" : "+=")) +
distance;
// Animate
el.animate( animation, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
};
/*!
* jQuery UI Effects Transfer 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/transfer-effect/
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 182/257
8/2/25, 1:46 PM jquery-ui.js
/*!
* jQuery UI Progressbar 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/progressbar/
*/
change: null,
complete: null
},
min: 0,
_create: function() {
// Constrain initial value
this.oldValue = this.options.value = this._constrainedValue();
this.element
.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-
all" )
.attr({
// Only set static values, aria-valuenow and aria-
valuemax are
// set inside _refreshValue()
role: "progressbar",
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 183/257
8/2/25, 1:46 PM jquery-ui.js
"aria-valuemin": this.min
});
this._refreshValue();
},
_destroy: function() {
this.element
.removeClass( "ui-progressbar ui-widget ui-widget-content ui-
corner-all" )
.removeAttr( "role" )
.removeAttr( "aria-valuemin" )
.removeAttr( "aria-valuemax" )
.removeAttr( "aria-valuenow" );
this.valueDiv.remove();
},
// sanitize value
if ( typeof newValue !== "number" ) {
newValue = 0;
}
this._super( options );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 184/257
8/2/25, 1:46 PM jquery-ui.js
},
_percentage: function() {
return this.indeterminate ? 100 : 100 * ( this.options.value - this.min )
/ ( this.options.max - this.min );
},
_refreshValue: function() {
var value = this.options.value,
percentage = this._percentage();
this.valueDiv
.toggle( this.indeterminate || value > this.min )
.toggleClass( "ui-corner-right", value === this.options.max )
.width( percentage.toFixed(0) + "%" );
this.element.toggleClass( "ui-progressbar-indeterminate",
this.indeterminate );
if ( this.indeterminate ) {
this.element.removeAttr( "aria-valuenow" );
if ( !this.overlayDiv ) {
this.overlayDiv = $( "<div class='ui-progressbar-
overlay'></div>" ).appendTo( this.valueDiv );
}
} else {
this.element.attr({
"aria-valuemax": this.options.max,
"aria-valuenow": value
});
if ( this.overlayDiv ) {
this.overlayDiv.remove();
this.overlayDiv = null;
}
}
/*!
* jQuery UI Selectable 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/selectable/
*/
// callbacks
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 185/257
8/2/25, 1:46 PM jquery-ui.js
selected: null,
selecting: null,
start: null,
stop: null,
unselected: null,
unselecting: null
},
_create: function() {
var selectees,
that = this;
this.element.addClass("ui-selectable");
this.dragged = false;
this.selectees = selectees.addClass("ui-selectee");
this._mouseInit();
_destroy: function() {
this.selectees
.removeClass("ui-selectee")
.removeData("selectable-item");
this.element
.removeClass("ui-selectable ui-selectable-disabled");
this._mouseDestroy();
},
_mouseStart: function(event) {
var that = this,
options = this.options;
if (this.options.disabled) {
return;
}
this._trigger("start", event);
$(options.appendTo).append(this.helper);
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 186/257
8/2/25, 1:46 PM jquery-ui.js
// position helper (lasso)
this.helper.css({
"left": event.pageX,
"top": event.pageY,
"width": 0,
"height": 0
});
if (options.autoRefresh) {
this.refresh();
}
this.selectees.filter(".ui-selected").each(function() {
var selectee = $.data(this, "selectable-item");
selectee.startselected = true;
if (!event.metaKey && !event.ctrlKey) {
selectee.$element.removeClass("ui-selected");
selectee.selected = false;
selectee.$element.addClass("ui-unselecting");
selectee.unselecting = true;
// selectable UNSELECTING callback
that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
});
$(event.target).parents().addBack().each(function() {
var doSelect,
selectee = $.data(this, "selectable-item");
if (selectee) {
doSelect = (!event.metaKey && !event.ctrlKey) ||
!selectee.$element.hasClass("ui-selected");
selectee.$element
.removeClass(doSelect ? "ui-unselecting" : "ui-
selected")
.addClass(doSelect ? "ui-selecting" : "ui-
unselecting");
selectee.unselecting = !doSelect;
selectee.selecting = doSelect;
selectee.selected = doSelect;
// selectable (UN)SELECTING callback
if (doSelect) {
that._trigger("selecting", event, {
selecting: selectee.element
});
} else {
that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
return false;
}
});
},
_mouseDrag: function(event) {
this.dragged = true;
if (this.options.disabled) {
return;
}
var tmp,
that = this,
options = this.options,
x1 = this.opos[0],
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 187/257
8/2/25, 1:46 PM jquery-ui.js
y1 = this.opos[1],
x2 = event.pageX,
y2 = event.pageY;
this.selectees.each(function() {
var selectee = $.data(this, "selectable-item"),
hit = false;
if (hit) {
// SELECT
if (selectee.selected) {
selectee.$element.removeClass("ui-selected");
selectee.selected = false;
}
if (selectee.unselecting) {
selectee.$element.removeClass("ui-unselecting");
selectee.unselecting = false;
}
if (!selectee.selecting) {
selectee.$element.addClass("ui-selecting");
selectee.selecting = true;
// selectable SELECTING callback
that._trigger("selecting", event, {
selecting: selectee.element
});
}
} else {
// UNSELECT
if (selectee.selecting) {
if ((event.metaKey || event.ctrlKey) &&
selectee.startselected) {
selectee.$element.removeClass("ui-
selecting");
selectee.selecting = false;
selectee.$element.addClass("ui-
selected");
selectee.selected = true;
} else {
selectee.$element.removeClass("ui-
selecting");
selectee.selecting = false;
if (selectee.startselected) {
selectee.$element.addClass("ui-
unselecting");
selectee.unselecting = true;
}
// selectable UNSELECTING callback
that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 188/257
8/2/25, 1:46 PM jquery-ui.js
if (selectee.selected) {
if (!event.metaKey && !event.ctrlKey &&
!selectee.startselected) {
selectee.$element.removeClass("ui-
selected");
selectee.selected = false;
selectee.$element.addClass("ui-
unselecting");
selectee.unselecting = true;
// selectable UNSELECTING callback
that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
}
}
});
return false;
},
_mouseStop: function(event) {
var that = this;
this.dragged = false;
$(".ui-unselecting", this.element[0]).each(function() {
var selectee = $.data(this, "selectable-item");
selectee.$element.removeClass("ui-unselecting");
selectee.unselecting = false;
selectee.startselected = false;
that._trigger("unselected", event, {
unselected: selectee.element
});
});
$(".ui-selecting", this.element[0]).each(function() {
var selectee = $.data(this, "selectable-item");
selectee.$element.removeClass("ui-selecting").addClass("ui-
selected");
selectee.selecting = false;
selectee.selected = true;
selectee.startselected = true;
that._trigger("selected", event, {
selected: selectee.element
});
});
this._trigger("stop", event);
this.helper.remove();
return false;
}
});
/*!
* jQuery UI Selectmenu 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/selectmenu
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 189/257
8/2/25, 1:46 PM jquery-ui.js
var selectmenu = $.widget( "ui.selectmenu", {
version: "1.11.1",
defaultElement: "<select>",
options: {
appendTo: null,
disabled: null,
icons: {
button: "ui-icon-triangle-1-s"
},
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
width: null,
// callbacks
change: null,
close: null,
focus: null,
open: null,
select: null
},
_create: function() {
var selectmenuId = this.element.uniqueId().attr( "id" );
this.ids = {
element: selectmenuId,
button: selectmenuId + "-button",
menu: selectmenuId + "-menu"
};
this._drawButton();
this._drawMenu();
if ( this.options.disabled ) {
this.disable();
}
},
_drawButton: function() {
var that = this,
tabindex = this.element.attr( "tabindex" );
// Create button
this.button = $( "<span>", {
"class": "ui-selectmenu-button ui-widget ui-state-default ui-
corner-all",
tabindex: tabindex || this.options.disabled ? -1 : 0,
id: this.ids.button,
role: "combobox",
"aria-expanded": "false",
"aria-autocomplete": "list",
"aria-owns": this.ids.menu,
"aria-haspopup": "true"
})
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 190/257
8/2/25, 1:46 PM jquery-ui.js
.insertAfter( this.element );
$( "<span>", {
"class": "ui-icon " + this.options.icons.button
})
.prependTo( this.button );
this.buttonText = $( "<span>", {
"class": "ui-selectmenu-text"
})
.appendTo( this.button );
_drawMenu: function() {
var that = this;
// Create menu
this.menu = $( "<ul>", {
"aria-hidden": "true",
"aria-labelledby": this.ids.button,
id: this.ids.menu
});
// Wrap menu
this.menuWrap = $( "<div>", {
"class": "ui-selectmenu-menu ui-front"
})
.append( this.menu )
.appendTo( this._appendTo() );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 191/257
8/2/25, 1:46 PM jquery-ui.js
}
that.focusIndex = item.index;
that.button.attr( "aria-activedescendant",
that.menuItems.eq( item.index ).attr(
"id" ) );
}
})
.menu( "instance" );
refresh: function() {
this._refreshMenu();
this._setText( this.buttonText, this._getSelectedItem().text() );
if ( !this.options.width ) {
this._resizeButton();
}
},
_refreshMenu: function() {
this.menu.empty();
var item,
options = this.element.find( "option" );
if ( !options.length ) {
return;
}
this._parseOptions( options );
this._renderMenu( this.menu, this.items );
this.menuInstance.refresh();
this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" );
item = this._getSelectedItem();
// If this is the first time the menu is being opened, render the items
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 192/257
8/2/25, 1:46 PM jquery-ui.js
if ( !this.menuItems ) {
this._refreshMenu();
} else {
this.isOpen = true;
this._toggleAttr();
this._resizeMenu();
this._position();
_position: function() {
this.menuWrap.position( $.extend( { of: this.button },
this.options.position ) );
},
this.isOpen = false;
this._toggleAttr();
this._off( this.document );
widget: function() {
return this.button;
},
menuWidget: function() {
return this.menu;
},
currentOptgroup = item.optgroup;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 193/257
8/2/25, 1:46 PM jquery-ui.js
if ( item.disabled ) {
li.addClass( "ui-state-disabled" );
}
this._setText( li, item.label );
return li.appendTo( ul );
},
if ( this.isOpen ) {
item = this.menuItems.eq( this.focusIndex );
} else {
item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
filter += ":not(.ui-state-disabled)";
}
if ( next.length ) {
this.menuInstance.focus( event, next );
}
},
_getSelectedItem: function() {
return this.menuItems.eq( this.element[ 0 ].selectedIndex );
},
_documentClick: {
mousedown: function( event ) {
if ( !this.isOpen ) {
return;
}
_buttonEvents: {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 194/257
8/2/25, 1:46 PM jquery-ui.js
// Prevent text selection from being reset when interacting with the
selectmenu (#10144)
mousedown: function( event ) {
event.preventDefault();
},
click: "_toggle",
if ( preventDefault ) {
event.preventDefault();
}
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 195/257
8/2/25, 1:46 PM jquery-ui.js
var item = this.menuItems.eq( this.focusIndex );
if ( !item.hasClass( "ui-state-disabled" ) ) {
this._select( item.data( "ui-selectmenu-item" ), event );
}
},
this.close( event );
},
this.button.attr({
"aria-labelledby": id,
"aria-activedescendant": id
});
this.menu.attr( "aria-activedescendant", id );
},
_appendTo: function() {
var element = this.options.appendTo;
if ( element ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 196/257
8/2/25, 1:46 PM jquery-ui.js
element = element.jquery || element.nodeType ?
$( element ) :
this.document.find( element ).eq( 0 );
}
if ( !element || !element[ 0 ] ) {
element = this.element.closest( ".ui-front" );
}
if ( !element.length ) {
element = this.document[ 0 ].body;
}
return element;
},
_toggleAttr: function() {
this.button
.toggleClass( "ui-corner-top", this.isOpen )
.toggleClass( "ui-corner-all", !this.isOpen )
.attr( "aria-expanded", this.isOpen );
this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen );
this.menu.attr( "aria-hidden", !this.isOpen );
},
_resizeButton: function() {
var width = this.options.width;
if ( !width ) {
width = this.element.show().outerWidth();
this.element.hide();
}
this.button.outerWidth( width );
},
_resizeMenu: function() {
this.menu.outerWidth( Math.max(
this.button.outerWidth(),
// support: IE10
// IE10 wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping
this.menu.width( "" ).outerWidth() + 1
) );
},
_getCreateOptions: function() {
return { disabled: this.element.prop( "disabled" ) };
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 197/257
8/2/25, 1:46 PM jquery-ui.js
_destroy: function() {
this.menuWrap.remove();
this.button.remove();
this.element.show();
this.element.removeUniqueId();
this.label.attr( "for", this.ids.element );
}
});
/*!
* jQuery UI Slider 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/slider/
*/
options: {
animate: false,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: false,
step: 1,
value: 0,
values: null,
// callbacks
change: null,
slide: null,
start: null,
stop: null
},
_create: function() {
this._keySliding = false;
this._mouseSliding = false;
this._animateOff = true;
this._handleIndex = null;
this._detectOrientation();
this._mouseInit();
this.element
.addClass( "ui-slider" +
" ui-slider-" + this.orientation +
" ui-widget" +
" ui-widget-content" +
" ui-corner-all");
this._refresh();
this._setOption( "disabled", this.options.disabled );
this._animateOff = false;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 198/257
8/2/25, 1:46 PM jquery-ui.js
_refresh: function() {
this._createRange();
this._createHandles();
this._setupEvents();
this._refreshValue();
},
_createHandles: function() {
var i, handleCount,
options = this.options,
existingHandles = this.element.find( ".ui-slider-handle"
).addClass( "ui-state-default ui-corner-all" ),
handle = "<span class='ui-slider-handle ui-state-default ui-
corner-all' tabindex='0'></span>",
handles = [];
this.handle = this.handles.eq( 0 );
this.handles.each(function( i ) {
$( this ).data( "ui-slider-handle-index", i );
});
},
_createRange: function() {
var options = this.options,
classes = "";
if ( options.range ) {
if ( options.range === true ) {
if ( !options.values ) {
options.values = [ this._valueMin(),
this._valueMin() ];
} else if ( options.values.length &&
options.values.length !== 2 ) {
options.values = [ options.values[0],
options.values[0] ];
} else if ( $.isArray( options.values ) ) {
options.values = options.values.slice(0);
}
}
if ( !this.range || !this.range.length ) {
this.range = $( "<div></div>" )
.appendTo( this.element );
classes = "ui-slider-range" +
// note: this isn't the most fittingly semantic framework
class for this element,
// but worked best visually with a variety of themes
" ui-widget-header ui-corner-all";
} else {
this.range.removeClass( "ui-slider-range-min ui-slider-
range-max" )
// Handle range switching from true to min/max
.css({
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 199/257
8/2/25, 1:46 PM jquery-ui.js
"left": "",
"bottom": ""
});
}
this.range.addClass( classes +
( ( options.range === "min" || options.range === "max" )
? " ui-slider-range-" + options.range : "" ) );
} else {
if ( this.range ) {
this.range.remove();
}
this.range = null;
}
},
_setupEvents: function() {
this._off( this.handles );
this._on( this.handles, this._handleEvents );
this._hoverable( this.handles );
this._focusable( this.handles );
},
_destroy: function() {
this.handles.remove();
if ( this.range ) {
this.range.remove();
}
this.element
.removeClass( "ui-slider" +
" ui-slider-horizontal" +
" ui-slider-vertical" +
" ui-widget" +
" ui-widget-content" +
" ui-corner-all" );
this._mouseDestroy();
},
if ( o.disabled ) {
return false;
}
this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
};
this.elementOffset = this.element.offset();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 200/257
8/2/25, 1:46 PM jquery-ui.js
});
this._handleIndex = index;
closestHandle
.addClass( "ui-state-active" )
.focus();
offset = closestHandle.offset();
mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-
handle" );
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
top: event.pageY - offset.top -
( closestHandle.height() / 2 ) -
( parseInt( closestHandle.css("borderTopWidth"), 10 ) ||
0 ) -
( parseInt( closestHandle.css("borderBottomWidth"), 10 )
|| 0) +
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
};
if ( !this.handles.hasClass( "ui-state-hover" ) ) {
this._slide( event, index, normValue );
}
this._animateOff = true;
return true;
},
_mouseStart: function() {
return true;
},
return false;
},
this._handleIndex = null;
this._clickOffset = null;
this._animateOff = false;
return false;
},
_detectOrientation: function() {
this.orientation = ( this.options.orientation === "vertical" ) ?
"vertical" : "horizontal";
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 201/257
8/2/25, 1:46 PM jquery-ui.js
pixelMouse,
percentMouse,
valueTotal,
valueMouse;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 202/257
8/2/25, 1:46 PM jquery-ui.js
} );
otherVal = this.values( index ? 0 : 1 );
if ( allowed !== false ) {
this.values( index, newVal );
}
}
} else {
if ( newVal !== this.value() ) {
// A slide can be canceled by returning false from the
slide callback
allowed = this._trigger( "slide", event, {
handle: this.handles[ index ],
value: newVal
} );
if ( allowed !== false ) {
this.value( newVal );
}
}
}
},
//store the last changed value index for reference when handles
overlap
this._lastChangedValue = index;
return this._value();
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 203/257
8/2/25, 1:46 PM jquery-ui.js
if ( arguments.length > 1 ) {
this.options.values[ index ] = this._trimAlignValue( newValue );
this._refreshValue();
this._change( null, index );
return;
}
if ( arguments.length ) {
if ( $.isArray( arguments[ 0 ] ) ) {
vals = this.options.values;
newValues = arguments[ 0 ];
for ( i = 0; i < vals.length; i += 1 ) {
vals[ i ] = this._trimAlignValue( newValues[ i ]
);
this._change( null, i );
}
this._refreshValue();
} else {
if ( this.options.values && this.options.values.length )
{
return this._values( index );
} else {
return this.value();
}
}
} else {
return this._values();
}
},
if ( $.isArray( this.options.values ) ) {
valsLength = this.options.values.length;
}
switch ( key ) {
case "orientation":
this._detectOrientation();
this.element
.removeClass( "ui-slider-horizontal ui-slider-
vertical" )
.addClass( "ui-slider-" + this.orientation );
this._refreshValue();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 204/257
8/2/25, 1:46 PM jquery-ui.js
this._animateOff = true;
this._refreshValue();
this._change( null, 0 );
this._animateOff = false;
break;
case "values":
this._animateOff = true;
this._refreshValue();
for ( i = 0; i < valsLength; i += 1 ) {
this._change( null, i );
}
this._animateOff = false;
break;
case "min":
case "max":
this._animateOff = true;
this._refreshValue();
this._animateOff = false;
break;
case "range":
this._animateOff = true;
this._refresh();
this._animateOff = false;
break;
}
},
return val;
},
if ( arguments.length ) {
val = this.options.values[ index ];
val = this._trimAlignValue( val );
return val;
} else if ( this.options.values && this.options.values.length ) {
// .slice() creates a copy of the array
// this copy gets trimmed by min and max and then returned
vals = this.options.values.slice();
for ( i = 0; i < vals.length; i+= 1) {
vals[ i ] = this._trimAlignValue( vals[ i ] );
}
return vals;
} else {
return [];
}
},
// returns the step-aligned value that val is closest to, between (inclusive) min
and max
_trimAlignValue: function( val ) {
if ( val <= this._valueMin() ) {
return this._valueMin();
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 205/257
8/2/25, 1:46 PM jquery-ui.js
if ( val >= this._valueMax() ) {
return this._valueMax();
}
var step = ( this.options.step > 0 ) ? this.options.step : 1,
valModStep = (val - this._valueMin()) % step,
alignValue = val - valModStep;
_valueMin: function() {
return this.options.min;
},
_valueMax: function() {
return this.options.max;
},
_refreshValue: function() {
var lastValPercent, valPercent, value, valueMin, valueMax,
oRange = this.options.range,
o = this.options,
that = this,
animate = ( !this._animateOff ) ? o.animate : false,
_set = {};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 206/257
8/2/25, 1:46 PM jquery-ui.js
valPercent = ( valueMax !== valueMin ) ?
( value - valueMin ) / ( valueMax - valueMin ) *
100 :
0;
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] =
valPercent + "%";
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set,
o.animate );
_handleEvents: {
keydown: function( event ) {
var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index"
);
switch ( event.keyCode ) {
case $.ui.keyCode.HOME:
case $.ui.keyCode.END:
case $.ui.keyCode.PAGE_UP:
case $.ui.keyCode.PAGE_DOWN:
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
event.preventDefault();
if ( !this._keySliding ) {
this._keySliding = true;
$( event.target ).addClass( "ui-state-
active" );
allowed = this._start( event, index );
if ( allowed === false ) {
return;
}
}
break;
}
step = this.options.step;
if ( this.options.values && this.options.values.length ) {
curVal = newVal = this.values( index );
} else {
curVal = newVal = this.value();
}
switch ( event.keyCode ) {
case $.ui.keyCode.HOME:
newVal = this._valueMin();
break;
case $.ui.keyCode.END:
newVal = this._valueMax();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 207/257
8/2/25, 1:46 PM jquery-ui.js
break;
case $.ui.keyCode.PAGE_UP:
newVal = this._trimAlignValue(
curVal + ( ( this._valueMax() -
this._valueMin() ) / this.numPages )
);
break;
case $.ui.keyCode.PAGE_DOWN:
newVal = this._trimAlignValue(
curVal - ( (this._valueMax() -
this._valueMin()) / this.numPages ) );
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:
if ( curVal === this._valueMax() ) {
return;
}
newVal = this._trimAlignValue( curVal + step );
break;
case $.ui.keyCode.DOWN:
case $.ui.keyCode.LEFT:
if ( curVal === this._valueMin() ) {
return;
}
newVal = this._trimAlignValue( curVal - step );
break;
}
if ( this._keySliding ) {
this._keySliding = false;
this._stop( event, index );
this._change( event, index );
$( event.target ).removeClass( "ui-state-active" );
}
}
}
});
/*!
* jQuery UI Sortable 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/sortable/
*/
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 208/257
8/2/25, 1:46 PM jquery-ui.js
forceHelperSize: false,
grid: false,
handle: false,
helper: "original",
items: "> *",
opacity: false,
placeholder: false,
revert: false,
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
scope: "default",
tolerance: "intersect",
zIndex: 1000,
// callbacks
activate: null,
beforeStop: null,
change: null,
deactivate: null,
out: null,
over: null,
receive: null,
remove: null,
sort: null,
start: null,
stop: null,
update: null
},
_create: function() {
var o = this.options;
this.containerCache = {};
this.element.addClass("ui-sortable");
this._setHandleClassName();
//We're ready to go
this.ready = true;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 209/257
8/2/25, 1:46 PM jquery-ui.js
this._setHandleClassName();
}
},
_setHandleClassName: function() {
this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-
handle" );
$.each( this.items, function() {
( this.instance.options.handle ?
this.item.find( this.instance.options.handle ) :
this.item )
.addClass( "ui-sortable-handle" );
});
},
_destroy: function() {
this.element
.removeClass( "ui-sortable ui-sortable-disabled" )
.find( ".ui-sortable-handle" )
.removeClass( "ui-sortable-handle" );
this._mouseDestroy();
return this;
},
if (this.reverting) {
return false;
}
//Find out if the clicked node (or one of its parents) is a actual item
in this.items
$(event.target).parents().each(function() {
if($.data(this, that.widgetName + "-item") === that) {
currentItem = $(this);
return false;
}
});
if($.data(event.target, that.widgetName + "-item") === that) {
currentItem = $(event.target);
}
if(!currentItem) {
return false;
}
if(this.options.handle && !overrideHandle) {
$(this.options.handle,
currentItem).find("*").addBack().each(function() {
if(this === event.target) {
validHandle = true;
}
});
if(!validHandle) {
return false;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 210/257
8/2/25, 1:46 PM jquery-ui.js
}
}
this.currentItem = currentItem;
this._removeCurrentsFromItems();
return true;
},
var i, body,
o = this.options;
this.currentContainer = this;
/*
* - Position generation -
* This block generates everything position related - it's the core of
draggables.
*/
$.extend(this.offset, {
click: { //Where the click happened, relative to the element
left: event.pageX - this.offset.left,
top: event.pageY - this.offset.top
},
parent: this._getParentOffset(),
relative: this._getRelativeOffset() //This is a relative to
absolute position minus the actual position calculation - only used for relative
positioned helper
});
// Only after we got the offset, we can change the helper's position to
absolute
// TODO: Still need to figure out a way to make relative sorting possible
this.helper.css("position", "absolute");
this.cssPosition = this.helper.css("position");
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 211/257
8/2/25, 1:46 PM jquery-ui.js
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
//If the helper is not the original, hide the original so it's not
playing any role during the drag, won't cause anything bad this way
if(this.helper[0] !== this.currentItem[0]) {
this.currentItem.hide();
}
// support: IE
this.storedCursor = body.css( "cursor" );
body.css( "cursor", o.cursor );
//Prepare scrolling
if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !==
"HTML") {
this.overflowOffset = this.scrollParent.offset();
}
//Call callbacks
this._trigger("start", event, this._uiHash());
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 212/257
8/2/25, 1:46 PM jquery-ui.js
if($.ui.ddmanager) {
$.ui.ddmanager.current = this;
}
this.dragging = true;
this.helper.addClass("ui-sortable-helper");
this._mouseDrag(event); //Execute the drag once - this causes the helper
not to be visible before getting its correct position
return true;
},
_mouseDrag: function(event) {
var i, item, itemElement, intersection,
o = this.options,
scrolled = false;
if (!this.lastPositionAbs) {
this.lastPositionAbs = this.positionAbs;
}
//Do scrolling
if(this.options.scroll) {
if(this.scrollParent[0] !== document &&
this.scrollParent[0].tagName !== "HTML") {
if((this.overflowOffset.top +
this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
this.scrollParent[0].scrollTop = scrolled =
this.scrollParent[0].scrollTop + o.scrollSpeed;
} else if(event.pageY - this.overflowOffset.top <
o.scrollSensitivity) {
this.scrollParent[0].scrollTop = scrolled =
this.scrollParent[0].scrollTop - o.scrollSpeed;
}
if((this.overflowOffset.left +
this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
this.scrollParent[0].scrollLeft = scrolled =
this.scrollParent[0].scrollLeft + o.scrollSpeed;
} else if(event.pageX - this.overflowOffset.left <
o.scrollSensitivity) {
this.scrollParent[0].scrollLeft = scrolled =
this.scrollParent[0].scrollLeft - o.scrollSpeed;
}
} else {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 213/257
8/2/25, 1:46 PM jquery-ui.js
scrolled =
$(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
} else if($(window).width() - (event.pageX -
$(document).scrollLeft()) < o.scrollSensitivity) {
scrolled =
$(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
}
//Rearrange
for (i = this.items.length - 1; i >= 0; i--) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 214/257
8/2/25, 1:46 PM jquery-ui.js
//Call callbacks
this._trigger("sort", event, this._uiHash());
this.lastPositionAbs = this.positionAbs;
return false;
},
if(!event) {
return;
}
//If we are using droppables, inform the manager about the drop
if ($.ui.ddmanager && !this.options.dropBehaviour) {
$.ui.ddmanager.drop(this, event);
}
if(this.options.revert) {
var that = this,
cur = this.placeholder.offset(),
axis = this.options.axis,
animation = {};
return false;
},
cancel: function() {
if(this.dragging) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 215/257
8/2/25, 1:46 PM jquery-ui.js
this.currentItem.css(this._storedCSS).removeClass("ui-
sortable-helper");
} else {
this.currentItem.show();
}
if (this.placeholder) {
//$(this.placeholder[0]).remove(); would have been the jQuery way
- unfortunately, it unbinds ALL events from the original node!
if(this.placeholder[0].parentNode) {
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
}
if(this.options.helper !== "original" && this.helper &&
this.helper[0].parentNode) {
this.helper.remove();
}
$.extend(this, {
helper: null,
dragging: false,
reverting: false,
_noFinalSort: null
});
if(this.domPosition.prev) {
$(this.domPosition.prev).after(this.currentItem);
} else {
$(this.domPosition.parent).prepend(this.currentItem);
}
}
return this;
},
serialize: function(o) {
$(items).each(function() {
var res = ($(o.item || this).attr(o.attribute || "id") ||
"").match(o.expression || (/(.+)[\-=_](.+)/));
if (res) {
str.push((o.key || res[1]+"[]")+"="+(o.key &&
o.expression ? res[1] : res[2]));
}
});
return str.join("&");
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 216/257
8/2/25, 1:46 PM jquery-ui.js
},
toArray: function(o) {
o = o || {};
},
var x1 = this.positionAbs.left,
x2 = x1 + this.helperProportions.width,
y1 = this.positionAbs.top,
y2 = y1 + this.helperProportions.height,
l = item.left,
r = l + item.width,
t = item.top,
b = t + item.height,
dyClick = this.offset.click.top,
dxClick = this.offset.click.left,
isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 +
dyClick ) > t && ( y1 + dyClick ) < b ),
isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 +
dxClick ) > l && ( x1 + dxClick ) < r ),
isOverElement = isOverElementHeight && isOverElementWidth;
}
},
_intersectsWithPointer: function(item) {
if (!isOverElement) {
return false;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 217/257
8/2/25, 1:46 PM jquery-ui.js
return this.floating ?
( ((horizontalDirection && horizontalDirection === "right") ||
verticalDirection === "down") ? 2 : 1 )
: ( verticalDirection && (verticalDirection === "down" ? 2 : 1)
);
},
_intersectsWithSides: function(item) {
},
_getDragVerticalDirection: function() {
var delta = this.positionAbs.top - this.lastPositionAbs.top;
return delta !== 0 && (delta > 0 ? "down" : "up");
},
_getDragHorizontalDirection: function() {
var delta = this.positionAbs.left - this.lastPositionAbs.left;
return delta !== 0 && (delta > 0 ? "right" : "left");
},
refresh: function(event) {
this._refreshItems(event);
this._setHandleClassName();
this.refreshPositions();
return this;
},
_connectWith: function() {
var options = this.options;
return options.connectWith.constructor === String ? [options.connectWith]
: options.connectWith;
},
_getItemsAsjQuery: function(connected) {
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) :
$(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-
placeholder"), inst]);
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 218/257
8/2/25, 1:46 PM jquery-ui.js
}
}
}
}
queries.push([$.isFunction(this.options.items) ?
this.options.items.call(this.element, null, { options: this.options, item:
this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-
helper").not(".ui-sortable-placeholder"), this]);
function addItems() {
items.push( this );
}
for (i = queries.length - 1; i >= 0; i--){
queries[i][0].each( addItems );
}
return $(items);
},
_removeCurrentsFromItems: function() {
},
_refreshItems: function(event) {
this.items = [];
this.containers = [this];
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0],
event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
this.containers.push(inst);
}
}
}
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 219/257
8/2/25, 1:46 PM jquery-ui.js
for (j=0, queriesLength = _queries.length; j < queriesLength;
j++) {
item = $(_queries[j]);
items.push({
item: item,
instance: targetData,
width: 0, height: 0,
left: 0, top: 0
});
}
}
},
refreshPositions: function(fast) {
//This has to be redone because due to the item being moved out/into the
offsetParent, the offsetParent's position will change
if(this.offsetParent && this.helper) {
this.offset.parent = this._getParentOffset();
}
var i, item, t, p;
t = this.options.toleranceElement ?
$(this.options.toleranceElement, item.item) : item.item;
if (!fast) {
item.width = t.outerWidth();
item.height = t.outerHeight();
}
p = t.offset();
item.left = p.left;
item.top = p.top;
}
return this;
},
_createPlaceholder: function(that) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 220/257
8/2/25, 1:46 PM jquery-ui.js
that = that || this;
var className,
o = that.options;
var nodeName =
that.currentItem[0].nodeName.toLowerCase(),
element = $( "<" + nodeName + ">",
that.document[0] )
.addClass(className ||
that.currentItem[0].className+" ui-sortable-placeholder")
.removeClass("ui-sortable-
helper");
that.currentItem.children().each(function() {
$( "<td> </td>",
that.document[0] )
.attr( "colspan", $( this
).attr( "colspan" ) || 1 )
.appendTo( element );
});
} else if ( nodeName === "img" ) {
element.attr( "src",
that.currentItem.attr( "src" ) );
}
if ( !className ) {
element.css( "visibility", "hidden" );
}
return element;
},
update: function(container, p) {
//Update the size of the placeholder (TODO: Logic to fuzzy, see line
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 221/257
8/2/25, 1:46 PM jquery-ui.js
316/317)
o.placeholder.update(that, that.placeholder);
},
_contactContainers: function(event) {
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur,
nearBottom, floating, axis,
innermostContainer = null,
innermostIndex = null;
if(this._intersectsWith(this.containers[i].containerCache)) {
innermostContainer = this.containers[i];
innermostIndex = i;
} else {
// container doesn't intersect. trigger "out" event if
necessary
if(this.containers[i].containerCache.over) {
this.containers[i]._trigger("out", event,
this._uiHash(this));
this.containers[i].containerCache.over = 0;
}
}
// move the item into the container if it's not there already
if(this.containers.length === 1) {
if (!this.containers[innermostIndex].containerCache.over) {
this.containers[innermostIndex]._trigger("over", event,
this._uiHash(this));
this.containers[innermostIndex].containerCache.over = 1;
}
} else {
//When entering a new container, we will find the item with the
least distance and append our item near it
dist = 10000;
itemWithLeastDistance = null;
floating = innermostContainer.floating ||
this._isFloating(this.currentItem);
posProperty = floating ? "left" : "top";
sizeProperty = floating ? "width" : "height";
axis = floating ? "clientX" : "clientY";
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 222/257
8/2/25, 1:46 PM jquery-ui.js
for (j = this.items.length - 1; j >= 0; j--) {
if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
continue;
}
if(this.items[j].item[0] === this.currentItem[0]) {
continue;
}
cur = this.items[j].item.offset()[posProperty];
nearBottom = false;
if ( event[ axis ] - cur > this.items[ j ][ sizeProperty
] / 2 ) {
nearBottom = true;
}
itemWithLeastDistance ? this._rearrange(event,
itemWithLeastDistance, null, true) : this._rearrange(event, null,
this.containers[innermostIndex].element, true);
this._trigger("change", event, this._uiHash());
this.containers[innermostIndex]._trigger("change", event,
this._uiHash(this));
this.currentContainer = this.containers[innermostIndex];
this.containers[innermostIndex]._trigger("over", event,
this._uiHash(this));
this.containers[innermostIndex].containerCache.over = 1;
}
},
_createHelper: function(event) {
var o = this.options,
helper = $.isFunction(o.helper) ?
$(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ?
this.currentItem.clone() : this.currentItem);
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 223/257
8/2/25, 1:46 PM jquery-ui.js
}
if(!helper[0].style.width || o.forceHelperSize) {
helper.width(this.currentItem.width());
}
if(!helper[0].style.height || o.forceHelperSize) {
helper.height(this.currentItem.height());
}
return helper;
},
_adjustOffsetFromHelper: function(obj) {
if (typeof obj === "string") {
obj = obj.split(" ");
}
if ($.isArray(obj)) {
obj = {left: +obj[0], top: +obj[1] || 0};
}
if ("left" in obj) {
this.offset.click.left = obj.left + this.margins.left;
}
if ("right" in obj) {
this.offset.click.left = this.helperProportions.width - obj.right
+ this.margins.left;
}
if ("top" in obj) {
this.offset.click.top = obj.top + this.margins.top;
}
if ("bottom" in obj) {
this.offset.click.top = this.helperProportions.height -
obj.bottom + this.margins.top;
}
},
_getParentOffset: function() {
return {
top: po.top +
(parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 224/257
8/2/25, 1:46 PM jquery-ui.js
left: po.left +
(parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
};
},
_getRelativeOffset: function() {
},
_cacheMargins: function() {
this.margins = {
left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
};
},
_cacheHelperProportions: function() {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
};
},
_setContainment: function() {
if(!(/^(document|window|parent)$/).test(o.containment)) {
ce = $(o.containment)[0];
co = $(o.containment).offset();
over = ($(ce).css("overflow") !== "hidden");
this.containment = [
co.left + (parseInt($(ce).css("borderLeftWidth"),10) ||
0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0)
+ (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) :
ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) -
(parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width -
this.margins.left,
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 225/257
8/2/25, 1:46 PM jquery-ui.js
co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight)
: ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) -
(parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height -
this.margins.top
];
}
},
if(!pos) {
pos = this.position;
}
var mod = d === "absolute" ? 1 : -1,
scroll = this.cssPosition === "absolute" && !
(this.scrollParent[0] !== document && $.contains(this.scrollParent[0],
this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
return {
top: (
pos.top +
// The absolute mouse position
this.offset.relative.top * mod +
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.top * mod -
// The offsetParent's offset without borders (offset + border)
( ( this.cssPosition === "fixed" ? -
this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
),
left: (
pos.left +
// The absolute mouse position
this.offset.relative.left * mod +
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.left * mod -
// The offsetParent's offset without borders (offset + border)
( ( this.cssPosition === "fixed" ? -
this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
)
};
},
_generatePosition: function(event) {
// This is another very weird special case that only happens for relative
elements:
// 1. If the css position is relative
// 2. and the scroll parent is the document or similar to the offset
parent
// we have to refresh the relative offset during the scroll so there are
no jumps
if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document
&& this.scrollParent[0] !== this.offsetParent[0])) {
this.offset.relative = this._getRelativeOffset();
}
/*
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 226/257
8/2/25, 1:46 PM jquery-ui.js
* - Position constraining -
* Constrain the position to a mix of grid, containment.
*/
if(this.containment) {
if(event.pageX - this.offset.click.left <
this.containment[0]) {
pageX = this.containment[0] +
this.offset.click.left;
}
if(event.pageY - this.offset.click.top <
this.containment[1]) {
pageY = this.containment[1] +
this.offset.click.top;
}
if(event.pageX - this.offset.click.left >
this.containment[2]) {
pageX = this.containment[2] +
this.offset.click.left;
}
if(event.pageY - this.offset.click.top >
this.containment[3]) {
pageY = this.containment[3] +
this.offset.click.top;
}
}
if(o.grid) {
top = this.originalPageY + Math.round((pageY -
this.originalPageY) / o.grid[1]) * o.grid[1];
pageY = this.containment ? ( (top - this.offset.click.top
>= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top :
((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top +
o.grid[1])) : top;
return {
top: (
pageY -
// The absolute mouse position
this.offset.click.top -
// Click offset (relative to the element)
this.offset.relative.top -
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.top +
// The offsetParent's offset without borders (offset + border)
( ( this.cssPosition === "fixed" ? -
this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
pageX -
// The absolute mouse position
this.offset.click.left -
// Click offset (relative to the element)
this.offset.relative.left -
// Only for relative positioned nodes: Relative offset from element to offset parent
this.offset.parent.left +
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 227/257
8/2/25, 1:46 PM jquery-ui.js
// The offsetParent's offset without borders (offset + border)
( ( this.cssPosition === "fixed" ? -
this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
)
};
},
a ? a[0].appendChild(this.placeholder[0]) :
i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ?
i.item[0] : i.item[0].nextSibling));
this._delay(function() {
if(counter === this.counter) {
this.refreshPositions(!hardRefresh); //Precompute after
each DOM insertion, NOT on mousemove
}
});
},
this.reverting = false;
// We delay all events that have to be triggered to after the point where
the placeholder has been removed and
// everything else normalized again
var i,
delayedTriggers = [];
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 228/257
8/2/25, 1:46 PM jquery-ui.js
this.currentItem.parent()[0]) && !noPropagation) {
delayedTriggers.push(function(event) { this._trigger("update",
event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
}
this.dragging = false;
if(this.cancelHelperRemoval) {
if(!noPropagation) {
this._trigger("beforeStop", event, this._uiHash());
for (i=0; i < delayedTriggers.length; i++) {
delayedTriggers[i].call(this, event);
} //Trigger all delayed events
this._trigger("stop", event, this._uiHash());
}
this.fromOutside = false;
return false;
}
if(!noPropagation) {
this._trigger("beforeStop", event, this._uiHash());
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 229/257
8/2/25, 1:46 PM jquery-ui.js
}
if(!noPropagation) {
for (i=0; i < delayedTriggers.length; i++) {
delayedTriggers[i].call(this, event);
} //Trigger all delayed events
this._trigger("stop", event, this._uiHash());
}
this.fromOutside = false;
return true;
},
_trigger: function() {
if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
this.cancel();
}
},
_uiHash: function(_inst) {
var inst = _inst || this;
return {
helper: inst.helper,
placeholder: inst.placeholder || $([]),
position: inst.position,
originalPosition: inst.originalPosition,
offset: inst.positionAbs,
item: inst.currentItem,
sender: _inst ? _inst.element : null
};
}
});
/*!
* jQuery UI Spinner 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/spinner/
*/
function spinner_modifier( fn ) {
return function() {
var previous = this.element.val();
fn.apply( this, arguments );
this._refresh();
if ( previous !== this.element.val() ) {
this._trigger( "change" );
}
};
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 230/257
8/2/25, 1:46 PM jquery-ui.js
version: "1.11.1",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
culture: null,
icons: {
down: "ui-icon-triangle-1-s",
up: "ui-icon-triangle-1-n"
},
incremental: true,
max: null,
min: null,
numberFormat: null,
page: 10,
step: 1,
change: null,
spin: null,
start: null,
stop: null
},
_create: function() {
// handle string values that need to be parsed
this._setOption( "max", this.options.max );
this._setOption( "min", this.options.min );
this._setOption( "step", this.options.step );
// Only format if there is a value, prevents the field from being marked
// as invalid in Firefox, see #9573.
if ( this.value() !== "" ) {
// Format the value, but don't constrain.
this._value( this.element.val(), true );
}
this._draw();
this._on( this._events );
this._refresh();
_getCreateOptions: function() {
var options = {},
element = this.element;
return options;
},
_events: {
keydown: function( event ) {
if ( this._start( event ) && this._keydown( event ) ) {
event.preventDefault();
}
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 231/257
8/2/25, 1:46 PM jquery-ui.js
keyup: "_stop",
focus: function() {
this.previous = this.element.val();
},
blur: function( event ) {
if ( this.cancelBlur ) {
delete this.cancelBlur;
return;
}
this._stop();
this._refresh();
if ( this.previous !== this.element.val() ) {
this._trigger( "change", event );
}
},
mousewheel: function( event, delta ) {
if ( !delta ) {
return;
}
if ( !this.spinning && !this._start( event ) ) {
return false;
}
// support: IE
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 232/257
8/2/25, 1:46 PM jquery-ui.js
// IE doesn't prevent moving focus even with
event.preventDefault()
// so we set a flag to know when we should ignore the blur event
// and check (again) if focus moved off of the input.
this.cancelBlur = true;
this._delay(function() {
delete this.cancelBlur;
checkFocus.call( this );
});
_draw: function() {
var uiSpinner = this.uiSpinner = this.element
.addClass( "ui-spinner-input" )
.attr( "autocomplete", "off" )
.wrap( this._uiSpinnerHtml() )
.parent()
// add buttons
.append( this._buttonHtml() );
// button bindings
this.buttons = uiSpinner.find( ".ui-spinner-button" )
.attr( "tabIndex", -1 )
.button()
.removeClass( "ui-corner-all" );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 233/257
8/2/25, 1:46 PM jquery-ui.js
keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.UP:
this._repeat( null, 1, event );
return true;
case keyCode.DOWN:
this._repeat( null, -1, event );
return true;
case keyCode.PAGE_UP:
this._repeat( null, options.page, event );
return true;
case keyCode.PAGE_DOWN:
this._repeat( null, -options.page, event );
return true;
}
return false;
},
_uiSpinnerHtml: function() {
return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-
all'></span>";
},
_buttonHtml: function() {
return "" +
"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
"<span class='ui-icon " + this.options.icons.up +
"'>▲</span>" +
"</a>" +
"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
"<span class='ui-icon " + this.options.icons.down +
"'>▼</span>" +
"</a>";
},
if ( !this.counter ) {
this.counter = 1;
}
this.spinning = true;
return true;
},
clearTimeout( this.timer );
this.timer = this._delay(function() {
this._repeat( 40, steps, event );
}, i );
if ( !this.counter ) {
this.counter = 1;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 234/257
8/2/25, 1:46 PM jquery-ui.js
_increment: function( i ) {
var incremental = this.options.incremental;
if ( incremental ) {
return $.isFunction( incremental ) ?
incremental( i ) :
Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i /
200 + 1 );
}
return 1;
},
_precision: function() {
var precision = this._precisionOf( this.options.step );
if ( this.options.min !== null ) {
precision = Math.max( precision, this._precisionOf(
this.options.min ) );
}
return precision;
},
return value;
},
clearTimeout( this.timer );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 235/257
8/2/25, 1:46 PM jquery-ui.js
clearTimeout( this.mousewheelTimer );
this.counter = 0;
this.spinning = false;
this._trigger( "stop", event );
},
_refresh: function() {
this.element.attr({
"aria-valuemin": this.options.min,
"aria-valuemax": this.options.max,
// TODO: what should we do with values that can't be parsed?
"aria-valuenow": this._parse( this.element.val() )
});
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 236/257
8/2/25, 1:46 PM jquery-ui.js
isValid: function() {
var value = this.value();
// null is invalid
if ( value === null ) {
return false;
}
_destroy: function() {
this.element
.removeClass( "ui-spinner-input" )
.prop( "disabled", false )
.removeAttr( "autocomplete" )
.removeAttr( "role" )
.removeAttr( "aria-valuemin" )
.removeAttr( "aria-valuemax" )
.removeAttr( "aria-valuenow" );
this.uiSpinner.replaceWith( this.element );
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 237/257
8/2/25, 1:46 PM jquery-ui.js
if ( !arguments.length ) {
return this._parse( this.element.val() );
}
spinner_modifier( this._value ).call( this, newVal );
},
widget: function() {
return this.uiSpinner;
}
});
/*!
* jQuery UI Tabs 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/tabs/
*/
// callbacks
activate: null,
beforeActivate: null,
beforeLoad: null,
load: null
},
_isLocal: (function() {
var rhash = /#.*$/;
// support: IE7
// IE7 doesn't normalize the href property when set via script
(#9317)
anchor = anchor.cloneNode( false );
_create: function() {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 238/257
8/2/25, 1:46 PM jquery-ui.js
var that = this,
options = this.options;
this.running = false;
this.element
.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
.toggleClass( "ui-tabs-collapsible", options.collapsible );
this._processTabs();
options.active = this._initialActive();
this._refresh();
if ( this.active.length ) {
this.load( options.active );
}
},
_initialActive: function() {
var active = this.options.active,
collapsible = this.options.collapsible,
locationHash = location.hash.substring( 1 );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 239/257
8/2/25, 1:46 PM jquery-ui.js
if ( active === -1 ) {
active = collapsible ? false : 0;
}
}
return active;
},
_getCreateEventData: function() {
return {
tab: this.active,
panel: !this.active.length ? $() : this._getPanelForTab(
this.active )
};
},
if ( this._handlePageNav( event ) ) {
return;
}
switch ( event.keyCode ) {
case $.ui.keyCode.RIGHT:
case $.ui.keyCode.DOWN:
selectedIndex++;
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.LEFT:
goingForward = false;
selectedIndex--;
break;
case $.ui.keyCode.END:
selectedIndex = this.anchors.length - 1;
break;
case $.ui.keyCode.HOME:
selectedIndex = 0;
break;
case $.ui.keyCode.SPACE:
// Activate only, no collapsing
event.preventDefault();
clearTimeout( this.activating );
this._activate( selectedIndex );
return;
case $.ui.keyCode.ENTER:
// Toggle (cancel delayed activation, allow collapsing)
event.preventDefault();
clearTimeout( this.activating );
// Determine if we should collapse or activate
this._activate( selectedIndex === this.options.active ?
false : selectedIndex );
return;
default:
return;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 240/257
8/2/25, 1:46 PM jquery-ui.js
// Navigating with control key will prevent automatic activation
if ( !event.ctrlKey ) {
// Update aria-selected immediately so that AT think the tab is
already selected.
// Otherwise AT may confuse the user by stating that they need to
activate the tab,
// but the tab will already be activated by the time the
announcement finishes.
focusedTab.attr( "aria-selected", "false" );
this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
this.activating = this._delay(function() {
this.option( "active", selectedIndex );
}, this.delay );
}
},
function constrain() {
if ( index > lastTabIndex ) {
index = 0;
}
if ( index < 0 ) {
index = lastTabIndex;
}
return index;
}
return index;
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 241/257
8/2/25, 1:46 PM jquery-ui.js
_setOption: function( key, value ) {
if ( key === "active" ) {
// _activate() will handle invalid values and update this.options
this._activate( value );
return;
}
refresh: function() {
var options = this.options,
lis = this.tablist.children( ":has(a[href])" );
this._processTabs();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 242/257
8/2/25, 1:46 PM jquery-ui.js
options.active = this.tabs.index( this.active );
}
this._refresh();
},
_refresh: function() {
this._setupDisabled( this.options.disabled );
this._setupEvents( this.options.event );
this._setupHeightStyle( this.options.heightStyle );
_processTabs: function() {
var that = this;
this.tablist = this._getList()
.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-
widget-header ui-corner-all" )
.attr( "role", "tablist" )
// support: IE <9
// Preventing the default action in mousedown doesn't prevent IE
// from focusing the element, so if the anchor gets focused,
blur.
// We don't have to worry about focusing the previously focused
// element since clicking on a non-focusable element should focus
// the body anyway.
.delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace,
function() {
if ( $( this ).closest( "li" ).is( ".ui-state-disabled" )
) {
this.blur();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 243/257
8/2/25, 1:46 PM jquery-ui.js
}
});
this.anchors = this.tabs.map(function() {
return $( "a", this )[ 0 ];
})
.addClass( "ui-tabs-anchor" )
.attr({
role: "presentation",
tabIndex: -1
});
this.panels = $();
this.anchors.each(function( i, anchor ) {
var selector, panel, panelId,
anchorId = $( anchor ).uniqueId().attr( "id" ),
tab = $( anchor ).closest( "li" ),
originalAriaControls = tab.attr( "aria-controls" );
// inline tab
if ( that._isLocal( anchor ) ) {
selector = anchor.hash;
panelId = selector.substring( 1 );
panel = that.element.find( that._sanitizeSelector(
selector ) );
// remote tab
} else {
// If the tab doesn't already have aria-controls,
// generate an id by using a throw-away element
panelId = tab.attr( "aria-controls" ) || $( {}
).uniqueId()[ 0 ].id;
selector = "#" + panelId;
panel = that.element.find( selector );
if ( !panel.length ) {
panel = that._createPanel( panelId );
panel.insertAfter( that.panels[ i - 1 ] ||
that.tablist );
}
panel.attr( "aria-live", "polite" );
}
if ( panel.length) {
that.panels = that.panels.add( panel );
}
if ( originalAriaControls ) {
tab.data( "ui-tabs-aria-controls", originalAriaControls
);
}
tab.attr({
"aria-controls": panelId,
"aria-labelledby": anchorId
});
panel.attr( "aria-labelledby", anchorId );
});
this.panels
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
.attr( "role", "tabpanel" );
},
// allow overriding how to find the list for rare usage scenarios (#7715)
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 244/257
8/2/25, 1:46 PM jquery-ui.js
_getList: function() {
return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
},
_createPanel: function( id ) {
return $( "<div>" )
.attr( "id", id )
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
.data( "ui-tabs-destroy", true );
},
// disable tabs
for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
$( li )
.addClass( "ui-state-disabled" )
.attr( "aria-disabled", "true" );
} else {
$( li )
.removeClass( "ui-state-disabled" )
.removeAttr( "aria-disabled" );
}
}
this.options.disabled = disabled;
},
this._focusable( this.tabs );
this._hoverable( this.tabs );
},
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 245/257
8/2/25, 1:46 PM jquery-ui.js
position = elem.css( "position" );
this.panels.each(function() {
$( this ).height( Math.max( 0, maxHeight -
$( this ).innerHeight() + $( this ).height() ) );
})
.css( "overflow", "auto" );
} else if ( heightStyle === "auto" ) {
maxHeight = 0;
this.panels.each(function() {
maxHeight = Math.max( maxHeight, $( this ).height( ""
).height() );
}).height( maxHeight );
}
},
event.preventDefault();
if ( tab.hasClass( "ui-state-disabled" ) ||
// tab is already loading
tab.hasClass( "ui-tabs-loading" ) ||
// can't switch durning an animation
this.running ||
// click on active header, but not collapsible
( clickedIsActive && !options.collapsible ) ||
// allow canceling activation
( this._trigger( "beforeActivate", event, eventData ) ===
false ) ) {
return;
}
if ( toShow.length ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 246/257
8/2/25, 1:46 PM jquery-ui.js
this.load( this.tabs.index( tab ), event );
}
this._toggle( event, eventData );
},
this.running = true;
function complete() {
that.running = false;
that._trigger( "activate", event, eventData );
}
function show() {
eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-
state-active" );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 247/257
8/2/25, 1:46 PM jquery-ui.js
return index;
},
_destroy: function() {
if ( this.xhr ) {
this.xhr.abort();
}
this.tablist
.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-
widget-header ui-corner-all" )
.removeAttr( "role" );
this.anchors
.removeClass( "ui-tabs-anchor" )
.removeAttr( "role" )
.removeAttr( "tabIndex" )
.removeUniqueId();
this.tablist.unbind( this.eventNamespace );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 248/257
8/2/25, 1:46 PM jquery-ui.js
.removeAttr( "aria-live" )
.removeAttr( "aria-busy" )
.removeAttr( "aria-selected" )
.removeAttr( "aria-labelledby" )
.removeAttr( "aria-hidden" )
.removeAttr( "aria-expanded" )
.removeAttr( "role" );
}
});
this.tabs.each(function() {
var li = $( this ),
prev = li.data( "ui-tabs-aria-controls" );
if ( prev ) {
li
.attr( "aria-controls", prev )
.removeData( "ui-tabs-aria-controls" );
} else {
li.removeAttr( "aria-controls" );
}
});
this.panels.show();
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 249/257
8/2/25, 1:46 PM jquery-ui.js
}
}
this._setupDisabled( disabled );
},
// not remote
if ( this._isLocal( anchor[ 0 ] ) ) {
return;
}
this.xhr
.success(function( response ) {
// support: jQuery <1.8
// http://bugs.jquery.com/ticket/11778
setTimeout(function() {
panel.html( response );
that._trigger( "load", event, eventData
);
}, 1 );
})
.complete(function( jqXHR, status ) {
// support: jQuery <1.8
// http://bugs.jquery.com/ticket/11778
setTimeout(function() {
if ( status === "abort" ) {
that.panels.stop( false, true );
}
tab.removeClass( "ui-tabs-loading" );
panel.removeAttr( "aria-busy" );
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 250/257
8/2/25, 1:46 PM jquery-ui.js
},
/*!
* jQuery UI Tooltip 1.11.1
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/tooltip/
*/
// callbacks
close: null,
open: null
},
if ( index !== -1 ) {
describedby.splice( index, 1 );
}
elem.removeData( "ui-tooltip-id" );
describedby = $.trim( describedby.join( " " ) );
if ( describedby ) {
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 251/257
8/2/25, 1:46 PM jquery-ui.js
elem.attr( "aria-describedby", describedby );
} else {
elem.removeAttr( "aria-describedby" );
}
},
_create: function() {
this._on({
mouseover: "open",
focusin: "open"
});
if ( this.options.disabled ) {
this._disable();
}
_disable: function() {
var that = this;
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 252/257
8/2/25, 1:46 PM jquery-ui.js
}
});
},
_enable: function() {
// restore title attributes
this.element.find( this.options.items ).addBack().each(function() {
var element = $( this );
if ( element.data( "ui-tooltip-title" ) ) {
element.attr( "title", element.data( "ui-tooltip-title" )
);
}
});
},
if ( target.attr( "title" ) ) {
target.data( "ui-tooltip-title", target.attr( "title" ) );
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 253/257
8/2/25, 1:46 PM jquery-ui.js
// ignore async response if tooltip was closed already
if ( !target.data( "ui-tooltip-open" ) ) {
return;
}
// IE may instantly serve a cached response for ajax requests
// delay this call to _open so the other call to _open runs first
that._delay(function() {
// jQuery creates a special event for focusin when it
doesn't
// exist natively. To improve performance, the native
event
// object is reused and the type is changed. Therefore,
we can't
// rely on the type being correct after the event
finished
// bubbling, so we set it back to the previous value.
(#8740)
if ( event ) {
event.type = eventType;
}
this._open( event, target, response );
});
});
if ( content ) {
this._open( event, target, content );
}
},
if ( !content ) {
return;
}
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 254/257
8/2/25, 1:46 PM jquery-ui.js
this.liveRegion.children().hide();
if ( content.clone ) {
a11yContent = content.clone();
a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
} else {
a11yContent = content;
}
$( "<div>" ).html( a11yContent ).appendTo( this.liveRegion );
this.hiding = false;
this.closing = false;
tooltip.hide();
events = {
keyup: function( event ) {
if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
var fakeEvent = $.Event(event);
fakeEvent.currentTarget = target[0];
this.close( fakeEvent, true );
}
}
};
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 255/257
8/2/25, 1:46 PM jquery-ui.js
events.focusout = "close";
}
this._on( true, target, events );
},
this._removeDescribedBy( target );
this.hiding = true;
tooltip.stop( true );
this._hide( tooltip, this.options.hide, function() {
that._removeTooltip( $( this ) );
this.hiding = false;
this.closing = false;
});
target.removeData( "ui-tooltip-open" );
this._off( target, "mouseleave focusout keyup" );
this.closing = true;
this._trigger( "close", event, { tooltip: tooltip } );
if ( !this.hiding ) {
this.closing = false;
}
},
$( "<div>" )
.addClass( "ui-tooltip-content" )
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 256/257
8/2/25, 1:46 PM jquery-ui.js
.appendTo( tooltip );
tooltip.appendTo( this.document[0].body );
this.tooltips[ id ] = element;
return tooltip;
},
_destroy: function() {
var that = this;
}));
file:///Users/ttak003/Zotero/storage/XGDPU88A/jquery-ui.js 257/257